templateCode) when sending messages. This page
covers the two template-management endpoints: create and fetch.
Create Template
Endpoint:POST https://api.onexaura.com/rcs/templates
This endpoint accepts a multipart/form-data request. Template metadata is passed as a JSON
string in the data field, alongside separate form fields for sender profile and media upload.
cURL
Form fields
JSON string (see below) describing the template —
name, type, content fields, and
optional suggestions.Fields inside data
Array of interactive action (button) objects. Optional — can be empty or omitted for basic
text messages.
Field constraints
These are the technical limits. Templates are also reviewed against content rules — category
alignment, brand visibility, and a minimum 70% static text ratio. See
template guidelines.
Suggestion limits depend on the template type:
File name matching. When you upload a file rather than supplying a URL, the uploaded file’s
name must exactly match the
fileName, thumbnailFileName, or documentFileName you declare
in data. A mismatch fails the upload. Videos additionally require a thumbnailFileName.
Suggestions object
Each entry insuggestions is one interactive button. suggestionType determines which other
fields are required.
Type of suggestion. Supported values:
reply, dialer_action, url_action,
view_location_latlong, view_location_query, share_location, calendar_event.Data sent back to the bot when the user interacts with the suggestion. Used for internal
logic/tracking.
Phone number to call when the user taps the suggestion. Required when
suggestionType is
dialer_action.Label for the map location (e.g. “Our Store”). Required when
suggestionType is
view_location_latlong.The query string to search (e.g. “nearest ATM”). Required when
suggestionType is
view_location_query.Event start time, ISO or
yyyy-MM-dd HH:mm:ss format. Required when suggestionType is
calendar_event.Event end time, ISO or
yyyy-MM-dd HH:mm:ss format. Required when suggestionType is
calendar_event.Minimum required fields per suggestion type
Include
displayText in every suggestion, including calendar_event.Template type: Text Message
Text Template
type: "text_message" shape, adding one suggestions entry per action:
Template type: Text Message with Media
URL of the media file to attach. Supported formats usually include images (
.jpg, .png),
videos (.mp4), and documents (.pdf, .docx). The file should be publicly accessible or
hosted via an approved CDN.Determines display order of media and text. Accepted values:
media_at_top (media displayed
above text) or text_message_at_top (text displayed above media).Template type: Rich Card Standalone
Card height. Applies to
VERTICAL orientation only. Supported values: SHORT_HEIGHT,
MEDIUM_HEIGHT, TALL_HEIGHT.Card alignment. Applies to
HORIZONTAL orientation only. Supported values: LEFT or
RIGHT.An object that defines media, text, and actions for this single rich card. See fields below.
height and alignment are mutually exclusive and driven by orientation — a VERTICAL card
takes height, a HORIZONTAL card takes alignment. Set orientation first.standAlone:
Description or message text for the card. Can include placeholders like
[custom_param].Optional list of interactive buttons (see Suggestions Object above). Can be left empty (
[])
if no actions are required.Template type: Rich Card Carousel
Parameters inside eachcarouselList entry:
Fetch Template
Endpoint:POST https://api.onexaura.com/oapi/templates/fetch
cURL
Request body
Sample request
Response
Array of matching template objects. Each object’s shape mirrors the create-template payload
for its
type (text_message, text_message_with_media, rich_card, or carousel), plus:Next steps
Once a template isApproved, reference its name as templateCode when sending a message —
see Send a template message.
