Skip to main content
RCS templates are reusable message definitions — text, media, or rich cards — that you submit for approval and later reference by name (or templateCode) when sending messages. This page covers the two template-management endpoints: create and fetch.

Create Template

string
required
Your OneXtel API key.
string
required
Must be application/json.
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

string
required
JSON string (see below) describing the template — name, type, content fields, and optional suggestions.
string
required
The RCS sender profile the template belongs to.
string
required
Identifier of the user/system submitting the template.
string
required
RCS template category (e.g. Promotional, Transactional).
file
Media file to attach, for template types that include media (image, video, or document).

Fields inside data

string
required
Unique template name. Must be alphanumeric with underscores only.
string
required
Template type. One of text_message, text_message_with_media, rich_card, carousel.
array
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.
Templates are rejected outright if any of these limits is exceeded, so validate before submitting rather than after.
Character limits count variables as written, not as resolved. A cardTitle of Hi [customer_first_name] costs 24 characters against the 200 limit regardless of what the variable expands to — but a displayText built the same way can exceed 25 easily.
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 in suggestions is one interactive button. suggestionType determines which other fields are required.
string
required
Type of suggestion. Supported values: reply, dialer_action, url_action, view_location_latlong, view_location_query, share_location, calendar_event.
string
required
The button text shown to the user.
string
required
Data sent back to the bot when the user interacts with the suggestion. Used for internal logic/tracking.
string
URL to open when the user taps the suggestion. Required when suggestionType is url_action.
string
Phone number to call when the user taps the suggestion. Required when suggestionType is dialer_action.
string
Label for the map location (e.g. “Our Store”). Required when suggestionType is view_location_latlong.
string
Latitude coordinate for the map view. Required when suggestionType is view_location_latlong.
string
Longitude coordinate for the map view. Required when suggestionType is view_location_latlong.
string
The query string to search (e.g. “nearest ATM”). Required when suggestionType is view_location_query.
string
Title of the calendar event. Required when suggestionType is calendar_event.
string
Description or notes for the calendar event. Required when suggestionType is calendar_event.
string
Event start time, ISO or yyyy-MM-dd HH:mm:ss format. Required when suggestionType is calendar_event.
string
Event end time, ISO or yyyy-MM-dd HH:mm:ss format. Required when suggestionType is calendar_event.
string
Time zone of the event (e.g. “Asia/Kolkata”). Required when suggestionType is calendar_event.

Minimum required fields per suggestion type

Include displayText in every suggestion, including calendar_event.

Template type: Text Message

string
required
Unique template name. Alphanumeric with underscores only.
string
required
Always "text_message".
string
required
The actual message body. Can include placeholders (e.g. [name], [otp]).
Text Template
Suggestion-specific variants of the text template (reply, dialer, URL, location, calendar) all use the same type: "text_message" shape, adding one suggestions entry per action:

Template type: Text Message with Media

string
required
Always "text_message_with_media".
string
required
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.
string
required
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).
string
required
Message body shown with the media. Supports placeholders like [custom_param].

Template type: Rich Card Standalone

string
required
Unique identifier or name for the rich card template.
string
required
Must be "rich_card".
string
required
Defines the layout of card components. Supported values: VERTICAL or HORIZONTAL.
string
required
Card height. Applies to VERTICAL orientation only. Supported values: SHORT_HEIGHT, MEDIUM_HEIGHT, TALL_HEIGHT.
string
required
Card alignment. Applies to HORIZONTAL orientation only. Supported values: LEFT or RIGHT.
object
required
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.
Parameters inside standAlone:
string
required
Publicly accessible URL to the card’s media (image, video, or document).
string
Name of the file that has been uploaded.
string
required
Title text shown on the card.
string
required
Description or message text for the card. Can include placeholders like [custom_param].
array
Optional list of interactive buttons (see Suggestions Object above). Can be left empty ([]) if no actions are required.
string
required
Template name, e.g. "richCardCarouselP".
string
required
Always "carousel".
string
required
Carousel card width. One of MEDIUM_WIDTH, SMALL_WIDTH, or SHORT_WIDTH.
string
required
Carousel card height. One of SHORT_HEIGHT, MEDIUM_HEIGHT, or TALL_HEIGHT.
Array of carousel card objects — see fields below.
string
Template state — "Create" or "Submit".
Parameters inside each carouselList entry:
string
required
Image/video URL used in the card.
string
File name, e.g. "marketing.png".
string
required
Title of the carousel card, e.g. "New York Store".
string
required
Description shown below the title, e.g. "Visit us in NYC and grab exciting deals!".
array
Array of suggested actions. Can be empty ([]).

Fetch Template

string
required
Your OneXtel API key.
string
required
Must be application/json.
Endpoint: POST https://api.onexaura.com/oapi/templates/fetch

cURL

Request body

string
required
Messaging channel. Must be "RCS".
string
required
RCS sender profile identifier from which templates are fetched.
string
required
RCS template category: Promotional, Transactional, or OTP.
string
Filters templates based on approval status: Approved, Pending, or Rejected.
string
Filters templates by creation timestamp, local datetime format YYYY-MM-DDTHH:mm:ss.
string
RCS template name to filter by.
integer
required
Page number for pagination. Must be a non-negative integer.
integer
required
Number of records to return per page.

Sample request

Response

object
Pagination metadata echoing the requested pageNo and limit.
array
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 is Approved, reference its name as templateCode when sending a message — see Send a template message.