Messaging API - Templates

This page lists each template, its template-specific parameters, and its recommended channels. These parameters are in addition to those for any request to the API.

📘

NOTE:

For a full list that defines both these parameters and others that are common to any API request regardless of the template used, go to POST /v1/omnichannel.

text

Recommended For
all channels

Send a simple text-only message.

ParameterTypeDescriptionExampleRequired?
message.{channel_name}.parametersobjectContains sub-properties with values for variables in the message template.y
message.{channel_name}.parameters.textstringThe main text of your message.All purchases today are 20% off!y

text_2way

Recommended For
Viber

Send a simple text-only message as part of a Viber two-way chat. The schema is the same as for the text template.

text_session

Recommended For
Viber

Send a simple text-only message as part of a Viber session chat. The schema is the same as for the text template.

media

Recommended For
RCS

Send a message to an end-user that includes an embedded image, audio file, or video file.

ParameterTypeDescriptionExampleRequired?
message.{channel_name}.parametersobjectContains sub-properties with values for variables in the message template.y
message.{channel_name}.parameters.urlstringThe URL for the image, video, or audio file to embed in the message.https://acme.co/summer_deals.pngy

url_action

Recommended For
RCS
Viber

Send a message to an end-user that includes a link button to a URL of your choice.

ParameterTypeDescriptionExampleRequired?
message.{channel_name}.parametersobjectContains sub-properties with values for variables in the message template.y
message.{channel_name}.parameters.textstringThe main text of your message.All purchases today are 20% off!y
message.{channel_name}.parameters.url_textstringText for the link in the message.See all deals here.y
message.{channel_name}.parameters.url_idstringUnique identifier for the link in the message.mktUrl1y
message.{channel_name}.parameters.urlstringThe URL for the link in the message.https://acme.co/summer_dealsy

rc_url_action_vertical

Recommended For
RCS

Send a message to an end-user that displays a vertically stacked rich card, including both an image and a link button to a URL of your choice.

ParameterTypeDescriptionExampleRequired?
message.{channel_name}.parametersobjectContains sub-properties with values for variables in the message template.y
message.{channel_name}.parameters.url_textstringText for the link in the message.See all deals here.y
message.{channel_name}.parameters.url_idstringUnique identifier for the link in the message.mktUrl1y
message.{channel_name}.parameters.urlstringThe URL for the link in the message.https://acme.co/summer_dealsy
message.{channel_name}.parameters.media_urlstringThe URL reference for the image to include in the rich card in your message.https://s3.amazonaws.com/acmeco-content/group_photo.jpgy

rc_url_action_horizontal

Recommended For
RCS

Send a message to an end-user that displays a horizontally arranged rich card, including both an image and a link button to a URL of your choice.

ParameterTypeDescriptionExampleRequired?
message.{channel_name}.parametersobjectContains sub-properties with values for variables in the message template.y
message.{channel_name}.parameters.url_textstringText for the link in the message.See all deals here.y
message.{channel_name}.parameters.url_idstringUnique identifier for the link in the message.mktUrl1y
message.{channel_name}.parameters.urlstringThe URL for the link in the message.https://acme.co/summer_dealsy
message.{channel_name}.parameters.media_urlstringThe URL reference for the image to include in the rich card in your message.https://s3.amazonaws.com/acmeco-content/group_photo.jpgy

dial_action

Recommended For
RCS

Send a message to an end-user that includes a button they can select to initiate a voice call.

ParameterTypeDescriptionExampleRequired?
message.{channel_name}.parametersobjectContains sub-properties with values for variables in the message template.y
message.{channel_name}.parameters.textstringThe main text of your message.All purchases today are 20% off!y
message.{channel_name}.parameters.dial_textstringText on the click-to-call button.Call agenty
message.{channel_name}.parameters.phone_number_to_dialstringThe complete phone number to call when the button is selected. Include + at the beginning of international numbers.+15555551212y
message.{channel_name}.parameters.dial_idstringUnique identifier for the click-to-call phone number in the message.dial_idy

rc_dial_action_vertical

Recommended For
RCS

Send a message to an end-user that displays a vertically stacked rich card, including both an image and a click-to-call button.

ParameterTypeDescriptionExampleRequired?
message.{channel_name}.parametersobjectContains sub-properties with values for variables in the message template.y
message.{channel_name}.parameters.dial_textstringText on the click-to-call button.Call agenty
message.{channel_name}.parameters.phone_number_to_dialstringThe complete phone number to call when the button is selected. Include + at the beginning of international numbers.+15555551212y
message.{channel_name}.parameters.dial_idstringUnique identifier for the click-to-call phone number in the message.dial_idy
message.{channel_name}.parameters.media_urlstringThe URL reference for the image to include in the rich card in your message.https://s3.amazonaws.com/acmeco-content/group_photo.jpgy

