Skip to content

API reference

Narrative summary of platform-relevant endpoints. Authoritative request/response schemas live on the running service:

  • OpenAPI 3.1: {CENTRAL_BASE}/openapi.json
  • Swagger UI: {CENTRAL_BASE}/docs

Generate clients from OpenAPI. All operations have stable operationId values.

Authentication flow

MethodPathAuthoperationIdNotes
GET/v1/auth/startPublicstartAuthenticationBrowser entry; 302 to ZITADEL
GET/v1/auth/callbackPublic (ZITADEL only)handleZitadelCallbackFixed central redirect URI; sets gateway cookie
GET/v1/auth/resumeGateway cookieresumeAuthenticationCentral onboarding continuation
POST/v1/auth/exchangePlatform BasicexchangeAuthenticationHandoffServer-to-server; one-time handoff_ code

Start query parameters

ParamRequiredRules
platformKeyyes^[A-Z][A-Z0-9_]{1,63}$
returnToyes1–2048 chars; allowlisted
onboardingModenonone | platform | central; must match registry

Exchange body

json
{ "code": "handoff_…" }

code must start with handoff_ (max length 200).

Exchange 200 body (runtime)

Returned by HandoffService.exchange:

FieldTypeMeaning
session.iduuidGateway session id
session.expiresAtdate-timeSession expiry
session.gatewayTokenstringOpaque credential for Central cookie auth
user.iduuidLocal user id
user.substringZITADEL subject
platform.keystringPlatform key
onboarding.statusenumNOT_STARTED | IN_PROGRESS | COMPLETE
onboarding.requirementVersionintegerCurrent platform requirement version
onboarding.missingFieldsstring[]Required field keys still empty
onboarding.canCompleteCentrallybooleanFrom platform central_onboarding_enabled
permissionsstring[]Captured gateway session permissions
returnTostringAbsolute allowlisted destination from start

OpenAPI’s handoffExchangeSchema reuses a bootstrap user shape that may list optional picture. Runtime exchange does not currently return picture. Prefer the table above.

Typical status codes (auth-flow)

CodeWhen
302Successful start / callback / resume redirect
400Validation / invalid redirect shape
401Bad platform Basic auth; ZITADEL exchange failures; missing gateway cookie on resume
403returnTo or onboardingMode not registered for platform
404Unknown platform; invalid/expired/consumed state or handoff
409Platform callback missing; central onboarding disabled; documented resume conflict when a handoff row already exists for the transaction (unique on transaction_id)
503OIDC client not configured; ZITADEL unavailable

Onboarding (user)

MethodPathAuthPurpose
GET/v1/onboarding/{platformKey}/requirementsUser (Bearer or gateway cookie)Fields + current values
GET/v1/onboarding/{platformKey}/statusUserCalculated status
PUT/v1/onboarding/{platformKey}/valuesUserUpsert values (cookie writes need allowlisted Origin)
POST/v1/onboarding/{platformKey}/completeUserComplete when no missing required fields

Platform registry (admin)

Requires platforms:admin (via gateway session permissions or ZITADEL Bearer with that role).

MethodPathNotes
GET / POST/v1/platformsList / create
GET / PATCH / DELETE/v1/platforms/{platformKey}Read / update / soft deactivate
POST/v1/platforms/{platformKey}/activateRe-activate
POST/v1/platforms/{platformKey}/credentials/rotateReturns new secret once

Onboarding schema (admin)

Under /v1/platforms/{platformKey}/onboarding/fields with onboarding:schema:read / onboarding:schema:write. Non-central callers must also carry a matching platform claim unless they have platforms:admin.

Profile / account (Account Center style)

Not required for basic platform login, but available with user auth:

  • GET /v1/me
  • GET / PATCH /v1/profile/me
  • POST /v1/profile/me/avatar/upload-request
  • GET /v1/account/authentication-methods
  • POST /v1/account/password
  • DELETE /v1/account/me (soft delete)

Health

MethodPathBehavior
GET/health/liveNo dependency checks
GET/health/readyChecks PostgreSQL

Security schemes (OpenAPI)

  • platformBasicAuth — exchange only
  • gatewayCookieAuth — resume and cookie-authenticated user routes
  • Bearer ZITADEL access token — user and admin routes when not using the gateway cookie