Skip to main content
GET
/
files
/
{file_id}
/
preview
Error
A valid request URL is required to generate request examples
"<string>"

Authorizations

Authorization
string
header
required

API Key authentication. For all API requests, include your API Key in the Authorization HTTP Header, prefixed with Bearer. Example: Authorization: Bearer {API_KEY}. Strongly recommend storing your API Key on the server-side, not shared or stored on the client-side, to avoid possible API-Key leakage that can lead to serious consequences.

Path Parameters

file_id
string<uuid>
required

The unique identifier of the file to preview, obtained from the Upload File API response.

Query Parameters

as_attachment
boolean
default:false

If true, forces the file to download as an attachment instead of previewing in browser.

user
string

User identifier, used for end-user context.

Response

Returns the raw file content. The Content-Type header is set to the file's MIME type. If as_attachment is true, the file is returned as a download with Content-Disposition: attachment.

The response is of type file.