For the complete documentation index, see llms.txt. This page is also available as Markdown.

Media Uploads

Endpoints for uploading media files

Upload Media

post

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.

Authorizations
D360-API-KEYstringRequired

API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.

Body
filestring · binaryRequired

Media file to upload

messaging_productstringRequired

Messaging product (must be 'whatsapp')

Responses
200

Media uploaded successfully

application/json
idstringOptional
post/media
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"
}

Get Upload Session Status

get

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

Authorizations
D360-API-KEYstringRequired

API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.

Path parameters
session_idstringRequired

Upload session ID (the part after 'upload:')

Responses
200

Session status retrieved

application/json
file_offsetintegerOptionalExample: 1048576
idstringOptionalExample: upload:abcdefghijklmnopqrstuvwxyz123456
get/upload:{session_id}
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 Session (Resumable Upload API)

post

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

Authorizations
D360-API-KEYstringRequired

API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.

Path parameters
session_idstringRequired

Upload session ID (the part after 'upload:')

Header parameters
file_offsetintegerOptional

Byte offset to resume upload from (default: 0). Use session status endpoint to determine current offset

Body
string · binaryOptional
Responses
200

File uploaded successfully, returns handle

application/json
hstringOptionalExample: 2:c2FtcGxl...
post/upload:{session_id}
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 Upload Session

post

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

Authorizations
D360-API-KEYstringRequired

API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.

Query parameters
file_namestringRequired

File name

file_lengthintegerRequired

File size in bytes

file_typestringRequired

MIME type of the file

Responses
200

Upload session created successfully

application/json
idstringOptionalExample: upload:abcdefghijklmnopqrstuvwxyz123456
post/uploads
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 with Session ID

post

Upload media using upload: prefixed session ID (e.g., for profile picture uploads via Resumable Upload API).

Authorizations
D360-API-KEYstringRequired

API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.

Path parameters
session_idstringRequired

Session ID with 'upload:' prefix (e.g. 'upload:1234567890')

Header parameters
file_offsetintegerOptional

Byte offset to resume upload from. Default 0

Body
string · binaryOptional
Responses
200

File handle returned on successful upload

application/json

Response payload containing the uploaded file handle

hstringOptionalExample: 2:c2FtcGxl...
post/{session_id}
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?