Skip to main content
POST
Assign a phone number to a Voice Agent.

Authorizations

Authorization
string
header
required

Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token '

Body

application/json
voiceAgentId
string<uuid>
required

ID of the voice agent that answers the number.

Example:

"d949f13f-40d2-4e48-ac86-b66633070603"

phoneNumber
string
required

The number as you added it, for example +14155550100. Spaces are removed.

Example:

"+14155550100"

environmentId
string<uuid> | null

Environment the number answers from on this agent. Omit it (or send prod's id) for prod. A dev or staging environment needs deployments on. Only that environment's slot changes: a number already there is unassigned, the agent's other numbers stay.

Response

Successful response

success
boolean
Example:

true

message
string
Example:

"Success"

data
object