Getting started

Module

WhatsApp · Media

Full file flow: upload, send, inspect and download media without exposing a connection token.

POST/mediaScope: writeOfficial (Meta)Requires Official or Agency plan

Upload a file to Meta.

Send multipart/form-data with connection_id and file; the response returns media_id.

Path parameters

No additional parameters.

Query parameters

No additional parameters.

Body fields
FieldTypeDescription
connection_idrequireduuidOfficial connection that owns the file.
filerequiredbinaryFile up to 100 MB; final format limits are enforced by Meta.

Ready examples

curl -X POST "https://connect.zyronstack.com/api/v1/media" \
  -H "Authorization: Bearer SUA_CHAVE_API" \
  -F "connection_id=<CONNECTION_ID>" \
  -F "file=@/CAMINHO/arquivo.pdf"

Responses

201Upload complete; use data.id as media.id.
GET/media/:idScope: readOfficial (Meta)Requires Official or Agency plan

Get metadata and a download route.

Use the media_id from a message payload; returns MIME type, size, hash and an authenticated Zyron download URL.

Path parameters
FieldTypeDescription
idrequiredstringMeta media_id.
Query parameters
FieldTypeDescription
connection_idrequireduuidConnection that owns the media.

Body fields

This endpoint does not receive a JSON body.

Ready examples

curl -X GET "https://connect.zyronstack.com/api/v1/media/<MEDIA_ID>?connection_id=<CONNECTION_ID>" \
  -H "Authorization: Bearer SUA_CHAVE_API"

Responses

200Metadata returned.

Response example

{
  "data": {
    "id": "<MEDIA_ID>",
    "mime_type": "image/jpeg",
    "file_size": "303833",
    "download_url": "https://connect.zyronstack.com/api/v1/media/<MEDIA_ID>/download?connection_id=<CONNECTION_ID>",
    "download_requires_authorization": true
  }
}
GET/media/:id/downloadScope: readOfficial (Meta)Requires Official or Agency plan

Download an inbound or outbound file.

Use the same Bearer key; the API streams bytes and never exposes the Meta token.

Path parameters
FieldTypeDescription
idrequiredstringMeta media_id.
Query parameters
FieldTypeDescription
connection_idrequireduuidConnection that owns the media.

Body fields

This endpoint does not receive a JSON body.

Ready examples

curl -X GET "https://connect.zyronstack.com/api/v1/media/<MEDIA_ID>/download?connection_id=<CONNECTION_ID>" \
  -H "Authorization: Bearer SUA_CHAVE_API"

Responses

200Media bytes with its original content type.
DELETE/media/:idScope: writeOfficial (Meta)Requires Official or Agency plan

Delete media stored by Meta.

Only delete media no longer needed by messages or automations.

Path parameters
FieldTypeDescription
idrequiredstringMeta media_id.
Query parameters
FieldTypeDescription
connection_idrequireduuidConnection that owns the media.

Body fields

This endpoint does not receive a JSON body.

Ready examples

curl -X DELETE "https://connect.zyronstack.com/api/v1/media/<MEDIA_ID>?connection_id=<CONNECTION_ID>" \
  -H "Authorization: Bearer SUA_CHAVE_API"

Responses

200Media deleted.