Messages
Get signed URL for an attachment
Return a short-lived signed R2 URL for the attachment along with the storage key (and remappedFrom when a stale email-attachment key was rewritten). The signed URL is used by previews that need the URL itself rather than a redirect.
Path Parameters
storageKey*string
Full R2 storage key
Query Parameters
inline?string
Set to "1" or "true" to request inline content disposition for PDFs
contentType?string
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/messages/attachment-url/string"{ "url": "https://r2.example.com/messages/65a0.../photo.jpg?token=...", "storageKey": "messages/65a0e0e0e0e0e0e0e0e0e0e0/msg_67b0/photo.jpg"}