***

id: 59a0436c-0b74-4380-bb89-8d976cd6f312
title: Compatibility API
subtitle: A drop-in replacement for Twilio's TwiML and REST APIs
slug: /
position: 0
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

The SignalWire Compatibility API provides a seamless migration path from Twilio\* to SignalWire. If you've built applications using Twilio's TwiML, REST API, or helper libraries, you can transition to SignalWire with minimal code changes while gaining access to SignalWire's powerful infrastructure and competitive pricing.

## Quick start migration

Migrating from Twilio to SignalWire typically requires just three changes:

<Steps>
  <Step title="Update your credentials">
    Replace your Twilio Account SID and Auth Token with your SignalWire Project ID and API Token from your [SignalWire Dashboard](https://signalwire.com/signin).
  </Step>

  <Step title="Change the API endpoint">
    If using the Twilio REST API or SDK, update the base URL from `api.twilio.com` to `your-space.signalwire.com`, where `your-space` is your SignalWire Space name. This is not required if using the SignalWire Compatibility SDK.
  </Step>

  <Step title="Update webhook URLs">
    Point your phone number webhooks to your SignalWire Space. Your existing TwiML/cXML response handlers work without modification.
  </Step>
</Steps>

## What's included

The Compatibility API provides three main components:

<CardGroup cols={3}>
  <Card title="cXML" icon="https://files.buildwithfern.com/signalwire.docs.buildwithfern.com/docs/a62876b8ddb346c5817711eaf0ebc7e969625e7d5d4f564c090ed22030500bd3/assets/icons/cxml_file.svg" href="/docs/compatibility-api/cxml">
    SignalWire's XML-based language for controlling calls, messages, and faxes â€” directly compatible with Twilio's TwiML.
  </Card>

  <Card title="Client SDKs" icon="cube" href="/docs/compatibility-api/rest/client-sdks">
    Helper libraries for generating cXML and making REST API calls in your preferred language.
  </Card>

  <Card title="REST API" icon="fa-regular fa-rectangle-api" href="/docs/compatibility-api/rest">
    RESTful endpoints for managing calls, messages, phone numbers, recordings, and more.
  </Card>
</CardGroup>

## Migrating from Twilio

You can easily migrate from Twilio with minimal changes. Replace the Twilio client with the SignalWire client and update the `from` number to a valid SignalWire number.

<Warning title="Make sure to change the 'From' number!">
  When migrating to SignalWire, make sure to replace the `from` numbers with a valid SignalWire number.
</Warning>

```javascript {2-3}
// Replace these lines:
const twilio = require('twilio')
const response = new twilio.twiml.VoiceResponse()
```

```javascript {2-3}
// With:
const { RestClient } = require('@signalwire/compatibility-api')
const response = new RestClient.LaML.VoiceResponse()
```

```javascript title="Node.js"
// Now use response like you did before!
response.say('Hey, welcome to SignalWire!')
```

## Supported features

The Compatibility API supports the full range of Twilio-compatible features:

| Category          | Features                                                                               |
| ----------------- | -------------------------------------------------------------------------------------- |
| **Voice**         | Inbound/outbound calls, call control, conferencing, queues, recordings, transcriptions |
| **Messaging**     | SMS, MMS, status callbacks                                                             |
| **Fax**           | Send and receive faxes                                                                 |
| **Phone Numbers** | Purchase, configure, and manage phone numbers                                          |
| **Applications**  | Manage voice and messaging application configurations                                  |

<hr />

<p>
  *Twilio and TwiML are trademarks of Twilio, Inc. SignalWire, Inc. and its products are not affiliated with or endorsed by Twilio, Inc.
</p>