Compat

View as MarkdownOpen in Claude

The CompatNamespace provides a Twilio-compatible LAML REST API through the RestClient. It implements the familiar /2010-04-01/Accounts/{AccountSid}/ URL structure with 12 sub-resources, making it straightforward to migrate existing Twilio integrations to SignalWire.

Access via client.compat 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 calls = await client.compat.calls.list();

The Compat namespace uses the same REST patterns as Twilio’s API. If you are migrating from Twilio, most code changes are limited to updating the client initialization to use SignalWire credentials. Resource identifiers use SIDs (e.g., CA... for calls, SM... for messages).

Sub-resources