The two-slot model
Every number stores two assignment slots:| Slot | Column | Applies to |
|---|---|---|
| Inbound | inbound_agent_version_id | Calls placed to the number |
| Outbound | outbound_agent_version_id | Calls placed from the number |
both. An empty slot means no agent handles that direction for that number.
Only published versions are assignable. The publish endpoint sets the version’s
published flag to true before it writes the assignment, so deploying a version always publishes it in the same call.Assign a version
Call the publish endpoint with the version you want live, the numbers to deploy to, and the direction.| Field | Type | Default | Description |
|---|---|---|---|
phone_numbers | array of strings | none | Numbers to deploy this version to. Omit to publish without changing assignments. |
unassign_phone_numbers | array of strings | none | Numbers to clear this agent from. |
direction | inbound | outbound | both | inbound | Which slot(s) to write or clear. |
agents:manage scope and returns the list of updated PhoneNumber records.
Direction values
| Value | Inbound slot | Outbound slot |
|---|---|---|
inbound | written | unchanged |
outbound | unchanged | written |
both | written | written |
Unassign a version
To remove an agent from a number, send the numbers underunassign_phone_numbers with the direction to clear. Only slots currently pointing at a version of this agent are cleared — slots holding a different agent are left untouched.
phone_numbers and unassign_phone_numbers. The response combines both result sets, deduplicated by number.
Editing from the Phone Numbers page
The Phone Numbers page provides an edit dialog as an alternate entry point to the same flow. For each number you pick an agent and version per side (Inbound and Outbound), and selecting None clears that side. Behind the dialog, choosing a version calls the same publish endpoint, and clearing a side calls the same unassign path — so the result is identical to driving the API directly.Related
Creating an agent
Build and publish the agent version you assign to a number.
Telephony overview
How numbers, calls, and agents fit together.

