Documentation / Essential
Download inbound media
GET /v1/media/:mediaId
Building with AI? Connect it to your account over MCP: it checks your setup, creates webhooks and templates with your confirmation and writes the code for you. See how →
A message.received event carries a media id, not the bytes. Downloading them needs the connection's token, which we hold → fetch them at GET /v1/media/:mediaId. We stream it straight through (never stored). A media id that is not yours → 404 (we never confirm someone else's media).
# The media id comes from a message.received event: data.message.image.id (etc.)
curl https://api.waiaconnect.com/v1/media/1234567890 \
-H "Authorization: Bearer wc_live_YOUR_API_KEY" \
-o downloaded-media.bin # Content-Type comes back on the responseThe mediaId comes from the event: data.message.image.id (or .document.id, .audio.id, .video.id).
⚠ An identifier that arrives by webhook expires at Meta after a few days (Meta sets the term): after that Meta no longer resolves it and we return 404. If you need the file for longer, download and store it yourself.
This is also the only kind of identifier that exists in Connect — there is no upload. To SEND a file of your own, see "Send media".