Skip to main content
POST
Send File / Media
Sends an image, video, audio, or document to a WhatsApp number — the single endpoint for all media types.
You must provide either media_url or media_id — at least one is required.

Sending a document

A document also needs media_name — the filename the recipient sees. Without it the API answers media_name is required when media_type is document.
  • With media_url, any filename is accepted. Use the last part of the URL, such as invoice.pdf.
  • With media_id, pass the media_name that Upload Media returned.
  • media_name is only for documents. Leave it out for images, video and audio.
The response includes the wa_message_id, which you can pass to Get Delivery Message Status.

Body

application/x-www-form-urlencoded
apiToken
string
required

Your ChatSyncs API key (not a WhatsApp/Meta access token). Where to find it.

Example:

"API-KEY"

phone_number_id
string
required

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

Example:

"PHONE-NUMBER-ID"

phone_number
string
required

The subscriber's phone number, with country code, digits only.

Example:

"PHONE-NUMBER"

media_url
string

Public HTTPS URL of the file. Required if media_id isn't set.

Example:

"https://example.com/image.jpg"

media_id
string

A WhatsApp media ID from Upload Media or Graph. Required if media_url isn't set; requires media_type when used alone.

Example:

"1739230482390482"

media_type
string

One of image, video, audio, document. Required when using media_id alone, or when media_url has no file extension.

Example:

"image"

media_name
string

The filename shown to the recipient. Required when media_type is document (also when the type is inferred from the URL); not used for image, video or audio. With media_url any filename is accepted, such as the last part of the URL; with a media_id, pass the media_name that Upload Media returned.

Example:

"invoice.pdf"

media_caption_text
string

Caption for an image, video, or document (not supported for audio). Falls back to message if omitted.

Example:

"Here's your invoice"

Response

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

status
string

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

message
string

Human-readable result message.