Media Uploads
Endpoints for uploading media files
Upload media files (images, videos, documents) to Meta's media API for use in messages. More info on media uploads can be found in our documentation: https://docs.360dialog.com/docs/waba-messaging/media/upload-retrieve-or-delete-media?q=resumable+upload#upload-media.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Media file to upload
Messaging product (must be 'whatsapp')
Media uploaded successfully
Bad request
Unauthorized
Internal server error
POST /media HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 44
{
"file": "binary",
"messaging_product": "text"
}{
"id": "text"
}Retrieve current status of an upload session to resume interrupted uploads. Returns session ID and current file offset. See Meta docs: https://developers.facebook.com/docs/graph-api/guides/upload
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Upload session ID (the part after 'upload:')
Session status retrieved
1048576upload:abcdefghijklmnopqrstuvwxyz123456Bad request - missing session ID or authorization header
Internal server error
GET /upload:{session_id} HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Accept: */*
{
"file_offset": 1048576,
"id": "upload:abcdefghijklmnopqrstuvwxyz123456"
}Upload file data to an existing upload session using Meta's Resumable Upload API. The file_offset header allows resuming interrupted uploads from a specific byte position. Returns file handle on completion. See Meta docs: https://developers.facebook.com/docs/graph-api/guides/upload
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Upload session ID (the part after 'upload:')
Byte offset to resume upload from (default: 0). Use session status endpoint to determine current offset
File uploaded successfully, returns handle
2:c2FtcGxl...Bad request - missing session ID or authorization header
Internal server error
POST /upload:{session_id} HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Content-Type: application/octet-stream
Accept: */*
Content-Length: 8
"binary"{
"h": "2:c2FtcGxl..."
}Create a new upload session for media files. Returns a session ID for uploading file data. See Meta docs: https://developers.facebook.com/docs/graph-api/guides/upload
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
File name
File size in bytes
MIME type of the file
Upload session created successfully
upload:abcdefghijklmnopqrstuvwxyz123456Bad request - missing or malformed authorization header, or invalid parameters
Internal server error
POST /uploads?file_name=text&file_length=1&file_type=text HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Accept: */*
{
"id": "upload:abcdefghijklmnopqrstuvwxyz123456"
}Upload media using upload: prefixed session ID (e.g., for profile picture uploads via Resumable Upload API).
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Session ID with 'upload:' prefix (e.g. 'upload:1234567890')
Byte offset to resume upload from. Default 0
File handle returned on successful upload
Response payload containing the uploaded file handle
2:c2FtcGxl...Bad request - missing 'upload:' prefix
Unauthorized
Internal server error
POST /{session_id} HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Content-Type: application/octet-stream
Accept: */*
Content-Length: 8
"binary"{
"h": "2:c2FtcGxl..."
}Last updated
Was this helpful?