Conversations API

Add annotations to a conversation

post
https://api.dev.poly.ai/v1/agents/{agentId}/conversations/{conversationId}/annotation

Path Parameters

agentIdstringrequired
conversationIdstringrequired

Body

application/json

AddAnnotationsBody

Request body for adding annotations to a conversation.

annotationsarray[object]required

>= 1 items

Response

application/json

Successful response

OperationSuccessResponse

Minimal success payload for mutation endpoints.

successboolean

Default:true

post/v1/agents/{agentId}/conversations/{conversationId}/annotation

Body

{ "annotations": [ {} ] }
 
application/json

Get audio recording for a conversation

get
https://api.dev.poly.ai/v1/agents/{agentId}/conversations/{conversationId}/audio

Query Parameters

directionstring

Audio direction: “combined”, “user”, or “agent”

Allowed values:combineduseragent

Default:combined

redactedboolean

Whether to return redacted audio

Default:false

Path Parameters

agentIdstringrequired
conversationIdstringrequired

Response

audio/wav

Successful response

string(binary)
get/v1/agents/{agentId}/conversations/{conversationId}/audio
 
audio/wav

Upsert a note on a conversation

post
https://api.dev.poly.ai/v1/agents/{agentId}/conversations/{conversationId}/note

Path Parameters

agentIdstringrequired
conversationIdstringrequired

Body

application/json

UpsertNoteBody

Request body for upserting a note on a conversation.

notestringrequired

Response

application/json

Successful response

OperationSuccessResponse

Minimal success payload for mutation endpoints.

successboolean

Default:true

post/v1/agents/{agentId}/conversations/{conversationId}/note

Body

{ "note": "note" }
 
application/json

Create a new debug chat session

post
https://api.dev.poly.ai/v1/agents/{agentId}/debug-chat

Path Parameters

agentIdstringrequired

Body

application/json

CreateDebugChatBody

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

Response

application/json

Successful response

DebugChatResponse

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
post/v1/agents/{agentId}/debug-chat

Body

{ "clientEnv": "clientEnv" }
 
application/json

Send a message to a debug chat session

post
https://api.dev.poly.ai/v1/agents/{agentId}/debug-chat/{conversationId}

Path Parameters

agentIdstringrequired
conversationIdstringrequired

Body

application/json

RespondDebugChatBody

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

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.

messagestring

User input message

Default:

metadataobject

User input metadata

Response

application/json

Successful response

DebugChatResponse

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
post/v1/agents/{agentId}/debug-chat/{conversationId}

Body

{ "clientEnv": "clientEnv" }
 
application/json