Canvas

Canvases are one of the most common objects in most app cycles. They enable Intercom to determine what your app will render, alongside how this content will be rendered. These can either be:

  • Static: the given content in the canvas will remain until an action is taken to change this.
  • Live: the given content in the canvas can change dynamically whenever anybody views the card. More about the Live Canvas can be found here.

Static Canvas

{
  canvas: {
    content: {
      components: [
        {
          type: "text",
          text: "Hello World!"
        }
      ]
    },
    stored_data: {} //optional
  }
}
KeyTypeDescription
contentobjectMore on the content object can be found here. Max Size is 64KB.
stored_dataobjectMore on the stored_data object can be found here. Max Size is 64KB.

Live Canvas

{
  canvas: {
    content_url: "https://messengerapp.com/get-content-here",
    stored_data: {} //optional
  }
}
KeyTypeDescription
content_urlstringThe URL which we make Live Canvas requests to. You must respond to these with a Content Object. Max size is 64KB.
stored_dataobjectOptional Stored Data that you want to be returned in the next sent request. Max Size is 64KB.