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

{
 "receiver": {
   "contacts": [
     {
       "identifierValue": "+31612345678"
     }
   ]
 },
 "body": {...}
}

Single image message

Body

{
  "type": "image",
  "image": {
    "images": [
      {
        "altText": "Label of first image",
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FRPPgQAGyZE7rvIh3WM2Z%2Fimage2.avif?alt=media"
      }
    ]
  }
}

MMS

Only SMS channels that are MMS capable support image messages. See here

WhatsApp

Google RCS

Facebook

Instagram

Line

Single image message with text

Body

{
  "type": "image",
  "image": {
    "images": [
      {
        "altText": "Label of first image",
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FRPPgQAGyZE7rvIh3WM2Z%2Fimage2.avif?alt=media"
      }
    ],
    "text": "Single image message"
  }
}

MMS

Only SMS channels that are MMS capable support image messages. See here

WhatsApp

Google RCS

Facebook

Instagram

Line

Multiple image message

Body

{
  "type": "image",
  "image": {
    "images": [
      {
        "altText": "Label of first image",
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FrEM9zztd8SEiJS6RQuR3%2Fimage.png?alt=media"
      },
      {
        "altText": "Label of second image",
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FRPPgQAGyZE7rvIh3WM2Z%2Fimage2.avif?alt=media"
      }
    ],
    "text": "Multiple images message"
  }
}

MMS

Only SMS channels that are MMS capable support image messages. See here

WhatsApp

Google RCS

Facebook

Instagram

Line

Single image message with actions

Single image message with postback actions

Body

{
  "type": "image",
  "image": {
    "images": [
      {
        "altText": "Image label",
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FRPPgQAGyZE7rvIh3WM2Z%2Fimage2.avif?alt=media"
      }
    ],
    "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

Google RCS

Facebook

Instagram

Line

Single image message with reply actions

Body

{
  "type": "image",
  "image": {
    "text": "Single image message with reply actions",
    "images": [
      {
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FRPPgQAGyZE7rvIh3WM2Z%2Fimage2.avif?alt=media",
        "altText": "Image label"
      }
    ],
    "actions": [
      {
        "type": "reply",
        "reply": {
          "text": "Reply action 1"
        }
      },
      {
        "type": "reply",
        "reply": {
          "text": "Reply action 2"
        }
      }
    ]
  }
}

WhatsApp

Google RCS

Facebook

Instagram

Line

Single image message with postback and reply actions

Body

{
  "type": "image",
  "image": {
    "text": "Single image message with postback and reply actions",
    "images": [
      {
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FRPPgQAGyZE7rvIh3WM2Z%2Fimage2.avif?alt=media",
        "altText": "Image label"
      }
    ],
    "actions": [
      {
        "type": "postback",
        "postback": {
          "text": "Postback action",
          "payload": "postback-payload"
        }
      },
      {
        "type": "reply",
        "reply": {
          "text": "Reply action"
        }
      }
    ]
  }
}

WhatsApp

Google RCS

Facebook

Instagram

Line

Multiple image message with actions

Multiple image message with labels and postback

Body

{
  "type": "image",
  "image": {
    "images": [
      {
        "altText": "First image label",
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FrEM9zztd8SEiJS6RQuR3%2Fimage.png?alt=media"
      },
      {
        "altText": "Second image label",
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FRPPgQAGyZE7rvIh3WM2Z%2Fimage2.avif?alt=media"
      }
    ],
    "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

Google RCS

Facebook

Instagram

Line

Multiple images message with reply actions

Body

{
  "type": "image",
  "image": {
    "images": [
      {
        "altText": "First image label",
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FrEM9zztd8SEiJS6RQuR3%2Fimage.png?alt=media"
      },
      {
        "altText": "Second image label",
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FRPPgQAGyZE7rvIh3WM2Z%2Fimage2.avif?alt=media"
      }
    ],
    "text": "Multiple images message with reply actions",
    "actions": [
      {
        "type": "reply",
        "reply": {
          "text": "Reply action 1"
        }
      },
      {
        "reply": {
          "text": "Reply action 2"
        },
        "type": "reply"
      }
    ]
  }
}

WhatsApp

Google RCS

Facebook

Instagram

Line

Multiple images message with labels, postback and reply actions

Body

{
  "type": "image",
  "image": {
    "images": [
      {
        "altText": "First image label",
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FrEM9zztd8SEiJS6RQuR3%2Fimage.png?alt=media"
      },
      {
        "altText": "Second image label",
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FRPPgQAGyZE7rvIh3WM2Z%2Fimage2.avif?alt=media"
      }
    ],
    "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

Google RCS

Facebook

Instagram

Line

Last updated