Create Template
Overview
The first message sent by an Enterprise to its customer must be whitelisted on the RCS platform by submitting template details.
There are three types of templates that can be created:
Text Template
- Can have a maximum of 2,500 characters.
- Supports up to 11 interactive buttons, including:
- Quick Reply
- Dial a Number
- Open a URL
- Location (Lat/Long or Query)
- Share Location
- Calendar Event
Rich Card Standalone Template
- Includes an image or video, a title, and a description.
- Supports up to 4 interactive buttons (same types as above).
Rich Card Carousel Template
- Can include up to 10 Rich Cards.
- Each card may contain media, title, description, and buttons.
- API Endpoints: -
/v2/rcs/<appId>/templates - Authentication: - This API requires Bearer token authentication. See Authentication for more details.
- Method: -
POST - Payload: - The payload must be passed in the body as a JSON object. Refer to
CreateTemplatePayload
CreateTemplatePayload
Key Features
- name: Unique Name of the template.
- type: Type of template
rich_card,text_messageorcarousel. SeeTemplateTypefor more details. - component (union field): See
MessageContentfor more details.
JSON Representation
{
"name": string,
"type": enum (TemplateType),
"component": {
object (MessageContent)
}
}
See MessageContent and TemplateType for more details.
Field Details
| Field | |
|---|---|
| name | string Name of the template. Must be unique. Only lowercase letters, numbers, and underscores are allowed. Maximum length: 20 characters. |
| type | enum (TemplateType) Type of the template. |
| component | object (MessageContent) The content of the message template. |
TemplateType
| Enums | |
|---|---|
| text_message | Plain text template. |
| rich_card | Single rich card template. |
| carousel | Carousel of rich cards. |
TemplateStatus
| Enums | |
|---|---|
| approved | Template is approved. |
| pending | Template approval is pending. |
| rejected | Template is rejected. |
| expired | Template is expired. |
MessageContent
Depending on the type field, this object represents one of the following:
PlainText— used whentypeistext_messageRichCardStandAlone— used whentypeisrich_cardRichCardCarousel— used whentypeiscarousel
PlainText
JSON Representation
{
"text": string,
"suggestions": [
{
object (Suggestion)
}
]
}
See Suggestion for more details.
Fields
| Field | |
|---|---|
| text | string Text encoded in UTF-8. Maximum 3072 characters. |
| suggestions[] | object (Suggestion) A list of suggested replies and suggested actions that appear as a list of suggestion chips following the associated agent message. Maximum 11 suggestions. The chips only display when the associated agent message is the most recent message within the conversation (including both agent and user messages). The user can tap a suggested reply to send the text reply back to the agent or tap a suggested action to initiate a native action on the device. Maximum 11 suggestions. |
Code Samples
- cURL
- Python
- JavaScript
curl -X POST "https://api.aclwhatsapp.com/access-api/v2/rcs/<APP_ID>/templates"
-H "Authorization: Bearer <YOUR_TOKEN>"
-H "Content-Type: application/json"
-d '{
"name": "text_message_example",
"type": "text_message",
"component": {
"text": "Hi [custom_param1b], \n This is a test template for testing [custom_param2b]. \n Thanks",
"suggestions": [
{
"reply": {
"text": "Sug Butn Reply 1",
"postbackData": "text_message_example"
}
},
{
"action": {
"text": "Sug Butn DaN 2",
"postbackData": "text_message_example",
"dialAction": {
"phoneNumber": "+918010921481"
}
}
},
{
"action": {
"text": "Sug Butn OaU 3",
"postbackData": "text_message_example",
"openUrlAction": {
"url": "https://sinch.com/[custom_param1u]",
"application": "BROWSER"
}
}
},
{
"action": {
"text": "Sug Butn OaU 4",
"postbackData": "text_message_example",
"openUrlAction": {
"url": "https://sinch.com/[custom_param2u]",
"application": "WEBVIEW",
"webviewViewMode": "FULL",
"description": "This is a variation"
}
}
},
{
"action": {
"text": "Sug Butn OaU 5",
"postbackData": "text_message_example",
"openUrlAction": {
"url": "https://sinch.com/[custom_param3u]",
"application": "WEBVIEW",
"webviewViewMode": "HALF",
"description": "This is a variation"
}
}
},
{
"action": {
"text": "Sug Butn OaU 6",
"postbackData": "text_message_example",
"openUrlAction": {
"url": "https://sinch.com/[custom_param4u]",
"application": "WEBVIEW",
"webviewViewMode": "TALL",
"description": "This is a variation"
}
}
},
{
"action": {
"text": "Sug Butn VLLL 7",
"postbackData": "text_message_example",
"viewLocationAction": {
"latLong": {
"latitude": "33.22",
"longitude": "24.24"
},
"label": "Noida, Sector 132"
}
}
},
{
"action": {
"text": "Sug Butn VLQ 8",
"postbackData": "text_message_example",
"viewLocationAction": {
"query": "Share your Location"
}
}
},
{
"action": {
"text": "Sug Butn SL 9 Noida",
"postbackData": "text_message_example",
"shareLocationAction": {}
}
},
{
"action": {
"text": "Sug Butn CCE 10",
"postbackData": "text_message_example",
"createCalendarEventAction": {
"description": "Test Event Description",
"startTime": "2025-08-14T06:30:00Z",
"endTime": "2025-08-14T06:30:00Z",
"title": "Test Event Title"
}
}
},
{
"reply": {
"text": "Sug Butn Reply 11",
"postbackData": "text_message_example"
}
}
]
}
}'
import requests
url = "https://api.aclwhatsapp.com/access-api/v2/rcs/<APP_ID>/templates"
payload = {
"name": "text_message_example",
"type": "text_message",
"component": {
"text": "Hi [custom_param1b], \n This is a test template for testing [custom_param2b]. \n Thanks",
"suggestions": [
{
"reply": {
"text": "Sug Butn Reply 1",
"postbackData": "text_message_example"
}
},
{
"action": {
"text": "Sug Butn DaN 2",
"postbackData": "text_message_example",
"dialAction": {
"phoneNumber": "+918010921481"
}
}
},
{
"action": {
"text": "Sug Butn OaU 3",
"postbackData": "text_message_example",
"openUrlAction": {
"url": "https://sinch.com/[custom_param1u]",
"application": "BROWSER"
}
}
},
{
"action": {
"text": "Sug Butn OaU 4",
"postbackData": "text_message_example",
"openUrlAction": {
"url": "https://sinch.com/[custom_param2u]",
"application": "WEBVIEW",
"webviewViewMode": "FULL",
"description": "This is a variation"
}
}
},
{
"action": {
"text": "Sug Butn OaU 5",
"postbackData": "text_message_example",
"openUrlAction": {
"url": "https://sinch.com/[custom_param3u]",
"application": "WEBVIEW",
"webviewViewMode": "HALF",
"description": "This is a variation"
}
}
},
{
"action": {
"text": "Sug Butn OaU 6",
"postbackData": "text_message_example",
"openUrlAction": {
"url": "https://sinch.com/[custom_param4u]",
"application": "WEBVIEW",
"webviewViewMode": "TALL",
"description": "This is a variation"
}
}
},
{
"action": {
"text": "Sug Butn VLLL 7",
"postbackData": "text_message_example",
"viewLocationAction": {
"latLong": {
"latitude": "33.22",
"longitude": "24.24"
},
"label": "Noida, Sector 132"
}
}
},
{
"action": {
"text": "Sug Butn VLQ 8",
"postbackData": "text_message_example",
"viewLocationAction": {
"query": "Share your Location"
}
}
},
{
"action": {
"text": "Sug Butn SL 9 Noida",
"postbackData": "text_message_example",
"shareLocationAction": {}
}
},
{
"action": {
"text": "Sug Butn CCE 10",
"postbackData": "text_message_example",
"createCalendarEventAction": {
"description": "Test Event Description",
"startTime": "2025-08-14T06:30:00Z",
"endTime": "2025-08-14T06:30:00Z",
"title": "Test Event Title"
}
}
},
{
"reply": {
"text": "Sug Butn Reply 11",
"postbackData": "text_message_example"
}
}
]
}
}
headers = {
"Authorization": "Bearer <YOUR_TOKEN>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
import fetch from 'node-fetch';
const url = "https://api.aclwhatsapp.com/access-api/v2/rcs/<APP_ID>/templates";
const payload = {
"name": "text_message_example",
"type": "text_message",
"component": {
"text": "Hi [custom_param1b], \n This is a test template for testing [custom_param2b]. \n Thanks",
"suggestions": [
{
"reply": {
"text": "Sug Butn Reply 1",
"postbackData": "text_message_example"
}
},
{
"action": {
"text": "Sug Butn DaN 2",
"postbackData": "text_message_example",
"dialAction": {
"phoneNumber": "+918010921481"
}
}
},
{
"action": {
"text": "Sug Butn OaU 3",
"postbackData": "text_message_example",
"openUrlAction": {
"url": "https://sinch.com/[custom_param1u]",
"application": "BROWSER"
}
}
},
{
"action": {
"text": "Sug Butn OaU 4",
"postbackData": "text_message_example",
"openUrlAction": {
"url": "https://sinch.com/[custom_param2u]",
"application": "WEBVIEW",
"webviewViewMode": "FULL",
"description": "This is a variation"
}
}
},
{
"action": {
"text": "Sug Butn OaU 5",
"postbackData": "text_message_example",
"openUrlAction": {
"url": "https://sinch.com/[custom_param3u]",
"application": "WEBVIEW",
"webviewViewMode": "HALF",
"description": "This is a variation"
}
}
},
{
"action": {
"text": "Sug Butn OaU 6",
"postbackData": "text_message_example",
"openUrlAction": {
"url": "https://sinch.com/[custom_param4u]",
"application": "WEBVIEW",
"webviewViewMode": "TALL",
"description": "This is a variation"
}
}
},
{
"action": {
"text": "Sug Butn VLLL 7",
"postbackData": "text_message_example",
"viewLocationAction": {
"latLong": {
"latitude": "33.22",
"longitude": "24.24"
},
"label": "Noida, Sector 132"
}
}
},
{
"action": {
"text": "Sug Butn VLQ 8",
"postbackData": "text_message_example",
"viewLocationAction": {
"query": "Share your Location"
}
}
},
{
"action": {
"text": "Sug Butn SL 9 Noida",
"postbackData": "text_message_example",
"shareLocationAction": {}
}
},
{
"action": {
"text": "Sug Butn CCE 10",
"postbackData": "text_message_example",
"createCalendarEventAction": {
"description": "Test Event Description",
"startTime": "2025-08-14T06:30:00Z",
"endTime": "2025-08-14T06:30:00Z",
"title": "Test Event Title"
}
}
},
{
"reply": {
"text": "Sug Butn Reply 11",
"postbackData": "text_message_example"
}
}
]
}
};
const response = await fetch(url, {
method: "POST",
headers: {
"Authorization": "Bearer <YOUR_TOKEN>",
"Content-Type": "application/json"
},
body: JSON.stringify(payload)
});
const data = await response.json();
console.log(data);
RichCard
RichCardStandAlone
JSON Representation
{
"richCard": {
"standaloneCard" : {
"cardOrientation": enum (CardOrientation),
"thumbnailImageAlignment": enum (ThumbnailImageAlignment),
"cardContent": {
object (CardContent)
}
}
}
}
See CardOrientation, ThumbnailImageAlignment and CardContent for more details.
Fields
| Field | |
|---|---|
| richCard.standaloneCard | object Standalone card. |
| richCard.standaloneCard.cardOrientation | enum (CardOrientation) Orientation of the card. |
| richCard.standaloneCard.thumbnailImageAlignment | enum (ThumbnailImageAlignment) Image preview alignment for standalone cards with horizontal layout. |
| richCard.standaloneCard.cardContent | object (CardContent) Card content. |
CardOrientation
| Enums | |
|---|---|
| HORIZONTAL | Horizontal layout. If a horizontal rich card's object(CardContent) contains the media field, it must also include at least a title, description, or suggestions[] field. |
| VERTICAL | Vertical layout. |
ThumbnailImageAlignment
| Enums | |
|---|---|
| LEFT | File preview is left-aligned. |
| RIGHT | File preview is right-aligned. |
CardContent
JSON Representation
{
"title": string,
"description": string,
"media": {
"height": enum (MediaHeight),
"contentInfo": {
"fileUrl": string,
"thumbnailUrl": string,
"forceRefresh": boolean
}
},
"suggestions": [
{
object (Suggestion)
}
]
}
See MediaHeight and Suggestion for more details.
Fields
| Field | |
|---|---|
| title | string (Optional) Title of the card. Maximum 200 characters. |
| description | string (Optional) Description of the card. Maximum 2000 characters. |
| media | object (Optional) Media (image, GIF, video, PDF) to include in the card. |
| media.height | enum (MediaHeight) (Optional) The height of the media within a rich card with a vertical layout. For a standalone card with horizontal layout, height is not customizable, and this field is ignored. |
| media.contentInfo | object Information about a file, including the URL of the file and the URL of the file’s thumbnail. The platform serves content from a cache, but an agent can force the platform to fetch a new version of the content and refresh the cache. |
| media.contentInfo.fileUrl | string Publicly reachable URL of the file. The platform determines the MIME type of the file from the content-type field in the HTTP headers when the platform fetches the file. The content-type field must be present and accurate in the HTTP response from the URL. Recommended maximum file size of 100 MB. Note: redirects in file URLs are not supported. |
| media.contentInfo.thumbnailUrl | object (CardContent) (Optional, for image, audio and video files only) Publicly reachable URL of the thumbnail. Maximum size of 100 kB. If you don't provide a thumbnail URL, the platform displays a blank placeholder thumbnail until the user's device downloads the file. Depending on the user's setting, the file may not download automatically and may require the user to tap a download button. Note: redirects in file URLs are not supported. |
| media.contentInfo.forceRefresh | boolean If set, the platform fetches the file and thumbnail from the specified URLs, even if the platform has cached copies of the file (and/or of the thumbnail). |
| suggestions[] | object (Suggestion) (Optional) List of suggestions to include in the card. Maximum 4 suggestions. |
MediaHeight
| Enums | |
|---|---|
| SHORT | 112 DP. |
| MEDIUM | 168 DP. |
| TALL | 264 DP. Not available for rich card carousels when the card width is set to small. |
Sample API payload
Media: IMAGE and cardOrientation: HORIZONTAL
{
"name": "rich_card_example",
"type": "rich_card",
"component": {
"richCard": {
"standaloneCard": {
"cardOrientation": "HORIZONTAL",
"thumbnailImageAlignment": "LEFT",
"cardContent": {
"title": "Welcome to Sinch Engage",
"description": "A single, powerful platform for SMS & WhatsApp — made for conversion.",
"media": {
"contentInfo": {
"fileUrl": "https://sinch.com/assets/banner.jpg",
"thumbnailUrl": "https://sinch.com/assets/thumb.jpg"
},
"height": "MEDIUM"
},
"suggestions": [
{
"reply": {
"text": "Sug Butn Reply 1",
"postbackData": "rich_card_example"
}
},
{
"action": {
"text": "Sug Butn DaN 2",
"postbackData": "rich_card_example",
"dialAction": {
"phoneNumber": "+918010921481"
}
}
},
{
"action": {
"text": "Sug Butn OaU 3",
"postbackData": "rich_card_example",
"openUrlAction": {
"url": "https://sinch.com/[custom_param1u]",
"application": "BROWSER"
}
}
},
{
"action": {
"text": "Sug Butn OaU 4",
"postbackData": "rich_card_example",
"openUrlAction": {
"url": "https://sinch.com/[custom_param2u]",
"application": "WEBVIEW",
"webviewViewMode": "FULL",
"description": "This is a variation"
}
}
}
]
}
}
}
}
}
Media: VIDEO and cardOrientation: VERTICAL
{
"name": "rich_card_example",
"type": "rich_card",
"component": {
"richCard": {
"standaloneCard": {
"cardOrientation": "VERTICAL",
"thumbnailImageAlignment": "RIGHT",
"cardContent": {
"title": "Welcome to Sinch Engage",
"description": "A single, powerful platform for SMS & WhatsApp — made for conversion.",
"media": {
"contentInfo": {
"fileUrl": "https://freetestdata.com/wp-content/uploads/2022/02/Free_Test_Data_1MB_MP4.mp4",
"thumbnailUrl": "https://sinch.com/assets/thumb.jpg"
},
"height": "SHORT"
},
"suggestions": [
{
"action": {
"text": "Sug Butn VLLL 1",
"postbackData": "rich_card_example",
"viewLocationAction": {
"latLong": {
"latitude": "33.22",
"longitude": "24.24"
},
"label": "Noida, Sector 132"
}
}
},
{
"action": {
"text": "Sug Butn VLQ 2",
"postbackData": "rich_card_example",
"viewLocationAction": {
"query": "Share your Location"
}
}
},
{
"action": {
"text": "Sug Butn SL 3 Noida",
"postbackData": "rich_card_example",
"shareLocationAction": {}
}
},
{
"action": {
"text": "Sug Butn CCE 4",
"postbackData": "rich_card_example",
"createCalendarEventAction": {
"description": "Test Event Description",
"startTime": "2025-08-14T06:30:00Z",
"endTime": "2025-08-14T06:30:00Z",
"title": "Test Event Title"
}
}
}
]
}
}
}
}
}
RichCardCarousel
JSON Representation
{
"richCard": {
"carouselCard" : {
"cardWidth": enum (CardWidth),
"cardContents": [
{
object (CardContent)
}
]
}
}
}
See CardWidth and CardContent for more details
Fields
| Field | |
|---|---|
| richCard.carouselCard | object Carousel of cards. |
| richCard.carouselCard.cardWidth | enum (CardWidth) The width of the cards in the carousel. |
| richCard.carouselCard.cardWidth | enum (CardWidth) The width of the cards in the carousel. |
| richCard.carouselCard.cardContents[] | object (CardContent) The list of contents for each card in the carousel. A carousel can have a minimum of 2 cards and a maximum 10 cards. |
CardWidth
| Enums | |
|---|---|
| SMALL | 120 DP. Note that tall media cannot be used. |
| MEDIUM | 232 DP. |
Sample API payload
{
"name": "carousel_example",
"type": "carousel",
"component": {
"richCard": {
"carouselCard": {
"cardWidth": "MEDIUM",
"cardContents": [
{
"title": "Card 1: Sinch Engage SMS",
"description": "Send SMS campaigns that drive engagement and conversion.",
"media": {
"contentInfo": {
"fileUrl": "https://sinch.com/assets/sms_card.jpg"
},
"height": "TALL"
},
"suggestions": [
{
"reply": {
"text": "Sug Butn Reply 1",
"postbackData": "carousel_example"
}
},
{
"action": {
"text": "Sug Butn DaN 2",
"postbackData": "carousel_example",
"dialAction": {
"phoneNumber": "+918010921481"
}
}
},
{
"action": {
"text": "Sug Butn OaU 3",
"postbackData": "carousel_example",
"openUrlAction": {
"url": "https://sinch.com/[custom_param1u]",
"application": "BROWSER"
}
}
},
{
"action": {
"text": "Sug Butn OaU 4",
"postbackData": "carousel_example",
"openUrlAction": {
"url": "https://sinch.com/[custom_param2u]",
"application": "WEBVIEW",
"webviewViewMode": "FULL",
"description": "This is a variation"
}
}
}
]
},
{
"title": "Card:2 Sinch Engage WhatsApp",
"description": "Create personalized WhatsApp campaigns to boost customer interactions.",
"media": {
"contentInfo": {
"fileUrl": "https://freetestdata.com/wp-content/uploads/2022/02/Free_Test_Data_1MB_MP4.mp4",
"thumbnailUrl": "https://sinch.com/assets/thumb.jpg"
},
"height": "MEDIUM"
},
"suggestions": [
{
"action": {
"text": "Sug Butn OaU 5",
"postbackData": "carousel_example",
"openUrlAction": {
"url": "https://sinch.com/[custom_param3u]",
"application": "WEBVIEW",
"webviewViewMode": "HALF",
"description": "This is a variation"
}
}
},
{
"action": {
"text": "Sug Butn OaU 6",
"postbackData": "carousel_example",
"openUrlAction": {
"url": "https://sinch.com/[custom_param4u]",
"application": "WEBVIEW",
"webviewViewMode": "TALL",
"description": "This is a variation"
}
}
},
{
"action": {
"text": "Sug Butn VLLL 7",
"postbackData": "carousel_example",
"viewLocationAction": {
"latLong": {
"latitude": "33.22",
"longitude": "24.24"
},
"label": "Noida, Sector 132"
}
}
},
{
"action": {
"text": "Sug Butn VLQ 8",
"postbackData": "carousel_example",
"viewLocationAction": {
"query": "Share your Location"
}
}
}
]
},
{
"title": "Card 3: Sinch Engage Analytics",
"description": "Track your campaign performance in real-time to optimize conversions.",
"media": {
"contentInfo": {
"fileUrl": "https://sinch.com/assets/analytics_card.jpg"
},
"height": "SHORT"
},
"suggestions": [
{
"action": {
"text": "Sug Butn SL 9 Noida",
"postbackData": "carousel_example",
"shareLocationAction": {}
}
},
{
"action": {
"text": "Sug Butn CCE 10",
"postbackData": "carousel_example",
"createCalendarEventAction": {
"description": "Test Event Description",
"startTime": "2025-08-14T06:30:00Z",
"endTime": "2025-08-14T06:30:00Z",
"title": "Test Event Title"
}
}
},
{
"reply": {
"text": "Sug Butn Reply 11",
"postbackData": "carousel_example"
}
},
{
"action": {
"text": "Sug Butn DaN 12",
"postbackData": "carousel_example",
"dialAction": {
"phoneNumber": "+918010921481"
}
}
}
]
}
]
}
}
}
}
Suggestions
A Suggestion is either a SuggestedReply or a SuggestedAction.
SuggestedReply
JSON Representation
{
"reply": {
"text": string,
"postbackData": string
}
}
Fields
| Field | |
|---|---|
| reply.text | string Text that is shown in the suggested reply and sent back to the agent when the user taps it. Maximum 25 characters. |
| reply.postbackData | string The base64-encoded payload that the agent receives in a user event when the user taps the suggested reply. |
SuggestedAction
JSON Representation
{
"action": {
"text": string,
"postbackData": string,
"fallbackUrl": string,
// Union field action can be only one of the following:
"dialAction": {
"phoneNumber": string
},
"viewLocationAction": {
"latLong": {
"latitude": string,
"longitude": string
},
"label": string,
"query": string
},
"createCalendarEventAction": {
"startTime": string,
"endTime": string,
"title": string,
"description": string
},
"openUrlAction": {
"url": string,
"application": enum (OpenUrlApplication),
"webviewViewMode": enum (WebviewViewMode),
"description": string
},
"shareLocationAction": {
// This type has no fields.
}
// End of list of possible types for union field action.
}
}
Fields
| Field | |
|---|---|
| action.text | string Text that is shown in the suggested action. Maximum 25 characters. |
| action.postbackData | string Payload (base64 encoded) that will be sent to the agent in the user event that results when the user taps the suggested action. Maximum 2048 characters. |
| action.fallbackUrl | string (Optional) Fallback URL to use if a client doesn't support a suggested action. Fallback URLs open in new browser windows. Must be a valid URI as defined in RFC 3986. Maximum 2048 characters. |
Union field action. The native action initiated on the device when the user taps the suggested action action can be only one of the following: | |
| action.dialAction | object Opens the user's default dialer app with the agent-specified phone number filled in. |
| action.dialAction.phoneNumber | string The phone number in E.164 format, for example, +12223334444. |
| action.viewLocationAction | object Opens the user's default map app and selects the agent-specified location or searches around the user's location given an agent-specified query. |
| action.viewLocationAction.latLong | object (Optional) The latitude and longitude of the specified location. |
| action.viewLocationAction.latLong.latitude | string The latitude in degrees. It must be in the range [-90.0, +90.0]. |
| action.viewLocationAction.latLong.longitude | string The longitude in degrees. It must be in the range [-180.0, +180.0]. |
| action.viewLocationAction.label | string (Optional) The label of the pin dropped at latLong. |
| action.viewLocationAction.query | string (Optional, only supported on Android Messages clients) Rather than specify a latLong (and optionally, a label), the agent can instead specify a query string. For default map apps that support search functionality (including Google Maps), tapping this suggested action results in a location search centered around the user's current location. If the query is sufficiently specific, then agents can use it to select any location in the world. For instance, setting the query string to "Growing Tree Bank" will show all Growing Tree Bank locations in the user's vicinity. Setting the query string to "1600 Amphitheater Parkway, Mountain View, CA 94043" will select that specific address, regardless of the user's location. |
| action.createCalendarEventAction | object Opens the user's default calendar app and starts the new calendar event flow with the agent-specified event data pre-filled. |
| action.createCalendarEventAction.startTime | string (Timestamp format) Event start time. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: 2014-10-02T15:01:23Z, 2014-10-02T15:01:23.045123456Z or 2014-10-02T15:01:23+05:30. |
| action.createCalendarEventAction.endTime | string (Timestamp format) Event end time. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: 2014-10-02T15:01:23Z, 2014-10-02T15:01:23.045123456Z or 2014-10-02T15:01:23+05:30. |
| action.createCalendarEventAction.title | string Event title. Maximum 100 characters. |
| action.createCalendarEventAction.description | string Event description. Maximum 500 characters. |
| action.openUrlAction | object Opens the user's default web browser app to the given URL. If the user has an app installed that is registered as the default handler for the URL, then this app will be opened instead, and its icon will be used in the suggested action UI. |
| action.openUrlAction.url | string The URL to open. Effective November 1, 2025, the URL scheme must be https:// or http://. API requests using any other schemes (e.g., tel:, mailto:, sms:) will be rejected with a 400 Bad Request error after this date. The URL must be a valid URI as defined in RFC 3986. Maximum 2048 characters. |
| action.openUrlAction.application | enum (OpenUrlApplication) URL open application, browser or webview. To check whether a user's device supports webview mode, run a capability check first. See the documentation for details: https://developers.google.com/business-communications/rcs-business-messaging/guides/build/capabilities. |
| action.openUrlAction.webviewViewMode | enum (WebviewViewMode) View mode for webview |
| action.openUrlAction.description | string Accessibility description for webview. |
OpenUrlApplication
| Enums | |
|---|---|
| BROWSER | Use browser to open URL. |
| WEBVIEW | Open URL in an integrated web view window |
WebviewViewMode
| Enums | |
|---|---|
| FULL | Requires a full screen overlay with the Chatbot conversation labelled within the status bar. |
| HALF | Requires a half screen overlay. |
| TALL | Requires a three-quarters screen overlay. |
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | The response body contains a newly created instance of Template. | TemplateCreated |
| 400 | Bad Request | Invalid Query or Body Parameters. | BadRequest |
| 401 | Unauthorized | Missing or invalid Authorization header. | None |
| 403 | Forbidden | The provided token does not have access to this resource. | None |
| 429 | Too Many Requests | Rate limit exceeded. Retry after the time specified in Retry-After header. | None |
| 500 | Internal Server Error | Something Went wrong wile processing your request. | InternalServerError |
| 502 | Bad Gateway | The upstream service failed to respond correctly. | None |
| 503 | Service Unavailable | The API is temporarily unavailable, often due to maintenance or overload. | None |
| 504 | Gateway Timeout | The server did not receive a timely response from the upstream service. | None |
TemplateCreated
JSON Representation
{
"component": {
object (MessageContent)
},
"name": string,
"type": enum (TemplateType),
"status": enum (TemplateStatus)
}
See MessageContent, TemplateType and TemplateStatus for more details.
Fields
| Fields | |
|---|---|
| component | object (MessageContent) The content of the message template. |
| name | string Name of the template. |
| type | enum (TemplateType) Type of the template. |
| status | enum (TemplateStatus) Approval status of the template. |
BadRequest
JSON Representation
{
"error": {
"code": 400,
"message": string
}
}
Fields
| Fields | |
|---|---|
| error.code | 400 |
| error.message | string The message detailing what parameter from the Body and Query is invalid. |
InternalServerError
JSON Representation
{
"error": {
"message": "Something went wrong.",
"code": 500
}
}
Fields
| Fields | |
|---|---|
| error.code | 500 |
| error.message | Something went wrong. |