REST API Reference
Complete REST API reference with request/response schemas, error codes, rate limits, and multi-language executable examples.
API Categories
Discover purpose-built endpoints engineered for scale, high-throughput delivery, and rich customer interaction.
Messaging API
Send SMS, WhatsApp Business, and Rich Communication Services (RCS) with unified template rendering, carousel cards, and interactive buttons.
Verify / OTP API
Generate, dispatch, and validate one-time passcodes with intelligent multi-channel fallback routing (WhatsApp → SMS → Voice IVR).
Voice API
Programmatic outbound calling, Text-to-Speech (TTS), interactive dynamic IVR menus, call recording, and real-time status webhooks.
Chatbot API
Manage multi-turn conversational sessions, user context, intent matching, human agent live handoff, and GenAI automated responses.
Webhooks
Event payload definitions, HMAC SHA-256 signature verification headers, timestamp validation, and automatic retry rules.
Accounts & Usage
Query real-time wallet credits, channel balance breakdowns, TPS limits, sub-account provisions, and programmatic usage analytics.
Endpoint Schemas & Responses
Inspect exact request parameters, headers, and JSON responses for all core API endpoints.
Sends an omnichannel message over WhatsApp, SMS, or RCS. If the primary channel fails or is not supported by the handset, the engine will automatically fallback to the specified fallback channel.
{
"channel": "whatsapp",
"to": "+919876543210",
"template_name": "shipping_update_v2",
"parameters": {
"customer_name": "Rahul Sharma",
"tracking_id": "ALOT-88231",
"eta": "Tomorrow by 5 PM"
},
"fallback": {
"channel": "sms",
"sender_id": "ALOTIN",
"dlt_template_id": "110716123456789"
}
}
Generates a cryptographically secure 4-8 digit OTP with customizable expiry and automatic multi-tier delivery over direct telco routes.
{
"phone": "+919876543210",
"otp_length": 6,
"expiry_seconds": 300,
"channels": ["whatsapp", "sms"]
}
// Response: HTTP 200 OK
{
"status": "success",
"request_id": "req_otp_99214a",
"dispatched_via": "whatsapp",
"expires_at": "2026-09-18T06:15:00Z"
}
Triggers an outbound phone call with Text-to-Speech audio or an audio file URL, optionally capturing DTMF user keypresses.
{
"to": "+919876543210",
"caller_id": "+912248900000",
"tts_text": "Your one-time passcode for Alot Banking is 4, 8, 2, 9.",
"record": true,
"callback_url": "https://yourapp.com/webhooks/voice"
}
Alot Solutions signs all webhook payloads with an HMAC-SHA256 signature passed in the X-Alot-Signature header so you can verify authenticity.
{
"event": "message.delivered",
"message_id": "msg_99214f882",
"channel": "whatsapp",
"recipient": "+919876543210",
"status": "DELIVRD",
"delivered_at": "2026-09-18T06:10:22Z",
"carrier_code": "JIO_IND"
}
Standard HTTP & CPaaS Error Codes
Predictable, structured JSON errors for fast debugging.
| HTTP Code | Error String | Description | Recommended Action |
|---|---|---|---|
| 400 | ERR_INVALID_PAYLOAD | Required parameter missing or malformed JSON. | Check schema and phone number format (E.164). |
| 401 | ERR_UNAUTHORIZED | Missing or invalid Bearer API token. | Verify credentials in Alot Developer Console. |
| 422 | ERR_DLT_TEMPLATE_MISMATCH | Provided message body does not match registered TRAI DLT template. | Ensure variable text matches registered DLT template rules. |
| 429 | ERR_RATE_LIMIT_EXCEEDED | Account Transactions Per Second (TPS) limit reached. | Implement exponential backoff or request TPS limit increase. |
| 504 | ERR_CARRIER_TIMEOUT | Downstream telco carrier node did not respond within SLA. | Auto-fallback triggered; check webhook status. |