Skip to content

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.

What Message App is

Customers use Message App to:

  1. Send campaigns from the portal (Broadcast, Bulk Upload, Customize, International).
  2. Send the same channel from their own systems using an API key.
  3. 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.

SetupWhereWhy
Wallet balanceUser walletSMS is billed from credits
Approved Sender IDSMS → Utility → Manage Sender IDHeader shown on the phone (for example AZMARQ). India: PE ID (Principal Entity ID)
Approved TemplateSMS → Utility → Manage TemplateDLT template body + template ID
Gateway / routeAssigned to the accountHTTP API field type must match the assigned gateway API code
API key (for developers)System → Developer → API KeyPass 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.

EncodingWhat it is1 SMSLonger textJoin header
Normal (GSM-7)English / GSM alphabet160 chars153 chars per part7 chars
Unicode (UCS-2)Regional languages, emoji70 chars67 chars per part3 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 bodySMS parts billed
1–1601 SMS
161–3062 SMS (153 + 153)
307–4593 SMS
Each extra 153 after that+1 SMS

Unicode / regional language (UCS-2)

Characters in the bodySMS parts billed
1–701 SMS
71–1342 SMS (67 + 67)
135–2013 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.

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:

  1. A Principal Entity (PE) — the company that is sending.
  2. A Header — the sender ID shown on the phone (for example AZMARQ).
  3. 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.

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 operatorHow to find the portal
Vodafone Idea (Vi)Search vilpower / Vi DLT PE registration
AirtelSearch Airtel DLT / commercial communication
JioSearch Jio TrueConnect DLT
BSNLSearch BSNL UCC / DLT
Tata TeleservicesSearch 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.

  1. Register as PE on one DLT portal. Wait until status is approved. Copy the PE ID.
  2. 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.
  3. 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).
  4. Wait for the template status Approved on DLT. Copy the Template ID (usually about 19 digits).
  5. 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.
  6. Send from Broadcast / Customize / API using that sender. On /v1/sms/template, pass templateId and custom values 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

TermWhat it isWhere you get itWhere you store it here
PE IDYour company ID on DLTDLT PE registrationOn the Sender ID (peId)
Sender ID / HeaderName shown on the handsetDLT Header registrationManage Sender ID → field sender on API
Template IDID of one approved messageDLT content templateManage Template → templateId on API
PlaceholdersSlots DLT allows to changeWritten in the DLT bodycustom 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)

ToolWhat you doWhen to use
Broadcast / ComposeOne message to many recipientsPromotions, alerts, same text for everyone
Bulk UploadUpload CSV/Excel of numbers + one campaign messageLarge same-text campaigns
CustomizeFile (or API) with a different message per rowOTPs, names, order IDs, unique text
InternationalSame as compose, for numbers with country codesNon-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

ToolWhat it is
Manage Sender IDCreate / approve / default sender headers. PE ID for DLT
Manage TemplateDLT templates with {#var#} (and similar) placeholders
Manage Short URLBranded / tracked short links to insert in SMS
Personalize URLCustom tracking domains
Block numbersDo-not-send list (manual + bulk upload). Blocked numbers are skipped
Spamming contentWords that block a send if they appear in the message
DLR push configYour webhook URL to receive delivery receipts

Reports

ReportUse
Message reportCampaign-level: status, sender, gateway, date range
Number reportPer-recipient status for a campaign
Advance searchFind messages by number / filters
Clicker reportWho clicked short links (device / OS / browser)
Link / short-URL reportClick analytics
User report downloadExport
Smart resendResend failed / selected statuses, or clicker-based resend

Developer setup

  1. Create an API key under System → Developer → API Key. See Authentication.
  2. Optionally restrict the key with an IP allowlist.
  3. Copy $API_BASE_URL from this page — it is white-label / environment specific.
  4. Prefer POST + JSON. Send endpoints also accept GET.
  5. Pass the key as header apikey or apiKey, or as apikey in 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.


GET|POST

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 shortenUrl is true, targetUrl is required (string or array). Placeholder count must match targetUrl length. 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.

MethodPathPurpose
POST/v1/api/sms/createTemplateCreate one template or an array of templates
POST/v1/api/sms/templateListList / filter by templateName or templateId
POST/v1/api/sms/deleteTemplateDelete 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."
}
POST
/v1/api/sms/createTemplate
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

PathUse
POST /v1/sms/checkMobileNumberErrorValidate numbers. Body: { "apikey": "...", "mobileNumbers": ["91xxxxxxxxxx"] }
POST /v1/sms/saveDndNumberInBlockListAdd DND numbers to the blocklist
POST /v1/sms/webEngageWebEngage 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.

ConceptIn this product
PE IDStored on Sender ID (peId). Applied automatically on send
Template IDStored on the template. Pass templateId on the API
Headersender 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

  1. API key is resolved. The user must be active.
  2. Sender ID must exist and be Approved.
  3. Numbers are normalized. Blocklist numbers are dropped.
  4. Message is checked against spam words. Encoding is GSM (160 / 153) or Unicode (70 / 67) as in Normal and Unicode characters.
  5. Credits are checked on the user’s wallet for every SMS part.
  6. The job is queued. The response returns campaign id and per-number messageId.
  7. 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

SituationWhat it means
Bad or missing keyInvalid API key
User disabledUser deactivated
Unknown or unapproved senderSender ID invalid / blocked / pending
Unknown or unapproved templateNo template / blocked / pending / rejected
Variable count mismatchTemplate does not match custom
Bad numbersInvalid numbers
Low walletInsufficient / low balance
Spam word in textspam content found …
Schedule too soonInvalid scheduleDateTime (must be at least 5 minutes ahead)
Short URL count mismatchShorten URL count does not match

See Errors for HTTP status and the JSON envelope. Next: Quickstart, Recipes, and Webhooks.

Was this page helpful?