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 following is the example and its body parameters for the location message:

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

ParameterDescriptionType
traceIdA unique number to identify the message. Use this to verify the message delivery. Optional.integer
typeIndicates the message type. Should be mediastring
mediaTypeMedia type. Supported value: image, file, audio, or videostring
urlMedia attachment URL.string
titleLocation title. Optional.string
mimeTypeSpecify the MIME type of the uploaded file. Supported media formats are channel-specific.string
lang2 letters language code in ISO format. Optional.string
timezoneUTF timezone offset in hours. Optionalinteger
paramsOther parameters. Optional.object