Skip to main content

RCS Templates

RCS templates are pre-configured messages that can be reused for repeated sends. They support three formats: plain text, rich card, and card carousel.

Endpoint

MethodPathDescription
GET/api/message-server/rcs/templatesList templates
GET/api/message-server/rcs/templates/{id}Template details
POST/api/message-server/rcs/templatesCreate template
PUT/api/message-server/rcs/templates/{id}Update template
DELETE/api/message-server/rcs/templates/{id}Delete template

Template types

TEXT

The simplest type: a text message with optional suggestions.

{
"name": "rcs_welcome",
"description": "Welcome template",
"type": "TEXT",
"body": {
"text": "Ciao {name}! Benvenuto nel nostro servizio.",
"suggestions": [
{ "type": "reply", "text": "Grazie!" },
{ "type": "url", "text": "Visita il sito", "url": { "url": "https://example.com" } }
],
"fallbackSms": {
"sender": "AZIENDA",
"text": "Ciao {name}! Benvenuto. Visita https://example.com"
}
}
}

CARD

A rich card with image/video, title, description, and buttons.

{
"name": "rcs_promo",
"description": "Promotion with image",
"type": "CARD",
"body": {
"cardOrientation": "VERTICAL",
"thumbnailAlignment": "LEFT",
"card": {
"title": "Offerta speciale",
"description": "Scopri le novita' della stagione",
"media": {
"height": "TALL",
"fileUrl": "https://example.com/promo.jpg"
},
"suggestions": [
{ "type": "url", "text": "Scopri", "url": { "url": "https://example.com/promo" } }
]
},
"fallbackSms": {
"sender": "SHOP",
"text": "Offerta speciale! Scopri: https://example.com/promo"
}
}
}

A carousel of horizontally scrollable cards.

{
"name": "rcs_catalogo",
"description": "Product catalog",
"type": "CAROUSEL",
"body": {
"cardWidth": "MEDIUM",
"cards": [
{
"title": "Prodotto A",
"description": "29.99 EUR",
"media": { "height": "MEDIUM", "fileUrl": "https://example.com/a.jpg" },
"suggestions": [
{ "type": "url", "text": "Dettagli", "url": { "url": "https://example.com/a" } }
]
},
{
"title": "Prodotto B",
"description": "49.99 EUR",
"media": { "height": "MEDIUM", "fileUrl": "https://example.com/b.jpg" },
"suggestions": [
{ "type": "url", "text": "Dettagli", "url": { "url": "https://example.com/b" } }
]
}
],
"fallbackSms": {
"sender": "SHOP",
"text": "Scopri il nostro catalogo: https://example.com"
}
}
}

Template creation fields

FieldTypeReq.Description
namestringYesTemplate name
descriptionstringNoDescription
typestringYesType: TEXT, CARD, CAROUSEL
bodyobjectYesContent (structure varies based on the type)

Available suggestions

TypeDescriptionFields
replyQuick replytext
urlOpens a linktext, url.url
dialStarts a calltext, dial.phoneNumber
locationCoordinatesShows locationtext, locationCoordinates.latitude/longitude/label
locationQuerySearches for locationtext, locationQuery.query
calendarCalendar eventtext, calendar.title/description/startTime/endTime

Fallback

Each template can include:

  • fallbackWhatsApp: if RCS is not available, sends via WhatsApp
  • fallbackSms: if the previous channel fails, sends SMS (required if fallbackWhatsApp is present)

Media

FieldTypeDescription
heightenumSHORT, MEDIUM, TALL, UNSPECIFIED
fileUrlstringPublic media URL (*exclusive with mediaKey)
mediaKeystringInternal media key (*exclusive with fileUrl)
thumbnailUrlstringPreview URL (optional)

Template list filters

ParameterDescription
searchSearch by name/description
typeFilter by type: TEXT, CARD, CAROUSEL
enabled0 = disabled only, 1 = enabled only
sortBySort field (name, type, creationDate, etc.)
sortOrderasc or desc
limitItems per page
pagePage number (0-based)