connect_phone_number
Connect one of the organization’s free phone numbers to an agent, so calls to that number go to the agent. A number is free when it is active, not connected to another agent, and not used by an inbound campaign. Buying, porting or adding numbers happens in the VoiceAIWrapper app. This changes live call routing, so the AI app confirms the number and the agent with you first. Scope:agents.write · Hints: destructive
Inputs
string
required
The
agent_id from list_agents.string
The number to connect, as listed, for example
+14155550100. Formatting is ignored. Leave it out to get the list of free numbers.Returns
object
The agent:
id, name, url.string
inbound (answers calls) or outbound (makes calls).boolean
false when no number was given: pick one of free_numbers.string
The connected number, in E.164.
object[]
Only when no number was given: each free number’s
phone_number and label.Listing free numbers
Inbound and outbound agents
- Inbound agent: calls to the number go to the agent from now on.
- Outbound agent: the number becomes the agent’s, and calls to it go to the agent. The number an outbound agent calls from is picked by its campaign. Choose this number when you set up the campaign in the VoiceAIWrapper app.

