Fast Message APIs
Home
Getting Started
Home
Getting Started
  • SMS API
    • Send SMS
    • Bulk SMS
    • Send Hashed SMS
    • Send OTP
    • Delivery Reports
    • Delivery Status Descriptions
    • SMS Balance
    • Common Errors
    • Response Codes
  • RESELLER SMS CREDIT API
  • USSD GUIDE
  • SHORTCODE GUIDE
  • SMPP API
  • AIRTIME API
  • EMAIL API

SEND BULK

The Send Bulk API allows you to send up to 1000 unique messages in a single request.
Each message can have a different recipient, message content.

Info

The partnerID, apikey, and shortcode should be the same for all JSON objects within the smslist array. Any mismatch will default to using credentials in the first object.

POST Method

https://{{url}}/api/services/sendbulk

Request Body:

{
    "count": {{count}},// The count of the SMS list
    "smslist": [
        {
            "partnerID": "{{partnerID}}",
            "apikey": "{{apikey}}",
            "pass_type": "plain",
            "clientsmsid": {{clientsmsid1}},//Your preferred dynamic identifier
            "mobile": "{{mobile1}}",
            "message": "{{message1}}",
            "shortcode": "{{shortcode}}"
        },
        {
            "partnerID": "{{partnerID}}",
            "apikey": "{{apikey}}",
            "pass_type": "plain",
            "mobile": "{{mobile2}}",
            "clientsmsid": {{clientsmsid2}},
            "message": "{{message2}}",
            "shortcode": "{{shortcode}}",
            "pass_type": "{{pass_type}}"
        }
    ]
}

Sample Success Response:

{
    "responses":
    [
        {
            "response-code":200,
            "response-description":"Success",
            "mobile":"xxxxxxxx",
            "messageid":"xxxxxxxx",
            "clientsmsid":1234,
            "networkid":1
            },
            {
                "response-code":200,
                "response-description":"Success",
                "mobile":"xxxxxxxx",
                "messageid":"xxxxxxxx",
                "clientsmsid":1234,
                "networkid":1
            }
    ]
}

Sample Error Response:

{
    "response-code":1006,
    "response-description":"Invalid credentials"
}

Code Examples (POST Request)

PHP
<?php
$payload = json_encode([
    "count" => {{count}},
    "smslist" => [
        [
            "partnerID" => "{{partnerID}}",
            "apikey" => "{{apikey}}",
            "pass_type" => "plain",
            "clientsmsid" => {{clientsmsid1}},
            "mobile" => "{{mobile1}}",
            "message" => "{{message1}}",
            "shortcode" => "{{shortcode}}"
        ],
        [
            "partnerID" => "{{partnerID}}",
            "apikey" => "{{apikey}}",
            "pass_type" => "plain",
            "mobile" => "{{mobile2}}",
            "clientsmsid" => {{clientsmsid2}},
            "message" => "{{message2}}",
            "shortcode" => "{{shortcode}}",
            "pass_type" => "{{pass_type}}"
        ]
    ]
]);

$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_URL => "https://{{url}}/api/services/sendbulk",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => $payload,
    CURLOPT_HTTPHEADER => ['Content-Type: application/json']
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
Node.js
const axios = require('axios');

const payload = {
    count: {{count}},
    smslist: [
        {
            partnerID: "{{partnerID}}",
            apikey: "{{apikey}}",
            pass_type: "plain",
            clientsmsid: {{clientsmsid1}},
            mobile: "{{mobile1}}",
            message: "{{message1}}",
            shortcode: "{{shortcode}}"
        },
        {
            partnerID: "{{partnerID}}",
            apikey: "{{apikey}}",
            pass_type: "plain",
            mobile: "{{mobile2}}",
            clientsmsid: {{clientsmsid2}},
            message: "{{message2}}",
            shortcode: "{{shortcode}}",
            pass_type: "{{pass_type}}"
        }
    ]
};

axios.post('https://{{url}}/api/services/sendbulk', payload, {
    headers: { 'Content-Type': 'application/json' }
})
.then(response => console.log(response.data))
.catch(error => console.error(error));
Python
import requests

url = "https://{{url}}/api/services/sendbulk"
payload = {
    "count": {{count}},
    "smslist": [
        {
            "partnerID": "{{partnerID}}",
            "apikey": "{{apikey}}",
            "pass_type": "plain",
            "clientsmsid": {{clientsmsid1}},
            "mobile": "{{mobile1}}",
            "message": "{{message1}}",
            "shortcode": "{{shortcode}}"
        },
        {
            "partnerID": "{{partnerID}}",
            "apikey": "{{apikey}}",
            "pass_type": "plain",
            "mobile": "{{mobile2}}",
            "clientsmsid": {{clientsmsid2}},
            "message": "{{message2}}",
            "shortcode": "{{shortcode}}",
            "pass_type": "{{pass_type}}"
        }
    ]
}

headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
Prev
Send SMS
Next
Send Hashed SMS