Developer Documentation

SMS API Reference

Recommended normalized states:

TEXT
POST https://api.alert21.in/v1/sms/send

Endpoint

TEXT
POST https://api.alert21.in/v1/sms/send

Authentication

BASH
Authorization: Bearer <API_KEY>

Request Body

JSON
{
  "to": "919876543210",
  "template_id": "1107161234567890123",
  "variables": ["Amit", "2500", "TXN88991"]
}
FieldTypeRequiredDescription
tostringYesRecipient in international/E.164-style numeric format expected by the enabled route
template_idstringYesApproved template identifier mapped to the customer account
variablesarray of stringsConditionalOrdered values inserted into template variable positions; send an empty array if the template has no variables

Recommended Success Response

JSON
{
  "success": true,
  "data": {
    "message_id": "AL21SMS260824001234",
    "status": "queued",
    "to": "919876543210",
    "credits_used": 1,
    "submitted_at": "2026-08-24T14:00:00+05:30"
  }
}

Validation Rules

  • API key must be active and authorized for SMS.
  • Recipient format must be valid for the destination.
  • Template must belong to or be authorized for the customer account.
  • Template must be active.
  • Variable count must match the approved template configuration.
  • Message category and destination must be permitted.
  • Sufficient wallet/credit entitlement must exist where prepaid billing applies.
  • Rate limits and abuse controls must pass.

Message Status Endpoint

TEXT
GET https://api.alert21.in/v1/sms/{message_id}

queued, processing, submitted, sent, delivered, failed, rejected, expired, undelivered, cancelled.

Production Integration Recommendations

  • Treat a successful API response as acceptance, not final delivery.
  • Use signed webhooks as the primary delivery-status mechanism.
  • Use the status API for reconciliation.
  • Never infer payment success or other business success from SMS delivery.
  • Use idempotency keys for retry-sensitive events.
  • Do not expose API keys in client-side code.
EVERY ALERT. ONE API.

Turn your next business event into a traceable alert.

Start with DLT-ready SMS today on Alert21’s developer-first communication platform.