Skip to content

Routes outside the OpenAPI document

The OpenAPI document (/api/openapi.json, committed as api/openapi.lock.json) describes the operations the platform registers through its typed router. Several other routes are served by plain HTTP handlers because their shape is fixed by a standard (OAuth, OIDC), because they set cookies, or because they are not JSON request/response calls (server-sent events, HTML pages). They are not in the OpenAPI document by design. This page lists them.

The routes marked “spec stub” are plain handlers that are still described in the OpenAPI document by a spec-only stub, so generated clients can call them.

Three guards apply to browser-facing routes. Requests authenticated by Authorization: Bearer (SDKs, service accounts, the router), the OAuth endpoints and the delivery callbacks are not subject to the first two.

Session-cookie writes. A POST, PUT, PATCH or DELETE under /api/*, /bff/* or the authenticated /auth/* routes that the fc_session cookie authenticates must come from the platform’s own origin: Sec-Fetch-Site: same-origin or none, or, without that header, an Origin naming the request’s host or the public base URL (FC_JWT_ISSUER). Otherwise, and when neither header is present, the answer is 403 CROSS_ORIGIN_REQUEST. A body must be application/json (or application/*+json), else 415 UNSUPPORTED_MEDIA_TYPE. A script that replays a browser cookie must send a matching Origin, or use a bearer token.

Sign-in and credential routes (login CSRF). The public routes that sign a browser in or set its credentials take only a JSON body, from any caller: POST /auth/login, the public /auth/2fa/* steps, POST /auth/webauthn/authenticate/{begin,complete}, POST /auth/password-reset/{request,confirm}, POST /auth/password-setup/request and POST /portal/auth/{check-domain,login,password-reset}. A non-JSON body is 415. A request the browser marks as coming from elsewhere (Sec-Fetch-Site other than same-origin or none, or an Origin naming neither the host nor the public base URL, including Origin: null) is 403 CROSS_ORIGIN_REQUEST. Unlike the cookie rule, a request with neither header is accepted, so curl and scripts that send JSON keep working.

SSO callback binding. GET /auth/oidc/login and GET /portal/auth/oidc/login set a short-lived (10 minute) cookie, __Host-fc_sso_<digest> over HTTPS or fc_sso_<digest> over HTTP, in the browser that starts the sign-in. GET /auth/oidc/callback requires it: a callback the browser did not start is 400 LOGIN_NOT_STARTED_HERE. A sign-in must start and finish in the same browser, on the host of the public base URL.

Method Path Purpose
GET /.well-known/openid-configuration OIDC discovery document.
GET /.well-known/jwks.json The public signing keys: RSA (RS256), Ed25519 (EdDSA) and ML-DSA-65 keys, including keys that are pending (published a day before they sign) and retired (kept until every token they signed has expired). The HS256 session-cookie key is never published. Cache by kid, and refetch on an unknown kid.
GET /oauth/authorize Authorization endpoint. Authorization-code flow with PKCE. ?client=<identifier> brands the login page with that client’s theme; ?provider=<idp-id> enters the OIDC bridge directly for that identity provider. Portal-flagged OAuth clients are refused here.
POST /oauth/token Token endpoint. Form-encoded. Grants: authorization_code, refresh_token, client_credentials. Responses carry Cache-Control: no-store.
GET, POST /oauth/userinfo OIDC UserInfo.
POST /oauth/introspect RFC 7662 introspection.
POST /oauth/revoke RFC 7009 revocation. Always answers 200. A client authenticated by credentials revokes only refresh tokens issued to it.

The discovery document advertises issuer, the authorization, token, userinfo, end-session, introspection and revocation endpoints, jwks_uri, supported response types, subject types, signing algorithms (id_token_signing_alg_values_supported lists the algorithms the server holds keys for), scopes, token-endpoint auth methods, grant types, claims and PKCE methods (code_challenge_methods_supported). request and request_uri parameters are not supported.

The built-in public client fcdev-cli (authorization code and refresh, PKCE S256 required) may use any port on its registered http://127.0.0.1/callback and http://[::1]/callback redirects (RFC 8252). No other client may.

Two settings change the revocation and introspection behaviour: FC_OAUTH_REVOKE_ENFORCE_CLIENT=false restores revocation of tokens bound to other clients, and FC_OAUTH_INTROSPECT_CLIENT_AUTH_ONLY=true makes introspection refuse Bearer callers (401 invalid_client). With FC_OIDC_REJECT_UNVERIFIED_EMAIL=true an SSO callback whose id_token says email_verified: false is 403 EMAIL_NOT_VERIFIED. Concurrent presentations of one refresh token: exactly one succeeds, the others get invalid_grant and the family is revoked. Error bodies follow RFC 6749; see Error codes. Claims are on Token claims.

These routes serve the console’s sign-in pages and the SDK session helpers. They set or clear the fc_session cookie.

Method Path Purpose
POST /auth/login Password login: session cookie and principal.
POST /auth/refresh Rotate a refresh token without an existing session (tokens in the JSON body, no cookie).
POST, GET /auth/check-domain Resolve the sign-in method for an email’s domain.
GET /auth/me The current session cookie’s principal.
POST /auth/logout Clear the session cookie.
GET /auth/oidc/login, /auth/oidc/callback OIDC SSO through the bridge (email-domain path).
GET /auth/oidc/session/end End the session (clears the cookie).
POST /auth/change-password, /auth/change-password/send-email-code Change the signed-in user’s password.
GET /auth/login-history The signed-in user’s recent sign-ins.
GET, POST /auth/client/accessible, /auth/client/switch, /auth/client/current List, switch and read the working client.
POST /auth/2fa/verify, /auth/2fa/challenge/email The second factor that finishes a password login.
POST /auth/2fa/enroll/{totp,email}/{begin,confirm} Enrol a factor during login.
GET, POST, DELETE /auth/2fa/status, /auth/2fa/methods/*, /auth/2fa/recovery-codes/regenerate, /auth/2fa/trusted-devices[/{id}] Self-service management of second factors.
POST, GET /auth/password-reset/request, /validate, /confirm, /passkey/begin Unauthenticated password reset (hex SHA-256 tokens).
POST /auth/password-setup/request Ask for a fresh set-password link.
POST, GET /auth/webauthn/register/{begin,complete}, /authenticate/{begin,complete}, /credentials Passkeys. These are typed routes and appear in the OpenAPI document.

Details of what each step needs are in Second factors and password policy and Sign-in and federation.

Caller identity and application admin (spec stubs)

Section titled “Caller identity and application admin (spec stubs)”
Method Path Purpose
GET /api/me, /api/me/applications Caller identity and accessible applications.
GET /api/me/clients, /api/me/clients/{clientId}, /api/me/clients/{clientId}/applications The caller’s clients.
POST /api/dispatch-jobs, /api/dispatch-jobs/batch Create dispatch jobs from an application.
POST /api/audit-logs/batch Batch audit ingest.
Method Path Purpose
GET /api/public/platform, /api/config/platform Public platform configuration for the sign-in page.
GET /api/public/login-theme The login page theme (global, layered with the client’s when client is given).

No authentication.

The console’s own backend routes (/bff/roles, /bff/event-types, /bff/scheduled-jobs, /bff/dashboard/stats, /bff/developer/*, /bff/filter-options/*, and the debug reads under /bff/debug/*) are internal to the console. They are not a supported application surface and are not part of the contract applications may rely on; use the /api operations instead.

Method Path Purpose
POST /api/dispatch/process The platform’s dispatch-processing callback. The router posts a message here; the platform makes the real webhook call to the subscription’s target, signs it and settles the job. Described in Delivery and webhook signatures.
POST /api/dispatch/settled The router’s “settled” hook: when it acknowledges a message group’s untried buffered messages after the head failed terminally under BLOCK_ON_ERROR, it posts their job ids with each job’s scheduler-signed token so the platform can mark them for review.

These are for the platform’s own components; applications receive deliveries but do not call them.

The portal identity plane is separate from principals. Portal clients are refused at /oauth/authorize and use their own entry points: GET /portal/authorize, GET /portal/auth/oidc/login, and the JSON routes POST /portal/auth/check-domain, POST /portal/auth/login and POST /portal/auth/password-reset. Tokens come from /oauth/token with the portal OAuth client, and carry ptu_ subjects; see Portal identity and Token claims.

Device-facing routes for field-worker apps, authenticated by a DPoP proof and PIN or badge, not by platform API middleware. They are rate limited per IP (FC_FIELD_RATE_PER_MIN, FC_FIELD_BURST) and answer 503 FIELD_IDENTITY_UNCONFIGURED when the platform has no FLOWCATALYST_APP_KEY.

Method Path
POST /field/auth/nonce, /field/devices/enrol, /field/auth/login, /field/auth/refresh, /field/auth/pin, /field/auth/logout, /field/auth/act-as, /field/auth/sign-in-code
POST /field/auth/unlock-keys, /field/auth/unlock-keys/revoke, /field/auth/unlock/challenge, /field/auth/unlock (unlock keys)
POST /field/worker/photo, /field/worker/photo/set, /field/worker/photo/remove (the worker’s photo)

These routes also answer cross-origin requests from the origins on the console’s CORS Origins list (for a web page that uses the browser build of the field library), never with credentials.

The full protocol is on Field identity protocol. The admin side (/api/field-workers, /api/field-devices, /api/field-policies, /api/field-tokens) is in the OpenAPI document.

Public routes that phone apps call to fetch over-the-air updates (the Expo Updates protocol). They need no sign-in: a manifest is signed, and each route is rate limited per source IP. They answer 503 (APP_UPDATES_UNCONFIGURED) until at least one manifest-signing key is configured. They allow GET only.

Method Path Purpose
GET /app-updates/{applicationCode}/{appKey}/manifest The signed manifest of the newest update of the branch the app asks for.
GET /app-updates/{applicationCode}/{appKey}/assets/{sha256} One asset of an update, by content hash.
GET /app-updates/{applicationCode}/{appKey}/install/{token} The install page of an install link.
GET /app-updates/{applicationCode}/{appKey}/install/{token}/{file} The binary download of an install link.
Method Path Purpose
GET /control/functions/desired A runner’s desired state, with ETag and wait long-poll.
POST /control/functions/heartbeat Runner heartbeat and capabilities.
GET /control/functions/artifacts/{digest} An artifact: a redirect to storage, or the bytes.
POST /control/functions/events, /control/functions/dispatch-jobs Emit an event or create a dispatch job from a function.
POST /control/functions/token Mint the application token for a function that declares one.
POST /control/functions/trace-log Ship trace records.
any /fn/{target}[/{path...}] Invoke a function (on a runner’s invocation listener).

See Function control-plane protocol.

The ingestor runtime is a separate process (Java and Camel). Its HTTP listener serves POST /ingest/{client}/{code} and POST /ingest/{application}/{client}/{code} for HTTP ingestions; the runtime’s calls to the platform (/api/ingestion-runtime/v1/*) are in the OpenAPI document. See Ingestor runtime contract.

Served only when FC_PUSH_ENABLED=true; it is a separate, opt-in subsystem of the server.

Method Path Purpose
POST /api/push/subscriptions Open a stream: create a subscription ticket.
GET /api/push/stream The server-sent-events stream (text/event-stream).
GET /api/push/keys Stream keys.
POST /api/push/batch Publish pushes from an application.
GET /health/push Gateway health.

Frames, topics and tickets are on Push wire format.

The router’s operations API is mounted under FC_ROUTER_HTTP_PREFIX (default /router) on the unified listener, behind HTTP Basic credentials when configured. It has its own OpenAPI document at <prefix>/openapi.json. It serves /monitoring/* (health, pools, queues, circuit breakers, in-flight messages, warnings, blocked groups, group flushes, stream health), mutations such as PUT /monitoring/pools/{poolCode}, POST /monitoring/circuit-breakers/{name}/reset and POST /monitoring/in-flight-messages/{messageId}/ack, an HTML dashboard at /monitoring/dashboard, a /metrics endpoint, and, when FC_DEBUG_ENDPOINTS_ENABLED is true, /debug/* (pprof, expvar, a router dump). The debug routes refuse cross-site browser requests with 403 CROSS_ORIGIN_REQUEST.

Method Path Purpose
GET /api/openapi.json, /api/openapi.yaml, /q/openapi The platform OpenAPI document.
GET /swagger-ui Interactive documentation.
GET /health Liveness.
GET /ready Readiness.
GET /metrics Prometheus metrics, on the metrics listener (FC_METRICS_PORT, default 9090). See Metrics.

An unknown path under /api, /bff, /oauth, /.well-known, /control or /q is 404 NOT_FOUND in the standard envelope (it is never the console’s index.html).

/mcp serves the Model Context Protocol over streamable HTTP (POST, GET for server-sent events, DELETE) when the MCP subsystem is enabled. See MCP tools.

The server-rendered console is served under /ui (pages, /ui/assets/*, /ui/auth/* for sign-in, and /ui/logout). Its pages are HTML, not an API. Browser requests for the old single-page-app URLs are redirected to /ui/. The single-page app has been removed, and there is no setting that restores it.

Responses from typed (huma) routes carry a $schema member and a Link: rel="describedBy" header; ignore both. Everything else follows the wire conventions.