API Documentation

REST API. JSON in, JSON out. No SDKs required.

Base URL

https://api.bremlio.com

All requests require the X-Api-Key header.

Endpoints

Send SMS
POST /sms/send { "to": "+27821234567", "message": "Your order is confirmed." } → { "success": true, "destination": "South Africa", "cost": 1, "credits_remaining": 94 }
Send OTP
POST /otp/send { "phone": "+27821234567" } → { "success": true, "otp_id": "abc123", "expires_in": 300 }
Bulk SMS (up to 50)
POST /sms/send-bulk { "messages": [ { "to": "+268...", "message": "Hello" }, { "to": "+277...", "message": "Hi" } ] } → { "success": true, "sent": 2 }
Check Balance
GET /sms/balance → { "notification_credits": 487 } GET /sms/pricing → { "rates": [ { "country": "Eswatini", "credits": 1 }, { "country": "UK", "credits": 2 }, ... ]}
Price Check
POST /sms/price-check { "to": "+447846426683" } → { "country": "UK", "credits_per_sms": 2 }
Verify OTP
POST /otp/verify { "otp_id": "abc123", "code": "482916" } → { "success": true, "verified": true }

Quick Start

cURL example
curl -X POST https://api.bremlio.com/sms/send \ -H "X-Api-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"to": "+27821234567", "message": "Hello from Bremlio!"}'
Node.js
const res = await fetch('https://api.bremlio.com/sms/send', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-Api-Key': process.env.BREMLIO_KEY }, body: JSON.stringify({ to: '+27821234567', message: 'Hello from Bremlio!' }) }); const data = await res.json();
Python
import requests r = requests.post('https://api.bremlio.com/sms/send', headers={'X-Api-Key': 'YOUR_API_KEY'}, json={'to': '+27821234567', 'message': 'Hello from Bremlio!'}) print(r.json())

Try it live

Uses a shared test key. Get your own API key for production.