> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modulex.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Twilio Voice Integration for AI Agents & Workflows

> Make and manage phone calls with Twilio Programmable Voice. Place outbound calls with TwiML instructions, list call logs, and retrieve call recordings.

{/* Self-hosted logo — build-time vendored from modulex.json / Iconify (see scripts/lib/logo.js). */}

<img src="https://mintcdn.com/modulexaillc/df8MOr-hXotYLTh5/logos/twilio-voice.svg?fit=max&auto=format&n=df8MOr-hXotYLTh5&q=85&s=119cd7daa2e4246436200db0c96846ca" alt="Twilio Voice logo" width="72" height="72" data-path="logos/twilio-voice.svg" />

## Overview

Add **Twilio Voice** to any ModuleX agent or workflow. Make and manage phone calls with Twilio Programmable Voice — place outbound calls driven by TwiML, list call logs, and retrieve call recordings against the Twilio REST API (`api.twilio.com/2010-04-01`).

<Info>
  **Categories**: Communication · Messaging · Text To Speech · **Auth**: Account SID & Auth Token · **Actions**: 3
</Info>

## Authentication

### Account SID & Auth Token

Authenticate with your Twilio Account SID and Auth Token using HTTP Basic authentication

<Steps>
  <Step title="Step 1">
    Sign in to the Twilio Console at [https://console.twilio.com](https://console.twilio.com)
  </Step>

  <Step title="Step 2">
    On the dashboard, find your Account SID (starts with 'AC')
  </Step>

  <Step title="Step 3">
    Reveal and copy your Auth Token
  </Step>

  <Step title="Step 4">
    Provide the Account SID and Auth Token below
  </Step>
</Steps>

#### Required Credentials

| Field              | Description                                     | Required | Format                               |
| ------------------ | ----------------------------------------------- | -------- | ------------------------------------ |
| Twilio Account SID | Your Twilio Account SID from the Twilio Console | Yes      | `ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` |
| Twilio Auth Token  | Your Twilio Auth Token from the Twilio Console  | Yes      | `your_auth_token`                    |

## Available Actions

<AccordionGroup>
  <Accordion title="make_call — Make an outbound phone call using the Twilio Voice API.">
    ### Parameters

    <ResponseField name="to" type="string" required>
      Phone number to call in E.164 format (e.g., +14155551234)
    </ResponseField>

    <ResponseField name="from_" type="string" required>
      Your Twilio phone number to call from in E.164 format (e.g., +14155559876)
    </ResponseField>

    <ResponseField name="account_sid" type="string" required>
      Twilio Account SID (starts with 'AC')
    </ResponseField>

    <ResponseField name="url" type="string">
      Webhook URL that returns TwiML instructions for the call
    </ResponseField>

    <ResponseField name="twiml" type="string">
      TwiML instructions to execute (raw XML, e.g. '\<Response>\<Say>Hello\</Say>\</Response>'). Provide this or 'url'.
    </ResponseField>

    <ResponseField name="status_callback" type="string">
      Webhook URL for call status updates
    </ResponseField>

    <ResponseField name="status_callback_method" type="string">
      HTTP method for the status callback (GET or POST)
    </ResponseField>

    <ResponseField name="record" type="boolean">
      Whether to record the call (Default: `false`)
    </ResponseField>

    <ResponseField name="recording_status_callback" type="string">
      Webhook URL for recording status updates
    </ResponseField>

    <ResponseField name="timeout" type="integer">
      Seconds to wait for an answer before giving up (default: 60)
    </ResponseField>

    <ResponseField name="machine_detection" type="string">
      Answering machine detection: 'Enable' or 'DetectMessageEnd'
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "call_sid": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Call Sid"
        },
        "status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Status"
        },
        "direction": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Direction"
        },
        "from_": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "From"
        },
        "to": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "To"
        },
        "duration": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Duration"
        },
        "price": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Price"
        },
        "price_unit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Price Unit"
        }
      },
      "required": [
        "success"
      ],
      "title": "MakeCallOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="list_calls — Retrieve a list of calls made to and from a Twilio account.">
    ### Parameters

    <ResponseField name="account_sid" type="string" required>
      Twilio Account SID (starts with 'AC')
    </ResponseField>

    <ResponseField name="to" type="string">
      Filter by calls to this phone number (E.164 format)
    </ResponseField>

    <ResponseField name="from_" type="string">
      Filter by calls from this phone number (E.164 format)
    </ResponseField>

    <ResponseField name="status" type="string">
      Filter by call status (queued, ringing, in-progress, completed, busy, failed, no-answer, canceled)
    </ResponseField>

    <ResponseField name="start_time_after" type="string">
      Filter calls that started on or after this date (YYYY-MM-DD)
    </ResponseField>

    <ResponseField name="start_time_before" type="string">
      Filter calls that started on or before this date (YYYY-MM-DD)
    </ResponseField>

    <ResponseField name="page_size" type="integer">
      Number of records to return (max 1000, default 50)
    </ResponseField>

    <ResponseField name="include_recordings" type="boolean">
      Whether to fetch recording SIDs for each returned call (adds one extra request per call that has recordings) (Default: `true`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "CallListItem": {
          "additionalProperties": false,
          "description": "A single call row in ``list_calls``.",
          "properties": {
            "call_sid": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Call Sid"
            },
            "from_": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "From"
            },
            "to": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "To"
            },
            "status": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Status"
            },
            "direction": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Direction"
            },
            "duration": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Duration"
            },
            "price": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Price"
            },
            "price_unit": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Price Unit"
            },
            "start_time": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Start Time"
            },
            "end_time": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "End Time"
            },
            "date_created": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Date Created"
            },
            "recording_sids": {
              "items": {
                "type": "string"
              },
              "title": "Recording Sids",
              "type": "array"
            }
          },
          "title": "CallListItem",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "calls": {
          "items": {
            "$ref": "#/$defs/CallListItem"
          },
          "title": "Calls",
          "type": "array"
        },
        "total": {
          "default": 0,
          "title": "Total",
          "type": "integer"
        },
        "page": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Page"
        },
        "page_size": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Page Size"
        }
      },
      "required": [
        "success"
      ],
      "title": "ListCallsOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_recording — Retrieve call recording information by recording SID.">
    ### Parameters

    <ResponseField name="recording_sid" type="string" required>
      Recording SID to retrieve (e.g., RExxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)
    </ResponseField>

    <ResponseField name="account_sid" type="string" required>
      Twilio Account SID (starts with 'AC')
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "recording_sid": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Recording Sid"
        },
        "call_sid": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Call Sid"
        },
        "duration": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Duration"
        },
        "status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Status"
        },
        "channels": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Channels"
        },
        "source": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Source"
        },
        "media_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Media Url"
        },
        "price": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Price"
        },
        "price_unit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Price Unit"
        },
        "uri": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Uri"
        },
        "transcription_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Transcription Text"
        },
        "transcription_status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Transcription Status"
        },
        "transcription_price": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Transcription Price"
        },
        "transcription_price_unit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Transcription Price Unit"
        }
      },
      "required": [
        "success"
      ],
      "title": "GetRecordingOutput",
      "type": "object"
    }
    ```
  </Accordion>
</AccordionGroup>

## Limits & Quotas

* **Concurrency**: outbound call throughput depends on your account
  tier and number of phone numbers; long calls and the call queue are
  subject to Twilio's per-account limits.
* **List pagination**: `list_calls` accepts `page_size` (max 1000,
  default 50); when `include_recordings` is enabled it issues one extra
  request per call that has recordings.
* **Pricing**: per-minute voice rates and per-recording charges vary by
  destination and feature — see Twilio's pricing pages.
* **Error model**: non-2xx responses, timeouts, and Twilio
  `error_code`/`message` failures are caught and returned as
  `success=False` + `error` rather than raising. Plan retries on the
  agent side based on the error string.

## Related integrations

<CardGroup cols={3}>
  <Card title="Slack" href="/integrations/tools/slack" />

  <Card title="Telegram Bot" href="/integrations/tools/telegram" />

  <Card title="WhatsApp" href="/integrations/tools/whatsapp" />
</CardGroup>

## Links

* [Twilio Voice](https://www.twilio.com)
