> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://poly-ai.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://poly-ai.ferndocs.com/_mcp/server.

# Twilio

> Connect your PolyAI agent to Twilio for voice automation and handoffs.

> **Note**
>
> For basic Twilio number and SMS setup, see [Voice > Numbers > Twilio](/agent-studio/voice/numbers/twilio/overview).

Connect Twilio to your PolyAI project from Agent Studio. PolyAI uses your Twilio API credentials to automatically provision the SIP trunk(s) needed to route calls to your agent — you just bring your API keys and your own phone numbers.

## Quick setup

#### Open Integrations

In Agent Studio, go to **Integrations** and click **Connect** on the Twilio card.

![The Integrations page in Agent Studio showing available telephony providers including Twilio.](/_fern-files/_img/35b0bf2ca3b0326a350e6a60adf5812cc63e490bae8e2580e07be76b183d78a2.webp)

#### Enter your Twilio account credentials

In the **Step 1: Twilio account credentials** panel, paste:

* **API Key**
* **API Secret**
* **Account SID**

![The Twilio account credentials panel showing fields for API Key, API Secret, and Account SID.](/_fern-files/_img/b1e2f34444110bad4093a2c5b8d27b4ccdb7cf546c31c8a6b51912d81e1dee66.webp)

PolyAI uses these to provision the SIP trunk(s) on your Twilio account. Click **Continue**.

#### Add your phone numbers

Add the Twilio numbers you want to route to PolyAI for **Sandbox**, **Pre-release**, and **Live**. Numbers must be in E.164 format with a country code (e.g. `+441234567890`).

#### Submit

PolyAI provisions the SIP trunk on your Twilio account and wires up routing per environment. You're then taken to **Voice > Handoffs** to configure transfers back to a human agent.

That's it — no manual TwiML, no PolyAI ticket, no shared SIP trunk to negotiate.

## Where to find your Twilio credentials

In the [Twilio Console](https://console.twilio.com/):

* **Account SID** — top of the **Account Info** panel on the dashboard.
* **API Key + API Secret** — **Account > API keys & tokens > Create API key**. The secret is shown once at creation; copy it before closing the dialog.

Use a Standard API key with permissions to manage SIP trunks on the account.

## Editing or removing the integration

* **Update routing** — re-open the Twilio card in **Integrations** to add or remove numbers per environment.
* **Disconnect** — use the **Disconnect** action on the integration. PolyAI removes the routing on its side and tears down the SIP trunk it provisioned.

## Configuring handoffs

After the integration is connected, configure how calls transfer back to human agents in **Voice > Handoffs**. See [Call handoffs](/agent-studio/voice/handoffs) for the full reference.

## Related pages

* [Voice > Numbers > Twilio](/agent-studio/voice/numbers/twilio/overview) — basic Twilio number and SMS setup
* [Call handoffs](/agent-studio/voice/handoffs) — configure transfer destinations
* [Voice integrations](/integrations/telephony/voice) — other voice platforms