Skip to navigation
REST ClientFabricResources

assign_phone_route

View as MarkdownOpen in Claude

Assign a phone route to a Fabric resource.

Path parameters

idstringRequiredformat: "uuid"
The unique identifier of the Resource.

Request

phone_route_idstringRequiredformat: "uuid"
The id of the phone route.
handlerenumRequired
Indicates if the resource should be assigned to a `calling` or `messaging` handler.
Allowed values:

Response

idstringRequiredformat: "uuid"
Unique ID of the Fabric Address.
resource_idstringRequiredformat: "uuid"
Unique ID of the resource the address routes to.
namestringRequired
Name of the Fabric Address.
display_namestringRequired
Display name of the Fabric Address.
cover_urlstring or nullRequired
Cover URL of the Fabric Address, or `null` when the resource has no cover image.
preview_urlstring or nullRequired
Preview URL of the Fabric Address, or `null` when no preview is available. Only Conference Room addresses return one, while a session with room previews enabled is in progress.
lockedbooleanRequired
Locks the Fabric Address. This is used to prevent the Fabric Address from accepting calls.
channelsobjectRequired
Channels of the Fabric Address.
canonical_uristring or nullRequired
The address in canonical form: `/<context>/<name>` for a resource address, `sip:<domain>` for a SIP address, or the E.164 number for a phone number or WhatsApp number address. `null` when the phone number, WhatsApp number, or SIP domain behind the address no longer exists.
typeenumRequired
The display type of a fabric address pointing to an application.
Allowed values:

Response Example

Response
{
"id": "691af061-cd86-4893-a605-173f47afc4c2",
"resource_id": "993ed018-9e79-4e50-b97b-984bd5534095",
"name": "justice-league",
"display_name": "Justice League",
"cover_url": "https://coverurl.com",
"preview_url": "https://previewurl.com",
"locked": true,
"channels": {
"audio": "/external/resource_name?channel=audio"
},
"canonical_uri": "/public/justice-league",
"type": "app"
}

Example

from signalwire.rest import RestClient
client = RestClient(
project="your-project-id",
token="your-api-token",
host="your-space.signalwire.com",
)
result = client.fabric.resources.assign_phone_route(
"resource-id", phone_route_id="route-uuid", handler="calling",
)
print(f"Phone route assigned: {result['id']}")