Overview

This guide walks through integrating the Bulk SMS — DSC API into your application using PHP, Node.js, Python, and cURL. The API endpoint is:

POST https://bulksms.schooldream.co.rw/api/v2/sms/send

Authentication

The API uses three credentials: api_key, username, and password. These are provided when you contact our team to set up your account.

PHP Integration (cURL)

<?php
$url = 'https://bulksms.schooldream.co.rw/api/v2/sms/send';
$data = [
    'api_key'    => 'your_api_key',
    'username'   => 'your_username',
    'password'   => 'your_password',
    'recipients' => '250782589800,250782589801',
    'message'    => 'Hello from BulkSMS!',
    'dlrurl'     => 'https://yourdomain.com/dlr-handler'
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);
echo $result['status']; // "success" or "error"
?>

Node.js Integration (axios)

const axios = require('axios');

const data = {
  api_key: 'your_api_key',
  username: 'your_username',
  password: 'your_password',
  recipients: '250782589800,250782589801',
  message: 'Hello from BulkSMS!',
  dlrurl: 'https://yourdomain.com/dlr-handler'
};

const response = await axios.post(
  'https://bulksms.schooldream.co.rw/api/v2/sms/send',
  data
);
console.log(response.data);

Python Integration (requests)

import requests

url = 'https://bulksms.schooldream.co.rw/api/v2/sms/send'
payload = {
    'api_key': 'your_api_key',
    'username': 'your_username',
    'password': 'your_password',
    'recipients': '250782589800,250782589801',
    'message': 'Hello from BulkSMS!',
    'dlrurl': 'https://yourdomain.com/dlr-handler'
}

response = requests.post(url, data=payload)
print(response.json())

cURL (command line)

curl -X POST https://bulksms.schooldream.co.rw/api/v2/sms/send \
  -d "api_key=your_api_key" \
  -d "username=your_username" \
  -d "password=your_password" \
  -d "recipients=250782589800,250782589801" \
  -d "message=Hello from BulkSMS!" \
  -d "dlrurl=https://yourdomain.com/dlr-handler"

Handling Responses

A successful response looks like:

{
  "status": "success",
  "totalmessages": 2,
  "totalcost": 150,
  "unit": "RWF",
  "response": [
    { "status": "sent", "messageid": "118579716", "recipient": "250782589800", "cost": 75 },
    { "status": "failed", "messageid": "118579717", "recipient": "250782589801", "cost": 75 }
  ]
}

Delivery Reports (DLR)

When you include a dlrurl, our system sends a GET request to your URL when delivery reaches a final state. The callback includes: dnis, username, password, command=deliver, dlvrMsgId, and dlvrMsgStat (D=Delivered, U=Undelivered).

Full documentation is available here →


Contact Us Try the API