VX Agents

API directory · Messaging & SMS

Twilio Content Templates & Approvals

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

Draft a WhatsApp quick-reply, card or media template once in Twilio's Content API, send it to Meta for approval and see whether it was approved, rejected or is still pending, all from one HX content SID.

Connect this API to an AI agent Browse all specs

What you can do with Twilio Content Templates & Approvals 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 /v1/Content listContent List all content templates in the account
POST /v1/Content createContent Create a new content template (text, quick reply, card, media and more)
GET /v1/Content/{Sid} getContent Get one content template by its HX SID
GET /v1/ContentAndApprovals listContentWithApprovals List templates together with their WhatsApp approval status
GET /v1/Content/{Sid}/ApprovalRequests getApprovalStatus Check the WhatsApp approval status of a template
POST /v1/Content/{ContentSid}/ApprovalRequests/whatsapp submitWhatsAppApproval Submit a template to WhatsApp for approval

Authentication

twilioBasic

HTTP Basic

HTTP basic auth with your Twilio Account SID as the username and Auth Token as the password, or an API key SID (SK...) and its secret.

How to get a credential

  1. Sign in to the Twilio Console (https://console.twilio.com).
  2. Copy the Account SID and Auth Token from the Account Info panel, or go to Account > API keys & tokens and create a Standard API key (copy the SID and the secret, which is shown once).
  3. To submit WhatsApp templates, connect a WhatsApp sender to the account first (Messaging > Senders > WhatsApp senders).

Permissions used

Credential Operations
Account SID + Auth Token, or Standard API key listContent, getContent, listContentWithApprovals, getApprovalStatus, createContent, submitWhatsAppApproval

Common errors

  • 401 Unauthorized (code 20003): wrong SID/secret pair, or an API key from another account. Re-copy both values.
  • 403 Forbidden: the API key is Restricted without Content access, or the account is suspended. Use a Standard key.
  • 400 Bad Request: invalid types body or a duplicate template name for WhatsApp; read the message field.
  • 429 Too Many Requests: back off and retry after a few seconds.

Store the username and password as a Basic credential in VX Agents; never paste them into chat.

Usage guide

Setup

  • Credential: Basic auth with your Twilio Account SID + Auth Token, or an API key SID + secret.
  • A WhatsApp sender must be connected to the account before templates can be submitted for approval.

Create a template and get it approved

  1. listContentWithApprovals to see existing templates and their WhatsApp status, so you do not create a duplicate name.
  2. createContent with friendly_name, language (e.g. en), optional variables (e.g. {"1": "Jane"}) and a types object such as twilio/text, twilio/quick-reply, twilio/card or twilio/media. Placeholders in the body are written {{1}}, {{2}}. Show the user the full template and confirm before creating it.
  3. submitWhatsAppApproval with the new HX... SID, a name (lowercase letters, digits and underscores, unique per WhatsApp account) and a category (UTILITY, MARKETING or AUTHENTICATION). Confirm before submitting: it goes to Meta for review.
  4. getApprovalStatus later to read the status (received, pending, approved, rejected, paused, disabled) and any rejection_reason.

Look things up

  • listContent pages through all templates; getContent returns one template with its types and variables.

Good to know

  • Template SIDs start with HX. Use the SID as ContentSid when sending a message through the Messaging API.
  • Lists are paged: pass PageSize (max 1000) and follow meta.next_page_url.
  • Twilio also offers /v2/Content and /v2/ContentAndApprovals with search filters (Language, ContentName, ChannelEligibility); this spec uses the v1 endpoints.
  • To change a template, create a new one and submit it again.
  • Dates are ISO 8601 UTC.

Source: Twilio Content API reference (https://www.twilio.com/docs/content/content-api-resources), checked 2026-10-22.

How to use this spec

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

Related APIs