+263 77 878 5354 [email protected] Monday to Friday, 08:00 to 17:00 (CAT, UTC+2)
Droom Dazlean Solutions (DDS)

SMS API reference

Everything you need to send SMS from your own system through the free SMS gateway: base URL, authentication, endpoints, limits and examples.

Droom Dazlean Solutions (DDS) runs this API. You need an activated gateway phone and its API key; see how to get one.

Base URL and authentication

Base URL: https://sms.droomdazlean.com/api/v1. Send your key in the X-API-Key header (or Authorization: Bearer KEY, or an api_key field). Every response is JSON with "ok": true or "ok": false and a message.

Send an SMS

POST /api/v1/send with JSON: to (one number, several separated by commas, or a list), message, and optional sim (1 or 2) and skip_invalid (true to send to the valid numbers when some are invalid).

curl -X POST https://sms.droomdazlean.com/api/v1/send \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to": "0771234567", "message": "Hello from DDS", "sim": 1}'

Answer:

{"ok": true, "batch_id": "b_3f…", "count": 1, "phone_online": true,
 "messages": [{"id": 1042, "to": "+263771234567", "status": "pending"}]}

Python

import requests
r = requests.post("https://sms.droomdazlean.com/api/v1/send",
                  headers={"X-API-Key": "YOUR_API_KEY"},
                  json={"to": "0771234567", "message": "Hello"})
print(r.json())

PHP

$ch = curl_init("https://sms.droomdazlean.com/api/v1/send");
curl_setopt_array($ch, [CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ["X-API-Key: YOUR_API_KEY", "Content-Type: application/json"],
  CURLOPT_POSTFIELDS => json_encode(["to" => "0771234567", "message" => "Hello"])]);
echo curl_exec($ch);

JavaScript (from your server, e.g. Node.js)

const r = await fetch("https://sms.droomdazlean.com/api/v1/send", {
  method: "POST",
  headers: {"X-API-Key": process.env.SMS_API_KEY, "Content-Type": "application/json"},
  body: JSON.stringify({to: "0771234567", message: "Hello"})
});
console.log(await r.json());

Many numbers and CSV files

Put several numbers in to, or send a CSV file as multipart/form-data in a field named file: up to 100,000 numbers and 20 MB per request. Use one number per row, or a column named phone (or number, mobile, msisdn, to). An optional message column gives each row its own text. Invalid rows are skipped and reported.

curl -X POST https://sms.droomdazlean.com/api/v1/send \
  -H "X-API-Key: YOUR_API_KEY" \
  -F "[email protected]" \
  -F "message=Our shop opens at 8 tomorrow"

All endpoints

RequestWhat it returns
POST /api/v1/sendQueues one or many SMS; returns the batch id and message ids
GET /api/v1/deviceYour phone: name, online status, battery and SIM cards
GET /api/v1/messages/<id>One message and its current status
GET /api/v1/messagesSent messages, newest first. Filters: status, batch_id, to, page, limit (max 200)
GET /api/v1/receivedSMS your gateway phone received
GET /api/v1/batches/<batch_id>Progress of one send: counts per status and estimated finish
POST /api/v1/batches/<batch_id>/cancelCancels that send's messages that have not gone out yet
GET /api/v1/queueMessages waiting for your phone, its speed and when the queue will be empty

Message status

pending waiting for the phone · sending the phone took it · sent left the phone · delivered the network confirmed delivery · failed see the error for the reason · cancelled stopped before it was sent.

Limits and errors

SituationAnswer
More than 120 requests a minute for one key429 rate_limited with Retry-After: 60
Phone already has 500,000 messages waiting429 queue_full, with how many it can still take
Request larger than 20 MBError explaining the size limit
No valid phone numbers"ok": false listing the invalid numbers

Sending speed: by default one SMS every 10 seconds per phone. Sends with 10 or fewer numbers go before waiting bulk lists. Add more phones (each with its own key) to send faster.

Keep your key safe

Anyone who sees your key can send SMS from your phone and airtime. Call the API from your server, not from a public web page. If a key leaks, contact us and we will replace it. Prefer POST: a key in a URL ends up in logs and browser history.

Help

Full guide, test page and app download: sms.droomdazlean.com. Questions: [email protected] or WhatsApp +263 77 878 5354. Terms: API terms and acceptable use.