REST ClientPhone Numbers

set_relay_application

View as MarkdownOpen in Claude

Route inbound calls on this phone number to a named Relay application. The server auto-creates a relay_application Fabric resource referencing the application name.

This is a typed wrapper over update that sets call_handler to relay_application and populates call_relay_application for you.

Parameters

resource_id
strRequired

ID of the phone number to bind.

name
strRequired

Name of the Relay application to route calls to.

**extra
Any

Additional fields forwarded to update.

Returns

dict — The updated phone number resource.

Example

from signalwire.rest import RestClient
client = RestClient(
project="your-project-id",
token="your-api-token",
host="your-space.signalwire.com",
)
client.phone_numbers.set_relay_application(
"phone-number-id",
"my-relay-app",
)