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](/docs/platform/your-signalwire-api-space).
Request
This endpoint expects an object.
namestringOptionalformat: "^[a-z0-9_]+(-[a-z0-9_]+)*$"<=256 characters
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_idstringOptionalformat: "uuid"
ID of the resource that should handle the channel from now on. Must be a resource in your project of a type that can handle the address's channel. Defaults to the current value when omitted.
Response
The request has succeeded.
idstringformat: "uuid"
Unique identifier for the phone number address.
typeenum
The object type. Always phone.
handler_typeenum
The channel this address represents: calling for inbound calls or messaging for inbound messages. A phone number has one address per channel.
resource_idstring or nullformat: "uuid"
ID of the resource that handles this channel. null when no resource is assigned.
namestring
Name of the phone number address.
phone_numberstring
The phone number in E.164 format.
phone_number_idstringformat: "uuid"
ID of the phone number this address belongs to.
created_atdatetime
Date and time when the phone number address was created.
updated_atdatetime
Date and time when the phone number address was last updated.