This article describes how you can send bulk SMS via the babelforce API platform without the need to develop your own code. Note that you find all the required enpoints in our API documentation. However, we will provide you with some postman collections here as well.
To start with please download the following files and resources:
- Postman application for your operating system
- babelforce pre-configured API requests collection and environment setup:
Environment variables for EU region:
Environment variables for US region:
Environment variables for Asia-Pacific region:
- Data source example file with phone numbers and message text:
Then follow these 10 steps to setup everything:
- Open the Postman application and click on the "Import" button in the left corner. Choose the downloaded babelforce collection and environment files and import it to the Postman app
- You should now see the collection in the Postman app and you should be able to choose between the environments.
- In the right corner click on the settings wheel and choose "Manage environment". Then chose the profile for your region and click on the name of it.
- Now Go to your regions babelforce admin website, login with your credentials and click on the profile page. For EU region this would be this site: https://apps.babelforce.com/manager2/#/app/manager/account/overview
From where you can get your "accessID" and "accessToken". Copy the ID and Token and past it into the corresponding environment variables of your region in the Postman app.
- In the variable field for "fromNumber" please enter the phone number which should be shown to all the recipients of your SMS. Usually this would be the SMS inbound and outbound number that you've got from babelforce. The "toNumber" and the "messageText" variables you can leave empty, because these get filled with the values from your data CSV file. Click on the "Update" button and save your settings.
- Now to test your setup click on the "General" section in the babelforce requests collection on the left and open the "Get account details" request. A new tab should open and you can see the request details. Just click on the "Send" button. Everything is pre-configured already. You should see the answer in the window below the request. If everything was setup correctly, it should show your company name and user account profile information.
- Now you need to prepare your data source file. Open the example file "Send batch SMS list - data.csv" in your preferred spreadsheet application. In the column "toNumber" enter all the mobile numbers you want to send an SMS too. in the column "messageText" enter the SMS text you want do send to. If the SMS text should be the same for all recipients just copy the same text in each field. Then save the file and export as tab-separated CSV file again. Don't edit the first line of the CSV line, because it is needed by the Postman application. Here is an example how the sheet could look like:
toNumber messageText 447937985830 Text example 1 491771789302 Text example 2
- In the Postman application click on the "Runner" Button in the left corner. A new window appears where you can define the parameters for the API requests you want to run against the babelforce API.
- To send batch SMS requests please choose the following recommend settings:
- click on the babelforce collection and choose SMS folder
- in the environment popup list please choose the environment for your region, e.g. babelforce EU
- the iterations field you can leave at 1, it will change later to the number of entries you have in the data source csv file
- for delay we recommend to use 5000 ms to make sure your SMS send requests are throttled and not send all at once, the reason for this to be compliant with regulation requirements, which can be different in every country
- near the data field click on "Select file" button and choose your saved CSV data file as source, when the file is loaded the number in the "Iterations" field should change to the number of entries you have in the CSV file automatically
10. That's it. You can now click the "Start run" button and start sending your SMS bulk requests against the babelforce API. But be careful and double check your data source file! Once you hit the button, the SMS will be send out immediately one after each other
The Postman Runner will go through each entry in your CSV data file and capture the phone number and message text from it and then send the request against the babelforce platform. The runner iterates through each entry in the file. At the end you should see a summary with the results. The number of passed requests should be the same as the number of iterations. If an error occurs you need to investigate and send this SMS again manually later on.