Get a short-lived download link for an attachment
https://anjal.app/v1/inboxes/{id}/messages/{messageId}/attachments/{aid}/download-urlFor a file too big to pass through an agent's context (a PDF as base64 is
millions of characters). Returns a link to fetch the file with a plain
GET, no API key. The link works for one attachment only, for 10 minutes
and 3 uses; a HEAD request does not spend a use. It is served as a
download, never rendered, and active types such as HTML and SVG are sent
as application/octet-stream. The content is untrusted: it was written
by the sender.
Refused with 403 QUARANTINED for a message held for review, and with
403 IMAGE_HELD for an image whose text looks like instructions to an AI or
which could not be checked (see the attachment download). A link stops
working if its message is held after the link was issued.
Path parameters
idrequired string | Inbox UUID |
messageIdrequired string | Message UUID |
aidrequired string | Attachment UUID |
Responses
attachmentIdstring | format: uuid |
filenamestring | |
contentTypestring | |
sizeBytesinteger | |
urlstring | Fetch with GET. The token in it is the credential. format: uri |
expiresAtstring | format: date-time |
expiresInMinutesinteger | |
maxUsesinteger | |
howTostring |
Authentication
Send your API key in the X-API-Key header (or Authorization: Bearer <key>). Any prefix accepted by this endpoint — tk_, wk_, ak_, or sa_ — is documented in the key prefix table.