Endpoint
The Fallback API uses the same endpoint as the OmniChannel send API. Fallback behavior
is activated by including the
fallback object in the request body.Headers
Request body
The request body is a JSON object. Each top-level key represents a messaging channel. You may use any one ofsms, wa, or rcs as your primary channel, plus a fallback
object defining the fallback behavior.
sms — SMS channel (array of objects)
DLT template ID. Optional only when template auto-match is enabled on the API key; otherwise
required for DLT-registered SMS in India.
DLT entity ID. Optional only when template auto-match is enabled on the API key; otherwise
required for DLT-registered SMS in India.
With template auto-match enabled on the API key, OneXtel matches
messageBody against your
registered DLT templates and fills in templateId and entityId. When you do pass both, they
are used as sent.Optional custom reference fields for tracking or tagging (e.g.
CustomReference1,
CustomReference2).wa — WhatsApp channel (array of objects)
Object with
name, language.code (the template language), and components. Uses the
same payload structure as the WhatsApp Template Message API.rcs — RCS channel (array of objects)
Contains
templateMessage, an object with templateCode and customParams. Uses the
same payload structure as the RCS Template Message API.fallback — fallback configuration (object)
Defines fallback behavior when the primary channel fails to deliver.
Seconds to wait for a delivery or failure report on the primary channel before falling back,
for example
30. A numeric string such as "30" is accepted too. If the primary message carries
a ttl longer than this wait time, the wait time overrides the TTL, so the primary attempt ends
when fallback fires and the recipient does not get both messages.SMS fallback object:
sender, type, messageBody plus optional unicode,
templateId, entityId, and custRef1–custRef5. Include as per your fallback
configuration. templateId and entityId follow the same auto-match rule as the sms
channel above.WhatsApp fallback object:
sender, template, languageCode, templateComponents
(same payload structure as the WhatsApp Template Message API) plus optional
custref1–custref5. Include as per your fallback configuration.RCS fallback object:
sender, messageType, templateCode, customParams (same
payload structure as the RCS Template Message API) plus optional
custref1–custref5. Include as per your fallback configuration.Fallback Channel 1 and Fallback Channel 2 details can be added as per your fallback
configuration. If a third-party fallback is used, dynamic keys can be added with the
specific channel name.
When the fallback block is rejected
The fallback block is checked before the primary message, so these come back straight away:
A mistake inside the fallback message itself, such as an invalid SMS
type, is not caught here.
It surfaces only when fallback fires, after the primary send has returned 200. Check a request
with the payload validator before you send it.
Optional top-level fields
Object with
flag (set to 1 — mandatory if a URL shortener is required in the
message body) and a urlDetails array. Each urlDetails item contains longUrl
(mandatory when flag is 1), domain (optional), and track_user (optional).
