Skip to main content
POST
/
api
/
agents
/
{agent_id}
/
unassign-phone-number
/
{phone_number_id}
Unassign Phone Number
curl --request POST \
  --url https://api.example.com/api/agents/{agent_id}/unassign-phone-number/{phone_number_id} \
  --header 'X-API-Key: <x-api-key>' \
  --header 'X-Organization-Id: <x-organization-id>'
{
  "success": true,
  "message": "Phone number unassigned successfully",
  "data": {
    "agent_id": "agent_a1b2c3d4e5f6",
    "agent_name": "Sales Rep",
    "assigned_phone_number_ids": [],
    "updated_at": "2024-01-20T15:00:00Z"
  }
}
Unassign a phone number from an agent.

Headers

X-API-Key
string
required
Your API key for authentication.
X-Organization-Id
string
required
The organization ID.

Path Parameters

agent_id
string
required
The unique identifier of the agent.
phone_number_id
string
required
The unique identifier of the phone number to unassign.

Permissions

  • phone_numbers:update (admin, agent_manager)

Response

success
boolean
Indicates if the unassignment was successful.
message
string
Human-readable success message.
data
object
The updated agent object.
{
  "success": true,
  "message": "Phone number unassigned successfully",
  "data": {
    "agent_id": "agent_a1b2c3d4e5f6",
    "agent_name": "Sales Rep",
    "assigned_phone_number_ids": [],
    "updated_at": "2024-01-20T15:00:00Z"
  }
}

Errors

404
object
Agent not found.
403
object
Access denied to agent.
400
object
Phone number not assigned to this agent.