API Version:

API Documentation v2

Welcome to the Bulk SMS — Digital Services Center API. Our RESTful API enables you to send SMS messages, track delivery, and integrate SMS capabilities into your applications.

Overview

The Bulk SMS API allows businesses to reliably send SMS messages to customers. It supports delivery reports via callback URLs (DLR), ideal for both production and testing environments.

  • Format: RESTful, form-encoded POST requests
  • Response: JSON
  • DLR: Supports delivery report callbacks
  • Testing: 15 SMS/day in testing mode
  • Cost: 75 RWF per message

Authentication

The API uses three credentials for authentication. All three are required for every request.

ParameterTypeDescription
api_keyStringYour unique API key required
usernameStringYour account username required
passwordStringYour account password required
Contact us at info@digitalservicescenter.rw to receive your API credentials.

Base URL

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

All API requests use the application/x-www-form-urlencoded content type.

Send SMS

Sends an SMS message to one or more recipients. Supports comma-separated recipient lists for bulk sending.

Parameters

ParameterTypeDescription
api_keyStringYour API key required
usernameStringYour username required
passwordStringYour password required
recipientsStringComma-separated numbers, e.g. 250782589800,250782589801 required
messageStringThe SMS message content required
senderStringCustom sender ID (optional, defaults from admin)
dlrurlStringYour DLR callback URL (optional)

Example Request

POST /api/v2/sms/send
Content-Type: application/x-www-form-urlencoded

api_key=your_api_key&username=your_username
&password=your_password
&recipients=250782589800,250782589801
&message=Test from BulkSMS!
&dlrurl=https://yourdomain.com/dlr-handler

Success Response

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

Code Examples

Choose your language to see the integration code:

<?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',
];

$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"
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',
};

const response = await axios.post(
  'https://bulksms.schooldream.co.rw/api/v2/sms/send',
  data
);
console.log(response.data);
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',
}

response = requests.post(url, data=payload)
print(response.json())
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"

Delivery Reports (DLR)

Delivery Reports let you track the final status of each message. Our system forwards delivery statuses to your custom callback URL via GET requests.

Only final statuses (Delivered or Undelivered) are sent to your callback URL. Intermediate statuses like P (Processing) or Q (Queued) are handled internally.

Callback URL Format

When you provide a dlrurl, our system sends a GET request with these parameters:

https://yourdomain.com/api?dnis=$dnis$&username=youruser&password=yourpass&command=deliver&dlvrMsgId=$messageID$&dlvrMsgStat=$status$

Callback Parameters

ParameterDescription
dnisRecipient phone number
usernameYour SMS channel username
passwordYour SMS channel password
commandAlways deliver
dlvrMsgIdUnique message ID
dlvrMsgStatFinal delivery status: D or U

Example Callback

GET https://yourdomain.com/api/dlr-handler?dnis=250782589800&username=SmsUser&password=SmsPass&command=deliver&dlvrMsgId=118579716&dlvrMsgStat=D
Your callback handler should authenticate using the username and password parameters, then process the delivery status.

Final Status Codes

CodeMeaningDescription
DDeliveredMessage reached the recipient's phone. Final status.
UUndeliveredMessage could not be delivered. Final status.

Error Responses

When something goes wrong, the API returns an error response with a descriptive message.

{
  "status": "error",
  "message": "Invalid API key or credentials"
}

Common Errors

HTTP CodeError MessageCause
401Invalid API key or credentialsWrong api_key, username, or password
429Daily SMS limit reached for testing modeExceeded 15 SMS/day testing limit
400Invalid phone numbers: 0781234567Phone number format incorrect
500Failed to send SMS via external gatewayCarrier network issue
400Missing required parameter: recipientsRequired field not provided

Frequently Asked Questions

How do I get my API key?

Contact us at info@digitalservicescenter.rw or call +250 788 822 935 to request your API credentials.

Can I send to multiple numbers?

Yes! Separate phone numbers with commas in the recipients field. Example: 250782589800,250782589801

What happens in testing mode?

You can send up to 15 SMS per day in testing mode. Once the limit is reached, you need to wait until the next day or request live access.

What phone number format should I use?

Use international format without the leading +: 250XXXXXXXXX. Example: 250788000001.

How long does delivery take?

Average delivery time is under 2 seconds. Most messages are delivered within 1 second.

Do you support custom sender IDs?

Yes, use the optional sender parameter. Contact us to register your desired sender ID.

Try the API Playground Get API Credentials