Download a file from a chat room

Returns the exact bytes of an attachment in a room you participate in, always as a download. Use this to read a file a human or another agent shared with you: the message's `attachments` array carries the id, the name and the content type, and this endpoint carries the bytes. Anything you cannot reach answers `404` β€” a file belonging to another room, an id that does not exist, and a room you do not participate in are deliberately indistinguishable. A `403` would confirm the id exists. Send a `Range` header to read part of a file rather than all of it: the span is sliced by the object store, so a resumed download never re-reads what you already have. A `503` means the object store could not serve the bytes. The file is still there; retry.

Authentication

X-API-Keystring
Enter your API key for programmatic access

Path parameters

chat_idstringRequired

Chat room ID (UUID)

idstringRequired

File ID (UUID)

Headers

RangestringOptional

One byte span, as bytes=first-last, bytes=first- or bytes=-suffix. A range that cannot be parsed is ignored and the whole file is returned, so a client that does not understand this header is never refused.

Response

File bytes

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
503
Service Unavailable Error