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
| Field | Type | Description |
|---|
connection_idrequired | uuid | Official connection that owns the file. |
filerequired | binary | File 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
| 201 | Upload 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
| Field | Type | Description |
|---|
idrequired | string | Meta media_id. |
Query parameters
| Field | Type | Description |
|---|
connection_idrequired | uuid | Connection 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"
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
| Field | Type | Description |
|---|
idrequired | string | Meta media_id. |
Query parameters
| Field | Type | Description |
|---|
connection_idrequired | uuid | Connection 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
| 200 | Media 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
| Field | Type | Description |
|---|
idrequired | string | Meta media_id. |
Query parameters
| Field | Type | Description |
|---|
connection_idrequired | uuid | Connection 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"