Zobi SMS Gateway

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

ParameterTypeRequirementDescription
numberStringRequiredInternational number with + prefix
device_idIntegerRequiredRegistered device ID
simIntegerOptionalAndroid subscription ID. Omit for device default.
messageStringRequiredSMS 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

ParameterTypeRequirementDescription
nameStringRequiredCampaign name, up to 150 characters
numbersArray or stringRequiredUp to 5,000 international numbers, one per line or in an array. Duplicates are removed.
device_idIntegerRequiredRegistered device ID
simIntegerOptionalAndroid subscription ID. Omit for device default.
messageStringRequiredSMS 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

HTTPMeaning
400Malformed JSON
401Missing or invalid API key
402Insufficient segment credits
403Suspended account, expired or missing package, or HTTPS required
404Unknown or inaccessible endpoint, device or message
405Incorrect HTTP method
409Idempotency conflict
413Request too large
422Invalid fields
429Rate limit exceeded
500Gateway error
503Gateway unavailable
{"error":"Insufficient SMS segment credits."}