Agents

Attach Agent Phone Number

Links a workspace phone number to an agent for inbound or outbound calls. The agent needs a published version and can have at most 3 numbers per direction. A number serves one agent per direction. Set move to true to detach it from its current agent and attach it here in one transaction; live calls, unfinished outbound batches, and active outbound workflows can block the move.

post/v1/agents/{agentId}/phone-numbers

Request

  • Base URL: https://api.dialnexa.com
  • URL: https://api.dialnexa.com/v1/agents/{agentId}/phone-numbers
  • Auth: HTTP bearer

Path parameters

agentIdstring required
Example:agent_2g7Xy3tY53gRlp

Agent ID from List Agents.

Request body

phone_number_idstring required

Organization phone number to attach

direction'inbound' | 'outbound' required
moveboolean

Move the number here when another agent holds it in this direction. That agent loses it in the same request, under the same rules as detaching it there.

Example request

{
  "phone_number_id": "phn_2g7Xy3tY53gRlp"
}

Response

Successful response.

successboolean required
errorboolean required
statusCodeinteger required
messagestring required
timestampstring date-time required

Example response

{
  "data": {
    "agent_id": "agent_2g7Xy3tY53gRlp",
    "phone_number_id": "phn_abc123"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.