🖥️Sending Messages via Postman API
How do I send out messages if I want to call Postman's API Endpoints
Before calling Postman's API endpoints, please ensure
You are connected to the whitelisted IP address for this campaign.
You have entered the correct API key.
Multiple message parameters (variables)
In this example, we will be using the following message content with multiple message parameters (variables).
Dear {{name}}, your next appointment at {{clinic}} is on {{date}} at {{time}} hrs.
Request Body example
{
"recipient": "6599999999",
"language": "english",
"values": {
// The following values are values for the parameters in the example template
"name": "John Doe",
"clinic": "Example Clinic",
"date": "11 Dec 2023",
"time": "11:30 am"
}
}
CSV example for batch send
recipient,language,name,clinic,date,time
6599999999,ENGLISH,John Doe,Example Clinic,11 Dec 2023,11:30 am
API users who do not want to manage your message templates within Postman
If you are an API user that
manages message templates within your own system
uses Postman solely for sending out the full text of your message
you may create a single variable, {{body}}
, and insert the message into the {{body}}
variable.

Request Body example - single variable {{body}}
{
"recipient": "6599999999",
"language": "english",
"values": {
// The following values are values for the parameters in the example template
"body": "Fill in your system constructed message here"
},
}
CSV example for batch send - single variable {{body}}
recipient,language,body
6599999999,english,"Fill in your system constructed message here"
Line breaks in {{body}} messages
When formatting line breaks in your request body, please note the differences between
API request body
Creating line breaks in campaign message template
If your campaign requires sending via single send with line breaks, we advise you to create the campaign message template with line breaks included, during the campaign creation stage.

Creating line breaks in message body for batch messages
If your message template is already created, and you need to fill in message content with line breaks within the CSV file, use simple keyboard paragraphing to create the line breaks within your CSV file, then upload them.

Excel automatically adds ""
to your file after you have saved it as a .csv file.
As such, do not encase the message in the {{body}}
variable in ""
.

Another example:
recipient,language,body
6591234567,english,"Dear Amy
Your appointment for VACCINATION is confirmed.
Please do not reply to this message."
6599999999,english,"Dear John
Your appointment for VACCINATION is confirmed.
Please do not reply to this message."
Your message in the {{body}}
variable will need to be encased in ""
if you are creating messages from a text editor.
Creating line breaks in API request body
If you are sending an API single send message, you can add \n
into the JSON request body. Do make sure your request body is in JSON format or you will receive an error.
Example:
{
"recipient": "6599999999",
"language": "english",
"values": {
"test": "This is a test for line breaks \n this is one line spacing \n\n this is a paragraph spacing"
}
}
And your message should look like this:

If you are sending an API bulk send message, then use simple keyboard paragraphing to create the line breaks within your CSV file (see above).
Postman Test Site limitations
DO NOT conduct load testing on our test site.
Postman test site has a .csv file limit of 20 rows to ensure no load testing is done on this site. More information here on load testing.
Postman's test site is meant for agency users to test out the platform. As such, you should test out the site like how you would send out messages to MOPs in a real scenario, where each number will only receive a single message.
Multiple messages to the same user
If you send test messages with exact same content to the same person multiple times in 1 sitting in the same campaign:
eg. "Hi your appointment is on 1 Jan 2024" was sent to Tom 10 times within 1 batch send.
The telcos' automatic spam filter may be triggered . This means the message may not be delivered to Tom's phone at all, even though it will pass Postman’s send filters and status is reflected as delivered
. See screenshot below on how the batch .csv is formatted in this failed example.

Last updated