API Reference
Files
Downloading uploaded files such as post documents.
Downloading uploaded files such as post documents.
Generated from the OpenAPI spec by
npm run docs:api -w api. Do not edit this page — change the decorators inapps/api/src/and regenerate.
Conventions
- Auth — a session on every route: the cookie on web, the bearer token on mobile. See Authentication.
- Errors — every non-2xx response has the body described in Errors.
- Types — a
?after a field name means it is optional;| nullmeans it is present but may be null. - Guide — Media.
Endpoints
GET /api/v1/files/{kind}/{name} — Download an uploaded file
Every avatar, image, video and document the API returns is a path onto this route. It is behind the session like everything else, so an image loader that does not send the credential gets a 401 and shows nothing — configure your image component to send the Authorization header (or the cookie). Responses are immutable and safe to cache for as long as you like: the key is a fresh uuid per upload and the bytes behind it never change.
| Path parameter | Type | Notes |
|---|---|---|
kind | avatars | posts | |
name | string | A uuid plus an extension. |
Returns 200 → the file, streamed
| Error | When |
|---|---|
401 | No valid session. Clear the stored token and sign in again. |
403 | Signed in, but not allowed to do this. |
404 | No such file. |