Platform API.
The administrative surface that powers the console — workspaces, members, roles, service activation, workspace API keys, audit, introspection. Generated from the live OpenAPI spec.
Browser sessions authenticate via the auth_token cookie set by /v1/auth/signin. CI/CD and other programmatic callers authenticate via a workspace API key (pcft_live_*) minted on the console's API keys page — pass it as Authorization: Bearer <token>. The policies bound to the key determine which actions are allowed, and a key can never carry more than the minter's own permissions. Signed-in users are checked against their workspace role's policy instead. Minting and revoking keys requires a signed-in session — a key cannot mint other keys.
Base URL
https://api.platform-auth.productcraft.coAuth
Authorization: Bearer …Spec version
OAuth Sign-In
Sign in to ProductCraft with Google, GitHub or Apple (browser redirects; not part of the SDKs).
Authentication
Platform sign-up, sign-in, token refresh, sign-out and password reset for ProductCraft accounts (the people who run workspaces, not your end users: those sign in through Auth).
- post
/v1/auth/signupCreate a new account and sign in - post
/v1/auth/signinSign in with email/username and password - post
/v1/auth/refreshRefresh access token using refresh token - post
/v1/auth/logoutLogout by revoking refresh token - post
/v1/auth/logout-currentRevoke the server-side session tied to the caller’s current access token - post
/v1/auth/password/request-resetRequest a password reset email. - post
/v1/auth/password/resetReset password using the email-delivered reset token. - post
/v1/auth/mfa/send-codeEmail a sign-in code - post
/v1/auth/mfa/webauthn/optionsGet passkey options for the second step - post
/v1/auth/mfa/verifyFinish sign-in with the second step - get
/v1/auth/step-upGet the session's step-up state - post
/v1/auth/step-upConfirm it is you (step-up) - post
/v1/auth/step-up/send-codeEmail a step-up code - post
/v1/auth/step-up/webauthn/optionsGet passkey options for step-up
Introspect
Who is calling: the session, its membership and effective policy in a workspace, and what a workspace API key resolves to. Product APIs call these to authorise requests.
Jwks
The public keys that verify platform-issued JWTs.
Me
The signed-in account: profile, avatar and console guide preferences.
- get
/v1/me/mfaGet the caller's two-step sign-in methods - post
/v1/me/mfa/totpStart adding an authenticator app - post
/v1/me/mfa/totp/{factor_id}/confirmTurn on a pending authenticator app - post
/v1/me/mfa/emailStart adding email codes - post
/v1/me/mfa/email/{factor_id}/confirmTurn on pending email codes - post
/v1/me/mfa/webauthnStart adding a passkey - post
/v1/me/mfa/webauthn/{factor_id}/confirmTurn on a pending passkey - patch
/v1/me/mfa/factors/{factor_id}Rename a factor - delete
/v1/me/mfa/factors/{factor_id}Remove a factor - post
/v1/me/mfa/recovery-codesReplace the recovery codes - get
/v1/meRead the caller's account profile. - patch
/v1/me/profileUpdate the caller's profile. - post
/v1/me/avatarUpload (or replace) the caller's avatar. - delete
/v1/me/avatarClear the caller's avatar and delete the stored object.
Platform-Api-Keys
Workspace API keys (`pcft_live_…`): mint from a preset or managed policies, list, rotate, rebind, revoke, and ask a key what it can do (`api-keys/self`).
- get
/v1/workspaces/{workspace_slug}/api-keysList the API keys in this workspace - post
/v1/workspaces/{workspace_slug}/api-keysMint a new PAK. - get
/v1/workspaces/{workspace_slug}/api-keys/presetsList the ready-made permission sets a workspace key can be minted with (`preset` on create), each with a label, a… - post
/v1/workspaces/{workspace_slug}/api-keys/previewDescribe the key a mint with this `preset` or these `policy_ids` would create, without creating anything: what it… - post
/v1/workspaces/{workspace_slug}/api-keys/{id}/rotateMint a replacement for an existing PAK, carrying its name, description and policy bindings over. - patch
/v1/workspaces/{workspace_slug}/api-keys/{id}/bindingsReplace the managed-policy bindings on a PAK. - get
/v1/workspaces/{workspace_slug}/api-keys/{id}Get a single PAK by id. - patch
/v1/workspaces/{workspace_slug}/api-keys/{id}Update a PAK’s name or description (does not touch bindings). - delete
/v1/workspaces/{workspace_slug}/api-keys/{id}Revoke a PAK. - get
/v1/api-keys/selfDescribe the workspace key making this request: its name, workspace, expiry and what it may do in plain sentences.
Session
The signed-in account's sessions: list them and sign out of one or all others.
Verification
Verify the account email address with the emailed code, or send a new code.
Workspace-Audit-Logs
The workspace audit log and the cross-product audit feed, with NDJSON or CSV export.
- get
/v1/workspaces/{workspace_slug}/audit-logsList workspace audit log entries, newest first. - get
/v1/workspaces/{workspace_slug}/audit-logs/exportStream the workspace audit log as NDJSON or CSV, applying the same `?action=` / `?actor_id=` / `?since=` / `?until=`… - get
/v1/workspaces/{workspace_slug}/audit-feedUnified workspace audit feed (cursor-paginated)
Workspace-Policies
Managed IAM-style policies that roles and API keys are bound to, and the action catalog they are written against.
- get
/v1/workspaces/{workspace_slug}/policiesList managed policies in a workspace, alphabetically. - post
/v1/workspaces/{workspace_slug}/policiesCreate a managed policy. - get
/v1/workspaces/{workspace_slug}/policies/actions/catalogList every known workspace action (catalog of statement actions). - get
/v1/workspaces/{workspace_slug}/policies/{policy_id}Get a managed policy by id - patch
/v1/workspaces/{workspace_slug}/policies/{policy_id}Update a managed policy. - delete
/v1/workspaces/{workspace_slug}/policies/{policy_id}Delete a managed policy.
Workspace-Roles
Custom and system roles in a workspace and the policy each grants.
- get
/v1/workspaces/{workspace_slug}/rolesList roles in a workspace. - post
/v1/workspaces/{workspace_slug}/rolesCreate a new custom role. - get
/v1/workspaces/{workspace_slug}/roles/{role_id}Get a role + its permissions - patch
/v1/workspaces/{workspace_slug}/roles/{role_id}Update a role or replace its permission set. - delete
/v1/workspaces/{workspace_slug}/roles/{role_id}Delete a custom role (fails if it has members).
Workspace-Services
Turn products (Auth, Mail, Waitlist, Social, Trawl, Flags, Notify) on or off for a workspace, with their settings.
- get
/v1/workspaces/{workspace_slug}/servicesList services activated on this workspace. - post
/v1/workspaces/{workspace_slug}/services/{service}Enable (or re-enable) a service for this workspace - delete
/v1/workspaces/{workspace_slug}/services/{service}Disable a service (settings are retained) - patch
/v1/workspaces/{workspace_slug}/services/{service}/settingsReplace the settings jsonb for an active service
Workspace-Stats
Workspace dashboard totals and a daily series of admin changes.
Workspaces
Workspaces, their members and invites. Platform routes name a workspace by its slug, positionally (`workspaces.retrieve("acme")`); the product APIs bind `workspace_id` instead.
- get
/v1/workspacesList workspaces the current user belongs to - post
/v1/workspacesCreate a new workspace. - get
/v1/workspaces/{workspace_slug}Get workspace details - patch
/v1/workspaces/{workspace_slug}Update workspace display name, slug, or settings. - delete
/v1/workspaces/{workspace_slug}Delete a workspace (requires workspace.delete). - post
/v1/workspaces/{workspace_slug}/avatarUpload (or replace) the workspace identity avatar. - delete
/v1/workspaces/{workspace_slug}/avatarClear the workspace avatar and delete the stored object. - get
/v1/workspaces/{workspace_slug}/membersList workspace members, oldest join first. - patch
/v1/workspaces/{workspace_slug}/members/{account_id}/roleUpdate a member's role. - delete
/v1/workspaces/{workspace_slug}/members/{account_id}Remove a member from a workspace (or self-leave) - post
/v1/workspaces/invites/acceptAccept a workspace invite by code. - get
/v1/workspaces/{workspace_slug}/invitesList workspace invites, newest first. - post
/v1/workspaces/{workspace_slug}/invitesCreate a workspace invite link. - delete
/v1/workspaces/{workspace_slug}/invites/{invite_id}Revoke a workspace invite. - get
/v1/workspaces/{workspace_slug}/securityGet the workspace security policy - put
/v1/workspaces/{workspace_slug}/securityChange the workspace security policy