Skip to main content

Send Your First SMS

Send your first SMS with Exotel in under 5 minutes. This guide walks you through getting your API credentials and making your first API call.

Prerequisites​

Before you begin, make sure you have:

  • An Exotel account (Sign up here)
  • API credentials (API Key, API Token, Account SID)
  • For India: DLT registration (Entity ID and Template ID)
Where to find your credentials

Log in to the Exotel Dashboard → Settings → API Settings. You'll find your API Key, API Token, and Account SID on this page. See Authentication for details.

Step 1: Set Up Your Credentials​

Store your credentials as environment variables to keep them out of your code:

export EXOTEL_API_KEY="your_api_key"
export EXOTEL_API_TOKEN="your_api_token"
export EXOTEL_ACCOUNT_SID="your_account_sid"
export EXOTEL_SUBDOMAIN="api.exotel.com"
Which subdomain?

Use api.exotel.com (Singapore) for most accounts, or api.in.exotel.com (Mumbai) for India-based accounts with lower latency needs.

Step 2: Send Your First SMS​

curl -X POST "https://$EXOTEL_API_KEY:$EXOTEL_API_TOKEN@$EXOTEL_SUBDOMAIN/v1/Accounts/$EXOTEL_ACCOUNT_SID/Sms/send" \
-d "From=EXOTEL" \
-d "To=+919876543210" \
-d "Body=Hello from Exotel! Your OTP is 123456" \
-d "DltEntityId=YOUR_DLT_ENTITY_ID" \
-d "DltTemplateId=YOUR_DLT_TEMPLATE_ID"

Step 3: Check the Response​

A successful request returns:

{
"SMSMessage": {
"Sid": "a]1b2c3d4e5f6",
"AccountSid": "your_sid",
"From": "EXOTEL",
"To": "+919876543210",
"Body": "Hello from Exotel! Your OTP is 123456",
"Status": "queued",
"DateCreated": "2026-02-25 10:30:00",
"DateSent": null,
"Price": null
}
}
FieldWhat it means
SidYour unique SMS ID — save this to check delivery later
Statusqueued means accepted and waiting to be sent
PriceUpdates after delivery
Important

A 200 response means the SMS was accepted, not delivered. The Status will be queued. Use the SMS Details endpoint or set up a StatusCallback webhook to track delivery.

Step 4: Verify Delivery (Optional)​

Check if your SMS was delivered using the Sid from Step 3:

curl "https://$EXOTEL_API_KEY:$EXOTEL_API_TOKEN@$EXOTEL_SUBDOMAIN/v1/Accounts/$EXOTEL_ACCOUNT_SID/SMS/Messages/YOUR_SMS_SID.json"

Look for "DetailedStatus": "DELIVERED_TO_HANDSET" in the response.

Understanding DLT (India)​

What is DLT?

DLT (Distributed Ledger Technology) is a regulatory requirement by TRAI for all SMS sent in India. You need:

  1. DLT Entity ID — Register as a business entity on a DLT portal (e.g., Jio, Airtel, Vodafone-Idea)
  2. DLT Template ID — Register your message templates for approval
  3. Sender ID — Register your header/sender ID (e.g., "EXOTEL")

Without DLT registration, SMS to Indian numbers will be blocked by telecom operators.

What's Next?​