Skip to main content
POST
Upload Media
Uploads a file and returns a media_id and media_type you can reuse across multiple Send File or Send Interactive Buttons calls, instead of hosting the file at a public URL.
This endpoint requires multipart/form-data — it’s POST-only, unlike most other endpoints in this API.

Body

multipart/form-data
apiToken
string
required

Your ChatSyncs API key (can also be sent as Authorization: Bearer token) -- not a WhatsApp/Meta token.

Example:

"API-KEY"

phone_number_id
string
required

The WhatsApp account's phone number ID. Where to find it.

Example:

"PHONE-NUMBER-ID"

media_file
file
required

The file to upload. The multipart field name must be exactly media_file.

Response

200 - application/json

Standard ChatSyncs response. status is "1" on success and "0" on failure.

status
string

"1" = success, "0" = failure.

message
string

Human-readable result message.