← Twilio Developer KitCONTENT HISTORY

Update to Twilio Developer Kit

Snapshot Sep 30, 2026 · 22:50 UTC · version 0.2.2

Collection source: not recorded for this historical snapshot.

WHAT CHANGED · RULE-BASED ANALYSIS

First saved snapshot

No earlier snapshot is available to establish a change.

Compare saved observations

Download comparison JSON
Full technical diff · 0 changed fields
Full snapshot data
{
  "name": "twilio-whatsapp-send-message",
  "description": "WhatsApp messaging deep-dive reference. Covers the 24-hour service window rules (free-form vs template mode), sandbox setup for testing, template approval workflow, production sender requirements, and WhatsApp-specific error handling. For sending WhatsApp messages, use twilio-send-message instead. Use this skill when setting up WhatsApp for the first time or debugging WhatsApp-specific delivery behavior.",
  "included_files": [
    {
      "relative_path": "agents/openai.yaml",
      "size_in_bytes": 237
    }
  ],
  "skill_md_contents": "---\nname: twilio-whatsapp-send-message\ndescription: >\n  WhatsApp messaging deep-dive reference. Covers the 24-hour service\n  window rules (free-form vs template mode), sandbox setup for testing,\n  template approval workflow, production sender requirements, and\n  WhatsApp-specific error handling. For sending WhatsApp messages, use\n  twilio-send-message instead. Use this skill when setting up WhatsApp\n  for the first time or debugging WhatsApp-specific delivery behavior.\n---\n\n## Overview\n\n**WhatsApp is one channel in Twilio's Messaging platform.** All channels share the same `messages.create()` API — see `twilio-messaging-overview` for the full channel comparison and onboarding sequence.\n\nTwilio routes WhatsApp through the Programmable Messaging API — all numbers use `whatsapp:+E.164` prefix. Two sending modes apply: **free-form** (within 24 hrs of last inbound) and **template** (anytime). Sending free-form outside the window causes silent delivery failure — always check which mode is required.\n\n| Mode | When allowed | Parameters |\n|------|-------------|------------|\n| Free-form | Within 24 hrs of last inbound from user | `body`, optional `mediaUrl` |\n| Template | Anytime | `contentSid` + `contentVariables` |\n\n---\n\n## Prerequisites\n\n- Twilio account with WhatsApp enabled\n  — New to Twilio? See `twilio-account-setup`\n- Environment variables:\n  - `TWILIO_ACCOUNT_SID`\n  - `TWILIO_AUTH_TOKEN`\n  — See `twilio-iam-auth-setup` for credential setup and best practices\n- SDK: `pip install twilio` / `npm install twilio`\n- Recipient opted in to receive messages from your WhatsApp Business Account\n\n**Testing (sandbox):** Join by texting `join <your-code>` to `+14155238886`. No registration needed — see [Console > Messaging > Try it out > Send a WhatsApp message](https://console.twilio.com/us1/develop/sms/try-it-out/whatsapp-learn). Sandbox participants must re-join every 3 days.\n\n**Production:** Register a WhatsApp Business sender first — see `twilio-whatsapp-manage-senders`.\n\n---\n\n## Quickstart\n\n**Python**\n```python\nimport os\nfrom twilio.rest import Client\n\nclient = Client(os.environ[\"TWILIO_ACCOUNT_SID\"], os.environ[\"TWILIO_AUTH_TOKEN\"])\n\nmessage = client.messages.create(\n    from_=\"whatsapp:+14155238886\",   # Sandbox sender (or your production number)\n    to=\"whatsapp:+15005550006\",      # Must have joined the sandbox\n    body=\"Your order has been confirmed.\"\n)\n\nprint(message.sid)     # MMxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nprint(message.status)  # queued | sent | delivered | failed\n```\n\n**Node.js**\n```node\nconst twilio = require(\"twilio\");\nconst client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);\n\nconst message = await client.messages.create({\n    from: \"whatsapp:+14155238886\",\n    to: \"whatsapp:+15005550006\",\n    body: \"Your order has been confirmed.\",\n});\n\nconsole.log(message.sid);\nconsole.log(message.status);\n```\n\n---\n\n## Key Patterns\n\n### Send a Template Message (outside service window)\n\nTemplates are created in Console > Messaging > Content Template Builder and must be approved by Meta. See `twilio-content-template-builder` for template creation.\n\n**Python**\n```python\nmessage = client.messages.create(\n    from_=\"whatsapp:+14155238886\",\n    to=\"whatsapp:+15005550006\",\n    content_sid=\"HXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n    content_variables='{\"1\": \"March 25\", \"2\": \"2:00 PM\"}'\n)\n```\n\n**Node.js**\n```node\nconst message = await client.messages.create({\n    from: \"whatsapp:+14155238886\",\n    to: \"whatsapp:+15005550006\",\n    contentSid: \"HXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n    contentVariables: JSON.stringify({ \"1\": \"March 25\", \"2\": \"2:00 PM\" }),\n});\n```\n\n### Send Media (free-form only)\n\nMax file size: 16 MB.\n\n**Python**\n```python\nmessage = client.messages.create(\n    from_=\"whatsapp:+14155238886\",\n    to=\"whatsapp:+15005550006\",\n    body=\"Here is your invoice.\",\n    media_url=[\"https://example.com/invoice.pdf\"]\n)\n```\n\n**Node.js**\n```node\nconst message = await client.messages.create({\n    from: \"whatsapp:+14155238886\",\n    to: \"whatsapp:+15005550006\",\n    body: \"Here is your invoice.\",\n    mediaUrl: [\"https://example.com/invoice.pdf\"],\n});\n```\n\n---\n\n## Response Fields\n\n| Field | Description |\n|-------|-------------|\n| `sid` | Unique message identifier (`MM...`) |\n| `status` | `queued`, `sent`, `delivered`, `read`, `failed`, `undelivered` |\n| `error_code` | Populated on failure |\n| `error_message` | Human-readable error description |\n| `date_sent` | UTC timestamp |\n\n---\n\n## Common Errors\n\n| Code | Meaning | Fix |\n|------|---------|-----|\n| 63003 | Invalid WhatsApp destination number | Verify number is WhatsApp-enabled and correctly formatted |\n| 63018 | Rate limit exceeded on sender | Reduce send rate; default is 80 MPS |\n| 63020 | Business hasn't accepted Twilio's Meta invitation | Accept invite in Meta Business Manager |\n| N/A | Free-form outside window | Switch to a template message |\n\n---\n\n## CANNOT\n\n- **Cannot exceed 80 messages/second per sender** — Text-only can be raised to 400 MPS on request\n- **Cannot queue messages beyond 4 hours** — Undelivered messages fail after 4 hours\n- **Cannot exceed sandbox throttle limits** — 1 message per 3 seconds, 50 messages/day on trial, participants expire after 3 days\n- **Cannot send without opt-in** — Sending without recipient opt-in risks account suspension\n- **Cannot use WhatsApp Groups API** — Deprecated April 2020. Use Conversations API instead.\n\n---\n\n## Next Steps\n\n- **Channel overview and onboarding guide:** `twilio-messaging-overview`\n- **Register a production WhatsApp sender:** `twilio-whatsapp-manage-senders`\n- **Create and manage message templates:** `twilio-content-template-builder`\n- **Multi-channel conversations with history:** `twilio-conversations-api`\n"
}

SHA-256: 4ef0c877a9fb08afc5fee6846d1fe79b18de0370f41a120f2b8036d327dfe6f6