Update a number

Updates a phone number's routing and settings. Fields you omit keep their current values.

Use it:

  • Send only the fields you want to change.
  • On an account that routes calls only through call flows, send call_flow_uuid to attach the number to a call flow or move it to another one (see below).

Notes:

  • Every change is recorded in the number's history.
  • Routing changes take effect right away: the number's routing is rebuilt and reloaded.
  • Sending destination_actions, even with its current value, gives the number routing of its own and detaches it from its call flow (except on call-flows-only accounts, below).
  • domain_uuid, provider_uuid, provider_verified, destination_enabled and domain_name are ignored, without an error.
  • Changing the number, its prefix or its match pattern is refused (403) if the result would match a number another account already uses. Re-sending the values they already hold is fine.
  • If a step after saving fails, the change is rolled back where possible, and the response says whether that worked.

Accounts that route calls only through call flows:

  • Every enabled number stays attached to a call flow.
  • call_flow_uuid attaches the number first; the rest of your update is saved after. The response's attached_flow names the flow.
  • A change that would leave an enabled number without a call flow needs call_flow_uuid. That's clearing its routing, or changing anything on a number that has no call flow yet. Without it, you get 409 flow_required and nothing changes.
  • No published call flow yet? The number is attached to a new call flow named "Default call flow", which simply hangs up. You can edit it like any other call flow.
  • The routing fields can't give the number routing of its own here (409 legacy_routing_retired).
  • Disabled numbers never need a call flow, and neither does changing only destination_hold_music.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

ID of the phone number to update. The format is not checked before the lookup.

Body Params
destination_actions
array of objects

Routing actions for the number. The first entry supplies the flat app and data, and the array is stored when both are present. Sending a non-null array detaches the number from any call flow.

destination_actions
string

Fax metadata, stored as sent.

number

Whether the number carries text messaging.

number

Whether the number is usable for emergency calling.

number

Sort order for the number.

string

Type of the destination.

string

The phone number itself.

string

Prefix stored with the number.

string

Match expression used to recognize the number on an inbound call.

string

Caller ID name sent with calls on this number. Trimmed.

string

Caller ID number sent with calls on this number.

string

Prefix added to the caller ID name. Trimmed.

string

Routing context the number belongs to.

string

Routing application for the number. Overrides the value derived from destination_actions.

string

Argument for the routing application. Overrides the value derived from destination_actions.

string

Free-text description of the number. Trimmed.

boolean

Whether calls on this number are recorded. Stored as the string true or false.

string

Alternate routing application.

string

Argument for the alternate routing application.

destination_hold_music

What callers to this number hear when they're put on hold. Takes a recording, music on hold, an internet stream or silence, as a sound reference: an object whose type is one of the types below. null plays the default hold music.

string

The number's own ID. It can be changed here, so send it only when you mean to.

string

ID of the routing entry associated with this number.

string

Fax account this number delivers to. Send an empty string to clear it.

string

User this number is assigned to. Send an empty string to clear it.

uuid

The call flow to attach the number to: one of your account's published call flows. Only for accounts that route calls only through call flows (others get 400 invalid_parameter). It attaches or moves the number even when the change doesn't need it.

Responses

401

Missing or invalid API key.

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json