Skip to main content
Retrieve the raw contents of a stored file. This serves the file directly from R2 storage with appropriate HTTP headers.

Endpoint

GET /v1/accounts/:accountId/storage/*
The file’s storage key follows /v1/accounts/:accountId/storage/ in the URL path.

Authentication

No authentication required. Files are served publicly by their storage key.

Response

Returns the raw file body with the following headers:
HeaderDescription
Content-TypeThe file’s MIME type
ETagEntity tag for caching
Content-LengthFile size in bytes
Returns a 404 response (using the standard error envelope) if the file is not found.

Example

curl "https://api.collab-kit.com/v1/accounts/${ACCOUNT_ID}/storage/c3003c93/uploads/screenshot.png" \
  --output screenshot.png