templateCode in a Send Message request. This is the
same /oapi/send_sms endpoint used for non-template RCS messages —
the message is routed by the shape of contentMessage.
Endpoint: POST https://api.onexaura.com/oapi/send_sms
cURL
Request body
Wrapper array of one or more message objects, up to 500 per request. See
Send to many recipients.
Optional object used only if links in the message body need shortening/tracking. See fields
below.
Inside each rcs message object
Type of message:
Promotional or Transactional. OTP is not an RCS message type: send one-time
codes as Transactional.Recipient phone number, without prefix, or an array of up to 500 numbers. See
Send to many recipients.
Holds the message payload. For a template message, this contains a
templateMessage object
(documented below). contentMessage can alternatively hold text or richCard for
non-template messages.Inside contentMessage.templateMessage
Template identifier, matching the
name used when the template was created (e.g.
"my_template_otp").A JSON string of key-value pairs replacing the template’s placeholder variables (e.g.
[custom_param]). Not required for templates with no placeholders.Optional urlShortener object
1 = enable URL shortening, 0 = disable. Mandatory if URL shortening is required in the
message body.Array of URL-shortening definitions. Each entry defines
longUrl, senderId/domain, and
track_user.urlDetails entry:
The original (full) URL you want to shortened. Mandatory if
urlShortener.flag is set to
1.The sender ID or bot ID associated with the message (matches your RCS sender). Send this
field with the key
senderId.Send to many recipients
One request can reach many recipients in two ways:
For one recipient,
recipient can be a single number.
- One to many
- Many to many
Examples
Basic template reference
The minimal payload references an approved template bytemplateCode with no personalization:
Template with custom parameters
UsecustomParams to fill placeholders defined in the template’s textMessageContent,
cardDescription, etc.:
templateCode and customParams change to match the template’s
placeholders:
Send
customParams as one JSON object.Media template (with custom params or actions)
Templates of typetext_message_with_media are sent identically — only templateCode (and
optional customParams) differ per action type:
Rich card standalone template
Promotional
templateCode — e.g. rich_card_replyac (reply), richCardDialerAction (dialer),
rich_card_URL (URL), rich_card_location (location, also shown with expireTime),
LocationQuery (location query), standAloneShLocation (share location), and
richCardStandCalend (calendar event).
Rich card carousel template
Dynamic query with tracking (URL shortener + TTL)
Send
ttl as a sibling of contentMessage, at the message-object level.
