WhaBuzz docs
API reference

Media

Upload and download media. WhaBuzz proxies Meta and stores nothing.

Upload and download media. WhaBuzz proxies Meta and stores nothing.

Base URL https://api.whabuzz.com. Every request needs Authorization: Bearer <key> unless the operation says otherwise; see Authentication. Errors follow the two-source contract.

Operations on this page:

#Upload media to Meta for sending

POST/v1/media

Stored by Meta, not by WhaBuzz.

Auth: API key (tenant key, or app key with X-WhaBuzz-Tenant). Operation id: uploadMedia.

Request body (multipart/form-data, required)

FieldTypeRequiredDescription
filestring (binary)yes
typestringyes
fromstringyes

cURL:

curl -X POST "https://api.whabuzz.com/v1/media" \
  -H "Authorization: Bearer $WHABUZZ_KEY" \
  -F file=@./photo.jpg \
  -F type=<type> \
  -F from=<from>
bash

Responses

200 Meta's response verbatim

{
  "id": "1479537139650973"
}
json

Common errors. Shape and meanings are on the Errors page.

HTTPWhaBuzz codeMeaning
400131030Meta's error, passed through with Meta's HTTP status

#Download inbound media

GET/v1/media/{media_id}

Streams the bytes from Meta. WhaBuzz never stores media. Meta keeps inbound media for a limited time; download promptly.

Auth: API key (tenant key, or app key with X-WhaBuzz-Tenant). Operation id: downloadMedia.

Parameters

NameInTypeRequiredDescription
media_idpathstringyes
fromquerystringnoNumber that received it; needed only when the tenant has several WABAs.

cURL:

curl -X GET "https://api.whabuzz.com/v1/media/$MEDIA_ID" \
  -H "Authorization: Bearer $WHABUZZ_KEY"
bash

Responses

200 The file

Body: application/octet-stream.

404 Meta does not know this media id (passed through)

{
  "source": "meta",
  "error": {
    "message": "Unsupported get request. Object with ID '1479537139650973' does not exist, cannot be loaded due to missing permissions, or does not support this operation.",
    "type": "GraphMethodException",
    "code": 100,
    "error_subcode": 33,
    "fbtrace_id": "AxYz0123456789"
  }
}
json

#Delete uploaded media from Meta

DELETE/v1/media/{media_id}

Auth: API key (tenant key, or app key with X-WhaBuzz-Tenant). Operation id: deleteMedia.

Parameters

NameInTypeRequiredDescription
media_idpathstringyes
fromquerystringno

cURL:

curl -X DELETE "https://api.whabuzz.com/v1/media/$MEDIA_ID" \
  -H "Authorization: Bearer $WHABUZZ_KEY"
bash

Responses

200 Meta's response verbatim

{
  "success": true
}
json

This page as Markdown: /api/media.md. All docs in one file: /llms-full.txt.