/me | GET | Resolve the current session — returns AuthContext |
/magic/send | POST | Email a 6-digit code |
/magic/verify | POST | Trade code for session token |
/password/register | POST | Create user + sign in |
/password/login | POST | Sign in with email + password |
/email/send-verification | POST | Email a code to the current user |
/email/verify | POST | Verify the user’s email address |
/providers | GET | List configured OAuth providers |
/login/:provider | GET | Begin OAuth (returns redirect URL or 302) |
/callback/:provider | GET, POST | Complete OAuth |
/refresh | POST | Rotate the session token |
/sessions | GET | List all sessions for the current user |
/sessions | DELETE | Revoke all sessions for the current user |
/session | DELETE | Revoke the current session (sign out) |
/select-org | POST | Switch active tenant |
/guest | POST | Mint a guest session with a stable anonymous id |
/upgrade | POST | Convert a guest session to a real user (admin / dev only) |
/password/change | POST | Change password (requires current; HIBP-checked; revokes other sessions) |
/password/reset/request | POST | Email a single-use password-reset link (always 200; enumeration-safe) |
/password/reset/complete | POST | Consume the reset token, set the new password, revoke all sessions |
/api-keys | POST | Mint an API key (returns plaintext exactly once) |
/api-keys | GET | List the current user’s API keys (no plaintext) |
/api-keys/:id | DELETE | Revoke a single API key by id |
/account | DELETE | Wipe user — sessions, API keys, OAuth links, user row |
/totp/enroll | POST | Mint a TOTP secret + provisioning URL (re-enroll requires current code) |
/totp/verify | POST | Confirm a TOTP code; finalizes enrollment on first success |
/totp/disable | POST | Remove TOTP (requires a current code) |
/jwt | POST | Exchange the current session for a JWT-shaped token (requires PYLON_JWT_SECRET) |
/orgs | POST | Create an org (caller becomes owner) |
/orgs | GET | List orgs the caller belongs to |
/orgs/:id | GET, DELETE | Org details / delete (owner only) |
/orgs/:id/members | GET | List members |
/orgs/:id/members/:user_id | PUT, DELETE | Change role / remove (admin+) |
/orgs/:id/invites | POST, GET | Send invite by email / list pending |
/orgs/:id/invites/:invite_id | DELETE | Revoke pending invite |
/invites/:token/accept | POST | Accept an invite (must be logged in with the invited email) |
/billing/checkout (under /api/) | POST | Mint a Stripe Checkout Session for the current user |
/billing/webhook (under /api/) | POST | Stripe webhook target (verifies signature) |
/phone/send-code | POST | Send a 6-digit code via SMS (Twilio, configurable transport) |
/phone/verify | POST | Verify the code; mints session, creates user if new |
/siwe/nonce | GET | Mint a SIWE nonce for ?address=0x… (EIP-4361 step 1) |
/siwe/verify | POST | Verify EIP-191 signature; mints session keyed on wallet address |
/passkey/register/begin | POST | Issue a registration challenge (auth required) |
/passkey/register/finish | POST | Persist a new credential after the authenticator signs |
/passkey/login/begin | POST | Issue an assertion challenge (no auth needed) |
/passkey/login/finish | POST | Verify assertion → mint session |
/passkey/keys | GET, DELETE | List / revoke the user’s passkeys |
/.well-known/openid-configuration | GET | OIDC discovery doc (root path, no /api/ prefix) |
/oidc/jwks | GET | JWKS for verifying pylon-issued OIDC tokens |
/scim/v2/Users | POST, GET, DELETE | SCIM 2.0 user provisioning (Bearer PYLON_SCIM_TOKEN) |