Skip to main content
Download media content (image, video, audio, document) from a message. The media is returned as base64-encoded data.
This endpoint only works for messages that contain media. Text-only messages will return an error.

Request

message_id
string
required
The unique identifier of the message containing mediaExample: 3EB0123456789ABCDEF
X-Device-Id
string
Device identifier for multi-device support. Required when multiple devices are registered. If only one device is registered, it will be used as the default.
phone
string
required
Phone number with country code and WhatsApp suffixExample: [email protected]

Response

status
integer
HTTP status code (e.g., 200)
code
string
Response code (e.g., SUCCESS)
message
string
Response message describing the resultExample: Media downloaded successfully
results
object
status
string
Status of the download operation
mime_type
string
MIME type of the downloaded mediaExample: image/jpeg
file_size
integer
Size of the file in bytesExample: 524288
file_name
string
Original filename of the mediaExample: image.jpg
data
string
Base64 encoded media data
curl -X GET \
  'https://your-api-domain.com/message/3EB0123456789ABCDEF/[email protected]' \
  -H 'X-Device-Id: my-device' \
  -u 'username:password'
{
  "status": 200,
  "code": "SUCCESS",
  "message": "Media downloaded successfully",
  "results": {
    "status": "Media downloaded successfully",
    "mime_type": "image/jpeg",
    "file_size": 524288,
    "file_name": "image.jpg",
    "data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="
  }
}

Build docs developers (and LLMs) love