API Explain
API Explain
API Explain
VERSION 2.O
1. GETTING STARTED
BulkSMSNigeria.com 1
API DOCUMENTATION
ENDPOINT:
• https://www.bulksmsnigeria.com/api/v2/sms (POST)
HEADER PARAMETERS
• 'Accept: application/json',
• 'Content-Type: application/json'
BODY PARAMETERS
from: string | required | max: 11 characters
Preferred sender ID that will display when a message is received. We recommend alphabetic strings
up to a maximum of 11 characters. However, when necessary, you can also make use of
alphanumeric string. We strongly discourage the use of all numeric sender IDs as it could impact
delivery.
BulkSMSNigeria.com 2
API DOCUMENTATION
Please, note that you need to have a minimum balance of 100NGN in your wallet to make use of
the API.
SAMPLE REQUEST
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.bulksmsnigeria.com/api/v2/sms',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"body": "Your one time pass is 4567. Please, don\'t disclose this to anyone.",
"from": "AirtimeNG",
"to": "2348076007676",
"api_token": "PiSeOpDdBmxEgaUV0fLAsNdQ1GvwppHkHEbzDvOn7MMuYjobvkTVy3ioPh1D",
"gateway": "direct-refund",
"customer_reference": "HXYSJWKKSLOX",
"callback_url": "https://www.airtimenigeria.com/api/reports/sms",
}',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
BulkSMSNigeria.com 3
API DOCUMENTATION
curl_close($curl);
echo $response;
}
}
BulkSMSNigeria.com 4
API DOCUMENTATION
ENDPOINT:
• https://www.bulksmsnigeria.com/api/v2/balance (GET)
HEADER PARAMETERS
• 'Accept: application/json',
• 'Content-Type: application/json'
BODY PARAMETERS
api_token: string | required
Can be generated on the API Settings Page => www.bulksmsnigeria.com/app/api-settings
SAMPLE REQUEST
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.bulksmsnigeria.com/api/v2/balance',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_POSTFIELDS =>'{
"api_token": "PiSeOpDdBmxEgaUV0fLAsNdQ1GvwppHkHEbzDvOn7MMuYjobvkTVy3ioPh1D",
}',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
BulkSMSNigeria.com 5
API DOCUMENTATION
BulkSMSNigeria.com 6
API DOCUMENTATION
BulkSMSNigeria.com 7