Conversations API

ChatMetadataResponse

object

Metadata returned with each chat response.

stateobjectrequired
currentNodestringrequired
nodeTracearray[string]required
metricsobjectrequired
functionEventsarrayrequired
handoffDestinationstring
retrievedTopicsarray[string]
retrievedSourcesarray[string]
citedTopicstring
inFlowstring
inStepstring
llmRequestsarray[object]
asrLangCodestring
ttsLangCodestring
Example

ConversationDetailResponse

object

Public-facing conversation detail (includes turns, metrics).

conversationIdstringrequired
accountIdstringrequired
projectIdstringrequired
createdAtstring
startedAtstring
finishedAtstring
channelstring
fromNumberstring
toNumberstring
languagestring
variantIdstring
clientEnvstring
totalDurationinteger
polyaiDurationinteger
durationinteger
inProgressboolean
handoffboolean
handoffDestinationstring
handoffReasonstring
directionstring
tagsarray[string]
polyScorenumber
shortSummarystring
deploymentIdstring
notestring
audioUrlstring
turnsarray[object]
metricsobject
functionEventsobject
Example

ConversationSummaryResponse

object

Public-facing conversation summary (used in list endpoint).

conversationIdstringrequired
accountIdstringrequired
projectIdstringrequired
createdAtstring
startedAtstring
finishedAtstring
channelstring
fromNumberstring
toNumberstring
languagestring
variantIdstring
clientEnvstring
totalDurationinteger
polyaiDurationinteger
durationinteger
inProgressboolean
handoffboolean
handoffDestinationstring
handoffReasonstring
directionstring
tagsarray[string]
polyScorenumber
shortSummarystring
deploymentIdstring
notestring
audioUrlstring
Example

CreateDebugChatBody

object

Starting parameters for a debug chat session: which agent variant,
which language codes, and which environment to run in.

clientEnvstringrequired

Client environment (sandbox, pre-release, live)

asrLangCodestring

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

ttsLangCodestring

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

conversationIdstring

Custom conversation ID. Auto-generated if omitted.

variantIdstring

Variant ID to use

channelstring

Channel type (e.g. chat.polyai)

integrationAttributesobject

Custom attributes accessible via conv.integration_attributes in project functions

Example

DebugChatResponse

object

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

conversationIdstringrequired
userInputstringrequired
responsestringrequired
metadataobjectrequired

Metadata returned with each chat response.

Show Child Parameters
conversationEndedbooleanrequired
delayedResponsebooleanrequired
Example