Pooling
Pooling allows you to distribute messages across multiple sender numbers, ensuring reliable delivery even at high volumes. By creating a Sender Pool, you can group multiple senders (such as RCS, SMS, or WhatsApp) to increase throughput and enable automatic failover for failed messages.
If you need to manage multiple senders, create a Sender Pool. A Sender Pool can improve message throughput and let you combine different sender types, for example, RCS, SMS, and WhatsApp. If a message fails, Twilio automatically retries delivery through an alternative channel (failover).
Sample request:
1curl -X POST "https://comms.twilio.com/preview/SenderPools" \2--header 'Content-Type: application/json' \3--data '4{5"name": "Sales Leads - APAC",6"tags": {7"region": "APAC"8}9}' \10-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
See the full Sender Pools API reference for more details on creating and managing Sender Pools.
Now that you've created a Sender Pool, add the sender you want to your Pool.
1curl -X POST "https://comms.twilio.com/preview/SenderPools/comms_senderpool_12345/Senders" \2--header 'Content-Type: application/json' \3--data '{4"senderId": "comms_sender_01h9krwprkeee8fzqspvwy6nq8"5}' \6-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
You can then send a message using the Sender Pool as the sender.
1curl -X POST "https://comms.twilio.com/preview/Messages" \2-H "Content-Type: application/json" \3-d '{4"from": {5"senderPoolId": "comms_senderpool_12345"6},7"to": [8{9"address": "+19143188062",10"channel": "PHONE"11}12],13"content": {14"text": "Now I'\''m just using some of my senders!"15}16}' \17-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
- Scalability: Distribute high-volume sends across multiple numbers
- Reliability: Automatic failover to alternate senders or channels
- Flexibility: Mix and match sender types (SMS, WhatsApp, RCS, etc.) in a single pool
Learn more about configuring and managing your sender options in the Sender Pools guide.