Phone numbers API
Phone numbers and where their calls go.
The same operations are in the interactive API reference, and the whole contract is in the OpenAPI document.
GET/v1/numbers
List numbers
Returns every phone number the organization owns, each with where its calls go while the business is open and while it is closed. Needs numbers:read.
Paged, newest first: limit is 1 to 100 (default 50, out of range values are clamped) and cursor is the next_cursor of the previous page. The cursor is opaque and never built by the client; a cursor this API did not return is a 400. has_more is true while another page exists. There is no total. Free.
Each item says whether its routing is live, that is, whether a call reaching it today would actually be answered by the target, and if not, why. A number that points at a team with nobody on duty, or at a switched-off assistant, is not live.
A number whose configured is false shows routing derived from an older extension setting. It is accurate but cannot be edited until you route it once. A read_only number cannot be routed through the API.
Scope numbers:read. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | No | How many items to return. Default 50, at most 100. |
cursor | query | string | No | The `next_cursor` of the previous page. Opaque; never built by the client. |
GET/v1/numbers/{id}
Get a number
Returns one number and its routing. Needs numbers:read. Free.
Returns 404 when the id is not one of this organization's numbers, or belongs to the other mode (test versus live).
Scope numbers:read. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The resource id. |
PATCH/v1/numbers/{id}
Route a number
Sets who answers calls to this number while the business is open and, optionally, while it is closed. Needs numbers:write and the permission to manage numbers.
Both when_open and when_closed are targets: an assistant, a team, one member, an IVR menu, or take-a-message. The ids a target needs depend on its kind: team needs team_id, member needs member_id, menu needs menu_id, and a missing one is a 400. For assistant, leave assistant_id out to use the organization's default assistant, which is created on first use.
when_closed left out means the number behaves as in open hours; it does not keep an earlier closed-hours target, so send the full routing every time. The whole body replaces the old routing.
The change takes effect for calls that begin after it. In test mode only the sandbox routing changes. No credit is spent routing a number; calls the new routing then answers are charged as usual in live mode.
Repeating the same PATCH leaves the same result, so no Idempotency-Key is needed. The response reflects the new state, including whether it is live.
Scope numbers:write. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The resource id. |