Images Image message examples shown for each supported platform
All examples below must be sent within the body field of a message as shown below
Copy {
"receiver" : {
"contacts" : [
{
"identifierValue" : "+31612345678"
}
]
} ,
"body" : {...}
}
Single image message
Body
Copy {
"type" : "image" ,
"image" : {
"images" : [
{
"altText" : "Label of first image" ,
"mediaUrl" : "https://www.messagebird.com/image.png"
}
]
}
}
MMS
Only SMS channels that are MMS capable support image messages. See here
WhatsApp
Facebook
Instagram
Single image message with text
Body
Copy {
"type" : "image" ,
"image" : {
"images" : [
{
"altText" : "Label of first image" ,
"mediaUrl" : "https://www.messagebird.com/image.png"
}
] ,
"text" : "Single image message"
}
}
MMS
Only SMS channels that are MMS capable support image messages. See here
WhatsApp
Facebook
Instagram
Multiple image message
Body
Copy {
"type" : "image" ,
"image" : {
"images" : [
{
"altText" : "Label of first image" ,
"mediaUrl" : "https://www.messagebird.com/image1.png"
} ,
{
"altText" : "Label of second image" ,
"mediaUrl" : "https://www.messagebird.com/image2.png"
}
] ,
"text" : "Multiple images message"
}
}
MMS
Only SMS channels that are MMS capable support image messages. See here
WhatsApp
Facebook
Instagram
Single image message with actions
Single image message with postback actions
Body
Copy {
"type" : "image" ,
"image" : {
"images" : [
{
"altText" : "Image label" ,
"mediaUrl" : "https://www.messagebird.com/image.png"
}
] ,
"text" : "Single image message with postback actions" ,
"actions" : [
{
"type" : "postback" ,
"postback" : {
"payload" : "postback-payload-1" ,
"text" : "Postback option 1"
}
} ,
{
"postback" : {
"payload" : "postback-payload-2" ,
"text" : "Postback option 2"
} ,
"type" : "postback"
}
]
}
}
WhatsApp
Facebook
Instagram
Single image message with reply actions
Body
Copy {
"type" : "image" ,
"image" : {
"text" : "Single image message with reply actions" ,
"images" : [
{
"mediaUrl" : "https://www.messagebird.com/image.png" ,
"altText" : "Image label"
}
] ,
"actions" : [
{
"type" : "reply" ,
"reply" : {
"text" : "Reply action 1"
}
} ,
{
"type" : "reply" ,
"reply" : {
"text" : "Reply action 2"
}
}
]
}
}
WhatsApp
Facebook
Instagram
Single image message with postback and reply actions
Body
Copy {
"type" : "image" ,
"image" : {
"text" : "Single image message with postback and reply actions" ,
"images" : [
{
"mediaUrl" : "https://www.messagebird.com/image.png" ,
"altText" : "Image label"
}
] ,
"actions" : [
{
"type" : "postback" ,
"postback" : {
"text" : "Postback action" ,
"payload" : "postback-payload"
}
} ,
{
"type" : "reply" ,
"reply" : {
"text" : "Reply action"
}
}
]
}
}
WhatsApp
Facebook
Instagram
Multiple image message with actions
Multiple image message with labels and postback
Body
Copy {
"type" : "image" ,
"image" : {
"images" : [
{
"altText" : "First image label" ,
"mediaUrl" : "https://www.messagebird.com/image1.png"
} ,
{
"altText" : "Second image label" ,
"mediaUrl" : "https://www.messagebird.com/image2.png"
}
] ,
"text" : "Multiple images message with postback actions" ,
"actions" : [
{
"type" : "postback" ,
"postback" : {
"payload" : "postback-payload-1" ,
"text" : "Postback action 1"
}
} ,
{
"postback" : {
"payload" : "postback-payload-2" ,
"text" : "Postback action 2"
} ,
"type" : "postback"
}
]
}
}
WhatsApp
Facebook
Instagram
Multiple images message with reply actions
Body
Copy {
"type" : "image" ,
"image" : {
"images" : [
{
"altText" : "First image label" ,
"mediaUrl" : "https://www.messagebird.com/image1.png"
} ,
{
"altText" : "Second image label" ,
"mediaUrl" : "https://www.messagebird.com/image2.png"
}
] ,
"text" : "Multiple images message with reply actions" ,
"actions" : [
{
"type" : "reply" ,
"reply" : {
"text" : "Reply action 1"
}
} ,
{
"reply" : {
"text" : "Reply action 2"
} ,
"type" : "reply"
}
]
}
}
WhatsApp
Facebook
Instagram
Multiple images message with labels, postback and reply actions
Body
Copy {
"type" : "image" ,
"image" : {
"images" : [
{
"altText" : "First image label" ,
"mediaUrl" : "https://www.messagebird.com/image2.png"
} ,
{
"altText" : "Second image label" ,
"mediaUrl" : "https://www.messagebird.com/image2.png"
}
] ,
"text" : "Multiple images message with postback and reply actions" ,
"actions" : [
{
"type" : "postback" ,
"postback" : {
"payload" : "postback-payload" ,
"text" : "Postback action"
}
} ,
{
"reply" : {
"text" : "Reply action"
} ,
"type" : "reply"
}
]
}
}
WhatsApp
Facebook
Instagram
Last updated 9 months ago