Skip to main content
Twilio Voice logo

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).
Categories: Communication · Messaging · Text To Speech · Auth: Account SID & Auth Token · Actions: 3

Authentication

Account SID & Auth Token

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

Step 1

Sign in to the Twilio Console at https://console.twilio.com
2

Step 2

On the dashboard, find your Account SID (starts with ‘AC’)
3

Step 3

Reveal and copy your Auth Token
4

Step 4

Provide the Account SID and Auth Token below

Required Credentials

FieldDescriptionRequiredFormat
Twilio Account SIDYour Twilio Account SID from the Twilio ConsoleYesACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Twilio Auth TokenYour Twilio Auth Token from the Twilio ConsoleYesyour_auth_token

Available Actions

Parameters

to
string
required
Phone number to call in E.164 format (e.g., +14155551234)
from_
string
required
Your Twilio phone number to call from in E.164 format (e.g., +14155559876)
account_sid
string
required
Twilio Account SID (starts with ‘AC’)
url
string
Webhook URL that returns TwiML instructions for the call
twiml
string
TwiML instructions to execute (raw XML, e.g. ‘<Response><Say>Hello</Say></Response>’). Provide this or ‘url’.
status_callback
string
Webhook URL for call status updates
status_callback_method
string
HTTP method for the status callback (GET or POST)
record
boolean
Whether to record the call (Default: false)
recording_status_callback
string
Webhook URL for recording status updates
timeout
integer
Seconds to wait for an answer before giving up (default: 60)
machine_detection
string
Answering machine detection: ‘Enable’ or ‘DetectMessageEnd’

Response

{
  "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"
}

Parameters

account_sid
string
required
Twilio Account SID (starts with ‘AC’)
to
string
Filter by calls to this phone number (E.164 format)
from_
string
Filter by calls from this phone number (E.164 format)
status
string
Filter by call status (queued, ringing, in-progress, completed, busy, failed, no-answer, canceled)
start_time_after
string
Filter calls that started on or after this date (YYYY-MM-DD)
start_time_before
string
Filter calls that started on or before this date (YYYY-MM-DD)
page_size
integer
Number of records to return (max 1000, default 50)
include_recordings
boolean
Whether to fetch recording SIDs for each returned call (adds one extra request per call that has recordings) (Default: true)

Response

{
  "$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"
}

Parameters

recording_sid
string
required
Recording SID to retrieve (e.g., RExxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)
account_sid
string
required
Twilio Account SID (starts with ‘AC’)

Response

{
  "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"
}

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.

Slack

Telegram Bot

WhatsApp