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": "Demo Agent",
    "agentId": "mJzLaPEo425lieb9",
    "status": "Testing"
  }
}

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 the chat session in a specific agent.

Required string length: 1 - 128
Example:

"chat-nZ9hHYAANJbhLwZv"

input
string
required

Input message from the customer.

Required string length: 1 - 20480
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

Example:
{
  "name": "Demo Agent",
  "agentId": "mJzLaPEo425lieb9",
  "status": "Testing"
}