Messages
Download an attachment with forced Content-Disposition
Streams the attachment bytes back with Content-Disposition: attachment. Requires authentication (JWT or webchat session) and is scoped to the caller's organization: the storage key must belong to the caller's org, and webchat callers cannot fetch internal attachments.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Query Parameters
key*string
Full R2 storage key (must belong to the caller's organization)
fileName?string
Filename to suggest in the Content-Disposition header
Default
"download"Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/messages/download?key=string"Empty