HTTP API
The supported HTTP boundaries for Flow ID integrations.
The hosted issuer is https://id.flow.industries. Prefer the SDK for browser authentication and account navigation; raw authentication internals are not a substitute for its state, PKCE, callback, and account-change checks.
App session endpoint
Your app serves /flow/session using createSessionHandler() or handleSessionRequest() from @flow-industries/id/server.
| Method | Purpose |
|---|---|
| GET | Resolve the app session, refresh when needed, or complete an authorization callback. |
| POST | Start login, select an account, restore/create a guest, or perform another supported SDK session action. |
| DELETE | Revoke the linked session and refresh access, then clear app cookies. |
The handler is on your app's origin, not a cross-origin auth iframe. It owns HttpOnly cookies and the callback exchange. An unavailable issuer can cause logout to fail; do not show a successful logout before the handler confirms it.
Issuer endpoints
| Endpoint | Purpose |
|---|---|
GET /api/auth/jwks | Public signing keys for JWT verification. |
POST /api/session/verify | Verify { token, audience } and return { payload }, or an error. |
POST /api/session/refresh | Server-side rotating refresh exchange, managed by the session handler. |
GET /api/config | Public relying-party configuration. |
GET /api/info | Service version and discovery information. |
GET /health | Service health response. |
GET /.well-known/webauthn | WebAuthn related-origins configuration. |
Use the public issuer and intended audience when verifying a token. Treat refresh credentials as server-owned secrets, not values to send through browser navigation.
Account and product data
The account page uses cookie-authenticated endpoints for its own identity. For example, GET /api/account/export downloads the current account's JSON, and POST /api/account/delete requires { confirm: "current_username" }. These are sensitive user operations; use the Your data interface for interactive export and deletion.
GET /api/account/passkeys is the one account endpoint an app reads with its own Flow bearer token instead of the account cookie. It returns { userId, passkeys: [{ credentialId, publicKey, createdAt }] } — the account's registered passkeys, oldest first — so an app can verify a passkey assertion against the account rather than against a key a request carries. Send the bearer token and no cookie, never an X-Flow-User-Id header, and compare the returned userId to the account you expect. See Verify an assertion yourself.
Product APIs include room access, XP, actions, study, settings, and notifications. Their SDK clients and typed responses define the current contract. The Study and Focus surface uses /api/actions/me for the active session, /api/study/catalog and /api/study/subjects for subjects, and /api/study/summary?range=today for finished time. Valid ranges are today, 7d, 30d, and all.
Endpoint authorization varies: an app bearer token is not interchangeable with the account page's cookie session. Do not assume a successful sign-in grants arbitrary audiences, room access, or account-management privileges.
Errors and limits
Handle unauthenticated sessions, denied access, account-change conflicts, validation errors, rate limits, and unavailable upstream services. Preserve the SDK's retry and identity guards. For requests returning Retry-After, respect that delay rather than repeatedly retrying.
The old /keys/* adapter is retired. Do not build new integrations on legacy iframe login RPCs or routes from historical SDK documentation. Getting started describes the supported entry point.