Server-side · v1

Transactional SMS API

Order confirmations, shipping updates, appointment reminders — the messages your product sends because something happened, not because you are running a campaign. One endpoint, DLT-approved templates, and an idempotency key so a retry after a timeout cannot send twice.

This is not the OTP endpoint

Login codes go through the authentication API. Keeping them apart is deliberate: OTP delivery rate is a number you watch closely, and folding order updates into it moves that number for reasons that have nothing to do with whether people can log in. They are also billed separately.

Send a message

POST/v1/sms/send

Send one transactional SMS

Sends immediately and returns what happened. The template must already be DLT-approved on your account.

curl https://api.quickauth.in/v1/sms/send \
  -H "Content-Type: application/json" \
  -H "X-Client-Id: $CLIENT_ID" \
  -H "X-Client-Secret: $CLIENT_SECRET" \
  -d '{
    "templateId": "order_shipped",
    "to": "919876543210",
    "variables": ["Rohit", "ORD-42"],
    "idempotencyKey": "order-42-shipped"
  }'

Request fields

FieldRequiredWhat it does
templateIdYesA DLT-approved template on your account.
toYesRecipient in international format — 919876543210, no leading +.
variablesValues for the template’s placeholders, in order. Position is load-bearing.
variableValuesThe same values keyed by name, if you would rather not depend on order.
senderIdOverrides your account’s default sender ID.
idempotencyKeyThe same key never sends twice. See below — you want this.

Use an idempotency key

A network timeout tells you nothing about whether the message was sent. Without a key, the safe-looking retry is how a customer gets the same alert twice; with one, the retry is free. Derive it from something stable in your domain — order-42-shipped, not a random UUID generated at call time, which changes on the retry and defeats the point.

Response

{
  "messageId": "SP-8f2a91c3",
  "status":    "SENT",
  "to":        "919876543210"
}

status is SENT when the carrier accepted the message. It is not a delivery confirmation — see below.

Responses

  • 200The carrier accepted it. A repeat of a known idempotencyKey returns the original result rather than sending again.
  • 400A field is missing or malformed.INVALID_REQUEST
  • 400No such template on your account, or it is not approved.TEMPLATE_NOT_FOUND
  • 401Client id or secret is wrong.INVALID_CLIENT_CREDENTIALS
  • 402Out of SMS credit.INSUFFICIENT_SMS_BALANCE
  • 429Rate limited.RATE_LIMIT_EXCEEDED
  • 502The SMS provider refused the send.PROVIDER_ERROR

DLT, briefly

Indian regulation requires every transactional SMS template to be registered with DLT before it can be delivered. This is a TRAI requirement carried by every operator, not a QuickAuth rule — an unregistered template is rejected by the carrier, not by us. Register templates from the dashboard; approval usually takes a few hours.

Delivery is reported, not returned

A 200 means the carrier accepted the message. Whether it reached the handset arrives later — subscribe to delivery.delivered and delivery.failed under Webhooks in the dashboard, or read the SMS analytics page.

Chat with us