Download File
Available for: Chatflow, Chatbot, Agent, Text Generator apps.
Returns the raw bytes of a file previously returned by Upload File. A file is reachable only through the app whose messages reference it.
Authorizations
Every request authenticates with an API key: Authorization: Bearer {API_KEY}. App endpoints take an app API key; knowledge endpoints take a knowledge base API key (Get Started).
Keep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP 401 (unauthorized).
Path Parameters
ID of the file to download, from the Upload File response.
Query Parameters
When true, the file downloads as an attachment instead of rendering inline in the browser.
End-user identifier, defined by your app and unique within it. It has no effect on file access here, which is scoped by app and message rather than by user. See End User Identity.
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.