Skip to main content
POST
/
v1
/
chats
/
response
Chat Completion
curl --request POST \
  --url https://api.sigmamind.ai/v1/chats/response \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "chatId": "chat-nZ9hHYAANJbhLwZv",
  "input": "Where is my order?"
}
'
{
  "chatId": "chat-d17T6uReChpyfFeP",
  "createdAt": "2021-04-20T10:00:00.000Z",
  "status": "ended",
  "response": [
    {
      "id": "chat-item-G9YdhDqua0EngI1G",
      "role": "assistant",
      "type": "message",
      "content": [
        "Hello! My name is Grace, and I'm calling on behalf of SigmaMind AI. Am I speaking with Michael?"
      ]
    }
  ],
  "agent": {
    "name": "New AI Agent",
    "agentId": "D5D0p7TUs66TTAEAx",
    "status": "active"
  }
}

Authorizations

X-API-Key
string
header
required

API Key is required in header. You can find it in the settings

Body

application/json
chatId
string
required

The unique identifier of chat completion in specific agent.

Example:

"chat-nZ9hHYAANJbhLwZv"

input
string
required

Input message of the customer

Example:

"Where is my order?"

Response

OK

chatId
string

Unique identity for a chat

Example:

"chat-d17T6uReChpyfFeP"

createdAt
string<date-time>

The timestamp when the call record was created.

Example:

"2021-04-20T10:00:00.000Z"

status
enum<string>

Status of the chat

Available options:
in-progress, ended, error
Example:

"ended"

response
object[]

Agent response of the last user message

Example:
[
{
"id": "chat-item-G9YdhDqua0EngI1G",
"role": "assistant",
"type": "message",
"content": [
"Hello! My name is Grace, and I'm calling on behalf of SigmaMind AI. Am I speaking with Michael?"
]
}
]
agent
object

Assigned agent for current campaign