A unique feature of Plivo’s REST APIs is that you can send bulk SMS messages using a single API request. To send bulk SMS, make an HTTP POST request to the Message API. This request is similar to sending a single outbound SMS, but with the additional step of adding multiple DST destination numbers by separating each phone number with the "<"character.
- Sign up for a free Plivo trial account.
- Check out our server-side SDKs page and install the right helper based on the programming language you want to use.
- Buy a Plivo phone number (optional). Note: A phone number is required only for sending SMS to US and Canadian phone numbers. Country-specific carrier conditions may still apply. You can buy a US or Canadian phone number through the Buy Numbers tab in your Plivo account menu.
- Use a web hosting service to host your web application. There are many inexpensive cloud hosting providers that you can use for just a few dollars a month. Follow the instructions of your hosting provider to host your web application.
Note: If you are using a Plivo Trial account for this scenario, you can only send SMS messages to phone numbers that have been verified with Plivo. Phone numbers can be verified through the Sandbox Numbers page.
- Copy the relevant code below into a text file and save it.
- Replace “Your AUTH_ID” and “Your AUTH_TOKEN” with the AUTH ID and AUTH TOKEN found on your Plivo dashboard.
- Add your src (source) phone number. This will show up as your sender ID. Be sure that all phone numbers include the country code, area code, and phone number without spaces or dashes (e.g., 14153336666). Note: You can send SMS text messages to any country using the Message API and set any src number, except for US and Canadian numbers. In order to send text messages to phones in the US or Canada, you will need to purchase a US or Canadian phone number from Plivo and use it as the src number. You can buy a Plivo number from the Buy Numbers tab on your Plivo account dashboard.
- Add your DST (destination) phone numbers. These are the phone numbers you wish to send SMS text messages to. To send messages in bulk, separate your destination phone numbers with the delimiter "<"(e.g., 14156667777<14157778888<14158889999). Note: If you are using a trial account, your destination number needs to be verified with Plivo. Phone numbers can be verified on the Sandbox Numbers page.
- Edit the text field with your SMS text message. Note: text messages that are longer than 160 characters are concatenated and billed separately as individual text messages.
After completing these steps, make the HTTP POST request to Plivo. If successful, Plivo will queue your SMS and deliver it to your recipients at a base rate of one message per second. Please note that delivery is handled separately for each message.
Pro-tip: check out our full Message API guide to see all the parameters and functionalities you can use to bulk send SMS.