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.
namestringRequired
Name of the Fabric Address.
display_namestringRequired
Display name of the Fabric Address.
cover_urlstringRequired
Cover url of the Fabric Address.
preview_urlstringRequired
Preview url of the Fabric Address.
lockedbooleanRequired
Locks the Fabric Address. This is used to prevent the Fabric Address from accepting calls.
channelsobjectRequired
Channels of the Fabric Address.
created_atdatetimeRequired
Fabric Address Creation Date.
typeenumRequired
The display type of a fabric address pointing to an application.
Allowed values:

Response Example

Response
1{
2 "id": "691af061-cd86-4893-a605-173f47afc4c2",
3 "name": "justice-league",
4 "display_name": "Justice League",
5 "cover_url": "https://coverurl.com",
6 "preview_url": "https://previewurl.com",
7 "locked": true,
8 "channels": {
9 "audio": "/external/resource_name?channel=audio"
10 },
11 "created_at": "2024-05-06T12:20:00Z",
12 "type": "app"
13}

Example

1from signalwire.rest import RestClient
2
3client = RestClient(
4 project="your-project-id",
5 token="your-api-token",
6 host="your-space.signalwire.com",
7)
8
9result = client.fabric.resources.assign_phone_route(
10 "resource-id", phone_route_id="route-uuid", handler="calling",
11)
12print(f"Phone route assigned: {result['id']}")