{
"template": {
"link": "https://www.example.com/external/record/page",
"preview": {
"header": {
"title": "Message Card Title",
"subtitle": "Text that supports the title",
"image_url": "https://api.example.com/photo.jpeg"
},
"sections": [
{
"type": "paragraph",
"text": "A few sentences of text that will appear on the card in the timeline. You can addanything you like."
}
],
"actions": [
{
"url": "https://api.example.com/some/action",
"type": "postback",
"text": "Click Here",
"payload": "random=information"
}
]
},
"details": {
"header": {
"title": "Message Card Title",
"subtitle": "Supporting text, which can be different from preview header",
"image_url": "https://api.example.com/photo.jpeg"
},
"sections": [
{
"type": "paragraph",
"text": "A few sentences of text that will appear on the card in the timeline. You can add
anything you like."
},
{
"type": "key_value",
"values": [
{
"label": "Name",
"value": "Foobert Bar"
},
{
"label": "Occupation",
"value": "Example Message Card"
},
{
"label": "Date of Birth",
"value": "December 10th 2019"
}
]
}
],
"actions": [
{
"url": "https://api.example.com/some/action",
"type": "postback",
"text": "Click Here",
"payload": "random=information"
},
{
"url": "https://www.example.com",
"type": "web_url",
"text": "Go to Example"
}
]
}
}
}
|
Attribute
|
Description
|
|---|---|
|
preview
|
Object that describes Preview Card content. Required.
|
|
details
|
Object that describes Detail Card content. Optional.
|
|
link
|
URL to be opened directly from Preview Cards or via the External Link icon on Detail Cards.
|
|
Attribute
|
Description
|
|---|---|
|
header
|
Object that contains fields that appear at the top of Message Cards.
|
|
sections
|
Array of section objects.
|
|
Attribute
|
Description
|
|---|---|
|
title
|
Title content for Preview Cards.
|
|
subtitle
|
Subtitle content for Preview Cards.
|
|
image_url
|
Image URLs for Preview Cards.
|
|
Attribute
|
Description
|
|---|---|
|
type
|
The section type. Valid values are paragraph or key_value.
|
|
text
|
Text in paragraphs. Valid only for paragraph-type section objects. Markdown is supported in this field.
|
|
values
|
Values in key-value arrays. Valid only for key_value-type section objects.
|
|
Attribute
|
Description
|
|---|---|
|
label
|
The field label (the key).
|
|
value
|
The field value (the value).
|
|
Attribute
|
Description
|
|---|---|
|
type
|
The action type. Acceptable values are:
• postback: Triggers an HTTP POST request, optionally with a specified data payload.
• web_url: Triggers an HTTP GET request to open the specified URL in a web browser.
|
|
url
|
The URL associated with the action.
|
|
text
|
Button text.
|
|
payload
|
Form keys and values to send along with HTTP POST requests. Valid only for postback-type action objects.
|