API Documentation
Authentication
Use your customer API key as Authorization: Bearer API_KEY. Send JSON over HTTPS. Only message recipients who consented. Requests to queue SMS return HTTP 202. Delivery depends on the selected Android device and its carrier.
For write requests, send a unique Idempotency-Key header. Reuse it with the same payload if the response is lost. A changed payload with the same key returns HTTP 409.
Send single SMS
POST https://zobi.hajanaone.com/api/?op=send
| Parameter | Type | Requirement | Description |
|---|---|---|---|
| number | String | Required | International number with + prefix |
| device_id | Integer | Required | Registered device ID |
| sim | Integer | Optional | Android subscription ID. Omit for device default. |
| message | String | Required | SMS text, up to 2,000 characters |
cURL
curl --request POST 'https://zobi.hajanaone.com/api/?op=send' \
--header 'Authorization: Bearer API_KEY' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: REPLACE_WITH_OPERATION_ID' \
--data '{"device_id":12,"sim":0,"message":"Your appointment is tomorrow.","number":"+15551234567"}'PHP
<?php
$ch = curl_init('https://zobi.hajanaone.com/api/?op=send');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("ZOBI_API_KEY"),
"Content-Type: application/json", "Idempotency-Key: REPLACE_WITH_OPERATION_ID"],
CURLOPT_POSTFIELDS => '{"device_id":12,"sim":0,"message":"Your appointment is tomorrow.","number":"+15551234567"}',
CURLOPT_TIMEOUT => 15,
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $response;HTTP 202 response
{
"status": "pending",
"segments_per_message": 1,
"credits_used": 1,
"count": 1,
"message_id": 42
}Start campaign
POST https://zobi.hajanaone.com/api/?op=campaign
| Parameter | Type | Requirement | Description |
|---|---|---|---|
| name | String | Required | Campaign name, up to 150 characters |
| numbers | Array or string | Required | Up to 5,000 international numbers, one per line or in an array. Duplicates are removed. |
| device_id | Integer | Required | Registered device ID |
| sim | Integer | Optional | Android subscription ID. Omit for device default. |
| message | String | Required | SMS text, up to 2,000 characters |
cURL
curl --request POST 'https://zobi.hajanaone.com/api/?op=campaign' \
--header 'Authorization: Bearer API_KEY' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: REPLACE_WITH_OPERATION_ID' \
--data '{"device_id":12,"sim":0,"message":"Your appointment is tomorrow.","name":"Appointment reminders","numbers":["+15551234567","+15551234568"]}'PHP
<?php
$ch = curl_init('https://zobi.hajanaone.com/api/?op=campaign');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("ZOBI_API_KEY"),
"Content-Type: application/json", "Idempotency-Key: REPLACE_WITH_OPERATION_ID"],
CURLOPT_POSTFIELDS => '{"device_id":12,"sim":0,"message":"Your appointment is tomorrow.","name":"Appointment reminders","numbers":["+15551234567","+15551234568"]}',
CURLOPT_TIMEOUT => 15,
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $response;HTTP 202 response
{
"status": "pending",
"segments_per_message": 1,
"credits_used": 2,
"count": 2,
"campaign_id": 42
}Read endpoints
Message status
GET https://zobi.hajanaone.com/api/?op=status&id=42
{
"id": 42,
"device_id": 12,
"sim": 0,
"status": "delivered",
"segments": 1,
"attempts": 1,
"created": "2026-01-01 10:00:00",
"changed": "2026-01-01 10:00:08",
"report": "Carrier delivery confirmed",
"error": null
}Device list
GET https://zobi.hajanaone.com/api/?op=devices
{
"devices": [
{
"id": 12,
"name": "Android",
"sims": [
{
"id": 1,
"slot": 0,
"label": "Carrier"
}
],
"online": 1,
"running": 1,
"last_seen": "2026-01-01 10:00:08"
}
]
}Account credits
GET https://zobi.hajanaone.com/api/?op=credits
{
"package": "Standard",
"expires": null,
"credits": 100,
"used": 2,
"remaining": 98,
"device_limit": 1
}Errors
| HTTP | Meaning |
|---|---|
| 400 | Malformed JSON |
| 401 | Missing or invalid API key |
| 402 | Insufficient segment credits |
| 403 | Suspended account, expired or missing package, or HTTPS required |
| 404 | Unknown or inaccessible endpoint, device or message |
| 405 | Incorrect HTTP method |
| 409 | Idempotency conflict |
| 413 | Request too large |
| 422 | Invalid fields |
| 429 | Rate limit exceeded |
| 500 | Gateway error |
| 503 | Gateway unavailable |
{"error":"Insufficient SMS segment credits."}