POST
/
api
/
v1
/
assistants
/
{assistant_id}
/
phone-numbers
/
assign-by-number
{
  "success": true,
  "message": "<string>",
  "data": "<any>"
}
This endpoint assigns an available phone number from your organization to a specific assistant. The phone number must already exist within your organization’s pool of numbers and not be currently assigned to another assistant.

Path Parameters

  • assistant_id (string, required): The unique identifier of the assistant to whom the phone number will be assigned.

Request Body

  • phone_number (string, required): The phone number to assign, specified in E.164 format (e.g., +15551234567).
Request
{
  "phone_number": "+15551234567"
}

Response

A successful assignment will return the updated phone number object, which now includes the assistant_id.
Response
{
  "id": "pn_1a2b3c4d5e6f7g8h",
  "phone_number": "+15551234567",
  "assistant_id": "asst_a1b2c3d4e5f67890",
  "organization_id": "org_67890",
  "created_at": "2023-10-26T11:00:00Z",
  "updated_at": "2023-10-28T14:00:00Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

assistant_id
integer
required

Body

application/json

Schema for assigning a phone number to an assistant.

Response

200
application/json

Successful Response

Standard API response format.