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
Parameter | Description | Type |
---|---|---|
traceId | A unique number to identify the message. Use this to verify the message delivery. Optional. | integer |
type | Indicates the message type. Should be media | string |
mediaType | Media type. Supported value: image , file , audio , or video | string |
url | Media attachment URL. | string |
title | Location title. Optional. | string |
mimeType | Specify the MIME type of the uploaded file. Supported media formats are channel-specific. | string |
lang | 2 letters language code in ISO format. Optional. | string |
timezone | UTF timezone offset in hours. Optional | integer |
params | Other parameters. Optional. | object |