Pooling

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.

Create a Sender Pool

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:

$curl -X POST "https://comms.twilio.com/preview/SenderPools" \
>--header 'Content-Type: application/json' \
>--data '
>{
> "name": "Sales Leads - APAC",
> "tags": {
> "region": "APAC"
> }
>}' \
>-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN

See the full Sender Pools API reference for more details on creating and managing Sender Pools.

Add a Sender to a Sender Pool

Now that you’ve created a Sender Pool, add the sender you want to your Pool.

$curl -X POST "https://comms.twilio.com/preview/SenderPools/comms_senderpool_12345/Senders" \
>--header 'Content-Type: application/json' \
>--data '{
> "senderId": "comms_sender_01h9krwprkeee8fzqspvwy6nq8"
>}' \
>-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN

You can then send a message using the Sender Pool as the sender.

$curl -X POST "https://comms.twilio.com/preview/Messages" \
>-H "Content-Type: application/json" \
>-d '{
> "from": {
> "senderPoolId": "comms_senderpool_12345"
> },
> "to": [
> {
> "address": "+19143188062",
> "channel": "PHONE"
> }
> ],
> "content": {
> "text": "Now I'\''m just using some of my senders!"
> }
>}' \
>-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN

Benefits of pooling

  • 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

Next steps

Learn more about configuring and managing your sender options in the Sender Pools guide.