HTTP API Documentation

POST /sms/send HTTP/1.1
Host: api.kodesms.com
Content-Type: application/json
ApiKey: {your_api_key}
ApiSecret: {your_api_secret}

{
  "message": "Hello, World!",
  "recipient": "0241234567",
  "sender_alias": "MyApp"
}

PHP API Documentation

<?php
try {
    $ch = curl_init('https://api.kodesms.com/sms/send');

    $payload = json_encode([
        'message' => 'Hello World',
        'recipient' => '0241234567',
        'sender_alias' => 'MyApp'
    ]);

    curl_setopt_array($ch, [
        CURLOPT_POST => true,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            'Content-Type: application/json',
            'ApiKey: ' . $apiKey,
            'ApiSecret: ' . $apiSecret
        ],
        CURLOPT_POSTFIELDS => $payload
    ]);

    $response = curl_exec($ch);
    curl_close($ch);

    // Handle response
} catch (Exception $e) {
    // Handle error
}

CURL API Documentation

Copy                            curl -X POST \
                                -H 'Content-Type: application/json' \
                                -H 'Accept: application/json' \
                                -d '{
                                "from":"KODESMS",
                                "to":"0240120250",
                                "text":"Test SMS."
                                }' http://api.kodesms.com/sms/send
GET API KEYS.