Agents
Detach Agent Phone Number
Detach a phone number from a DialNexa agent for inbound or outbound calls.
DELETE
Detach Agent Phone Number
Destructive
Detach an agent phone number to stop routing that number through the agent in one direction. The number stays in your workspace and can be attached to this or another agent later. A number linked for both directions keeps the direction you did not detach.
When to use this
- Move a number to another agent: detach it here, then attach it to the new agent.
- Free a slot: an agent can hold only three numbers per direction.
- Stop inbound routing: after an inbound detach, calls to the number no longer reach this agent.
Before you detach
The request is refused while the number is still in use:- Calls are live on the number.
- For an outbound detach, a batch that is running, paused, scheduled, or waiting dials from the number.
- For an outbound detach, an active workflow uses the number in a voice call step.
Detach agent phone number request
Verify the result
A200 response returns the closed link in data, with unlinked_at set and unlink_reason of manual. Call List Agent Phone Numbers to confirm the number is gone from that direction.
Errors and recovery
Refusals carry a code indata.code.
A retry after a successful detach returns
404 because the number is no longer linked in that direction.
Related endpoints
- Attach Agent Phone Number
- Get Agent Phone Number History
- Update Batch Call Status
- Update Workflow Status
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Agent ID from List Agents.
Example:
"agent_2g7Xy3tY53gRlp"
Phone number ID from List Agent Phone Numbers.
Example:
"phn_2g7Xy3tY53gRlp"
Query Parameters
The direction to detach. A number linked for both directions keeps the other one.
Available options:
inbound, outbound