/api/v1, with one full-content subscriber envelope.
Where does mediaId come from?
AmediaId is an opaque Sendlyy UUID, not Meta’s numeric media ID and not an access token.
- A customer sends a file: the full-content webhook contains
message.audio.mediaId,message.image.mediaId,message.document.mediaId, etc. Sendlyy creates that reference automatically. - Your application uploads a file:
POST /api/v1/mediareturnsdata.mediaId. - Download a file: call
GET /api/v1/media/{mediaId}with your scoped Sendlyy API key. The response is the file itself, not a temporary URL or a JSON envelope.
Upload
Grant the keymedia:write and the business number. Its project and environment are inferred from the key. If exactly one number is granted, that number is inferred too:
--form 'senderId=<sender-uuid>'. Dashboard sessions must supply projectId, environmentId and senderId. Explicit IDs must always match the key’s own grants; they cannot override them. Let your HTTP client set the multipart boundary; do not manually set a JSON Content-Type.
Meta validates actual format/encoding; declaring a MIME type does not convert a file. Avoid blind upload retries after an uncertain provider response; they may create another provider file. Uploads do not use the message-send charging path.
Download
Grant the keymedia:read and the corresponding number:
application/octet-stream, Cache-Control: no-store and X-Content-Type-Options: nosniff. The webhook or upload response supplies the original MIME type. Do not put API keys in file URLs or expose them in browser code.
References are scoped to organization, project, environment and number. Key expiry/revocation, missing grants, a disconnected sender or an expired/released rental prevents access. A reference from an older rental allocation cannot be used by the new renter. Media IDs cannot be reused across projects/environments by changing request fields.
References expire at most 30 days after the message/upload timestamp. Meta may remove or make media unavailable sooner; this is not a 30-day storage guarantee. Download and retain important files in your own authorized storage. Expired references return 410; unknown/inaccessible references return 404 or a permission error. Other provider failures can return 502 without exposing provider credentials or response bodies.
The default download transport allows supported Meta HTTPS hosts, pins public DNS addresses, disables redirects and preserves TLS verification. Generic forward-proxy environments require a reviewed SSRF-safe transport before downloads can be enabled there.