RCS Templates
Create an RCS template
post/rcs/template
Request
- Base URLhttps://rcs-api.in.kaleyra.io/v1/XXXXX6913850XXXX
- URLhttps://rcs-api.in.kaleyra.io/v1/XXXXX6913850XXXX/rcs/template
- Authnone declared. Required headers: Content-Type, api-key
Headers
Content-Type'application/json' required
Indicates the format of the content the API will process. The documented value is application/json.
api-keystring required
API key generated from the Kaleyra account.
Request body
Example request
{
"agent_number": "116XX2",
"template_name": "doc_test_demo",
"contentMessage": {
"suggestions": [
{
"action": {
"text": "Contact",
"postback_data": "Contact",
"dial_action": {
"phone_number": "+9177XXXXXX77"
},
"open_url_action": {
"url": "https://demo.test.in/en/homepage-quick-bill-payment/",
"application": "WEBVIEW",
"webview_view_mode": "FULL"
}
},
"reply": {
"text": "Test reply text11",
"postback_data": "Test postback data11"
}
}
]
},
"file": {
"file_url": "https://example.com/document.pdf",
"thumbnail_url": "https://example.com/thumb.jpg",
"content_description": "File description"
},
"rich_card_standalone": {
"card_orientation": "VERTICAL",
"thumbnail_image_alignment": "LEFT",
"content": {
"title": "Card Title",
"description": "Card description text",
"media": {
"height": "MEDIUM",
"file": {
"file_url": "https://example.com/document.pdf",
"thumbnail_url": "https://example.com/thumb.jpg",
"content_description": "File description"
}
},
"suggestions": [
{
"action": {
"text": "Contact",
"postback_data": "Contact",
"dial_action": {
"phone_number": "+9177XXXXXX77"
},
"open_url_action": {
"url": "https://demo.test.in/en/homepage-quick-bill-payment/",
"application": "WEBVIEW",
"webview_view_mode": "FULL"
}
},
"reply": {
"text": "Test reply text11",
"postback_data": "Test postback data11"
}
}
]
}
},
"rich_card_carousel": {
"card_width": "MEDIUM",
"card_contents": [
{
"title": "Sample Title1",
"description": "Sample Description1",
"media": {
"height": "MEDIUM",
"file": {
"file_url": "https://example.com/document.pdf",
"thumbnail_url": "https://example.com/thumb.jpg",
"content_description": "File description"
}
},
"suggestions": [
{
"reply": {
"text": "Test reply text11",
"postback_data": "Test postback data11"
}
}
]
}
]
}
}Response
RCS Template created successfully.
Example response
{
"code": "RCS1102",
"message": "RCS Template created successfully",
"data": {
"contentMessage": {
"suggestions": [
{
"action": {
"text": "Contact",
"postback_data": "Contact",
"dial_action": {
"phone_number": "+9177XXXXXX77"
},
"open_url_action": {
"url": "https://demo.test.in/en/homepage-quick-bill-payment/",
"application": "WEBVIEW",
"webview_view_mode": "FULL"
}
},
"reply": {
"text": "Test reply text11",
"postback_data": "Test postback data11"
}
}
]
},
"file": {
"file_url": "https://example.com/document.pdf",
"thumbnail_url": "https://example.com/thumb.jpg",
"content_description": "File description"
},
"rich_card_standalone": {
"card_orientation": "VERTICAL",
"thumbnail_image_alignment": "LEFT",
"content": {
"title": "Card Title",
"description": "Card description text",
"media": {
"height": "MEDIUM",
"file": {
"file_url": "https://example.com/document.pdf",
"thumbnail_url": "https://example.com/thumb.jpg",
"content_description": "File description"
}
},
"suggestions": [
{
"action": {
"text": "Contact",
"postback_data": "Contact",
"dial_action": {
"phone_number": "+9177XXXXXX77"
},
"open_url_action": {
"url": "https://demo.test.in/en/homepage-quick-bill-payment/",
"application": "WEBVIEW",
"webview_view_mode": "FULL"
}
},
"reply": {
"text": "Test reply text11",
"postback_data": "Test postback data11"
}
}
]
}
},
"rich_card_carousel": {
"card_width": "MEDIUM",
"card_contents": [
{
"title": "Sample Title1",
"description": "Sample Description1",
"media": {
"height": "MEDIUM",
"file": {
"file_url": "https://example.com/document.pdf",
"thumbnail_url": "https://example.com/thumb.jpg",
"content_description": "File description"
}
},
"suggestions": [
{
"reply": {
"text": "Test reply text11",
"postback_data": "Test postback data11"
}
}
]
}
]
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.