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:
POST /v1/media: Upload media to Meta for sendingGET /v1/media/{media_id}: Download inbound mediaDELETE /v1/media/{media_id}: Delete uploaded media from Meta
#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)
| Field | Type | Required | Description |
|---|---|---|---|
file | string (binary) | yes | |
type | string | yes | |
from | string | yes |
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>bashResponses
200 Meta's response verbatim
{
"id": "1479537139650973"
}jsonCommon errors. Shape and meanings are on the Errors page.
| HTTP | WhaBuzz code | Meaning |
|---|---|---|
| 400 | 131030 | Meta'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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
media_id | path | string | yes | |
from | query | string | no | Number 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"bashResponses
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
media_id | path | string | yes | |
from | query | string | no |
cURL:
curl -X DELETE "https://api.whabuzz.com/v1/media/$MEDIA_ID" \
-H "Authorization: Bearer $WHABUZZ_KEY"bashResponses
200 Meta's response verbatim
{
"success": true
}jsonThis page as Markdown: /api/media.md. All docs in one file: /llms-full.txt.