v1

latestOpenAPI 3.1.02026-07-2687120159.0 KB

Send a message to an existing chat conversation

Sends a user message to an existing conversation and returns the agent's response.

post/{version}/{account_id}/{project_id}/chat/respond

Path parameters

versionstring required

API version

account_idstring required

Account ID

project_idstring required

Project ID

Headers

X-API-KEYstring required

Your PolyAI API key.

X-TOKENstring required

Agent authentication token (connector).

Request body

conversation_idstring required

ID of the conversation to respond to

messagestring

Message to send to the agent

Example request

{
  "conversation_id": "CONV-1234567890",
  "message": "Hello again"
}

Response

OK

conversation_idstring required

ID of the conversation

responsestring required

Response message from the agent

end_conversationboolean required

Whether the conversation should be ended

Example response

{
  "conversation_id": "CONV-1234567890",
  "response": "Transferring you to an agent.",
  "end_conversation": true,
  "handoff": {
    "destination": "live_agent_queue",
    "reason": "billing_question"
  }
}