Telephony

Route a number to an agent

Bind the number to an agent_id (or pass null to unassign) so inbound calls open that agent's Omni session. Requires the telephony:manage scope.

post/v1/telephony/numbers/{id}/assign

Request

  • Base URL: https://api.pyai.com
  • URL: https://api.pyai.com/v1/telephony/numbers/{id}/assign
  • Auth: one of:
    • HTTP bearer
    • API key in header x-api-key

Path parameters

idstring required

Request body

agent_idstring nullable

Agent to bind, or null to unassign.

Response

Updated

objectstring
idstring
phone_numberstring

E.164.

countrystring
area_codestring nullable
agent_idstring nullable

Agent that answers inbound calls to this number.

recordingboolean

Whether PyAI recording is enabled for the number.

monthly_cost_centsinteger
status'active' | 'released'
created_atinteger

Unix ms.

released_atinteger nullable

Unix ms.

Example response

{
  "object": "telephony.number",
  "id": "pn_...",
  "phone_number": "+14155550123",
  "country": "US",
  "area_code": "415"
}

Changes

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