Skip to content
Fluxer API

Fluxer API

Fluxer is a self-hostable chat platform. Its API has four surfaces, and all four share one identifier space.

SurfaceWhat it isReference
HTTP APIResource reads and mutations below /v1HTTP API
GatewayA persistent WebSocket for session state and real-time eventsGateway
Media ProxyAttachments, image assets, themes, entrance sound audio, and the upload relayMedia Proxy
Admin APIThe privileged namespace below /v1/adminAdmin API

A client mutates a resource over the HTTP API and receives the resulting update as a Gateway Dispatch. Each operation states the Dispatches it fires, and Events defines each payload and its recipient scope.

A snowflake is the identifier all four surfaces share. Voice runs on LiveKit, and Voice defines the placement protocol and the media transport.

Read thisFor
ConventionsWire table notation, footnotes, omission and null
AuthenticationThe Authorization grammar and the four credential kinds
SnowflakesIdentifiers, ordering, and pagination cursors
ErrorsThe error envelope and the code registries
Rate limitsBuckets, the 429 body, and the X-RateLimit-* headers
LocalesThe locale registry and Accept-Language negotiation

A client that knows only a Fluxer origin sends GET /.well-known/fluxer first. The route is unversioned, accepts no credential, and is readable from any origin.

GET https://example.com/.well-known/fluxer

The instance Fluxer hosts answers discovery at https://fluxer.app/.well-known/fluxer. That origin is the one thing a client is given.

The response is the instance discovery object. Every base URL a client uses comes from the instance endpoints object inside it. A client MUST read every base URL from that response, and it MUST NOT derive one from the origin it was given or assume an official Fluxer domain.

The base URL a client takes depends on its kind.

  • endpoints.api_public is the endpoint a bot, a library, or any other third-party client uses.
  • endpoints.api_client is the endpoint the first-party web application uses.
  • endpoints.api repeats endpoints.api_client.

A credential goes in the Authorization header.

GET https://api.example.com/v1/users/@me
Authorization: flx_ZDb1GURItsMuYl1zvrgxv2qLBxyNmgNSEaWT

That credential is a user session token. Log in with a password issues one. A bot sends a bot token with the Bot prefix, issued by Create application. Authentication gives the exact form of all four kinds.