Download File
Available for: Chatflow, Chatbot, Legacy 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.
For deployed environments, use the deployed-environment variant instead.
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
Query Parameters
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.