Phone Numbers
Update Phone Number
Change the agent assigned to a phone number, set or clear the display nickname, or unassign routing without releasing the number.
PATCH
Update a phone number
Updates editable fields on a phone number provisioned on your workspace. The most common change is assigning or replacing the inbound agent; you can also set or clear the display
nickname so the number is easier to identify in dashboard selectors. Only the fields you include are updated, omitted fields keep their current values. This endpoint does not change the underlying carrier configuration, the E.164 number itself, or the monthly billing.
When to use this
- Assigning an agent for the first time after purchasing the number through Buy a Phone Number.
- Switching the inbound agent when handing the number to a different team or workflow.
- Renaming for clarity: set a
nicknameso dashboard users can pick the right number out of a long list. - Detaching routing: pass
agent_id: nullto stop routing inbound calls without releasing the number. Useful while you investigate an issue or while the new agent is being prepared.
Path parameters
| Parameter | Description |
|---|---|
id | The phone number ID, for example phn_f7w2kx5mb9qz. |
Body parameters
| Field | Description |
|---|---|
agent_id | New inbound agent ID, or null to detach. |
nickname | New display nickname. Pass null or empty string to clear. |
label | Free-form label for internal accounting. |
Request example
Errors
404 Not Foundis returned when the phone number does not exist on this workspace.400 Bad Requestis returned when the suppliedagent_iddoes not exist or is not eligible to be assigned to a number.
Request
Response
Related endpoints
- Get Phone Number: confirm new values.
- Buy a Phone Number: purchase a new number.
- Release a Number: return the number to the provider’s pool.
- Receive Inbound Calls: end-to-end inbound setup guide.
Authorizations
Pass your API key as a Bearer token in the Authorization header.
Path Parameters
Body
application/json
Response
Success.
Example:
"phn_abc123"
Example:
"+912234567890"
Example:
"Main Support Line"
Example:
"agt_abc123"
Phone number provisioning status.
Available options:
pending, active Example:
"active"
Example:
"twilio"
Example:
"2024-03-01T10:00:00.000Z"
Human-readable nickname shown in dashboard selectors and phone number tables.
Maximum string length:
255Example:
"Sales Line"
Update a phone number