Skip to main content
Send images, videos, documents, and audio over WhatsApp with the same endpoint used for everything else: POST /v1/messages/send. There is no separate media endpoint — media is one of the three mutually exclusive send modes:
  1. Template sendtemplateId (+ optional media override)
  2. Free-form text sendtext
  3. Direct media sendmedia + mediaType, no templateId and no text

Direct media send

Provide media + mediaType without templateId or text. In this mode buttons, header, footer, and variables are not allowed. An optional caption is allowed for image, video, and document — but not for audio, voice, or sticker.

media and mediaType fields

  • media — a public http(s) URL or a base64 data URI (data:<mime>;base64,...).
  • mediaTypeimage, video, document, audio, voice, or sticker. Set it explicitly when the URL extension is not obvious (e.g. a PDF whose URL does not end in .pdf).

Base64 vs. URL per provider

Audio is a voice note (PTT)

When mediaType is audio, the file is delivered as a WhatsApp voice note (PTT) on all providers. On unofficial (Pilot Status web) numbers the recipient briefly sees a “recording audio” presence indicator before delivery; Meta Cloud API has no outbound presence API, so no indicator appears on Meta sends.

Stickers

mediaType: "sticker" sends a WhatsApp sticker. It is a direct media send only — never with templateId, and it takes no caption and no mediaFilename (both return 400), because a sticker carries no text. The file must be image/webp and exactly 512×512 pixels: 512×512 is a hard requirement, not a recommendation — any other size is rejected, including a near-square one like 361×363. Any other format or an oversized file is rejected by WhatsApp, not by this API — the send is accepted with 202 and the failure arrives later in the message.failed webhook. Convert before sending rather than relying on the API to catch it.

Media with templates

Add media (+ mediaType) to a template send to attach or override media — it takes precedence over any media URL embedded in the template:
Note that media/mediaType cannot be combined with a free-form text send. The API does accept buttons alongside mediaType: "video" or "document", though Meta may reject buttons on some video/PDF messages depending on the recipient’s client.