Downloads the file associated with a media message (image, video, audio, document, or sticker).
true: Returns MP3false: Returns OGG{
"id": "7EB0F01D7244B421048F0706368376E0",
"generate_mp3": true
}
{
"id": "7EB0F01D7244B421048F0706368376E0",
"transcribe": true
}
{
"id": "7EB0F01D7244B421048F0706368376E0",
"return_base64": true,
"return_link": false
}
{
"id": "7EB0F01D7244B421048F0706368376E0",
"download_quoted": true
}
Useful when the customer replies to a promotion/status - you download the original media to understand which product/offer they are asking about.
{
"fileURL": "[https://api.example.com/files/file.mp3](https://api.example.com/files/file.mp3)",
"mimetype": "audio/mpeg",
"base64Data": "UklGRkj...",
"transcription": "Transcribed text"
}
Note:
ID of the message containing the file
"7EB0F01D7244B421048F0706368376E0"
If true, returns the content in base64
For audio, defines return format (true=MP3, false=OGG)
Saves and returns public file URL
If true, transcribes audio to text
OpenAI API Key for transcription (optional)
"sk-..."
If true, downloads media from the quoted message instead of the main message
Successful file download
File MIME type
"audio/mpeg"
Public URL to access the file (if return_link=true)
"https://api.example.com/files/file.mp3"
File content in base64 (if return_base64=true)
"UklGRkj..."
Transcribed text from audio (if transcribe=true)
"Transcribed text"