Fabric

View as MarkdownOpen in Claude

The FabricNamespace provides access to all SignalWire Fabric resources through the RestClient. It organizes 16 sub-resources for managing AI agents, SWML scripts, RELAY applications, call flows, conference rooms, subscribers, SIP infrastructure, cXML resources, and authentication tokens.

Access via client.fabric on a RestClient instance.

1import { RestClient } from "@signalwire/sdk";
2
3const client = new RestClient({
4 project: "your-project-id",
5 token: "your-api-token",
6 host: "your-space.signalwire.com"
7});
8
9const agents = await client.fabric.aiAgents.list();
10for (const agent of agents.data ?? []) {
11 console.log(`${agent.display_name}: ${agent.id}`);
12}

Fabric resources use two update strategies. Resources like aiAgents, swmlWebhooks, sipGateways, and cxmlWebhooks use PATCH for partial updates. Resources like swmlScripts, relayApplications, callFlows, conferenceRooms, subscribers, and others use PUT for full replacement updates. The SDK handles this automatically.