SMS API (Message App) and India DLT
SMS / Message App is the Azmarq text-message channel. Send from the portal, or from your own systems with an API key. Wallet credits are deducted per SMS part: GSM (English) is 160 characters, Unicode (regional languages) is 70. India traffic needs DLT (PE ID + header + template) before the first send — see What DLT is.
$API_BASE_URL is https://api.azmarq.com. Authenticate with an API key (apikey / apiKey header, or apikey in the query or body) — not a portal login token. Store messageId from the send response to match delivery reports.
What Message App is
Customers use Message App to:
- Send campaigns from the portal (Broadcast, Bulk Upload, Customize, International).
- Send the same channel from their own systems using an API key.
- Manage sender IDs, DLT templates, short URLs, blocklists, DLR callbacks, and reports.
Credits depend on gateway price, normal vs Unicode encoding, how many SMS parts the body splits into, and short-URL length. Blocked numbers are skipped and not billed. India traffic uses PE ID on the sender ID and DLT template ID on the template.
Get ready before sending
Complete this setup in the portal before the first send.
| Setup | Where | Why |
|---|---|---|
| Wallet balance | User wallet | SMS is billed from credits |
| Approved Sender ID | SMS → Utility → Manage Sender ID | Header shown on the phone (for example AZMARQ). India: PE ID (Principal Entity ID) |
| Approved Template | SMS → Utility → Manage Template | DLT template body + template ID |
| Gateway / route | Assigned to the account | HTTP API field type must match the assigned gateway API code |
| API key (for developers) | System → Developer → API Key | Pass as header or body apikey |
API keys can have an IP allowlist and priority. Inactive users or keys are rejected.
Normal and Unicode characters
Handsets and mobile operators encode every SMS as either normal (GSM-7) characters or Unicode (UCS-2). That is a carrier rule from 3GPP TS 23.040 (the SMS specification, formerly GSM 03.40), not an Azmarq-only setting. The wallet bills one SMS credit per part the operator counts.
Unicode here means regional languages — Hindi, Tamil, Telugu, Kannada, Malayalam, Marathi, Bengali, Gujarati, Punjabi, Arabic, and any other non-GSM script — plus emoji. General English that stays in the GSM alphabet is normal text.
| Encoding | What it is | 1 SMS | Longer text | Join header |
|---|---|---|---|---|
| Normal (GSM-7) | English / GSM alphabet | 160 chars | 153 chars per part | 7 chars |
| Unicode (UCS-2) | Regional languages, emoji | 70 chars | 67 chars per part | 3 chars |
A phone still shows one long message. Operators send it as several linked parts. Those reserved characters are the User Data Header (UDH) that tells the handset how to join the parts. They are not extra letters in your copy — they come out of the per-part budget, which is why 160 becomes 153 and 70 becomes 67 after the first SMS.
How many credits a body uses
Count the characters in the final body (including spaces, newlines, DLT variables after they are filled, and any short URL). Then apply the table above.
Normal / English (GSM-7)
| Characters in the body | SMS parts billed |
|---|---|
| 1–160 | 1 SMS |
| 161–306 | 2 SMS (153 + 153) |
| 307–459 | 3 SMS |
| Each extra 153 after that | +1 SMS |
Unicode / regional language (UCS-2)
| Characters in the body | SMS parts billed |
|---|---|
| 1–70 | 1 SMS |
| 71–134 | 2 SMS (67 + 67) |
| 135–201 | 3 SMS |
| Each extra 67 after that | +1 SMS |
Examples: 160 English characters is 1 SMS. 161 English characters is 2 SMS. 70 Hindi characters is 1 SMS. 71 Hindi characters is 2 SMS.
One non-GSM character switches the whole message to Unicode. A 120-character English alert with a single Hindi word, emoji, or smart quote is billed as Unicode (70 / 67), not as GSM (160 / 153). GSM extension characters such as € { } [ ] \ ~ | ^ also count as two characters in a normal SMS.
On compose, pick text or unicode to match the body. On POST /v1/sms, unicode is 0 or 1. The platform also auto-detects non-Latin characters. For India, register the same encoding on DLT: a Unicode Hindi template cannot be sent as GSM text.
Short URLs, names, and OTP digits sit inside this budget. Keep Unicode campaigns shorter if you need a single credit.
What DLT is
DLT (Distributed Ledger Technology) is India’s national registry for commercial SMS. TRAI requires every promotional or transactional SMS on Indian numbers to be tied to:
- A Principal Entity (PE) — the company that is sending.
- A Header — the sender ID shown on the phone (for example
AZMARQ). - A content template — the exact wording (with placeholders) that operators are allowed to deliver.
Operators look up those three records on DLT before they deliver. If the PE ID, header, or template ID is missing, pending, or does not match the text you send, the message is dropped. This is an India telecom rule, not an Azmarq-only setting.
You register PE, headers, and templates on a DLT operator portal. You then copy the IDs into Message App. Azmarq does not register you on DLT and cannot approve a header that DLT has not approved.
This section covers what DLT is, where to register, and how PE ID, header, and template ID fit together. Complete DLT first, then map the IDs here. If something is still unclear after that, the team is happy to help.
Where to register DLT
Register once as a Principal Entity on any one TRAI-authorized DLT operator. The PE ID is shared across Indian operators through DLT, so you do not open a PE on every telco.
| DLT operator | How to find the portal |
|---|---|
| Vodafone Idea (Vi) | Search vilpower / Vi DLT PE registration |
| Airtel | Search Airtel DLT / commercial communication |
| Jio | Search Jio TrueConnect DLT |
| BSNL | Search BSNL UCC / DLT |
| Tata Teleservices | Search Tata DLT PE registration |
Portal URLs change. Use the operator’s current DLT site. You will typically upload company KYC (PAN, GST, CIN or equivalent, and a letter of authorization). After the operator approves the PE, you receive a PE ID.
Individuals / proprietors can also register where the operator allows it; keep the same PAN / GST you will use on headers and templates.
DLT process
Do these steps in order. Do not create senders or templates in Message App until DLT has issued the IDs.
- Register as PE on one DLT portal. Wait until status is approved. Copy the PE ID.
- Register Headers (Sender IDs) on that PE. India headers are usually 6 alphabetic characters. Choose the header type that matches the traffic (promotional vs transactional / service). A header approved only for transactional traffic cannot be used for promotions.
- Register content templates against those headers. Paste the exact message. Use DLT placeholders such as
{'{#var#}'}(and similar slots like{'{#num#}'}/{'{#name#}'}) where values will change per send. Pick the template type that matches the use (transactional, service implicit, service explicit, promotional). - Wait for the template status Approved on DLT. Copy the Template ID (usually about 19 digits).
- In Message App:
- SMS → Utility → Manage Sender ID — add the same header, paste PE ID, wait until this portal also shows Approved.
- SMS → Utility → Manage Template — paste the same body as DLT plus the template ID. Wait until Approved.
- Send from Broadcast / Customize / API using that sender. On
/v1/sms/template, passtemplateIdandcustomvalues in placeholder order.
Approval is not instant. PE and header review often takes a few working days. Templates are usually faster once the PE is live. Pending, rejected, or blocked records cannot be used on send.
If you change the wording on DLT, update the same template here. The body you send must stay identical to the registered template, with variables only in the placeholder slots.
Consent and DND
Promotional SMS to Indian numbers is subject to customer preference (DND / consent). Do not send promotional copy on a transactional header or template. Azmarq will still submit the message to the gateway; operators can still fail it when DLT or preference checks fail.
Sender IDs and templates
| Term | What it is | Where you get it | Where you store it here |
|---|---|---|---|
| PE ID | Your company ID on DLT | DLT PE registration | On the Sender ID (peId) |
| Sender ID / Header | Name shown on the handset | DLT Header registration | Manage Sender ID → field sender on API |
| Template ID | ID of one approved message | DLT content template | Manage Template → templateId on API |
| Placeholders | Slots DLT allows to change | Written in the DLT body | custom array on /v1/sms/template (same count and order) |
Unicode vs text: Hindi and other regional languages are Unicode. They use the 70 / 67 character budget in Normal and Unicode characters. Register the Unicode body on DLT if that is what you will send.
Short URLs: if the live message will contain a short link, the DLT template must allow that variable/URL pattern. Register the template with a placeholder for the link; do not insert a domain DLT did not approve.
Portal tools
Menu labels can vary by role. These are the Message App screens.
Create campaign (Quick Send)
| Tool | What you do | When to use |
|---|---|---|
| Broadcast / Compose | One message to many recipients | Promotions, alerts, same text for everyone |
| Bulk Upload | Upload CSV/Excel of numbers + one campaign message | Large same-text campaigns |
| Customize | File (or API) with a different message per row | OTPs, names, order IDs, unique text |
| International | Same as compose, for numbers with country codes | Non-India / international routes |
Broadcast audience sources
- Manual numbers (paste or type)
- Saved contacts: groups, categories, tags, CDP segments / sources / tags
- Upload file (CSV / Excel)
Campaign setup
- Gateway / route
- Sender ID
- Campaign name
- Message (plain text or unicode)
- Optional DLT template
- Optional short URLs in the body
- Send now or Schedule
- Optional split send (batch size + interval)
- Optional fallback to WhatsApp / RCS (if the account has it). Create the rule under Fallback Routing, then Enable Fallback on compose.
- Test vs production mode on file campaigns
Utilities
| Tool | What it is |
|---|---|
| Manage Sender ID | Create / approve / default sender headers. PE ID for DLT |
| Manage Template | DLT templates with {#var#} (and similar) placeholders |
| Manage Short URL | Branded / tracked short links to insert in SMS |
| Personalize URL | Custom tracking domains |
| Block numbers | Do-not-send list (manual + bulk upload). Blocked numbers are skipped |
| Spamming content | Words that block a send if they appear in the message |
| DLR push config | Your webhook URL to receive delivery receipts |
Reports
| Report | Use |
|---|---|
| Message report | Campaign-level: status, sender, gateway, date range |
| Number report | Per-recipient status for a campaign |
| Advance search | Find messages by number / filters |
| Clicker report | Who clicked short links (device / OS / browser) |
| Link / short-URL report | Click analytics |
| User report download | Export |
| Smart resend | Resend failed / selected statuses, or clicker-based resend |
Developer setup
- Create an API key under System → Developer → API Key. See Authentication.
- Optionally restrict the key with an IP allowlist.
- Copy
$API_BASE_URLfrom this page — it is white-label / environment specific. - Prefer POST + JSON. Send endpoints also accept GET.
- Pass the key as header
apikeyorapiKey, or asapikeyin the query or JSON body.
Send endpoints: $API_BASE_URL/v1/sms, /v1/sms/template, and /v1/sms/customize. Full URL for this environment: https://api.azmarq.com/v1/sms.
Send SMS
GET or POST $API_BASE_URL/v1/sms. Prefer POST + JSON.
One approved sender, one message body, one or more numbers in to.
Required fields
- Name
apikey- Type
- string
- Description
Developer API key (header, query, or body).
- Name
sender- Type
- string
- Description
Approved sender ID name.
- Name
to- Type
- string
- Description
Comma-separated mobile numbers.
- Name
text- Type
- string
- Description
Message body.
Optional fields
- Name
type- Type
- string
- Description
Route / gateway API code. Must match the gateway assigned to the account.
- Name
unicode- Type
- 0 or 1
- Description
Force Unicode (regional languages). Also auto-detected if the text has non-Latin characters. See Normal and Unicode characters: GSM 160 / 153, Unicode 70 / 67.
- Name
templateId- Type
- string
- Description
DLT template ID, 10–20 digits.
- Name
campaignName- Type
- string
- Description
Shown in reports.
- Name
scheduleDateTime- Type
- string
- Description
YYYY-MM-DD HH:mm:ss. Must be at least 5 minutes in the future.
- Name
flash- Type
- boolean
- Description
Flash SMS.
- Name
mid- Type
- string
- Description
Your own message id.
- Name
autoShortenUrl- Type
- boolean
- Description
Auto-shorten URLs in the text.
- Name
callbackAutoShortenUrl- Type
- string
- Description
Callback for auto-shortened URLs.
- Name
autoTrackRecipient- Type
- boolean
- Description
Per-recipient tracking on auto-shorten.
- Name
shortenUrlData- Type
- object
- Description
Manual short-URL control. If
shortenUrlistrue,targetUrlis required (string or array). Placeholder count must matchtargetUrllength. All shortened URLs in one message must share the same domain.
shortenUrlData shape:
{
"shortenUrl": true,
"targetUrl": ["https://example.com/offer"],
"trackRecipient": false,
"callbackShortenUrl": "https://yourapp.com/shorten-callback"
}
Request
curl --location --request POST 'https://api.azmarq.com/v1/sms' \
--header 'Content-Type: application/json' \
--header 'apikey: YOUR_API_KEY' \
--data-raw '{
"sender": "AZMARQ",
"to": "91xxxxxxxxxx,91yyyyyyyyyy",
"text": "Your OTP is 123456",
"type": "TRANSACTIONAL",
"templateId": "1234567890123456789",
"campaignName": "otp-login"
}'Response
{
"status": "OK",
"id": "<campaign-uuid>",
"data": [
{
"recipient": "91xxxxxxxxxx",
"messageId": "<campaign-uuid>:1"
}
],
"totalCount": 1,
"message": "Message Sent Successfully!",
"error": null
}
Send from a DLT template
GET or POST $API_BASE_URL/v1/sms/template. Same auth and routing as Send SMS, but the body is built from an approved template.
Template placeholders are DLT-style: {#var#}, {#num#}, {#name#}, and similar. Pending or rejected templates cannot be used.
- Name
apikey- Type
- string
- Description
Required. API key.
- Name
sender- Type
- string
- Description
Required. Sender ID name.
- Name
to- Type
- string
- Description
Required. Comma-separated numbers.
- Name
templateId- Type
- string
- Description
Required. DLT template ID.
- Name
custom- Type
- array
- Description
Required if the template has {#var#} slots. Replacement values. Count must match placeholders.
- Name
type- Type
- string
- Description
Optional. Gateway API code, same as
/v1/sms.
- Name
unicode, scheduleDateTime, flash, short-URL fields, mid- Type
- optional
- Description
Same meaning as
/v1/sms.
Request
curl --location --request POST 'https://api.azmarq.com/v1/sms/template' \
--header 'Content-Type: application/json' \
--header 'apikey: YOUR_API_KEY' \
--data-raw '{
"sender": "AZMARQ",
"to": "91xxxxxxxxxx",
"templateId": "1234567890123456789",
"custom": [
"123456"
],
"type": "TRANSACTIONAL"
}'Response shape matches Send SMS: status, id, data[] with recipient and messageId, totalCount, plus message and error.
Customize SMS
POST $API_BASE_URL/v1/sms/customize
Use when each row has its own text.
Rows with empty to / text, spam hits, or invalid numbers are skipped.
Related: POST $API_BASE_URL/v1/sms/customize-number uses the same payload. That response also flags invalid numbers with isValid: false.
Request
curl --location --request POST 'https://api.azmarq.com/v1/sms/customize' \
--header 'Content-Type: application/json' \
--header 'apikey: YOUR_API_KEY' \
--data-raw '{
"sender": "AZMARQ",
"type": "TRANSACTIONAL",
"campaignName": "order-updates",
"data": [
{
"to": "91xxxxxxxxxx",
"text": "Hi Ravi, order #1001 is shipped",
"templateId": "1234567890123456789",
"mid": "ord-1001",
"meta": {}
},
{
"to": "91yyyyyyyyyy",
"text": "Hi Anu, order #1002 is shipped",
"templateId": "1234567890123456789",
"mid": "ord-1002"
}
]
}'Template library
Manage DLT templates over HTTP. Auth is the same API key.
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/api/sms/createTemplate | Create one template or an array of templates |
| POST | /v1/api/sms/templateList | List / filter by templateName or templateId |
| POST | /v1/api/sms/deleteTemplate | Delete by id |
Create body:
- Name
apikey- Type
- string
- Description
Required.
- Name
templateId- Type
- string
- Description
Exactly 19 characters.
- Name
templateName- Type
- string
- Description
Required.
- Name
senderIdName- Type
- array
- Description
Array of sender names (minimum 1).
- Name
templateData- Type
- string
- Description
Template body with {#var#} slots.
Create template
{
"apikey": "YOUR_API_KEY",
"templateId": "1234567890123456789",
"templateName": "OTP Login",
"senderIdName": ["AZMARQ"],
"templateData": "Your OTP is {#var#}. Do not share it."
}
curl --location --request POST 'https://api.azmarq.com/v1/api/sms/createTemplate' \
--header 'Content-Type: application/json' \
--header 'apikey: YOUR_API_KEY' \
--data-raw '{
"apikey": "YOUR_API_KEY",
"templateId": "1234567890123456789",
"templateName": "OTP Login",
"senderIdName": [
"AZMARQ"
],
"templateData": "Your OTP is {#var#}. Do not share it."
}'Recipient delivery report
POST $API_BASE_URL/v1/api/sms/getSmsRecipientReport
Maximum 100 ids. Returns messageId, senderId, mobileNumber, status, errCode, errorDescription, createdAt.
Request
curl --location --request POST 'https://api.azmarq.com/v1/api/sms/getSmsRecipientReport' \
--header 'Content-Type: application/json' \
--header 'apikey: YOUR_API_KEY' \
--data-raw '{
"apikey": "YOUR_API_KEY",
"messageIds": [
"<campaign-uuid>:1",
"<campaign-uuid>:2"
]
}'Live operator status also arrives on the DLR webhook if you configured DLR push config under Utilities.
Other SMS APIs
| Path | Use |
|---|---|
POST /v1/sms/checkMobileNumberError | Validate numbers. Body: { "apikey": "...", "mobileNumbers": ["91xxxxxxxxxx"] } |
POST /v1/sms/saveDndNumberInBlockList | Add DND numbers to the blocklist |
POST /v1/sms/webEngage | WebEngage connector. Uses smsData and metadata.indiaDLT (contentTemplateId + principalEntityId) |
India DLT
How DLT maps on a send in this product. For registration and process, start at What DLT is.
| Concept | In this product |
|---|---|
| PE ID | Stored on Sender ID (peId). Applied automatically on send |
| Template ID | Stored on the template. Pass templateId on the API |
| Header | sender must be an Approved sender ID |
| Variables | {#var#} slots. custom[] count must match |
If the sender or template is pending, blocked, or rejected, the send fails. DLT still has to be Approved on the operator portal first.
How a send behaves
- API key is resolved. The user must be active.
- Sender ID must exist and be Approved.
- Numbers are normalized. Blocklist numbers are dropped.
- Message is checked against spam words. Encoding is GSM (160 / 153) or Unicode (70 / 67) as in Normal and Unicode characters.
- Credits are checked on the user’s wallet for every SMS part.
- The job is queued. The response returns campaign
idand per-numbermessageId. - Delivery status later appears in Message / Number reports, and on the DLR webhook if configured.
If every number is blocked, the API still returns success with empty data and totalCount: 0. Those numbers were skipped, not billed.
HTTP 200 on send means the API accepted the job. Handset delivery (DELIVERED, FAILED, PENDING) arrives later.
Typical errors
| Situation | What it means |
|---|---|
| Bad or missing key | Invalid API key |
| User disabled | User deactivated |
| Unknown or unapproved sender | Sender ID invalid / blocked / pending |
| Unknown or unapproved template | No template / blocked / pending / rejected |
| Variable count mismatch | Template does not match custom |
| Bad numbers | Invalid numbers |
| Low wallet | Insufficient / low balance |
| Spam word in text | spam content found … |
| Schedule too soon | Invalid scheduleDateTime (must be at least 5 minutes ahead) |
| Short URL count mismatch | Shorten URL count does not match |
See Errors for HTTP status and the JSON envelope. Next: Quickstart, Recipes, and Webhooks.