Bulk Messaging

It is possible to send one message to multiple destination numbers via a single API request using Plivo’s Bulk Messaging feature.

Simply provide a list of destination numbers separated with the delimiter <. (e.g. 14156667777<14157778888<14158889999).

Each destination number is sanitized and validated. Valid destination numbers are accepted, and the list of invalid destination numbers is shared in the message response.

This send message API supports up to 1000 unique destination numbers.

Note that messages to all recipients may not be delivered instantly. This is because the messages would be dequeued for delivery based on rate limits configured for your account.

Returns

A unique message_uuid is generated for each valid destination number, and the entire list of uuids is returned in the message_uuid parameter in the response body.

The list of invalid destination numbers is returned in the invalid_number parameter in the response body.

Response

HTTP Status Code: 202

{
  "api_id": "984bc856-9231-11e7-b886-067c5485c240",
  "invalid_number": [
    "jsgf3dsjh28372"
  ],
  "message": "message(s) queued",
  "message_uuid": [
    "6da4afba-2bcf-4a87-9eff-d2f88577b0f1",
    "6da384ba-19js-aand-2h3g-r2f8ja0700f1"
  ]
}

Example Request

1
2
3
4
5
6
7
8
import plivo

client = plivo.RestClient()
response = client.messages.create(
    src='from_number',
    dst=['to_number_1', 'to_number_2'],
    text='Test Message', )
print(response)
1
2
3
4
curl -i --user AUTH_ID:AUTH_TOKEN \
    -H "Content-Type: application/json" \
    -d '{"src": "1111111111","dst": "14156667777<14157778888<jsgf3dsjh28372", "text": "Hi, text from Plivo"}' \
    https://api.plivo.com/v1/Account/{auth_id}/Message/