SMS Quickstart — Send OTPs and alerts in minutes
Use the same MailSetu API model to send transactional or promotional SMS from any backend.
Step 1 — Create or reuse an API key
Open the dashboard and create an API key with send access. Sandbox keys are safe for integration testing; live keys require real AWS SNS credentials and sender configuration.
Step 2 — Send your first SMS
POST to /v1/messages with channel=sms, an E.164 phone number, and the message body.
curl -X POST https://api.mailssetu.in/v1/messages \
-H "Authorization: Bearer ms_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"channel": "sms",
"to": "+919876543210",
"message": "Your MailSetu OTP is 482913. It expires in 10 minutes.",
"type": "transactional"
}'Step 3 — Track delivery
Every SMS appears in Dashboard → SMS Logs, where you can inspect provider IDs, retries, failures, and the full event trail. The API also returns `X-SMS-Quota-*` headers so you can monitor usage proactively.
Production checklist
Before sending live traffic: • Configure AWS SNS credentials in your API environment • Register sender IDs / DLT when required for India • Keep recipient numbers in E.164 format • Use idempotency keys for OTP retries from your app
