Create a new debug chat session
Authentication
X-API-KEYstring
PolyAI API key. Send it in the X-API-KEY header.
Path parameters
agentId
Request
This endpoint expects an object.
clientEnv
Client environment (sandbox, pre-release, live).
Allowed values:
asrLangCode
ASR language code (e.g. en-US). Defaults to server config.
ttsLangCode
TTS language code (e.g. en-US). Defaults to server config.
conversationId
Custom conversation ID. Auto-generated if omitted.
variantId
Variant ID to use
channel
Channel type (e.g. chat.polyai)
integrationAttributes
Custom attributes accessible via conv.integration_attributes in project functions.
Response
Successful response
conversationId
userInput
response
metadata
Metadata returned with each chat response.
conversationEnded
delayedResponse
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error

