{"openapi":"3.1.0","info":{"title":"Prysmid Platform","description":"Prysmid is a B2B multi-tenant auth SaaS on top of self-hosted Zitadel. This is the platform API + web dashboard. See https://github.com/PrysmID/platform.","version":"0.1.0"},"paths":{"/v1/auth/login":{"get":{"tags":["auth"],"summary":"Login","description":"Start OIDC flow: redirect to auth.prysmid.com.\n\nUsed by both the dashboard's own \"log in\" button (no params) and by\nprysmid.com's `/signup` page (passes `idp_hint=<provider>` and\n`next=/app/workspaces/new` so first-time users land on the workspace\ncreation form right after authenticating).","operationId":"login_v1_auth_login_get","parameters":[{"name":"idp_hint","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Skip Zitadel's IdP picker and go directly to a specific external provider. Accepted: google, github, microsoft. Unknown values are ignored (falls through to the picker).","title":"Idp Hint"},"description":"Skip Zitadel's IdP picker and go directly to a specific external provider. Accepted: google, github, microsoft. Unknown values are ignored (falls through to the picker)."},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Path to redirect to after a successful login. Must be a relative path starting with `/`. Open-redirect attempts (absolute URLs, schemes, protocol-relative `//`) are rejected silently.","title":"Next"},"description":"Path to redirect to after a successful login. Must be a relative path starting with `/`. Open-redirect attempts (absolute URLs, schemes, protocol-relative `//`) are rejected silently."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/callback":{"get":{"tags":["auth"],"summary":"Callback","description":"OIDC callback: exchange code for token, upsert user, set session.\n\nRedirect target priority:\n  1. `post_login_next` from the session (set by `/login?next=...`).\n  2. `/app/workspaces/new` if this is a first-time user with zero\n     workspaces (most likely a fresh signup from prysmid.com).\n  3. `/app/` (the dashboard home) for returning users.","operationId":"callback_v1_auth_callback_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","description":"Terminate the Zitadel session and bounce the user to /post-logout.\n\nHallazgo #73: a bare `?post_logout_redirect_uri=...` is ignored by Zitadel\nif either (a) the URI is not registered on the OIDC app, or (b) the request\nomits `id_token_hint` (Zitadel can't tell which session to end). Without\nboth, the user lands on the Console default page after re-auth. We pop the\nid_token captured at /callback time and forward it as `id_token_hint`\nalongside `client_id` + a registered `post_logout_redirect_uri`.","operationId":"logout_v1_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/auth/me":{"get":{"tags":["auth","auth"],"summary":"Me","description":"Return the authenticated user (for SDK / agent consumers).","operationId":"me_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Me V1 Auth Me Get"}}}}}}},"/v1/auth/device/start":{"post":{"tags":["auth"],"summary":"Start an OAuth 2.0 Device Authorization Grant flow.","description":"Used by the @prysmid/mcp CLI and other headless tools that can't run a redirect-based browser flow. The client shows `verification_uri` + `user_code` to the human, then polls `/v1/auth/device/poll` until approval. RFC 8628.","operationId":"device_start_v1_auth_device_start_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceStartResponse"}}}}}}},"/v1/auth/device/poll":{"post":{"tags":["auth"],"summary":"Poll until the user approves the device.","description":"Returns `status=pending` while waiting, `status=complete` with tokens once the human approves at `verification_uri`, or `status` in {`slow_down`, `expired`, `denied`} for terminal/recoverable errors. Always 200 — the discriminator is `status`, not the HTTP code, so naive HTTP error handling on the client doesn't break polling.","operationId":"device_poll_v1_auth_device_poll_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevicePollRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevicePollResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces":{"get":{"tags":["workspaces"],"summary":"List Workspaces","description":"List workspaces owned by the authenticated user.","operationId":"list_workspaces_v1_workspaces_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceList"}}}}}},"post":{"tags":["workspaces"],"summary":"Create Workspace","description":"Create a workspace row (PROVISIONING) and kick off provisioning in the\nbackground. Client polls `GET /v1/workspaces/{id}` until `state == active`.","operationId":"create_workspace_v1_workspaces_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}":{"get":{"tags":["workspaces"],"summary":"Get Workspace","operationId":"get_workspace_v1_workspaces__workspace_id__get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["workspaces"],"summary":"Update Workspace","operationId":"update_workspace_v1_workspaces__workspace_id__patch","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workspaces"],"summary":"Delete Workspace","operationId":"delete_workspace_v1_workspaces__workspace_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Workspace V1 Workspaces  Workspace Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/retry-provisioning":{"post":{"tags":["workspaces"],"summary":"Retry Provisioning","description":"Re-run provisioning for a workspace in PROVISIONING_FAILED.\n\nNo-ops if the workspace is in any other state (including already-ACTIVE\nand in-flight PROVISIONING), returning the current state so the caller\ncan refresh.","operationId":"retry_provisioning_v1_workspaces__workspace_id__retry_provisioning_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/apps":{"get":{"tags":["apps"],"summary":"List Apps","description":"List all OIDC apps in the workspace's Default project.","operationId":"list_apps_v1_workspaces__workspace_id__apps_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["apps"],"summary":"Create App","description":"Create an OIDC app. `client_secret` is ONLY returned here (never again).","operationId":"create_app_v1_workspaces__workspace_id__apps_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppCredentials"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/apps/{app_id}":{"delete":{"tags":["apps"],"summary":"Delete App","description":"Delete an OIDC app. Idempotent — returns 204 even if already gone.","operationId":"delete_app_v1_workspaces__workspace_id__apps__app_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/login-policy":{"get":{"tags":["login-policy"],"summary":"Get Login Policy","operationId":"get_login_policy_v1_workspaces__workspace_id__login_policy_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginPolicyView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["login-policy"],"summary":"Update Login Policy","description":"Partial update — fields not in the request body keep their current value.","operationId":"update_login_policy_v1_workspaces__workspace_id__login_policy_patch","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginPolicyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginPolicyView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/idps":{"get":{"tags":["idps"],"summary":"List Idps","operationId":"list_idps_v1_workspaces__workspace_id__idps_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdpList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["idps"],"summary":"Create Idp","description":"Create + activate an IdP. Returns the IdP id once it's on the login screen.","operationId":"create_idp_v1_workspaces__workspace_id__idps_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdpCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdpOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/idps/{idp_id}":{"delete":{"tags":["idps"],"summary":"Delete Idp","description":"Remove from login policy and delete the IdP config. Both idempotent.","operationId":"delete_idp_v1_workspaces__workspace_id__idps__idp_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"idp_id","in":"path","required":true,"schema":{"type":"string","title":"Idp Id"}}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/users":{"get":{"tags":["users"],"summary":"List Users","operationId":"list_users_v1_workspaces__workspace_id__users_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/users/invite":{"post":{"tags":["users"],"summary":"Invite User","operationId":"invite_user_v1_workspaces__workspace_id__users_invite_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInvite"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInvited"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/users/{user_id}":{"delete":{"tags":["users"],"summary":"Delete User","description":"Delete a user. Idempotent — 204 even if the user was already gone.","operationId":"delete_user_v1_workspaces__workspace_id__users__user_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/smtp":{"get":{"tags":["smtp"],"summary":"Get Smtp","operationId":"get_smtp_v1_workspaces__workspace_id__smtp_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmtpView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["smtp"],"summary":"Set Custom Smtp","description":"Replace the active SMTP provider with the submitted custom config.\n\nSequence:\n  1. List providers, find any existing custom (sender != platform default)\n  2. Create new SMTP with submitted creds\n  3. Activate new (Zitadel auto-deactivates the previous active)\n  4. Delete previously-found custom providers (cleanup)","operationId":"set_custom_smtp_v1_workspaces__workspace_id__smtp_put","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmtpUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmtpView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["smtp"],"summary":"Revert To Platform Default","description":"Reactivate the platform Emboux-backed provider and delete all customs.","operationId":"revert_to_platform_default_v1_workspaces__workspace_id__smtp_delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmtpView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/branding":{"get":{"tags":["branding"],"summary":"Get Branding","operationId":"get_branding_v1_workspaces__workspace_id__branding_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["branding"],"summary":"Update Branding","operationId":"update_branding_v1_workspaces__workspace_id__branding_patch","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/branding/logo":{"post":{"tags":["branding"],"summary":"Upload Logo","operationId":"upload_logo_v1_workspaces__workspace_id__branding_logo_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_logo_v1_workspaces__workspace_id__branding_logo_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["branding"],"summary":"Delete Logo","operationId":"delete_logo_v1_workspaces__workspace_id__branding_logo_delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/billing":{"get":{"tags":["billing"],"summary":"Get State","operationId":"get_state_v1_workspaces__workspace_id__billing_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingStateView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/billing/checkout":{"post":{"tags":["billing"],"summary":"Checkout","description":"Start a Stripe Checkout session. Enterprise plan returns 422 — that's\ncontact-sales only, no self-serve.","operationId":"checkout_v1_workspaces__workspace_id__billing_checkout_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/billing/portal":{"post":{"tags":["billing"],"summary":"Portal","operationId":"portal_v1_workspaces__workspace_id__billing_portal_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/billing/schedule-plan-change":{"post":{"tags":["billing"],"summary":"Schedule Plan Change","description":"Defer a plan change to the end of the current billing period.\n\nOnly downgrades. The customer keeps paying for and using their current\nplan until `current_period_end`; at that moment Stripe transitions to\nthe target plan's prices, fires `customer.subscription.updated` with\nthe new `items[0].price.id`, and our webhook flips `workspace.plan`.\n\nNo prorations. No credits. No refunds. The customer paid for the\nperiod — we deliver what they paid for, then move on.\n\nUpgrades are rejected with 422 — those should go through /checkout so\nStripe charges the prorated remainder of the period immediately.","operationId":"schedule_plan_change_v1_workspaces__workspace_id__billing_schedule_plan_change_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchedulePlanChangeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingStateView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["billing"],"summary":"Release Scheduled Plan Change","description":"Drop the pending plan change. The subscription continues at its\ncurrent plan indefinitely (no schedule, normal renewal).","operationId":"release_scheduled_plan_change_v1_workspaces__workspace_id__billing_schedule_plan_change_delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingStateView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/billing/spending-cap":{"patch":{"tags":["billing"],"summary":"Update Spending Cap","description":"Set or remove the overage spending cap. Affects future billing periods.","operationId":"update_spending_cap_v1_workspaces__workspace_id__billing_spending_cap_patch","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendingCapUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingStateView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/stripe":{"post":{"tags":["webhooks"],"summary":"Stripe Webhook","description":"Receive and process Stripe events.\n\nSignature verification is mandatory — unsigned/wrong-signature requests\nreturn 400 (Stripe retries, but with a fresh attempt and same payload it\nwill fail again until the secret matches).\n\nIdempotency: `services.billing.process_event` inserts the event id into\n`stripe_event` (PK conflict short-circuits) before dispatching, so even\nStripe's at-least-once redelivery is safe.","operationId":"stripe_webhook_v1_webhooks_stripe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Stripe Webhook V1 Webhooks Stripe Post"}}}}}}},"/app/":{"get":{"tags":["views"],"summary":"Dashboard.Home","description":"Landing after login. Shows the user's workspaces and quick actions.","operationId":"dashboard_home_app__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/app/workspaces":{"get":{"tags":["views"],"summary":"Workspaces.List","operationId":"workspaces_list_app_workspaces_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["views"],"summary":"Workspaces.Create","description":"Create a workspace + kick off provisioning. HTMX-aware.","operationId":"workspaces_create_app_workspaces_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_workspaces_create_app_workspaces_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/workspaces/new":{"get":{"tags":["views"],"summary":"Workspaces.New","operationId":"workspaces_new_app_workspaces_new_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/app/workspaces/{workspace_id}/retry-provisioning":{"post":{"tags":["views"],"summary":"Workspaces.Retry Provisioning","description":"HTMX-called retry. Returns the workspace_status partial so the client\nre-mounts it (now in PROVISIONING state, polling active).","operationId":"workspaces_retry_provisioning_app_workspaces__workspace_id__retry_provisioning_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/workspaces/{workspace_id}":{"get":{"tags":["views"],"summary":"Workspaces.Detail","operationId":"workspaces_detail_app_workspaces__workspace_id__get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/workspaces/{workspace_id}/apps":{"get":{"tags":["views"],"summary":"Apps.List","operationId":"apps_list_app_workspaces__workspace_id__apps_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["views"],"summary":"Apps.Create","description":"Create an OIDC app. HTMX-aware: returns a credentials reveal partial.","operationId":"apps_create_app_workspaces__workspace_id__apps_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_apps_create_app_workspaces__workspace_id__apps_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/workspaces/{workspace_id}/apps/{app_id}":{"delete":{"tags":["views"],"summary":"Apps.Delete","description":"Delete an OIDC app. HTMX swaps the row out on 204.","operationId":"apps_delete_app_workspaces__workspace_id__apps__app_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/workspaces/{workspace_id}/settings/login-policy":{"get":{"tags":["views"],"summary":"Login Policy.View","operationId":"login_policy_view_app_workspaces__workspace_id__settings_login_policy_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["views"],"summary":"Login Policy.Save","description":"Save the full form. The form posts every field present so we apply\nthem as a complete state — unchecked checkboxes resolve to False here.","operationId":"login_policy_save_app_workspaces__workspace_id__settings_login_policy_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_policy_save_app_workspaces__workspace_id__settings_login_policy_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/workspaces/{workspace_id}/settings/idps":{"get":{"tags":["views"],"summary":"Idps.View","operationId":"idps_view_app_workspaces__workspace_id__settings_idps_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["views"],"summary":"Idps.Create","operationId":"idps_create_app_workspaces__workspace_id__settings_idps_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_idps_create_app_workspaces__workspace_id__settings_idps_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/workspaces/{workspace_id}/settings/idps/{idp_id}":{"delete":{"tags":["views"],"summary":"Idps.Delete","operationId":"idps_delete_app_workspaces__workspace_id__settings_idps__idp_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"idp_id","in":"path","required":true,"schema":{"type":"string","title":"Idp Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/workspaces/{workspace_id}/users":{"get":{"tags":["views"],"summary":"Users.View","operationId":"users_view_app_workspaces__workspace_id__users_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/workspaces/{workspace_id}/users/invite":{"post":{"tags":["views"],"summary":"Users.Invite","operationId":"users_invite_app_workspaces__workspace_id__users_invite_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_users_invite_app_workspaces__workspace_id__users_invite_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/workspaces/{workspace_id}/users/{user_id}":{"delete":{"tags":["views"],"summary":"Users.Delete","operationId":"users_delete_app_workspaces__workspace_id__users__user_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/workspaces/{workspace_id}/settings/smtp":{"get":{"tags":["views"],"summary":"Smtp.View","operationId":"smtp_view_app_workspaces__workspace_id__settings_smtp_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["views"],"summary":"Smtp.Save","operationId":"smtp_save_app_workspaces__workspace_id__settings_smtp_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_smtp_save_app_workspaces__workspace_id__settings_smtp_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/workspaces/{workspace_id}/settings/smtp/revert":{"post":{"tags":["views"],"summary":"Smtp.Revert","description":"HTMX-friendly revert. Same effect as DELETE on the JSON endpoint, but a\nPOST works better with traditional <form> submit + HTMX.","operationId":"smtp_revert_app_workspaces__workspace_id__settings_smtp_revert_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/workspaces/{workspace_id}/settings/branding":{"get":{"tags":["views"],"summary":"Branding.View","operationId":"branding_view_app_workspaces__workspace_id__settings_branding_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["views"],"summary":"Branding.Save","operationId":"branding_save_app_workspaces__workspace_id__settings_branding_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_branding_save_app_workspaces__workspace_id__settings_branding_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/workspaces/{workspace_id}/settings/branding/logo":{"post":{"tags":["views"],"summary":"Branding.Upload Logo","operationId":"branding_upload_logo_app_workspaces__workspace_id__settings_branding_logo_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_branding_upload_logo_app_workspaces__workspace_id__settings_branding_logo_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/workspaces/{workspace_id}/settings/branding/logo/remove":{"post":{"tags":["views"],"summary":"Branding.Remove Logo","operationId":"branding_remove_logo_app_workspaces__workspace_id__settings_branding_logo_remove_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/workspaces/{workspace_id}/billing":{"get":{"tags":["views"],"summary":"Billing.View","operationId":"billing_view_app_workspaces__workspace_id__billing_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/workspaces/{workspace_id}/billing/checkout":{"post":{"tags":["views"],"summary":"Billing.Checkout","description":"HTMX-friendly checkout starter. Returns 200 with `HX-Redirect` header\npointing at the Stripe Checkout URL — HTMX intercepts and navigates.\nPlain `<form>` submit (no `hx-ext` needed).","operationId":"billing_checkout_app_workspaces__workspace_id__billing_checkout_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_billing_checkout_app_workspaces__workspace_id__billing_checkout_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/workspaces/{workspace_id}/billing/portal":{"post":{"tags":["views"],"summary":"Billing.Portal","description":"HTMX-friendly portal opener. Same HX-Redirect trick as /checkout.","operationId":"billing_portal_app_workspaces__workspace_id__billing_portal_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/workspaces/{workspace_id}/billing/schedule-plan-change":{"post":{"tags":["views"],"summary":"Billing.Schedule Plan Change","description":"HTMX-friendly downgrade trigger. Defers the plan change to period\nend. Reloads the page on success so the new \"scheduled to switch on\nYYYY-MM-DD\" banner is visible.","operationId":"billing_schedule_plan_change_app_workspaces__workspace_id__billing_schedule_plan_change_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_billing_schedule_plan_change_app_workspaces__workspace_id__billing_schedule_plan_change_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/workspaces/{workspace_id}/billing/schedule-plan-change/release":{"post":{"tags":["views"],"summary":"Billing.Release Scheduled Plan Change","description":"Cancel a pending scheduled plan change. Reloads the page so the\nbanner disappears.","operationId":"billing_release_scheduled_plan_change_app_workspaces__workspace_id__billing_schedule_plan_change_release_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/workspaces/{workspace_id}/billing/spending-cap":{"post":{"tags":["views"],"summary":"Billing.Update Cap","operationId":"billing_update_cap_app_workspaces__workspace_id__billing_spending_cap_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_billing_update_cap_app_workspaces__workspace_id__billing_spending_cap_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/workspaces/{workspace_id}/settings":{"get":{"tags":["views"],"summary":"Settings.View","operationId":"settings_view_app_workspaces__workspace_id__settings_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/partials/workspaces/{workspace_id}/status":{"get":{"tags":["views"],"summary":"Partials.Workspace Status","description":"Polled by the dashboard while a workspace is PROVISIONING.\n\nClient: <div hx-get=\"/app/partials/workspaces/{id}/status\" hx-trigger=\"every 3s\">","operationId":"partials_workspace_status_app_partials_workspaces__workspace_id__status_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/healthz":{"get":{"tags":["health"],"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Healthz Healthz Get"}}}}}}}},"components":{"schemas":{"AppCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","examples":["Acme Web"]},"redirect_uris":{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array","minItems":1,"title":"Redirect Uris","description":"Where the IdP sends the user back after auth. At least one required.","examples":[["https://app.acme.com/auth/callback"]]},"post_logout_redirect_uris":{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array","title":"Post Logout Redirect Uris","description":"Where the IdP sends the user after logout."},"app_type":{"$ref":"#/components/schemas/AppType","default":"web"},"dev_mode":{"type":"boolean","title":"Dev Mode","description":"Relax HTTPS requirement on redirect_uris (allows http://localhost). Use only for local development; never in production.","default":false}},"type":"object","required":["name","redirect_uris"],"title":"AppCreate","description":"Payload to create an OIDC app in a workspace's Zitadel instance."},"AppCredentials":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret","description":"Only set for confidential apps (app_type=web). Public clients (spa/native) use PKCE and have no secret."},"app_type":{"$ref":"#/components/schemas/AppType"},"issuer":{"type":"string","title":"Issuer","description":"OIDC issuer URL, e.g. https://auth.acme.prysmid.com"},"discovery_url":{"type":"string","title":"Discovery Url","description":"OIDC discovery document (.well-known/openid-configuration)"}},"type":"object","required":["id","name","client_id","app_type","issuer","discovery_url"],"title":"AppCredentials","description":"Returned ONCE at creation — contains `client_secret` for confidential apps.\n\nThe secret is never retrievable again. The dashboard shows a copy-to-clipboard\nmodal; the JSON API caller must persist it themselves."},"AppList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AppOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"AppList"},"AppOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"client_id":{"type":"string","title":"Client Id"},"app_type":{"$ref":"#/components/schemas/AppType"},"redirect_uris":{"items":{"type":"string"},"type":"array","title":"Redirect Uris"},"post_logout_redirect_uris":{"items":{"type":"string"},"type":"array","title":"Post Logout Redirect Uris","default":[]},"dev_mode":{"type":"boolean","title":"Dev Mode","default":false}},"type":"object","required":["id","name","client_id","app_type","redirect_uris"],"title":"AppOut","description":"OIDC app projection returned by list/get. Does NOT include secrets."},"AppType":{"type":"string","enum":["web","spa","native"],"title":"AppType","description":"App kind, drives OIDC grant + auth_method defaults.\n\n- `web`: server-rendered confidential client. Gets a `client_secret`.\n- `spa`: single-page app (user-agent). Public, PKCE required, no secret.\n- `native`: desktop/mobile. Public, PKCE required, no secret."},"BillingStateView":{"properties":{"plan":{"$ref":"#/components/schemas/Plan"},"status":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionStatus"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End","default":false},"current_period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Period End"},"spending_cap_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Spending Cap Cents"},"signups_blocked":{"type":"boolean","title":"Signups Blocked","default":false},"scheduled_change":{"anyOf":[{"$ref":"#/components/schemas/ScheduledPlanChange"},{"type":"null"}]}},"type":"object","required":["plan"],"title":"BillingStateView","description":"What the dashboard shows. Source: local Subscription mirror + Workspace\n+ (when there's a live subscription) one Stripe call to surface any\nscheduled phase change."},"Body_apps_create_app_workspaces__workspace_id__apps_post":{"properties":{"name":{"type":"string","title":"Name"},"redirect_uris":{"type":"string","title":"Redirect Uris"},"app_type":{"type":"string","title":"App Type","default":"web"},"post_logout_redirect_uris":{"type":"string","title":"Post Logout Redirect Uris","default":""},"dev_mode":{"type":"boolean","title":"Dev Mode","default":false}},"type":"object","required":["name","redirect_uris"],"title":"Body_apps_create_app_workspaces__workspace_id__apps_post"},"Body_billing_checkout_app_workspaces__workspace_id__billing_checkout_post":{"properties":{"plan":{"type":"string","title":"Plan"}},"type":"object","required":["plan"],"title":"Body_billing_checkout_app_workspaces__workspace_id__billing_checkout_post"},"Body_billing_schedule_plan_change_app_workspaces__workspace_id__billing_schedule_plan_change_post":{"properties":{"plan":{"type":"string","title":"Plan"}},"type":"object","required":["plan"],"title":"Body_billing_schedule_plan_change_app_workspaces__workspace_id__billing_schedule_plan_change_post"},"Body_billing_update_cap_app_workspaces__workspace_id__billing_spending_cap_post":{"properties":{"cap_dollars":{"type":"string","title":"Cap Dollars","default":""}},"type":"object","title":"Body_billing_update_cap_app_workspaces__workspace_id__billing_spending_cap_post"},"Body_branding_save_app_workspaces__workspace_id__settings_branding_post":{"properties":{"primary_color":{"type":"string","title":"Primary Color","default":""},"background_color":{"type":"string","title":"Background Color","default":""},"warn_color":{"type":"string","title":"Warn Color","default":""},"font_color":{"type":"string","title":"Font Color","default":""},"hide_login_name_suffix":{"type":"boolean","title":"Hide Login Name Suffix","default":false},"disable_watermark":{"type":"boolean","title":"Disable Watermark","default":false}},"type":"object","title":"Body_branding_save_app_workspaces__workspace_id__settings_branding_post"},"Body_branding_upload_logo_app_workspaces__workspace_id__settings_branding_logo_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_branding_upload_logo_app_workspaces__workspace_id__settings_branding_logo_post"},"Body_idps_create_app_workspaces__workspace_id__settings_idps_post":{"properties":{"type":{"type":"string","title":"Type"},"name":{"type":"string","title":"Name"},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"},"issuer":{"type":"string","title":"Issuer","default":""},"tenant_id":{"type":"string","title":"Tenant Id","default":""}},"type":"object","required":["type","name","client_id","client_secret"],"title":"Body_idps_create_app_workspaces__workspace_id__settings_idps_post"},"Body_login_policy_save_app_workspaces__workspace_id__settings_login_policy_post":{"properties":{"allow_username_password":{"type":"boolean","title":"Allow Username Password","default":false},"allow_register":{"type":"boolean","title":"Allow Register","default":false},"allow_external_idp":{"type":"boolean","title":"Allow External Idp","default":false},"force_mfa":{"type":"boolean","title":"Force Mfa","default":false},"passwordless_allowed":{"type":"boolean","title":"Passwordless Allowed","default":false},"hide_password_reset":{"type":"boolean","title":"Hide Password Reset","default":false},"ignore_unknown_usernames":{"type":"boolean","title":"Ignore Unknown Usernames","default":false},"second_factors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Second Factors"},"multi_factors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Multi Factors"}},"type":"object","title":"Body_login_policy_save_app_workspaces__workspace_id__settings_login_policy_post"},"Body_smtp_save_app_workspaces__workspace_id__settings_smtp_post":{"properties":{"host":{"type":"string","title":"Host"},"port":{"type":"integer","title":"Port"},"tls":{"type":"boolean","title":"Tls","default":false},"sender_address":{"type":"string","title":"Sender Address"},"sender_name":{"type":"string","title":"Sender Name"},"smtp_user":{"type":"string","title":"Smtp User"},"password":{"type":"string","title":"Password"},"reply_to_address":{"type":"string","title":"Reply To Address","default":""}},"type":"object","required":["host","port","sender_address","sender_name","smtp_user","password"],"title":"Body_smtp_save_app_workspaces__workspace_id__settings_smtp_post"},"Body_upload_logo_v1_workspaces__workspace_id__branding_logo_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_logo_v1_workspaces__workspace_id__branding_logo_post"},"Body_users_invite_app_workspaces__workspace_id__users_invite_post":{"properties":{"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"}},"type":"object","required":["email","first_name","last_name"],"title":"Body_users_invite_app_workspaces__workspace_id__users_invite_post"},"Body_workspaces_create_app_workspaces_post":{"properties":{"slug":{"type":"string","title":"Slug"},"display_name":{"type":"string","title":"Display Name"},"plan":{"type":"string","title":"Plan","default":"free"}},"type":"object","required":["slug","display_name"],"title":"Body_workspaces_create_app_workspaces_post"},"BrandingUpdate":{"properties":{"primary_color":{"anyOf":[{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},{"type":"null"}],"title":"Primary Color","examples":["#5469d4"]},"background_color":{"anyOf":[{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},{"type":"null"}],"title":"Background Color"},"warn_color":{"anyOf":[{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},{"type":"null"}],"title":"Warn Color"},"font_color":{"anyOf":[{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},{"type":"null"}],"title":"Font Color"},"primary_color_dark":{"anyOf":[{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},{"type":"null"}],"title":"Primary Color Dark"},"background_color_dark":{"anyOf":[{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},{"type":"null"}],"title":"Background Color Dark"},"warn_color_dark":{"anyOf":[{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},{"type":"null"}],"title":"Warn Color Dark"},"font_color_dark":{"anyOf":[{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},{"type":"null"}],"title":"Font Color Dark"},"hide_login_name_suffix":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hide Login Name Suffix"},"disable_watermark":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Watermark"}},"type":"object","title":"BrandingUpdate","description":"Partial update — unset fields preserve their current value."},"BrandingView":{"properties":{"primary_color":{"type":"string","title":"Primary Color","default":""},"background_color":{"type":"string","title":"Background Color","default":""},"warn_color":{"type":"string","title":"Warn Color","default":""},"font_color":{"type":"string","title":"Font Color","default":""},"primary_color_dark":{"type":"string","title":"Primary Color Dark","default":""},"background_color_dark":{"type":"string","title":"Background Color Dark","default":""},"warn_color_dark":{"type":"string","title":"Warn Color Dark","default":""},"font_color_dark":{"type":"string","title":"Font Color Dark","default":""},"logo_url":{"type":"string","title":"Logo Url","default":""},"icon_url":{"type":"string","title":"Icon Url","default":""},"hide_login_name_suffix":{"type":"boolean","title":"Hide Login Name Suffix","default":false},"disable_watermark":{"type":"boolean","title":"Disable Watermark","default":false}},"type":"object","title":"BrandingView","description":"Read projection of the active label policy."},"CheckoutRequest":{"properties":{"plan":{"$ref":"#/components/schemas/Plan","description":"Target plan. 'enterprise' rejected — sales-only."}},"type":"object","required":["plan"],"title":"CheckoutRequest"},"CheckoutResponse":{"properties":{"url":{"type":"string","title":"Url","description":"Stripe Checkout URL — redirect the user here."}},"type":"object","required":["url"],"title":"CheckoutResponse"},"DevicePollRequest":{"properties":{"device_code":{"type":"string","minLength":1,"title":"Device Code","description":"The exact `device_code` returned by `/v1/auth/device/start`."}},"type":"object","required":["device_code"],"title":"DevicePollRequest","description":"Payload to `/v1/auth/device/poll` while waiting for user approval."},"DevicePollResponse":{"properties":{"status":{"type":"string","enum":["pending","slow_down","complete","expired","denied"],"title":"Status"},"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"expires_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In","description":"Lifetime of `access_token` in seconds. Use as TTL for caching."},"token_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Type","description":"OAuth token type, typically 'Bearer'."},"id_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id Token","description":"OIDC ID token, if the client requested `openid` scope. The MCP client uses it to display 'logged in as <email>' without an extra userinfo call."},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope","description":"Space-separated scopes effectively granted."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"error_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"}},"type":"object","required":["status"],"title":"DevicePollResponse","description":"Result of polling. `status` is the discriminator — clients should switch on it.\n\n- `pending`   → keep polling at `interval` from start response.\n- `slow_down` → keep polling but increase the interval by ≥5s (RFC 8628 §3.5).\n- `complete`  → `access_token` (and optional `refresh_token`) are populated.\n                Save them and stop polling.\n- `expired`   → `device_code` timed out. Restart the flow.\n- `denied`    → user said no, or another non-recoverable error. `error` carries\n                the original code (e.g. `access_denied`, `unauthorized_client`).\n                Restart only if the human asks to."},"DeviceStartResponse":{"properties":{"device_code":{"type":"string","title":"Device Code","description":"Opaque token used by the client to poll for completion."},"user_code":{"type":"string","title":"User Code","description":"Short human-typeable code. Shown on stdout / in the desktop app — the user enters it at `verification_uri` (e.g. 'XYZ-1234')."},"verification_uri":{"type":"string","title":"Verification Uri","description":"URL where the human signs in and approves the device. The client should print + ideally open this in the browser."},"verification_uri_complete":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verification Uri Complete","description":"`verification_uri` with `user_code` already pre-filled in the query string. Useful for QR codes and clickable links in agent UIs."},"interval":{"type":"integer","minimum":1.0,"title":"Interval","description":"Minimum seconds between successive polls. Clients MUST honor this; the server may return `slow_down` if polled too fast."},"expires_in":{"type":"integer","minimum":1.0,"title":"Expires In","description":"Seconds until `device_code` becomes invalid. The user must approve before this elapses or the client must restart the flow."}},"type":"object","required":["device_code","user_code","verification_uri","interval","expires_in"],"title":"DeviceStartResponse","description":"Mirror of RFC 8628 §3.2 device authorization response.\n\nThe client shows `verification_uri` (and ideally `verification_uri_complete`)\nto the human, then polls `/v1/auth/device/poll` with `device_code` every\n`interval` seconds until the user approves or `expires_in` runs out."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IdpCreate":{"properties":{"type":{"$ref":"#/components/schemas/IdpType"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","examples":["Google"]},"client_id":{"type":"string","minLength":1,"title":"Client Id"},"client_secret":{"type":"string","minLength":1,"title":"Client Secret"},"issuer":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Issuer","description":"OIDC discovery base URL (oidc type only)"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id","description":"Microsoft tenant GUID (microsoft type only). Default: accept any account."},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes","description":"OAuth scopes. Defaults: openid+profile+email (or user:email for github)."}},"type":"object","required":["type","name","client_id","client_secret"],"title":"IdpCreate","description":"Create payload — fields used depend on `type`.\n\n- google / github: client_id + client_secret\n- microsoft: client_id + client_secret, optional tenant_id (default = any account)\n- oidc: client_id + client_secret + issuer"},"IdpList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/IdpOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"IdpList"},"IdpOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/IdpType"},"state":{"type":"string","title":"State","default":"IDP_STATE_ACTIVE"}},"type":"object","required":["id","name","type"],"title":"IdpOut","description":"Read projection of an IdP. The Zitadel `state` field exposes whether\nthe IdP is active or in error."},"IdpType":{"type":"string","enum":["google","github","microsoft","oidc"],"title":"IdpType"},"LoginPolicyUpdate":{"properties":{"allow_username_password":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Username Password"},"allow_register":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Register"},"allow_external_idp":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow External Idp"},"force_mfa":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Force Mfa"},"passwordless_allowed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Passwordless Allowed"},"second_factors":{"anyOf":[{"items":{"$ref":"#/components/schemas/SecondFactor"},"type":"array"},{"type":"null"}],"title":"Second Factors"},"multi_factors":{"anyOf":[{"items":{"$ref":"#/components/schemas/MultiFactor"},"type":"array"},{"type":"null"}],"title":"Multi Factors"},"hide_password_reset":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hide Password Reset"},"ignore_unknown_usernames":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ignore Unknown Usernames"}},"type":"object","title":"LoginPolicyUpdate","description":"All fields optional. Unspecified fields preserve their current value."},"LoginPolicyView":{"properties":{"allow_username_password":{"type":"boolean","title":"Allow Username Password","default":true},"allow_register":{"type":"boolean","title":"Allow Register","default":true},"allow_external_idp":{"type":"boolean","title":"Allow External Idp","default":true},"force_mfa":{"type":"boolean","title":"Force Mfa","default":false},"passwordless_allowed":{"type":"boolean","title":"Passwordless Allowed","default":true},"second_factors":{"items":{"$ref":"#/components/schemas/SecondFactor"},"type":"array","title":"Second Factors"},"multi_factors":{"items":{"$ref":"#/components/schemas/MultiFactor"},"type":"array","title":"Multi Factors"},"hide_password_reset":{"type":"boolean","title":"Hide Password Reset","default":false},"ignore_unknown_usernames":{"type":"boolean","title":"Ignore Unknown Usernames","default":false}},"type":"object","title":"LoginPolicyView","description":"Read projection of the workspace's login policy."},"MultiFactor":{"type":"string","enum":["u2f_verified"],"title":"MultiFactor"},"Plan":{"type":"string","enum":["free","pro","enterprise"],"title":"Plan"},"PortalResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"PortalResponse"},"SchedulePlanChangeRequest":{"properties":{"plan":{"$ref":"#/components/schemas/Plan","description":"Target plan to take effect at the next renewal."}},"type":"object","required":["plan"],"title":"SchedulePlanChangeRequest","description":"Body for POST /billing/schedule-plan-change.\n\nOnly downgrades are accepted — the endpoint 422s if the target plan is\na non-strict-decrease in plan rank. Upgrades route through /checkout\nso Stripe charges the prorated remainder of the current period."},"ScheduledPlanChange":{"properties":{"target_plan":{"$ref":"#/components/schemas/Plan","description":"Plan that takes effect at `effective_at`."},"effective_at":{"type":"string","title":"Effective At","description":"ISO 8601 — start of the next billing period."}},"type":"object","required":["target_plan","effective_at"],"title":"ScheduledPlanChange","description":"A pending plan transition surfaced from a Stripe SubscriptionSchedule.\n\nPresent only when the customer asked for a downgrade — we never schedule\nupgrades (those flow through Checkout immediately, with proration)."},"SecondFactor":{"type":"string","enum":["otp","u2f","otp_email","otp_sms"],"title":"SecondFactor"},"SmtpSource":{"type":"string","enum":["platform","custom","none"],"title":"SmtpSource","description":"Where the currently active SMTP config came from."},"SmtpUpdate":{"properties":{"host":{"type":"string","minLength":1,"title":"Host","examples":["smtp.sendgrid.net"]},"port":{"type":"integer","maximum":65535.0,"minimum":1.0,"title":"Port","examples":[465]},"tls":{"type":"boolean","title":"Tls","default":true},"sender_address":{"type":"string","minLength":3,"title":"Sender Address","description":"Address that appears in the From header.","examples":["noreply@acme.com"]},"sender_name":{"type":"string","maxLength":200,"minLength":1,"title":"Sender Name","examples":["Acme"]},"user":{"type":"string","minLength":1,"title":"User","description":"SMTP auth username."},"password":{"type":"string","minLength":1,"title":"Password","description":"SMTP auth password / API key."},"reply_to_address":{"type":"string","title":"Reply To Address","description":"Optional Reply-To header.","default":""}},"type":"object","required":["host","port","sender_address","sender_name","user","password"],"title":"SmtpUpdate","description":"Replace the active SMTP provider with custom credentials.\n\nAll fields are required — the form is a complete state, not a partial."},"SmtpView":{"properties":{"source":{"$ref":"#/components/schemas/SmtpSource"},"host":{"type":"string","title":"Host","default":""},"port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Port"},"tls":{"type":"boolean","title":"Tls","default":true},"sender_address":{"type":"string","title":"Sender Address","default":""},"sender_name":{"type":"string","title":"Sender Name","default":""},"reply_to_address":{"type":"string","title":"Reply To Address","default":""},"description":{"type":"string","title":"Description","default":""},"state":{"type":"string","title":"State","default":"SMTP_CONFIG_INACTIVE"}},"type":"object","required":["source"],"title":"SmtpView","description":"Read projection of the active SMTP provider."},"SpendingCapUpdate":{"properties":{"cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Cents","description":"Max overage charge per period, in cents. NULL = unlimited."}},"type":"object","title":"SpendingCapUpdate","description":"`null` removes the cap (unlimited)."},"SubscriptionStatus":{"type":"string","enum":["trialing","active","past_due","canceled","unpaid","incomplete","incomplete_expired"],"title":"SubscriptionStatus","description":"Mirrors Stripe subscription statuses we care about."},"UserInvite":{"properties":{"email":{"type":"string","maxLength":320,"pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$","title":"Email"},"first_name":{"type":"string","maxLength":100,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":100,"minLength":1,"title":"Last Name"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name","description":"Defaults to the email address if omitted."}},"type":"object","required":["email","first_name","last_name"],"title":"UserInvite","description":"Send an invite email to a new human user. Idempotent by email."},"UserInvited":{"properties":{"user_id":{"type":"string","title":"User Id"},"created":{"type":"boolean","title":"Created","description":"True if a new user was created. False if the email already existed — in that case no invite email is re-sent."}},"type":"object","required":["user_id","created"],"title":"UserInvited","description":"Returned by POST /users/invite."},"UserList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UserOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"UserList"},"UserOut":{"properties":{"id":{"type":"string","title":"Id"},"user_name":{"type":"string","title":"User Name"},"email":{"type":"string","title":"Email","default":""},"first_name":{"type":"string","title":"First Name","default":""},"last_name":{"type":"string","title":"Last Name","default":""},"state":{"type":"string","title":"State","default":"USER_STATE_ACTIVE"}},"type":"object","required":["id","user_name"],"title":"UserOut","description":"Read projection of a Zitadel human user."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WorkspaceCreate":{"properties":{"slug":{"type":"string","maxLength":63,"minLength":3,"pattern":"^[a-z][a-z0-9-]*[a-z0-9]$","title":"Slug","description":"URL-safe lowercase slug. Becomes part of <slug>.auth.prysmid.com.","examples":["acme"]},"display_name":{"type":"string","maxLength":255,"minLength":1,"title":"Display Name","examples":["Acme Corp"]},"plan":{"$ref":"#/components/schemas/Plan","default":"free"}},"type":"object","required":["slug","display_name"],"title":"WorkspaceCreate","description":"Payload to create a new workspace."},"WorkspaceList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WorkspaceOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"WorkspaceList"},"WorkspaceOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"display_name":{"type":"string","title":"Display Name"},"state":{"$ref":"#/components/schemas/WorkspaceState"},"plan":{"$ref":"#/components/schemas/Plan"},"auth_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Domain"},"zitadel_instance_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zitadel Instance Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","slug","display_name","state","plan","auth_domain","zitadel_instance_id","created_at","updated_at"],"title":"WorkspaceOut"},"WorkspaceState":{"type":"string","enum":["provisioning","provisioning_failed","active","past_due","suspended","deleting"],"title":"WorkspaceState","description":"Lifecycle state of a workspace."},"WorkspaceUpdate":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Display Name"}},"type":"object","title":"WorkspaceUpdate"}}}}