Skip to main content
Send SMS to Indian numbers. Messages go in an sms array, so one request can carry several.
This API covers India, and carries the DLT fields Indian traffic requires. For destinations outside India, use the SMS List API — a different host with a different authentication scheme. See how the two compare.

Endpoint

Call the endpoint over HTTPS. An http:// request is answered with a 301 redirect, and a client that does not follow redirects — or that follows one without re-sending the body — will appear to send nothing while reporting no error.

Headers

string
required
API key issued by OneXtel.
string
required
Must be application/json.

Example request

The sms array

The sms array carries one or more messages in a single call. Each object is one message.
string
required
Sender ID. Must be DLT-approved — see DLT registration.
string
required
Recipient mobile number.
string
required
Content of the SMS.
string
required
Message type: SI, OTP, or SE. Case-sensitive.
SI and SE correspond to the DLT consent categories Service Implicit and Service Explicit — see DLT registration.
string
DLT-approved template ID.
string
DLT entity ID.
integer
1 for a Unicode message, 0 for normal text. Required when sending Unicode.
string | object
Up to five custom references of your own, echoed back on the delivery report so you can match a receipt to your own record. Each slot takes either a plain string or a nested object:
The nested form lets one slot carry several values — useful when five slots are not enough, or when you want the pairs kept together.
The nested object form is supported on SMS only. WhatsApp and RCS take custom references as plain values. Sending an object on those channels is not supported.
The message type is ultimately determined by your API key configuration, regardless of the type you send in the request. If messages are being charged or routed as a different category than you expect, the API key is the thing to check — not the payload.
templateId and entityId are marked optional in the API, but DLT-regulated traffic in India will be rejected by the operator without them. Treat them as required for Indian destinations. See DLT registration.

Messaging patterns

The sms array covers all three ways of sending:

Top-level fields

string
Identifier used to group and track messages as a campaign. Set it if you want the send to be filterable in reports.
string
Country code applied to recipient numbers — for example +91.
boolean
true rejects invalid requests outright; false processes them anyway.
Set validation to true while integrating. With false, a malformed request is accepted and fails silently downstream, which is far harder to diagnose than an upfront rejection.

URL shortener

Include the urlShortener object when your message contains a link you want shortened and tracked.
integer
1 enables shortening, 0 disables it. Required if short-URL conversion is needed.
string
The original URL to shorten. Required when flag is 1.
string
Sender ID associated with the shortened URL. Required when flag is 1.
string
Custom domain, if one is configured for your account. Required when flag is 1.
integer
1 enables click tracking, 0 disables it. Required if location tracking is needed.
Setting urlShortener.flag to 1 without an urlDetails entry shortens every http:// or https:// link already present in messageBody, automatically. Supply urlDetails only when you want to shorten a specific URL and control its domain and tracking separately.
Click data captured this way appears in the Clicker Data and Clicker Details reports, and is also pushed to your own endpoint if you’ve configured one — see the clicker callback.

Response

A request with a valid API key returns HTTP 200, with one entry per message inside smslist.sms[]. The wrapper key is lowercase smslist.
Accepted
integer
Per-message result. 200 means the message was accepted for processing.
string
Outcome text — for an accepted message, the tracking-id confirmation.
string
Tracking ID for the accepted message.
Accepted is not delivered. A 200 entry means OneXtel accepted the message for processing — not that it reached the handset, and not that the recipient number is valid. Confirm the outcome from the delivery report.

Authentication errors

A request with an invalid API key is rejected with HTTP 401, before any message is read:

Request errors

These are rejected before any message in the sms array is processed:
A missing or empty sms[].sender, sms[].recipient, sms[].messageBody, or sms[].type does not fail the request. The platform accepts it with HTTP 200, and the rejection surfaces later on the delivery report, not here. Set validation to true while integrating so these are rejected upfront instead — see validation above.

Send via GET

The same endpoint also accepts a GET request, with the message passed as query parameters instead of a JSON body. It carries one message per request — for several messages in one call, use POST.
string
required
Your OneXtel API key.
string
required
Sender ID. Must be DLT-approved.
string
required
Recipient mobile number. As with POST, pass a comma-separated list for one-to-many.
string
required
Content of the SMS.
string
Message type: SI, OTP, or SE. Case-sensitive.
string
DLT-approved template ID.
string
DLT entity ID.
string
Identifier used to group and track messages as a campaign.
integer
The query-string equivalent of urlShortener.flag — see URL shortener.
string
Up to five custom references, as separate query parameters. Unlike the POST body’s custRef1, these take plain string values only — there is no nested-object form on GET.

Example request

cURL

Response

The GET response uses a different shape from the POST response above:
Accepted
string
Submission result for the request as a whole — for example SUCCESS.
string
Identifier for this submission request.
string
Per-message result — for example SENT.
string
Tracking ID for the message — the same ID that appears on the delivery report.
string
Outcome text for the message.

Request errors on GET

GET validates more upfront than POST does — several conditions POST accepts with HTTP 200 are rejected outright here:
The same condition can behave differently on GET and POST. A missing recipient, for example, is rejected with 400 on GET but accepted with 200 on POST, with the rejection surfacing later on the delivery report instead. Don’t assume one method’s error behavior carries over to the other.