Chat Completion
Submits a new customer message to an in_progress chat session and returns the agent’s reply. The session must be active — calls against an ended session will be rejected. Returns the agent’s response and updated session state.
Authorizations
Authenticate every request by passing your API key in the X-API-Key header. To get your key, go to Dashboard → API Keys and create or copy your Production API key.
Body
Response
OK
Unique identity for a chat
"chat_d17T6uReChpyfFeP"
The timestamp when the call record was created.
"2021-04-20T10:00:00.000Z"
Status of the chat
in_progress, ended, error "ended"
Agent response of the last user message
[
{
"id": "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 assigned to handle all calls in this campaign. Contains the agent's ID, name, and current status. All contacts in the campaign's contact list will be called using this agent.