Skip to main content
POST
/
v1
/
agents
/
{agentId}
/
debug-chat
/
{conversationId}
Send a message to a debug chat session
curl --request POST \
  --url https://api.us.poly.ai/v1/agents/{agentId}/debug-chat/{conversationId} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "asrLangCode": "<string>",
  "ttsLangCode": "<string>",
  "message": "",
  "metadata": {}
}
'
{
  "conversationId": "<string>",
  "userInput": "<string>",
  "response": "<string>",
  "metadata": {
    "asrLangCode": "<string>",
    "ttsLangCode": "<string>",
    "agentResponseAudioUrl": "<string>"
  },
  "conversationEnded": true,
  "delayedResponse": true
}

Documentation Index

Fetch the complete documentation index at: https://docs.poly.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Contact your PolyAI representative.

Path Parameters

agentId
string
required

Agent ID.

conversationId
string
required

Debug chat session conversation ID returned by POST /v1/agents/{agentId}/debug-chat.

Body

application/json

A user turn sent into an existing debug chat session, with the runtime overrides that apply to this message.

clientEnv
enum<string>
required

Client environment (sandbox, pre-release, live).

Available options:
sandbox,
pre-release,
live
asrLangCode
string

ASR language code (e.g. en-US). Defaults to server config.

ttsLangCode
string

TTS language code (e.g. en-US). Defaults to server config.

message
string
default:""

User input message.

metadata
object

User input metadata.

Response

Successful response

A chat turn's result: the agent's reply text, the conversation's updated state, and whether the conversation has ended.

conversationId
string
required

ID of the debug chat session.

userInput
string
required

User input that produced this response.

response
string
required

Agent's reply text.

metadata
object
required

Metadata returned with each chat response.

conversationEnded
boolean
required

Whether the conversation has ended after this turn.

delayedResponse
boolean
required

Whether the agent's response was delayed (e.g. awaiting a long-running tool).

Last modified on June 1, 2026