Skip to content
FlexiPedia logo

Dynamic Content

Discover how to efficiently send dynamic messages with Flexito's powerful API, enabling seamless communication through text, images, and actions. Whether you're adding tags, setting custom user fields, or incorporating quick replies, this guide will help you maximise your messagi

Flexito OmniAI
Beginnerv4
Read in:

Listen to an audio overview

A short, AI-generated podcast-style summary of this article.

Discover how to efficiently send dynamic messages with Flexito's powerful API, enabling seamless communication through text, images, and actions. Whether you're adding tags, setting custom user fields, or incorporating quick replies, this guide will help you maximise your messaging capabilities across various platforms.

Response Format

Here's the format for sending dynamic messages:

{ "version": "v1", "content": { "messages": [ { "type": "text", "text": "simple text" }, { ...Other messages } ], "actions": [ //optional { "action": "add_tag", "tag_name": "example tag" }, { ...Other actions } ], "quick_replies": [ //optional { "type": "node", "caption": "Quick reply text", "target": "My Content" }, { ...Other quick replies } ] } }

The current version of the Dynamic Block API is v1. It allows a maximum of 10 messages, 11 quick replies, and 5 actions per block. The properties "buttons", "actions", and "quick_replies" are optional.

Button Types

Available button types include: url, call, and node.

{ "version": "v1", "content": { "messages": [ { "type": "text", "text": "simple text with button", "buttons": [ { "type": "url", "caption": "Show", "url": " OmniAI.au" //valid url }, { "type": "call", "caption": "Show", "phone": " (tel:)" //phone number E164 }, { "type": "node", "caption": "Show", "target": "My Content" //Node name } ] } ] } } Sending text Use this response for sending text messages.

Text messages can incorporate url, flow, and node buttons.

The properties "buttons", "actions", and "quick_replies" are optional.

{ "version": "v1", "content": { "messages": [ { "type": "text", "text": "simple text with button", "buttons": [ { "type": "url", "caption": "External link", "url": "" } ] } ], "actions": [], "quick_replies": [] } }

Sending messages as a reply to a previous message ID is supported on Facebook, WhatsApp, and Tiktok.

{ "version": "v1", "content": { "messages": [ { "type": "text", "text": "text one reply to message", "reply_to_mid": "m_5rqZy3-yriLwL9zUjT" }, { "type": "text", "text": "text two" }, { "type": "text", "text": "text three reply to another message", "reply_to_mid": "m_X98YmVGhuSSrsBoh9t" } ] } } Sending images This response format is used to send image files. Messenger supports JPG, PNG, and GIF formats. You can use url, call, buy, flow, and node buttons.

The properties "buttons", "actions", and "quick_replies" are optional.

{ "version": "v1", "content": { "messages": [ { "type": "image", "url": "" } ], "actions": [], "quick_replies": [] } }

Sending multiple images is only supported on Facebook.

{ "version": "v1", "content": { "messages": [ { "type": "files", "items": [ {"type": "image", "url": ""}, {"type": "image", "url": ""} ] } ] } } Action: Add Tag Use this response to add a tag to a contact. Ensure the tag name already exists in your bot.

{ "version": "v1", "content": { "messages": [ { "type": "text", "text": "simple text" } ], "actions": [ { "action": "add_tag", "tag_name": "your tag", } ], "quick_replies": [] } } The tag name provided with the tag_name parameter must match an existing tag.

Action: Set Custom User Field Value

Use this response to assign a value to a custom user field in the bot. The custom field name must already exist in your bot.

{ "version": "v1", "content": { "messages": [ { "type": "text", "text": "simple text" } ], "actions": [ { "action": "set_field_value", "field_name": "your field name", "value": "some value" } ], "quick_replies": [] } } The field name specified with field_name must correspond to an existing custom field in the bot. Ensure the data type matches that of the custom field.