twilio-reliability-patterns

Implement retry, backoff, and fallback patterns for Twilio messaging and voice at scale.

5.3k|765|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/openai/plugins --skill twilio-reliability-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: twilio-reliability-patterns
Source: https://github.com/openai/plugins/tree/main/plugins/twilio-developer-kit/skills/twilio-reliability-patterns
Command: npx skills add https://github.com/openai/plugins --skill twilio-reliability-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Twilio enforces per-resource rate limits, so at scale 429 errors, webhook timeouts, and throughput ceilings cause production failures. This Skill provides the patterns needed to handle rate limits, retries, and failures when sending messages or making calls at volume.

Core Features & Use Cases

  • Exponential Backoff with Jitter: Retry 429 responses with 100ms base delay, 2x multiplier, ±10% jitter, and a 30-second cap in Python or Node.js.
  • Throughput & Bulk Send Management: Apply per-number throughput limits (long code, toll-free, short code) and rate-limited dispatch loops sized to your Messaging Service pool.
  • Resilient Callback Handling: Use the thin-receiver pattern to queue StatusCallbacks, deduplicate with composite idempotency keys, and configure fallback URLs and SMS-to-voice-to-email fallback chains.
  • Use Case: When sending a bulk SMS campaign to thousands of recipients, use this Skill to rate-limit dispatch to your number pool capacity, back off on 429s, and process delivery StatusCallbacks asynchronously without dropping events.

Quick Start

Ask the AI to add exponential backoff with jitter and a thin-receiver StatusCallback handler to your existing Twilio messaging integration.

Frequently Asked Questions about twilio-reliability-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle Twilio 429 rate limit errors?

Handle Twilio 429 errors with exponential backoff: start at 100ms, double per attempt, add ±10% random jitter, and cap delays at 30 seconds. Retry up to 5 times, and never retry non-429 errors since those indicate real failures.

How to send bulk SMS with Twilio without hitting rate limits?

Send bulk SMS with a rate-limited dispatch loop sized to your number pool, not your desired speed. A pool of 10 long codes supports roughly 10 SMS per second; use Messaging Services to pool numbers and multiply throughput.

What is the SMS throughput limit for Twilio phone numbers?

Twilio throughput varies by number type: long codes send about 1 SMS per second, toll-free about 3 per second, and short codes 10-100 per second. Messaging Services sum the throughput of all numbers in the pool.

Why does my Twilio StatusCallback webhook fail under load?

StatusCallbacks fail under load because 50 concurrent calls generate about 300 webhook invocations per second, exceeding limits like Twilio Functions' 30 concurrent executions. Use a thin-receiver pattern: queue the event, respond 200 immediately, and process asynchronously.

How do I prevent duplicate Twilio webhook events?

Prevent duplicate webhook processing by using the composite key {CallSid}-{CallStatus} as an idempotency key. Twilio retries callbacks on timeout, so deduplicate events before updating your database.

Can I increase Twilio rate limits or configure callback retries?

You cannot increase per-number throughput or configure StatusCallback retry behavior; Twilio retries on timeout automatically. To scale, add numbers via Messaging Services and request CPS increases through support before launching campaigns.