Learn about the format of Media messages (images, files, and other media) sent with the Flow REST API.

The endpoint of the text message and the media message is the same. The body parameters for the media message are as follows:

POST rest/v1/messages/EXAMPLE-853a-448f-9f91-ef397588ff87 HTTP/1.1
Host: api.flow.ai
{
  "payload": {
    "type": "media",
    "mediaType": "image",
    "mimetype": "image/png",
    "title": "Example title",
    "url": "https://DOMAIN.com/random/880x400",
    "originator": {
      "name": "John Doe",
      "role": "external"
    }
  }
}

Media message parameters

Parameter

Description

Type

traceId

Optional unique number that is passed along to identify the message. Use this to verify message delivery.

integer

type

Indicates the type of message. Should be media

string

mediaType

Type of media, image, file, audio, or video

string

url

URL of media attachment

string

title

Optional title of location

string

mimeType

Optionally specify the mime-type of the uploaded file, supported media formats are channel specific

string

lang

Optional language code in ISO format (2 letters)

string

timezone

Optional UTF timezone offset in hours

integer

params

Optional parameters

object