For the complete documentation index, see llms.txt. Any page on this site can be fetched as Markdown by appending .md to its URL.

RoutingPhone numbers

Update a phone number

PUT
/v1/routing/phone-numbers/{phoneNumberId}

Change a phone number's label, route target, or variables. Only the fields you send are modified — omit a field to leave it as it is, and send an explicit null to clear it. Clearing the target unroutes the number, so inbound calls to it are no longer answered. The number itself cannot be changed after purchase; a request that includes phoneNumber is rejected.

Authorization

bearerAuth
AuthorizationBearer <token>

A Tandem bearer token. Requests are scoped to the organization the token belongs to; no organization header is required.

In: header

Path Parameters

phoneNumberId*string

The phone number's unique ID.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Every field is optional. An omitted field is left unchanged. A null clears the field — note that label is not nullable, because a phone number must always have one.

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/v1/routing/phone-numbers/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "label": "string",  "phoneNumber": "string",  "workflowId": "string",  "target": {    "type": "workflow",    "id": "string"  },  "variables": {    "property1": "string",    "property2": "string"  },  "recordCalls": "inherit",  "smsCapability": "enabled",  "mmsCapability": "enabled",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}