Agents API

Get a connector by ID

get
https://api.dev.poly.ai/v1/agents/{agentId}/telephony/connectors/{connectorId}

Path Parameters

agentIdstringrequired
connectorIdstringrequired

Response

application/json

Successful response

ConnectorResponse

A connector: the voice, language, variant, and environment bundle
that handles incoming calls. Multiple phone numbers can share one
connector.

connectorIdstringrequired

Unique connector identifier

namestringrequired

Connector display name

accountIdstringrequired

Account this connector belongs to

projectIdstringrequired

Project this connector belongs to

clientEnvstringrequired

Client environment (sandbox, pre-release, live)

variantIdstringrequired

Assigned variant ID (empty string if unassigned)

asrLangCodestringrequired

ASR language code (e.g. en-US)

ttsLangCodestringrequired

TTS language code (e.g. en-US)

voiceNamestringrequired

Google TTS voice name (e.g. en-US-Neural2-A)

disableHandoffbooleanrequired

Whether call handoff is disabled

get/v1/agents/{agentId}/telephony/connectors/{connectorId}
 
application/json

Delete a connector and its phone numbers

delete
https://api.dev.poly.ai/v1/agents/{agentId}/telephony/connectors/{connectorId}

Path Parameters

agentIdstringrequired
connectorIdstringrequired

Response

application/json

Successful response

DeleteConnectorResponse

Summary of a connector deletion, including every phone number that
was released by the cascade.

deletedConnectorstringrequired

ID of the deleted connector

deletedPhoneNumbersarray[string]required

Phone numbers that were associated with the connector

delete/v1/agents/{agentId}/telephony/connectors/{connectorId}
 
application/json

Update a connector

patch
https://api.dev.poly.ai/v1/agents/{agentId}/telephony/connectors/{connectorId}

Path Parameters

agentIdstringrequired
connectorIdstringrequired

Body

application/json

UpdateConnectorBody

Partial update to a connector.

Only fields present in the request body are changed; absent fields are
left alone. Pass null to clear a value explicitly.

variantIdstring

Variant ID to assign, or null to unassign

asrLangCodestring

ASR language code (e.g. en-US)

voiceNamestring

Google TTS voice name (e.g. en-US-Neural2-A). tts_lang_code is auto-derived from the voice name prefix. Validated via TTS probe.

projectIdstring

Move connector to a different project. API key must have access to both projects.

Response

application/json

Successful response

ConnectorResponse

A connector: the voice, language, variant, and environment bundle
that handles incoming calls. Multiple phone numbers can share one
connector.

connectorIdstringrequired

Unique connector identifier

namestringrequired

Connector display name

accountIdstringrequired

Account this connector belongs to

projectIdstringrequired

Project this connector belongs to

clientEnvstringrequired

Client environment (sandbox, pre-release, live)

variantIdstringrequired

Assigned variant ID (empty string if unassigned)

asrLangCodestringrequired

ASR language code (e.g. en-US)

ttsLangCodestringrequired

TTS language code (e.g. en-US)

voiceNamestringrequired

Google TTS voice name (e.g. en-US-Neural2-A)

disableHandoffbooleanrequired

Whether call handoff is disabled

patch/v1/agents/{agentId}/telephony/connectors/{connectorId}

Body

{}
 
application/json

List all phone numbers for a project

get
https://api.dev.poly.ai/v1/agents/{agentId}/telephony/phone-numbers

Query Parameters

connectorIdstring

Filter by connector ID

Path Parameters

agentIdstringrequired

Response

application/json

Successful response

GetPhoneNumbersResponse

Every phone number in the project, optionally filtered by connector.

phoneNumbersarray[object]required

A phone number owned by the project, plus the connector it routes incoming calls to.

Show Child Parameters
get/v1/agents/{agentId}/telephony/phone-numbers
 
application/json

Import phone numbers into a project

post
https://api.dev.poly.ai/v1/agents/{agentId}/telephony/phone-numbers

Path Parameters

agentIdstringrequired

Body

application/json

ImportPhoneNumbersBody

A batch of phone numbers to import, all sharing the same environment assignment.

phoneNumbersarray[string]required

List of phone numbers to import

>= 1 items

clientEnvstring

Client environment (sandbox, pre-release, live)

Default:live

Response

application/json

Successful response

ImportPhoneNumbersResponse

The set of phone numbers that were imported.

importedarray[string]required

List of successfully imported phone numbers

post/v1/agents/{agentId}/telephony/phone-numbers

Body

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