REST API — Send SMS

Send SMS programmatically using a simple HTTP POST request. All responses return JSON.

POST http://test.ottwala.xyz/api/send.php
Request Parameters
ParameterTypeRequiredDescription
api_keystringYesYour API key
tostringYesRecipient phone number (e.g. 01712345678)
messagestringYesSMS body text
typestringNonon_masking (default), readymade, or custom
sender_idstringConditionalRequired for readymade type. Auto-filled for custom.
Code Examples
cURL
curl -X POST http://test.ottwala.xyz/api/send.php \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "sk_live_your_api_key_here",
    "to": "01712345678",
    "message": "Hello from SHEBA SMS!",
    "type": "non_masking"
  }'
PHP
$response = file_get_contents('http://test.ottwala.xyz/api/send.php', false,
    stream_context_create(['http' => [
        'method'  => 'POST',
        'header'  => 'Content-Type: application/json',
        'content' => json_encode([
            'api_key' => 'sk_live_your_api_key_here',
            'to'      => '01712345678',
            'message' => 'Hello from SHEBA SMS!',
            'type'    => 'non_masking'
        ])
    ]])
);
print_r(json_decode($response, true));
Response Format
JSON Response
{
    "success": true,
    "message": "SMS sent successfully",
    "data": {
        "recipient": "01712345678",
        "segments": 1,
        "cost": 0.35,
        "balance": 985.50
    }
}