Skip to main content

Endpoint

Authentication

This endpoint requires an OAuth access token. Send it as a bearer token:
Required scope: files:read

Path Parameters

Request Example

There is no user_email query parameter here. The download is attributed to the access token’s user automatically.

Response

Success Response

Status Code: 200 OK

Response Fields

Error Responses

400 Bad Request

Returned when the file ID format is invalid, or when the access token has no user behind it. client_credentials tokens act as the admin who created the application, so this applies only to tokens issued before application creators were recorded.

401 Unauthorized

Returned when the access token is missing, unknown, revoked, or expired, or when an X-API-Key was sent instead of a bearer token. See OAuth error responses.

403 Forbidden

Returned when the token does not carry the required scope.

404 Not Found

Returned when the file does not exist.

429 Too Many Requests

Returned when your organization exceeds its per-minute request limit.

500 Internal Server Error

Returned when the request fails due to a server error.

Notes

The access token’s user is validated against the organization, but the file itself is authorized at the organization level. Any file in the organization can be downloaded with a valid files:read token, regardless of whether that user could open the file in the web application. Treat files:read as organization-wide file access and grant it deliberately.
File IDs follow a specific format: document_{id} for documents and attachment_{id} for attachments. Use the complete file ID as returned from other endpoints.
The presigned download URL expires after a certain time (indicated by expires_at). Download the file before the URL expires or request a new URL.

Common MIME Types

Use Cases

This endpoint is useful for:
  • File retrieval - Download files uploaded to or generated by workflows
  • Document export - Export documents to external systems
  • Archival - Save files to long-term storage
  • User downloads - Allow end users to download files through custom interfaces