Skip to Content
Phone numbers

List phone numbers

Permissionphone-numbers:readAuthentication
GET
/phone-numbers

Returns phone numbers in deterministic reverse-creation order. Safe nullable fields are explicit nulls. Raw provider errors are never returned to API keys.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Use a Voice API key or connected-app OAuth access token. Authentication.

Query Parameters

cursor?string

Opaque pagination cursor from a previous response's next_cursor.

limit?integer

Number of catalog resources to return. The server fetches one extra row internally to produce next_cursor.

Range1 <= value <= 200
Default50
q?string

Case-insensitive literal substring search across slug, name, and description. The supplied and trimmed values must each contain 1–200 Unicode characters; blank values and every Unicode control character are rejected. Percent, underscore, and backslash are literal characters, not LIKE syntax.

Length1 <= length <= 200
created_from?string

Inclusive created_at lower bound as RFC3339 or YYYY-MM-DD (midnight UTC).

created_to?string

Exclusive created_at upper bound as RFC3339 or YYYY-MM-DD (midnight UTC). Must be after created_from.

archived?string

Whether archived resources are excluded, included alongside active resources, or returned exclusively.

Default"exclude"
Value in"exclude""include""only"
status?string

Exact status. status=archived requires archived=include or archived=only.

Value in"provisioning""active""error""archived"
direction?string
Value in"inbound""outbound""both"
transport?string
Value in"livekit_sip""twilio_media_streams"
trunk_id?string
Formatuuid
agent_id?string
Formatuuid
assignment?string
Value in"assigned""unassigned"
outbound_draining?boolean

Response Body

A phone-number page. next_cursor is null on the terminal page.

application/json
  1. response
data*array<>
next_cursor*string|null
Example Request
curl -X GET 'https://api.kejue.co/v1/phone-numbers'
Example Response
{  "data": [    {      "inbound_routing_rules": [        {          "header": "string",          "operator": "equals",          "value": "string",          "case_sensitive": false,          "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978"        }      ],      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "trunk_id": "d1c0247b-6570-4df5-9107-7986a22149d1",      "trunk_name": "string",      "e164": "string",      "label": "string",      "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",      "agent_slug": "string",      "flow_id": "0746f03b-16cc-49fb-9833-df3713d407d2",      "flow_slug": "string",      "group_id": "306db4e0-7449-4501-b76f-075576fe2d8f",      "group_name": "string",      "direction": "inbound",      "transport": "livekit_sip",      "livekit_inbound_trunk_id": "string",      "livekit_dispatch_rule_id": "string",      "status": "provisioning",      "last_error": "string",      "last_error_code": "string",      "archived_at": "2019-08-24T14:15:22Z",      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z",      "outbound_capacity_mode": "inherit",      "max_concurrent_outbound": 0,      "outbound_weight": 1,      "outbound_draining": true    }  ],  "next_cursor": "string"}