rc_dial_action_horizontal

Recommended For
RCS

Send a message to an end-user that displays a horizontally arranged rich card, including both an image and a click-to-call button.

ParameterTypeDescriptionExampleRequired?
message.{channel_name}.parametersobjectContains sub-properties with values for variables in the message template.y
message.{channel_name}.parameters.dial_textstringText on the click-to-call button.Call agenty
message.{channel_name}.parameters.phone_number_to_dialstringThe complete phone number to call when the button is selected. Include + at the beginning of international numbers.+15555551212y
message.{channel_name}.parameters.dial_idstringUnique identifier for the click-to-call phone number in the message.dial_idy
message.{channel_name}.parameters.media_urlstringThe URL reference for the image to include in the rich card in your message.https://s3.amazonaws.com/acmeco-content/group_photo.jpg

2_suggested_replies

Recommended For
RCS

Send a message to an end-user that includes a question and two buttons, each of which suggests a reply for them to choose from.

ParameterTypeDescriptionExampleRequired?
message.{channel_name}.parametersobjectContains sub-properties with values for variables in the message template.y
message.{channel_name}.parameters.textstringThe main text of your message.All purchases today are 20% off!y
message.{channel_name}.parameters.reply1stringThe text of the first suggested reply.Yesy
message.{channel_name}.parameters.reply1_idstringUnique identifier for the first reply.r1idy
message.{channel_name}.parameters.reply2stringThe text of the second suggested reply.Noy
message.{channel_name}.parameters.reply2_idstringUnique identifier for the second reply.r2idy

3_suggested_replies

Recommended For
RCS

Send a message to an end-user that includes a question and three buttons, each of which suggests a reply for them to choose from.

ParameterTypeDescriptionExampleRequired?
message.{channel_name}.parametersobjectContains sub-properties with values for variables in the message template.
message.{channel_name}.parameters.textstringAll purchases today are 20% off!
message.{channel_name}.parameters.reply1stringYes
message.{channel_name}.parameters.reply1_idstringr1id
message.{channel_name}.parameters.reply2stringNo
message.{channel_name}.parameters.reply2_idstringr2id
message.{channel_name}.parameters.reply3stringNot sure
message.{channel_name}.parameters.reply3_idstringr3id

image

Recommended For
WhatsApp
MMS
Viber

Send a message to an end-user that includes an embedded image.

ParameterTypeDescriptionExampleRequired?
message.{channel_name}.parametersobjectContains sub-properties with values for variables in the message template.y
message.{channel_name}.parameters.urlstringThe URL for the image to display in the message.https://acme.co/summer_deals.pngy

image_2way

Recommended For
Viber

Send a message to an end-user that includes an embedded image as part of a Viber two-way chat. The schema is the same as for the image template.

image_session

Recommended For
Viber

Send a message to an end-user that includes an embedded image as part of a Viber session chat. The schema is the same as for the image template.

video

Recommended For
WhatsApp
MMS

Send a message to an end-user that includes an embedded video.

ParameterTypeDescriptionExampleRequired?
message.{channel_name}.parametersobjectContains sub-properties with values for variables in the message template.y
message.{channel_name}.parameters.urlstringThe URL for the video to display in the message.https://acme.co/summer_deals.mp4y

audio

Recommended For
WhatsApp
MMS

Send a message to an end-user that includes embedded audio.

ParameterTypeDescriptionExampleRequired?
message.{channel_name}.parametersobjectContains sub-properties with values for variables in the message template.y
message.{channel_name}.parameters.urlstringThe URL for the audio to embed in the message.https://acme.co/summer_deals.mp3y

file

Recommended For
WhatsApp

Send a message to an end-user that includes an attached file for them to open or download. This file is hosted by you.

ParameterTypeDescriptionExampleRequired?
message.{channel_name}.parametersobjectContains sub-properties with values for variables in the message template.y
message.{channel_name}.parameters.urlstringThe URL for the file attachment to embed in the message.https://acme.co/summer_deals.xlsxy

location

Recommended For
WhatsApp

Send a message to an end-user that includes latitude and longitude coordinates for a geographical location.

ParameterTypeDescriptionExampleRequired?
message.{channel_name}.parametersobjectContains sub-properties with values for variables in the message template.
message.{channel_name}.parameters.latitudestringThe latitude coordinate of your location as a positive or negative number.37.423021
message.{channel_name}.parameters.longitudestringThe longitude coordinate of your location as a positive or negative number.-122.083739

Did this page help you?