Quickstart
You will obtain an API key from the developer portal, then send a single
SMS to your own phone. By the end you will have a message_id and a
pending status from the sandbox.
Step 1 — Generate an API key
Section titled “Step 1 — Generate an API key”Open the developer portal in the Bloonio dashboard, switch to the
API keys tab, and click Generate API key. The cleartext
api_key is shown exactly once. Copy it into a secret store
immediately — it is not recoverable from the database after the banner
closes.
See API keys for the full management flow, including rotation and webhook configuration.
Step 2 — Send the SMS
Section titled “Step 2 — Send the SMS”The exact same call works from any language. Pick the tab matching your stack.
curl $BASE_URL/api/v1/lisoloo/sms-api/send \ -X POST \ -H "app-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "to": ["+243998857000"], "message": "Hello from Lisoloo!", "sender_id": "MYAPP" }'import requests
API_URL = "$BASE_URL/api/v1/lisoloo/sms-api"API_KEY = "YOUR_API_KEY"
response = requests.post( f"{API_URL}/send", headers={ "app-key": API_KEY, "Content-Type": "application/json", }, json={ "to": ["+243998857000"], "message": "Hello from Lisoloo!", "sender_id": "MYAPP", }, timeout=10,)response.raise_for_status()
result = response.json()print(f"Message ID: {result['data']['message_id']}")print(f"Status: {result['data']['status']}")const API_URL = "$BASE_URL/api/v1/lisoloo/sms-api";const API_KEY = "YOUR_API_KEY";
const response = await fetch(`${API_URL}/send`, { method: "POST", headers: { "app-key": API_KEY, "Content-Type": "application/json", }, body: JSON.stringify({ to: ["+243998857000"], message: "Hello from Lisoloo!", sender_id: "MYAPP", }),});
if (!response.ok) { throw new Error(`SMS failed: ${response.status}`);}
const { data } = await response.json();console.log("Message ID:", data.message_id);console.log("Status: ", data.status);<?php
$apiUrl = '$BASE_URL/api/v1/lisoloo/sms-api';$apiKey = 'YOUR_API_KEY';
$ch = curl_init();curl_setopt_array($ch, [ CURLOPT_URL => "$apiUrl/send", CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ "app-key: $apiKey", 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => json_encode([ 'to' => ['+243998857000'], 'message' => 'Hello from Lisoloo!', 'sender_id' => 'MYAPP', ]),]);
$response = curl_exec($ch);$result = json_decode($response, true);curl_close($ch);
echo "Message ID: " . $result['data']['message_id'] . PHP_EOL;echo "Status: " . $result['data']['status'] . PHP_EOL;You get back, on success:
{ "status_code": 201, "data": { "message_id": "507f1f77bcf86cd799439011", "total_recipients": 1, "total_messages": 1, "total_cost": 0.02, "currency": "USD", "status": "pending", "sending_type": "immediate" }}Within a few seconds the message will move from pending to
processing to sent to delivered. You can poll
GET /status/{message_id} to see the transitions, or wait for the
webhook to fire (if configured).
Step 3 — Check the status
Section titled “Step 3 — Check the status”curl $BASE_URL/api/v1/lisoloo/sms-api/status/507f1f77bcf86cd799439011 \ -H "app-key: YOUR_API_KEY"message_id = result["data"]["message_id"]status_resp = requests.get( f"{API_URL}/status/{message_id}", headers={"app-key": API_KEY}, timeout=10,)print(status_resp.json())const statusResp = await fetch(`${API_URL}/status/${data.message_id}`, { headers: { "app-key": API_KEY },});console.log(await statusResp.json());$messageId = $result['data']['message_id'];
$ch = curl_init("$apiUrl/status/$messageId");curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ["app-key: $apiKey"],]);echo curl_exec($ch);curl_close($ch);What just happened
Section titled “What just happened”- You authenticated to the gateway with the
app-keyheader. - The gateway validated the key, computed the cost (1 SMS × 1 recipient × unit price), and queued the message.
- The carrier connector picked it up, sent it through the network, and reported a delivery receipt back to the gateway.
- The gateway emitted the receipt to your
callback_urlif you set one, or to the webhook configured on your API key.
Next steps
Section titled “Next steps”- Receive delivery receipts asynchronously. Configure a webhook on your API key. See Webhooks overview.
- Send to many recipients. The
toarray accepts up to 1 000 numbers in one call. See Send an instant SMS. - Schedule the send. Set
sending_type: "scheduled"and passscheduled_dates. See Schedule an SMS. - Handle errors. Read Errors and the error catalogue.