India's premier SMS solution, offering cost-effective pricing.
SMS Gateway ProviderSMS Gateway ProviderSMS Gateway Provider
24 x 7 Sales / Support
info@smsgatewayprovider.com
Coimbatore. TN
Developer Docs · XML API

SMS XML API — Bulk & Personalised Sending at Scale

Post a single XML document to send thousands of messages in one request — each with its own recipient, sender ID and personalised text. Built for high‑volume campaigns, per‑customer content and enterprise systems that already speak XML.

1POST = many SMS
Per-messagePersonalisation
Unicode15+ languages
BulkCampaign-ready
<sms> <msg> to=91... Hi Asha </msg> <msg> to=91... Hi Ravi </msg> </sms> Asha Ravi
When to use XML

HTTP API or XML API?

Use the HTTP API when…

You send the same message to one or a few numbers — OTPs, alerts, simple triggers. One line of code per send. See HTTP API →

Use the XML API when…

You send different messages to many recipients in one shot — personalised campaigns, invoices, statements, mixed sender IDs and routes.

Endpoint

Base URL

POST an XML document with Content-Type: application/xml (or as a form field named data) to:

POST https://smsgatewayprovider.com/api/v3/sendsms/xml
Request body

XML structure

A single <MESSAGE> block holds your credentials once, then one <SMS> node per message. Set defaults at the top level and override per message where needed.

<!-- send different text to many recipients in one POST -->
<MESSAGE>
  <AUTH username="acme" apikey="YOUR_API_KEY"/>
  <SMS>
    <SENDER>ACMEIN</SENDER>
    <ROUTE>2</ROUTE>
    <TYPE>0</TYPE>
    <TO>919876543210</TO>
    <TEXT>Hi Asha, your order 4821 has shipped.</TEXT>
  </SMS>
  <SMS>
    <SENDER>ACMEIN</SENDER>
    <ROUTE>2</ROUTE>
    <TO>919812345678</TO>
    <TEXT>Hi Ravi, your order 4822 is out for delivery.</TEXT>
  </SMS>
</MESSAGE>
Reference

XML elements

ElementRequiredDescription
<AUTH>YesCredentials — username and apikey attributes. Sent once for the whole batch.
<SMS>YesOne message. Repeat this node for each recipient / body. Thousands per POST.
<SENDER>YesApproved sender ID / header for this message. Can differ per <SMS>.
<ROUTE>YesRoute ID (transactional / OTP / promotional) for this message.
<TO>YesRecipient in international format without + (e.g. 919876543210).
<TEXT>YesMessage body. Escape XML special characters (&amp;, &lt;) or wrap in <![CDATA[ … ]]>. Must match a DLT template for India.
<TYPE>No0 = plain text (default), 2 = Unicode for regional languages.
<SCHEDULE>NoFuture send time YYYY-MM-DD HH:MM:SS for this message.
Examples

Post the batch

cURL

curl -X POST https://smsgatewayprovider.com/api/v3/sendsms/xml \
  -H "Content-Type: application/xml" \
  --data-binary @batch.xml

PHP

$xml = file_get_contents('batch.xml');
$ch = curl_init('https://smsgatewayprovider.com/api/v3/sendsms/xml');
curl_setopt_array($ch, [
  CURLOPT_POST => true,
  CURLOPT_POSTFIELDS => $xml,
  CURLOPT_HTTPHEADER => ['Content-Type: application/xml'],
  CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch);

Response

<RESPONSE>
  <STATUS>success</STATUS>
  <BROADCAST_ID>1706donef4-2b9c-4d1a</BROADCAST_ID>
  <ACCEPTED>2</ACCEPTED>
  <REJECTED>0</REJECTED>
</RESPONSE>

Each accepted message gets a delivery receipt you can pull from the DLR API using the broadcast ID.

FAQ

XML API — frequently asked questions

How many messages can I send in one POST?
Thousands per request. For very large campaigns we recommend batching into chunks (for example 1,000–5,000 <SMS> nodes per POST) so retries stay cheap and you get responses quickly. Your account tier sets the throughput ceiling.
Can each recipient get a different message and sender ID?
Yes — that is the whole point of the XML API. Every <SMS> node carries its own <TO>, <TEXT>, <SENDER> and <ROUTE>, so you can mix personalised content and multiple headers in a single batch.
How do I include special characters or emoji?
Escape XML reserved characters (&amp;, &lt;, &gt;) or wrap the text in a <![CDATA[ ]]> block. For emoji and regional languages set <TYPE>2</TYPE> (Unicode) and encode the document as UTF‑8.
What happens if one message in the batch is invalid?
Valid messages are still accepted and sent; invalid ones are counted under <REJECTED> with a reason. The batch does not fail as a whole, so a single bad number never blocks the rest of your campaign.
Is DLT compliance handled the same way?
Yes. For Indian traffic each <TEXT> must match an approved DLT template tied to the sender header, exactly as with the HTTP API. We assist with entity, header and template registration.

Ready to run personalised campaigns at scale?

Get API access and send thousands of tailored, DLT‑compliant messages from a single request.

At vero eos et accusamus et iusto odio digni goikussimos ducimus qui to bonfo blanditiis praese. Ntium voluum deleniti atque.

Shopping Cart (0 items)