API Authentication Architecture

CodySMS uses secure, low-latency private authorization token keys to pass handshakes over our cellular routing nodes. Developers must pass their generated key string inside every HTTP header request payload context as an `Auth` parameter block.

Private Key Authentication Required

To acquire your unique secure 60-character cryptographic token, please create a free user account or log into your client matrix dashboard.

Login to get API Key

1. Check Wallet Balance

Returns profile information mapping your developer balance details inside our core system wallet engine ledger.

GET https://codysms.com/api/v1/profile
{
    "success": true,
    "user": {
        "name": "Merchant Name",
        "email": "developer@example.com",
        "balance": "340.50"
    }
}

2. Rent Short-Term Number

Provisions a fresh, 100% genuine cellular non-VoIP US phone number bound instantly to your specific target carrier integration parameters.

POST https://codysms.com/api/v1/number/rent
Post Body Parameter Specification:
ParameterTypeRequirementDescription
serviceStringRequiredThe unique target service system identifier slug mapping name (e.g., `whatsapp`, `telegram`, `google`).
{
    "success": true,
    "message": "Number rented successfully.",
    "rental": {
        "id": 13322954,
        "phone": "15012774216",
        "service": "Whatsapp",
        "cost": "$1.44",
        "expires_in_seconds": 1200
    }
}

3. Check Live Inbound OTP Code

Poll this tracking terminal endpoint progressively using loops to capture inbound text verify strings or integers from carrier pipelines.

GET https://codysms.com/api/v1/number/check-otp/{rental_id}
// Case A: Verification text packet captured successfully
{
    "success": true,
    "sms_received": true,
    "sms_code": "489201",
    "full_message": "Your WhatsApp verification code is: 489-201"
}

// Case B: Listening active, payload state empty (Keep polling)
{
    "success": true,
    "sms_received": false,
    "message": "Waiting for inbound SMS traffic payload instance..."
}

4. Query Rental History Log

Returns structural data indices tracking your complete chronological application transaction logs from your server architecture profiles.

GET https://codysms.com/api/v1/rentals/history
{
    "success": true,
    "current_page": 1,
    "total_records": 450,
    "data": [
        {
            "id": 13322954,
            "phone_number": "15012774216",
            "service_name": "WhatsApp",
            "cost": 1.44,
            "sms_code": "489201",
            "status": "completed",
            "created_at": "2026-06-11 03:20:14"
        }
    ]
}

5. Live Inbound SMS HTTP Webhooks

Deploy custom web listener routing nodes. Configure a URL endpoint structure, and our router will post instant data packets the millisecond text values land on our physical gateway modems.

WEBHOOK POST CALLBACK ↳ https://yourdomain.com/webhook-receiver
{
    "event": "sms.received",
    "timestamp": 1781151781,
    "rental_id": 13322954,
    "phone": "15012774216",
    "service_slug": "whatsapp",
    "sms_code": "489201",
    "raw_text": "Your WhatsApp verification code is: 489-201"
}