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.

Parameter

Type

Description

Example

Required?

message.{channel_name}.parameters

object

Contains sub-properties with values for variables in the message template.

y

message.{channel_name}.parameters.text

string

The 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.

Parameter

Type

Description

Example

Required?

message.{channel_name}.parameters

object

Contains sub-properties with values for variables in the message template.

y

message.{channel_name}.parameters.url

string

The URL for the image, video, or audio file to embed in the message.

https://acme.co/summer_deals.png

y

url_action

Recommended For
RCS
Viber

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

Parameter

Type

Description

Example

Required?

message.{channel_name}.parameters

object

Contains sub-properties with values for variables in the message template.

y

message.{channel_name}.parameters.text

string

The main text of your message.

All purchases today are 20% off!

y

message.{channel_name}.parameters.url_text

string

Text for the link in the message.

See all deals here.

y

message.{channel_name}.parameters.url_id

string

Unique identifier for the link in the message.

mktUrl1

y

message.{channel_name}.parameters.url

string

The URL for the link in the message.

https://acme.co/summer_deals

y

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.

Parameter

Type

Description

Example

Required?

message.{channel_name}.parameters

object

Contains sub-properties with values for variables in the message template.

y

message.{channel_name}.parameters.url_text

string

Text for the link in the message.

See all deals here.

y

message.{channel_name}.parameters.url_id

string

Unique identifier for the link in the message.

mktUrl1

y

message.{channel_name}.parameters.url

string

The URL for the link in the message.

https://acme.co/summer_deals

y

message.{channel_name}.parameters.media_url

string

The URL reference for the image to include in the rich card in your message.

https://s3.amazonaws.com/acmeco-content/group_photo.jpg

y

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.

Parameter

Type

Description

Example

Required?

message.{channel_name}.parameters

object

Contains sub-properties with values for variables in the message template.

y

message.{channel_name}.parameters.url_text

string

Text for the link in the message.

See all deals here.

y

message.{channel_name}.parameters.url_id

string

Unique identifier for the link in the message.

mktUrl1

y

message.{channel_name}.parameters.url

string

The URL for the link in the message.

https://acme.co/summer_deals

y

message.{channel_name}.parameters.media_url

string

The URL reference for the image to include in the rich card in your message.

https://s3.amazonaws.com/acmeco-content/group_photo.jpg

y

dial_action

Recommended For
RCS

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

Parameter

Type

Description

Example

Required?

message.{channel_name}.parameters

object

Contains sub-properties with values for variables in the message template.

y

message.{channel_name}.parameters.text

string

The main text of your message.

All purchases today are 20% off!

y

message.{channel_name}.parameters.dial_text

string

Text on the click-to-call button.

Call agent

y

message.{channel_name}.parameters.phone_number_to_dial

string

The complete phone number to call when the button is selected. Include + at the beginning of international numbers.

+15555551212

y

message.{channel_name}.parameters.dial_id

string

Unique identifier for the click-to-call phone number in the message.

dial_id

y

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.

Parameter

Type

Description

Example

Required?

message.{channel_name}.parameters

object

Contains sub-properties with values for variables in the message template.

y

message.{channel_name}.parameters.dial_text

string

Text on the click-to-call button.

Call agent

y

message.{channel_name}.parameters.phone_number_to_dial

string

The complete phone number to call when the button is selected. Include + at the beginning of international numbers.

+15555551212

y

message.{channel_name}.parameters.dial_id

string

Unique identifier for the click-to-call phone number in the message.

dial_id

y

message.{channel_name}.parameters.media_url

string

The URL reference for the image to include in the rich card in your message.

https://s3.amazonaws.com/acmeco-content/group_photo.jpg

y

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.

Parameter

Type

Description

Example

Required?

message.{channel_name}.parameters

object

Contains sub-properties with values for variables in the message template.

y

message.{channel_name}.parameters.dial_text

string

Text on the click-to-call button.

Call agent

y

message.{channel_name}.parameters.phone_number_to_dial

string

The complete phone number to call when the button is selected. Include + at the beginning of international numbers.

+15555551212

y

message.{channel_name}.parameters.dial_id

string

Unique identifier for the click-to-call phone number in the message.

dial_id

y

message.{channel_name}.parameters.media_url

string

The 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.

Parameter

Type

Description

Example

Required?

message.{channel_name}.parameters

object

Contains sub-properties with values for variables in the message template.

y

message.{channel_name}.parameters.text

string

The main text of your message.

All purchases today are 20% off!

y

message.{channel_name}.parameters.reply1

string

The text of the first suggested reply.

Yes

y

message.{channel_name}.parameters.reply1_id

string

Unique identifier for the first reply.

r1id

y

message.{channel_name}.parameters.reply2

string

The text of the second suggested reply.

No

y

message.{channel_name}.parameters.reply2_id

string

Unique identifier for the second reply.

r2id

y

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.

Parameter

Type

Description

Example

Required?

message.{channel_name}.parameters

object

Contains sub-properties with values for variables in the message template.

message.{channel_name}.parameters.text

string

All purchases today are 20% off!

message.{channel_name}.parameters.reply1

string

Yes

message.{channel_name}.parameters.reply1_id

string

r1id

message.{channel_name}.parameters.reply2

string

No

message.{channel_name}.parameters.reply2_id

string

r2id

message.{channel_name}.parameters.reply3

string

Not sure

message.{channel_name}.parameters.reply3_id

string

r3id

image

Recommended For
WhatsApp
MMS
Viber

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

Parameter

Type

Description

Example

Required?

message.{channel_name}.parameters

object

Contains sub-properties with values for variables in the message template.

y

message.{channel_name}.parameters.url

string

The URL for the image to display in the message.

https://acme.co/summer_deals.png

y

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.

Parameter

Type

Description

Example

Required?

message.{channel_name}.parameters

object

Contains sub-properties with values for variables in the message template.

y

message.{channel_name}.parameters.url

string

The URL for the video to display in the message.

https://acme.co/summer_deals.mp4

y

audio

Recommended For
WhatsApp
MMS

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

Parameter

Type

Description

Example

Required?

message.{channel_name}.parameters

object

Contains sub-properties with values for variables in the message template.

y

message.{channel_name}.parameters.url

string

The URL for the audio to embed in the message.

https://acme.co/summer_deals.mp3

y

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.

Parameter

Type

Description

Example

Required?

message.{channel_name}.parameters

object

Contains sub-properties with values for variables in the message template.

y

message.{channel_name}.parameters.url

string

The URL for the file attachment to embed in the message.

https://acme.co/summer_deals.xlsx

y

location

Recommended For
WhatsApp

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

Parameter

Type

Description

Example

Required?

message.{channel_name}.parameters

object

Contains sub-properties with values for variables in the message template.

message.{channel_name}.parameters.latitude

string

The latitude coordinate of your location as a positive or negative number.

37.423021

message.{channel_name}.parameters.longitude

string

The longitude coordinate of your location as a positive or negative number.

-122.083739


Did this page help you?