Phone Number Addresses

Update the resource for a phone number

Renames a phone number address, re-points its channel to a different resource, or both; omitted fields keep their current values. The channel itself is fixed: handler_type can't be changed, so to hand a number's other channel to a resource, update that channel's own address. Renaming the address also renames the phone number.

A 422 response names the problem in its code:

  • invalid_parameter: name is not URL-safe or is longer than 256 characters.
  • provided_id_is_unrecognized: resource_id is not a resource in your project.
  • invalid_resource_type: the resource can't handle this address's channel.

<Warning title="Beta">This API is in beta and may change.</Warning>

Permissions

The API token used to authenticate must have the following scope(s) enabled to make a successful request: Calling, Fax, Messaging, or Video.

Learn more about API scopes.

patch/api/fabric/phone_number_addresses/{id}

Path parameters

idstring uuid required

Universal Unique Identifier.

Unique ID of a phone number address.

Request body

namestring

New name for the phone number address — lowercase letters, numbers, underscores, and hyphens only (no spaces or other special characters), up to 256 characters. Also renames the phone number. Defaults to the current value when omitted.

resource_idstring uuid

Universal Unique Identifier.

Example request

{
  "name": "renamed-support-number"
}

Response

The request has succeeded.

idstring uuid required

Universal Unique Identifier.

type'phone' required

The object type. Always phone.

handler_type'calling' | 'messaging' required

Sets the handler to handle incoming calls or messages.

resource_idstring uuid required

Universal Unique Identifier.

namestring required

Name of the phone number address.

phone_numberstring required

The phone number in E.164 format.

phone_number_idstring uuid required

Universal Unique Identifier.

created_atstring date-time required

Date and time when the phone number address was created.

updated_atstring date-time required

Date and time when the phone number address was last updated.

Example response

{
  "type": "phone",
  "name": "main-support-number",
  "phone_number": "+13105550100",
  "created_at": "2024-05-06T12:20:00Z",
  "updated_at": "2024-05-06T12:20:00Z"
}

Changes

Changed in 4 of the 161 revisions of this API.123

    • ○

      endpoint added

      endpoint-added

    • ▲

      api path removed without deprecation

      api-path-removed-without-deprecation

    This revision also has 9 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 525afaa1e83221See the full diff
    • ●

      changed the pattern of the request property from ^[a-z0-9]+(-[a-z0-9]+)*$ to ^[a-z0-9_]+(-[a-z0-9_]+)*$

      request-property-pattern-changed

    • ●

      added the new phone enum value to the response property for the response status

      response-property-enum-value-added

    • ○

      removed the phone_number_address enum value from the response property for the response status

      response-property-enum-value-removed

    • ○

      endpoint added

      endpoint-added

Of the 161 revisions, 3 have a changelog that could not be searched.