Skip to main content

API reference (non-admin)

Base path: /api. Authentication: Authorization: Bearer <access token or API key>. Request bodies are JSON unless noted. Administrative endpoints are in the Admin API.

OpenAPI / Scalar: the app serves interactive docs at /scalar/doc (OpenAPI 3.1.0, BearerAuth HTTP bearer JWT scheme). Through the Docker proxy only /api/* is forwarded to flixer, so open Scalar on the API port directly (8081 in Docker, 8083 natively). scripts/update-insomnia.mjs regenerates an Insomnia collection.

Legend: Public = no auth; Bearer = any authenticated user; Signed = HMAC headers.

Version – VersionController​

MethodPathAuthPurpose
GET/versionPublic{ version }.

Auth – /auth​

MethodPathAuthPurpose
POST/auth/registerPublic (admin token if registration disabled)Create account; returns token or {verificationRequired}.
POST/auth/loginPublicUsername/e-mail + password → token, or {passkeyRequired, ticket}.
POST/auth/verify-emailPublicConfirm e-mail with token.
POST/auth/resend-verificationPublicResend verification mail (60 s cooldown).
GET/auth/meBearerCurrent user.
PATCH/auth/meBearerUpdate display name / e-mail.
PATCH/auth/me/passkey-requiredBearerToggle passkey second factor.
POST/auth/me/passwordBearerChange password.
POST/auth/me/deleteBearerDelete own account (password required).
GET/auth/sessionsBearerList own sessions.
DELETE/auth/sessions/:sessionIdBearerRevoke a session.
POST/auth/logoutBearerEnd current session.
POST/auth/me/avatarBearerUpload avatar (multipart avatar, ≤ 5 MB).
DELETE/auth/me/avatarBearerRemove avatar.
GET/auth/avatars/:filenamePublicAvatar image (immutable cache).

Passkeys – /auth/passkeys​

MethodPathAuthPurpose
GET/auth/passkeysBearerList own passkeys.
POST/auth/passkeys/register/optionsBearerWebAuthn creation options (body {password}).
POST/auth/passkeys/register/verifyBearerVerify and store a passkey.
POST/auth/passkeys/login/optionsPublicUsernameless authentication options.
POST/auth/passkeys/login/verifyPublicVerify assertion → token.
POST/auth/passkeys/second-factor/optionsPublic (ticket)Options for second factor.
POST/auth/passkeys/second-factor/verifyPublic (ticket)Verify → token.
POST/auth/passkeys/:passkeyId/deleteBearerDelete a passkey.

Users – UserController​

MethodPathAuthPurpose
GET/usersAdminList users.
GET/users/:idSelf or adminUser detail.
DELETE/users/:idSelf (with password) or adminDelete user.

Preferences​

MethodPathAuthPurpose
GET/preferencesBearerOwn preferences.
PATCH/preferencesBearerUpdate (language only; null deletes).

Settings​

MethodPathAuthPurpose
GET/settingsBearerVisible settings (public ones for non-admins).
GET/settings/registrationPublicWhether registration is enabled.

Sentry​

MethodPathAuthPurpose
GET/sentry/config/:appPublic{enabled, dsn} for flixer, streamer or web.

Media browsing – /media​

MethodPathAuthPurpose
GET/media/homeBearerHome page rows (libraries, featured, continue watching, recents).
GET/media/search?q=&type=BearerTitle search (q ≥ 2 chars).
GET/media/browse/:kind?sort=&offset=&limit=Bearerkind: movies, tv, music; sort: added, title, year; limit ≤ 100.
GET/media/items/:idBearerItem detail with children.
GET/media/items/:id/images/:indexBearerImage bytes (private, max-age=300).
GET/media/items/:id/progressBearerWatch progress.
PUT/media/items/:id/progressBearerSave {positionSeconds, durationSeconds} (204).

Playback – /playback​

MethodPathAuthPurpose
GET/playback/samplesBearerSample videos found in library folders.
POST/playback/items/:id/playback-infoBearerStream URL + token for an indexed item.
POST/playback/samples/:id/playback-infoBearerStream URL + token for a sample.

Streamer-facing​

MethodPathAuthPurpose
GET/streamer/media-rootsSigned (x-streamer-timestamp, x-streamer-signature){ roots: [{id, path}] }. Signature = hex HMAC-SHA256(STREAM_TOKEN_SECRET, flixer-streamer:media-roots:v1:<timestamp>), ±5 min.

Indexer-facing (signed)​

Headers x-indexer-timestamp and x-indexer-signature = hex HMAC-SHA256(STREAM_TOKEN_SECRET, flixer-indexer:v1:<ts>:<METHOD>:<path>:<sha256hex(body)>), ±5 min skew. Bodies are read raw so the signature covers exact bytes.

MethodPathPurpose
GET/indexer/librariesLibraries with absolute folder paths.
GET/indexer/settingsProviders, concurrency, language, subtitle settings (unmasked).
POST/indexer/media/itemsUpsert an item (rate-limited, 429 when busy).
POST/indexer/libraries/:id/pruneBody {scanStartedAt}; delete unseen items → {removed}.

Common error shape​

Ts.ED exceptions are returned as JSON with name, message, status. Typical statuses: 400 validation, 401 missing/invalid/expired token, 403 forbidden/disabled/unverified, 404, 409 conflict, 429 rate limited, 502/503/504 streamer or indexer problems.