POST

Assign Number to Agent

Assigns an owned phone number to an Agent.

POSThttps://api.vantaxai.com/v1/phone-numbers/{phone_number_id}/assign

Once assigned, inbound calls and messages to the number are handled by the Agent. A number maps to exactly one Agent, and an Agent can hold only one number at a time. The Agent must belong to the same sub-account as the number.

Headers

  • Authorizationstringrequired

    Bearer authentication with your secret API key.

    example: Bearer vx_live_3fa9c2…

  • Content-Typestringrequired

    Must be application/json for requests with a body.

    example: application/json

Path Parameters

  • phone_number_idstringrequired

    The phone number to assign.

    example: pn_55ad12

Body Parameters

  • agent_idstringrequired

    The Agent that will own the number.

    example: agt_3d9b21

Request

curl -X POST https://api.vantaxai.com/v1/phone-numbers/pn_55ad12/assign \
  -H "Authorization: Bearer vx_live_3fa9c2..." \
  -H "Content-Type: application/json" \
  -d '{
  "agent_id": "agt_3d9b21"
}'

Response

{
  "success": true,
  "message": "Agent assigned successfully",
  "data": {
    "id": "pn_55ad12",
    "number": "+14155550142",
    "country": "US",
    "source": "platform",
    "agent_id": "agt_3d9b21",
    "sub_account_id": "sub_8a1f4c2e",
    "capabilities": {
      "voice": true,
      "sms": true
    },
    "created_at": "2026-01-14T10:30:00Z"
  }
}