Server SDKs
Build AI agents, control calls, send messages, and more
Assign a phone route to a Fabric resource.
format: "uuid"
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}
1import { RestClient } from "@signalwire/sdk";23const client = new RestClient({4 project: "your-project-id",5 token: "your-api-token",6 host: "your-space.signalwire.com"7});89const result = await client.fabric.resources.assignPhoneRoute("resource-id", {10 phone_route_id: "route-uuid",11 handler: "calling"12});13console.log(`Phone route assigned: ${result.id}`);