Zernio
APIFor you
Zernio
APIFor you
API Reference

WhatsApp

Templates

List templatesGETCreate templatePOSTGet templateGETUpdate templatePATCHDelete templateDELETEGet template by idGETUpdate template by idPATCHDelete template by idDELETELook up a library templateGET

Business Profile

Get business profileGETUpdate business profilePOSTUpload profile picturePOSTGet display name statusGETRequest display name changePOSTGet business usernameGETGet username suggestionsGETSet business usernamePOSTDelete business usernameDELETE

Groups

List active groupsGETCreate groupPOSTGet group infoGETUpdate group settingsPOSTDelete groupDELETEAdd participantsPOSTRemove participantsDELETECreate invite linkPOSTList join requestsGETApprove join requestsPOSTReject join requestsDELETE

Blocking

Check if a user is blockedGETList blocked usersGETBlock usersPOSTUnblock usersDELETE

Media

Download WhatsApp mediaGET

Commerce

List the catalogs linked to a WhatsApp numberGETLink a catalog to a WhatsApp numberPOSTUnlink a catalog from a WhatsApp numberDELETEGet a number's commerce settingsGETUpdate a number's commerce settingsPUT

Conversions

Get CTWA conversions datasetGETProvision CTWA datasetPOSTList conversion eventsGETSend WhatsApp conversion eventPOST

Account Events

List account notificationsGET

Phone Numbers

Get number statusGETRegister a connected WhatsApp number on the Cloud APIPOSTMove a number to another profilePATCHRequest a Meta re-verification code for a BYO WhatsApp numberPOSTVerify the Meta re-verification code for a BYO WhatsApp numberPOST

Calling

Get calling config for an accountGETEnable calling on a numberPOSTUpdate calling configPATCHDisable calling on a numberDELETECheck call permissionGETList call history for an accountGETInitiate outbound callPOSTGet a single callGETEstimate per-minute costGETGet calling config for a numberGETGet a call recordingGETStart caller-ID verification for a customer-brought numberPOSTConfirm the caller-ID verification codePOST

Flows

List flowsGETCreate flowPOSTGet flowGETUpdate flowPATCHDelete flowDELETEGet flow JSON assetGETUpload flow JSONPUTGet flow preview URLGETList flow versionsGETPublish flowPOSTDeprecate flowPOSTSend flow messagePOSTList flow responsesGETGet Flows encryption key statusGETRegister a Flows encryption keyPOST

Sandbox

List your sandbox sessionsGETStart a sandbox activationPOSTRevoke a sandbox sessionDELETE

Other

Clear ice breakers and commandsDELETEGet ice breakers and commandsGETGet pricing analyticsGETSet ice breakers and commandsPOST
Dashboard
OverviewPlatformsAPI ReferenceResources
WhatsApp

Download WhatsApp media

Streams the binary for a WhatsApp attachment. This is the endpoint the url on a WhatsApp attachments[] entry points at, in both the message.received webhook and the List messages response.

This is an authenticated endpoint, not a public link. Send Authorization: Bearer <your API key> exactly as you would for any other call. Passing the URL straight to a browser, an LLM vision API, or a no-code "download file" step without the header returns 401. This is the most common integration mistake on this endpoint, and it differs from Instagram, Facebook and Telegram, whose attachments[].url is a direct CDN link that needs no header.

Fetch on receipt, not lazily. WhatsApp media lives in Meta's media store, not ours, and it is removed after a limited retention window (currently 7 days, and Meta has been dropping some inbound media sooner). Once Meta drops it the media is unrecoverable and this endpoint answers 400 permanently, so retrying will never succeed. Download and store the bytes when the webhook arrives.


GET
/v1/whatsapp/media/{mediaId}

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

In: header

Path Parameters

mediaId*string

The media id from attachments[].payload.id.

Query Parameters

accountId*string

The WhatsApp account that received the media.

Response Body

application/octet-stream

application/json

import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.whatsapp.getWhatsAppMedia({  path: {    mediaId: 'media_abc123',  },  query: {    accountId: 'account_abc123',  },});console.log(data);
"string"
Was this page helpful?

Unblock users

Unblock one or more previously blocked WhatsApp users on this number. Up to 1,000 users per request; per-user failures are reported in `failed` without failing the rest of the batch.

List the catalogs linked to a WhatsApp number

The Meta Commerce catalogs connected to the number's WhatsApp Business Account. Pass `catalogAccountId`: the WhatsApp connection's own (embedded signup) token answers an empty list even when a catalog is linked, only a Meta login with catalog_management sees the link. A linked catalog is what product, product_list and catalog_message interactive messages sell from (see POST /v1/inbox/conversations/{conversationId}/messages) and what customers browse in the WhatsApp app. Create and fill catalogs with the /v1/ads/catalogs endpoints.