VX Agents

OpenAPI Marketplace · Messaging & SMS

Twilio SMS & Messaging

v1.0.0 · 9 endpoints · 0 connections · shared by vx.ai

Lets an agent send SMS, MMS and WhatsApp messages through Twilio, check delivery status, browse message history and media, cancel scheduled messages, and list the account's phone numbers. Curated from Twilio's official OpenAPI specification.

Connect this API to an AI agent Browse all specs

What you can do with Twilio SMS & Messaging via MCP

Every endpoint below becomes a governed tool your AI agent (Claude, ChatGPT, or a customer-facing VX agent) can call — with scoped permissions, sandbox testing, and audit logs.

MethodPathOperationDescription
GET /2010-04-01/Accounts/{Sid}.json getAccount Get the Twilio account's name, status and type (trial or full)
GET /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json listIncomingPhoneNumbers List the phone numbers the account owns (possible senders)
GET /2010-04-01/Accounts/{AccountSid}/Messages.json listMessages List sent and received messages, filtered by number or date
POST /2010-04-01/Accounts/{AccountSid}/Messages.json sendMessage Send (or schedule) an SMS, MMS or WhatsApp message
GET /2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json getMessage Get one message with its delivery status, price and error code
POST /2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json updateMessage Cancel a scheduled message or redact a message body
DELETE /2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json deleteMessage Permanently delete a message record from the account log
GET /2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media.json listMessageMedia List images or files attached to an MMS/WhatsApp message
GET /2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{Sid}.json getMessageMedia Get details of one attached media file

Authentication

accountSid_authToken

HTTP Basic

HTTP Basic auth: username = Account SID (AC...), password = Auth Token. An API key works too: username = API Key SID (SK...), password = API key secret.

How to get a credential

  1. Sign in to the Twilio Console (https://console.twilio.com).
  2. On the dashboard under Account Info, copy the Account SID and reveal/copy the Auth Token.
  3. Recommended: create a restricted key instead in Account > API keys & tokens > Create API key (type Standard) and use its SID + secret.
  4. Buy or verify a sender: a Twilio phone number with SMS capability, a Messaging Service, or an approved WhatsApp sender.

Permissions used

Twilio Basic credentials are account-wide; there are no per-operation scopes.

Credential Operations
Account SID + Auth Token, or Standard API key getAccount, listIncomingPhoneNumbers, listMessages, getMessage, listMessageMedia, getMessageMedia, sendMessage, updateMessage, deleteMessage

Common errors

  • 401 Unauthorized (code 20003): wrong SID/token pair, or the AccountSid path value does not match the account of the key. Re-copy both values.
  • 403 Forbidden: account suspended, or trial account sending to an unverified number (21608). Upgrade or verify the recipient.
  • 400 Bad Request: invalid To/From (21211, 21606), number not SMS-capable, or missing Body/MediaUrl/ContentSid. Use E.164 numbers like +14155550100.
  • 429 Too Many Requests (20429): too many concurrent requests; back off and retry.

Store the SID and token (or API key SID and secret) as a VX Agents credential (Basic auth) for this spec; never paste them into chat.

Usage guide

Setup

  • Credential: Basic auth with Account SID + Auth Token, or a Standard API key SID + secret (Twilio Console > Account > API keys & tokens).
  • Pin AccountSid (AC...) as a preset: every call needs it in the path. getAccount uses it as Sid.
  • Worth pinning: the default sender (From number or MessagingServiceSid MG...). Use listIncomingPhoneNumbers to find numbers with SMS capability.

Send a message

  1. Check the sender: listIncomingPhoneNumbers (look at capabilities.sms / mms).
  2. sendMessage with To, a sender (From or MessagingServiceSid) and Body (and/or MediaUrl for MMS).
    • WhatsApp: prefix both numbers, e.g. To=whatsapp:+14155550100, From=whatsapp:+14155550199. Outside the 24-hour session window WhatsApp requires an approved template (ContentSid + ContentVariables).
    • Schedule: MessagingServiceSid + ScheduleType=fixed + SendAt (ISO 8601, 15 min to 35 days ahead).
  3. Track delivery with getMessage: status goes queued > sent > delivered (or undelivered/failed with error_code).
  4. Cancel a scheduled message with updateMessage Status=canceled; redact a sent body with Body="".

Confirm before writing: sending costs money and reaches real people. Show the user the recipient(s), sender and exact text, and wait for approval before sendMessage. Ask again before updateMessage or deleteMessage; deletion is permanent.

Review history

  • listMessages filtered by To, From or DateSent>/DateSent< (YYYY-MM-DD), PageSize up to 1000; follow next_page_uri for more.
  • getMessage shows price, num_segments and error_code; listMessageMedia/getMessageMedia for MMS attachments.

Good to know

  • Phone numbers must be E.164 (+ country code, no spaces).
  • Ids: SM/MM message, ME media, PN phone number, MG messaging service.
  • One SMS segment = 160 GSM-7 chars or 70 UCS-2 (emoji) chars; long texts are billed per segment.
  • Trial accounts can only text verified numbers and prefix a trial notice.
  • Requests are form-encoded; the response dates are RFC 2822 strings.

How to use this spec

  1. Create a free VX Agents account (sandbox tools included).
  2. Open the marketplace and connect “Twilio SMS & Messaging” to an agent.
  3. Expose it as an MCP server for Claude/ChatGPT, or chat with it directly.

Related APIs