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:nameis not URL-safe or is longer than 256 characters.provided_id_is_unrecognized:resource_idis not a resource in your project.invalid_resource_type: the resource can’t handle this address’s channel.
Permissions
The API token used to authenticate must have the following scope(s) enabled to make a successful request: Calling, Fax, Messaging, or Video.
Authentication
SignalWire Basic Authentication using Project ID and API Token.
The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password.
Example:
Authorization: Basic base64(project_id:token)
Path parameters
Request
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.
Response
The object type. Always phone.
The channel this address represents: calling for inbound calls or messaging for inbound messages. A phone number has one address per channel.
ID of the resource that handles this channel. null when no resource is assigned.