{"openapi":"3.1.0","info":{"title":"Imperal Cloud API","description":"Public developer API for the Imperal Cloud platform - build extensions, deploy apps, and integrate via the unified endpoints. Internal/service routes are not listed. See https://docs.imperal.io/en/api.","version":"0.1.0"},"paths":{"/v1/auth/register":{"post":{"tags":["auth"],"summary":"Register","operationId":"register_v1_auth_register_post","parameters":[{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login","description":"Every attempt is logged with the client's real address (2026-11-01 incident: ten accounts\ntaken with their own passwords, invisible to the gateway). A disabled account answers exactly\nlike a wrong password: \"Account disabled\" only ever followed a CORRECT password, so it told an\nattacker which stolen passwords were still good.","operationId":"login_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh","operationId":"refresh_v1_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_v1_auth_logout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_v1_auth_me_get","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/me/change-password":{"post":{"tags":["auth"],"summary":"Change Password","operationId":"change_password_v1_auth_me_change_password_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/.well-known/jwks.json":{"get":{"tags":["auth"],"summary":"Jwks","operationId":"jwks_v1_auth__well_known_jwks_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Jwks V1 Auth  Well Known Jwks Json Get"}}}}}}},"/v1/auth/users/{imperal_id}/cases-uid":{"patch":{"tags":["auth"],"summary":"Set Cases User Id","description":"Set Cases API user ID for a user. Called by Panel on first login.","operationId":"set_cases_user_id_v1_auth_users__imperal_id__cases_uid_patch","parameters":[{"name":"imperal_id","in":"path","required":true,"schema":{"type":"string","title":"Imperal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCasesUidRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Set Cases User Id V1 Auth Users  Imperal Id  Cases Uid Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/cli/codes":{"post":{"tags":["auth-cli"],"summary":"Mint Code","description":"Mint a one-time code bound to {imperal_id, code_challenge, redirect_uri}.\nCalled by the Panel /cli-authorize page (service-token + X-Acting-User) after\nthe user consents; `user` is the resolved acting (logged-in) user.","operationId":"mint_code_v1_auth_cli_codes_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliCodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliCodeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/cli/token":{"post":{"tags":["auth-cli"],"summary":"Exchange","description":"Public (PKCE-protected): exchange a one-time code + PKCE verifier for\naccess+refresh tokens. Single-use: the code is consumed before issuance.","operationId":"exchange_v1_auth_cli_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/cli/device/authorize":{"post":{"tags":["auth-cli"],"summary":"Device Authorize","description":"Mint an opaque device_code (CLI secret) + a short human user_code, both in\nRedis (TTL, single-use). No loopback — works remote/headless/dock.","operationId":"device_authorize_v1_auth_cli_device_authorize_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceAuthorizeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceAuthorizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/cli/device/approve":{"post":{"tags":["auth-cli"],"summary":"Device Approve","description":"Panel-only (service-token + X-Acting-User, same trust path as /codes): the\nlogged-in user approves — bind imperal_id, flip to approved. Case-insensitive.","operationId":"device_approve_v1_auth_cli_device_approve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceApproveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/cli/device/token":{"post":{"tags":["auth-cli"],"summary":"Device Token","description":"Public poll (PKCE-protected): authorization_pending / slow_down (HTTP 200\n{error}) until approved, then mint CLI tokens (single-use). Terminal -> 400.","operationId":"device_token_v1_auth_cli_device_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/sessions":{"get":{"tags":["auth-sessions"],"summary":"List Sessions","operationId":"list_sessions_v1_auth_sessions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionListResponse"}}}}}}},"/v1/auth/sessions/{session_id}/revoke":{"post":{"tags":["auth-sessions"],"summary":"Revoke","operationId":"revoke_v1_auth_sessions__session_id__revoke_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/sessions/revoke-others":{"post":{"tags":["auth-sessions"],"summary":"Revoke Others","operationId":"revoke_others_v1_auth_sessions_revoke_others_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/auth/sessions/register":{"post":{"tags":["auth-sessions"],"summary":"Register","operationId":"register_v1_auth_sessions_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterSessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/sessions/{session_id}/valid":{"get":{"tags":["auth-sessions"],"summary":"Valid","operationId":"valid_v1_auth_sessions__session_id__valid_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionValidResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/connections":{"get":{"tags":["connections"],"summary":"List Connections","operationId":"list_connections_v1_connections_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionListResponse"}}}}}},"post":{"tags":["connections"],"summary":"Create Connection","operationId":"create_connection_v1_connections_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionPublic"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/connections/{cid}/test":{"post":{"tags":["connections"],"summary":"Test Connection","operationId":"test_connection_v1_connections__cid__test_post","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"string","title":"Cid"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TestOptions"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionTestResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/connections/{cid}":{"delete":{"tags":["connections"],"summary":"Delete Connection","operationId":"delete_connection_v1_connections__cid__delete","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"string","title":"Cid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/connections/dispatch":{"post":{"tags":["connections"],"summary":"Dispatch","operationId":"dispatch_v1_connections_dispatch_post","parameters":[{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/signup":{"post":{"tags":["auth"],"summary":"Signup","operationId":"signup_v1_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/signup-status":{"get":{"tags":["auth"],"summary":"Signup Status","operationId":"signup_status_v1_auth_signup_status_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/verify-email":{"post":{"tags":["auth"],"summary":"Verify Email","operationId":"verify_email_v1_auth_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/nickname-available":{"get":{"tags":["auth"],"summary":"Nickname Available","operationId":"nickname_available_v1_auth_nickname_available_get","parameters":[{"name":"nickname","in":"query","required":true,"schema":{"type":"string","title":"Nickname"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/email-available":{"get":{"tags":["auth"],"summary":"Email Available","operationId":"email_available_v1_auth_email_available_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/resend-verification":{"post":{"tags":["auth"],"summary":"Resend Verification","operationId":"resend_verification_v1_auth_resend_verification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","operationId":"forgot_password_v1_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","operationId":"reset_password_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys":{"post":{"tags":["api-keys"],"summary":"Create Key","operationId":"create_key_v1_keys_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["api-keys"],"summary":"List Keys","operationId":"list_keys_v1_keys_get","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KeyListItem"},"title":"Response List Keys V1 Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/{key_id}":{"delete":{"tags":["api-keys"],"summary":"Delete Key","operationId":"delete_key_v1_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants":{"post":{"tags":["tenants"],"summary":"Create Tenant","operationId":"create_tenant_v1_tenants_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTenantRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["tenants"],"summary":"List Tenants","operationId":"list_tenants_v1_tenants_get","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TenantResponse"},"title":"Response List Tenants V1 Tenants Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant_id}":{"get":{"tags":["tenants"],"summary":"Get Tenant","operationId":"get_tenant_v1_tenants__tenant_id__get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["tenants"],"summary":"Update Tenant","operationId":"update_tenant_v1_tenants__tenant_id__patch","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTenantRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tenants"],"summary":"Delete Tenant","operationId":"delete_tenant_v1_tenants__tenant_id__delete","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant_id}/health":{"get":{"tags":["tenants"],"summary":"Tenant Health","operationId":"tenant_health_v1_tenants__tenant_id__health_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantHealthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/plans":{"get":{"tags":["billing"],"summary":"List Plans","operationId":"list_plans_v1_billing_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PlanResponse"},"type":"array","title":"Response List Plans V1 Billing Plans Get"}}}}}}},"/v1/billing/subscription":{"get":{"tags":["billing"],"summary":"Get Subscription","operationId":"get_subscription_v1_billing_subscription_get","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/usage":{"get":{"tags":["billing"],"summary":"Get Usage","operationId":"get_usage_v1_billing_usage_get","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/wallet":{"get":{"tags":["billing"],"summary":"Get Wallet","operationId":"get_wallet_v1_billing_wallet_get","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/balance":{"get":{"tags":["billing"],"summary":"Get Balance","operationId":"get_balance_v1_billing_balance_get","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/wallet/history":{"get":{"tags":["billing"],"summary":"Get Wallet History","operationId":"get_wallet_history_v1_billing_wallet_history_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LedgerEntry"},"title":"Response Get Wallet History V1 Billing Wallet History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/subscribe":{"post":{"tags":["billing"],"summary":"Subscribe","operationId":"subscribe_v1_billing_subscribe_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/cancel":{"post":{"tags":["billing"],"summary":"Cancel","operationId":"cancel_v1_billing_cancel_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/billing/resume":{"post":{"tags":["billing"],"summary":"Resume","operationId":"resume_v1_billing_resume_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/billing/change-plan":{"post":{"tags":["billing"],"summary":"Change Plan","operationId":"change_plan_v1_billing_change_plan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePlanRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/topup-config":{"get":{"tags":["billing-stripe"],"summary":"Get Topup Config","description":"Get top-up tiers and publishable key for Payment Element.","operationId":"get_topup_config_v1_billing_topup_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopUpConfigResponse"}}}}}}},"/v1/billing/topup":{"post":{"tags":["billing-stripe"],"summary":"Create Topup","description":"Create PaymentIntent for token top-up.","operationId":"create_topup_v1_billing_topup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopUpRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopUpResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/topup/confirm":{"post":{"tags":["billing-stripe"],"summary":"Confirm Topup","description":"Confirm top-up — sends TopUpWorkflow payment_confirmed signal.\n\nFederal I-WEBHOOK-SIGNAL-IDEMPOTENT: same workflow_id is also\nsignaled by /v1/webhooks/stripe; first signal wins, second is\na no-op on the workflow side. Workflow handles Stripe-verify +\nwallet credit + saga compensation.","operationId":"confirm_topup_v1_billing_topup_confirm_post","parameters":[{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopUpConfirmRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/checkout":{"post":{"tags":["billing-stripe"],"summary":"Checkout","description":"Create the first-period PaymentIntent for a paid plan.\nJWT — the just-verified user. Free/enterprise plans are rejected here.","operationId":"checkout_v1_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/checkout/confirm":{"post":{"tags":["billing-stripe"],"summary":"Checkout Confirm","description":"Snappy activation after the browser confirms payment. Verifies the PI\nwith Stripe (status + ownership) then activates idempotently. The Stripe\nwebhook is the backstop if the browser never reaches this call.","operationId":"checkout_confirm_v1_billing_checkout_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutConfirmRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/activate-trial":{"post":{"tags":["billing-stripe"],"summary":"Activate Trial","description":"Plant the first subscription period WITHOUT charging now (owner design\n2026-07-29). Call this AFTER the browser confirms the $0 SetupIntent from\nPOST /payment-methods/setup -- the card is verified/saved, no money moved.\nThe already-granted 10,000 one-time starter credits (at email-verify) are\nleft completely untouched; the daily SubscriptionRenewalSweepWorkflow\nbills the real plan price 30 days later and tops up the plan's included\ncredits on top of whatever the user has left (increment, never overwrite).\nIdempotent: a second call for an already-active subscription is a no-op.\n\nORDER MATTERS (fixed 2026-08-13): the \"already active?\" question is asked\nFIRST, before the plan is looked up or judged. The old order judged the\nrequested plan first, so a pending_plan naming a price-0 plan\n('enterprise') or a plan that no longer exists ('micro') raised 400 and the\ngate flag was never cleared -- the panel then bounced the user back to the\ncard screen on every single login, forever. An active subscription IS the\nplan decision, so it short-circuits everything else.","operationId":"activate_trial_v1_billing_activate_trial_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateTrialRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/payment-methods":{"get":{"tags":["billing-stripe"],"summary":"List Methods","description":"List saved payment methods.\n\nSelf-heals a missing default (2026-08-13). Cards attached outside a\nsubscription checkout -- panel \"Add card\", Stripe Customer Portal, or a\nsignup that predates the webhook fix -- left\n``invoice_settings.default_payment_method`` empty, and every charging path\nreads exactly that field: no default meant a permanent 402 \"Add a payment\nmethod first\" even though cards were plainly saved. Healing on this read\nrepairs an already-affected user the moment their billing screen loads,\nwith no migration to run and nothing for them to do.\n\nIdempotent and non-destructive: an existing default is never re-pointed.","operationId":"list_methods_v1_billing_payment_methods_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PaymentMethodItem"},"type":"array","title":"Response List Methods V1 Billing Payment Methods Get"}}}}}}},"/v1/billing/payment-methods/setup":{"post":{"tags":["billing-stripe"],"summary":"Setup Method","description":"Create SetupIntent to add a new payment method.\n\nOptional plan/period (2026-07-29): stamped into the SetupIntent's Stripe\nmetadata so the setup_intent.succeeded webhook can activate the trial\nsubscription server-side even if the browser never calls\nPOST /activate-trial itself (closed tab, crashed JS, network drop).","operationId":"setup_method_v1_billing_payment_methods_setup_post","parameters":[{"name":"plan","in":"query","required":false,"schema":{"type":"string","default":"","title":"Plan"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"monthly","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/portal":{"post":{"tags":["billing-stripe"],"summary":"Create Portal Session","operationId":"create_portal_session_v1_billing_portal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalSessionResponse"}}}}}}},"/v1/billing/profile":{"put":{"tags":["billing-stripe"],"summary":"Update Billing Profile","operationId":"update_billing_profile_v1_billing_profile_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/payment-methods/{pm_id}":{"delete":{"tags":["billing-stripe"],"summary":"Delete Method","description":"Remove a saved payment method.","operationId":"delete_method_v1_billing_payment_methods__pm_id__delete","parameters":[{"name":"pm_id","in":"path","required":true,"schema":{"type":"string","title":"Pm Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/payment-methods/{pm_id}/default":{"put":{"tags":["billing-stripe"],"summary":"Set Default","description":"Set payment method as default.","operationId":"set_default_v1_billing_payment_methods__pm_id__default_put","parameters":[{"name":"pm_id","in":"path","required":true,"schema":{"type":"string","title":"Pm Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/payments":{"get":{"tags":["billing-stripe"],"summary":"List Payments","description":"Payment history (newest first) with Stripe receipt links.","operationId":"list_payments_v1_billing_payments_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PaymentHistoryItem"},"title":"Response List Payments V1 Billing Payments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/auto-topup":{"get":{"tags":["billing-stripe"],"summary":"Get Auto Topup","description":"Get user's auto top-up settings.","operationId":"get_auto_topup_v1_billing_auto_topup_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoTopUpSettings"}}}}}},"put":{"tags":["billing-stripe"],"summary":"Update Auto Topup","description":"Update auto top-up settings.","operationId":"update_auto_topup_v1_billing_auto_topup_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoTopUpUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/renew":{"post":{"tags":["billing-stripe"],"summary":"Renew","description":"Renew an expired PAID subscription immediately by charging the saved\ndefault card for a fresh period. Shares the daily renewal sweep's\nidempotency key space, so a button click never double-charges a period\nthe sweep also handles.","operationId":"renew_v1_billing_renew_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/roles":{"get":{"tags":["roles"],"summary":"List Roles","operationId":"list_roles_v1_roles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RoleResponse"},"type":"array","title":"Response List Roles V1 Roles Get"}}}}}},"post":{"tags":["roles"],"summary":"Create Role","operationId":"create_role_v1_roles_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRoleRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/roles/{role_id}":{"patch":{"tags":["roles"],"summary":"Update Role","operationId":"update_role_v1_roles__role_id__patch","parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","title":"Role Id"}},{"name":"cascade","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Cascade"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["roles"],"summary":"Delete Role","operationId":"delete_role_v1_roles__role_id__delete","parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","title":"Role Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/users":{"get":{"tags":["users"],"summary":"List Users","operationId":"list_users_v1_users_get","parameters":[{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"}},{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Inactive"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["users"],"summary":"Create User","operationId":"create_user_v1_users_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/users/{user_id}":{"get":{"tags":["users"],"summary":"Get User","operationId":"get_user_v1_users__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["users"],"summary":"Update User","operationId":"update_user_v1_users__user_id__patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["users"],"summary":"Delete User","operationId":"delete_user_v1_users__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"permanent","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Permanent"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agencies/me":{"get":{"tags":["agencies"],"summary":"Get My Agency","description":"Return the authenticated user's agency (or default sentinel).","operationId":"get_my_agency_v1_agencies_me_get","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get My Agency V1 Agencies Me Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agencies":{"get":{"tags":["agencies"],"summary":"List Agencies","operationId":"list_agencies_v1_agencies_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgencyResponse"},"title":"Response List Agencies V1 Agencies Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["agencies"],"summary":"Create Agency","operationId":"create_agency_v1_agencies_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgencyRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agencies/{agency_id}":{"get":{"tags":["agencies"],"summary":"Get Agency","operationId":"get_agency_v1_agencies__agency_id__get","parameters":[{"name":"agency_id","in":"path","required":true,"schema":{"type":"string","title":"Agency Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agencies/{agency_id}/settings":{"put":{"tags":["agencies"],"summary":"Update Agency Settings","description":"Partially update an agency's settings blob (admin/service only).\n\nMerges the provided fields into the existing settings JSON. Unrecognised\nkeys passed via ``extra`` are preserved so downstream extensions can stash\nconfiguration. Secret-like keys (password, token, api_key) are rejected.\n\nLogo URLs are hardened: https:// or Panel-relative paths only — no\njavascript: / data: / file:// / etc. Per-agency Panel branding is driven\nentirely by ``settings.logo_url`` (light theme) and ``settings.logo_dark_url``\n(dark theme; falls back to logo_url if unset).","operationId":"update_agency_settings_v1_agencies__agency_id__settings_put","parameters":[{"name":"agency_id","in":"path","required":true,"schema":{"type":"string","title":"Agency Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencySettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agencies/{agency_id}/theme":{"put":{"tags":["agencies"],"summary":"Put Agency Theme","description":"Replace an agency's theme with a fully-validated AgencyTheme payload.\n\nValidation (WCAG AA contrast, allowed colour keys, CSS-value regex) is\nenforced by the Pydantic model declared on the parameter — a malformed\npayload is rejected by FastAPI with 422 before the handler runs.\n\nAdmin/service only. Agency-owner self-service is tracked as a follow-up\n(requires a per-user is_agency_owner flag that does not exist yet).","operationId":"put_agency_theme_v1_agencies__agency_id__theme_put","parameters":[{"name":"agency_id","in":"path","required":true,"schema":{"type":"string","title":"Agency Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyTheme"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agencies"],"summary":"Delete Agency Theme","description":"Clear an agency's theme (revert to Imperal defaults).","operationId":"delete_agency_theme_v1_agencies__agency_id__theme_delete","parameters":[{"name":"agency_id","in":"path","required":true,"schema":{"type":"string","title":"Agency Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat/stop":{"post":{"tags":["chat"],"summary":"Stop Chat Turn","description":"Advisory cancel of ONE in-flight turn, owner-scoped.\n\nThe kernel keys a turn off the assistant message id alone, so without an\nownership check any authenticated caller holding an id could cancel a\nstranger's turn. Turns started through /send are recorded (see\ndispatch.turn_owner_key); a turn we have no note for fails closed.","operationId":"stop_chat_turn_v1_chat_stop_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat/turn/{assistant_message_id}/live":{"get":{"tags":["chat"],"summary":"Get Turn Live","description":"The LIVE plane of one in-flight turn — what the brain is doing right now.\n\nThe kernel writes each turn to imperal:chat:stream:{assistant_message_id}\nas it works: `status` records carrying a phase (context -> brain -> render),\n`token` deltas as the answer is generated, and a final `done`/`error`.\nThe panel consumes this; native clients had no way in, which is why they\ncould only show a dumb spinner.\n\nPoll-friendly by design: pass the `cursor` from the previous call to get\nonly what is new. Owner-scoped exactly like /stop.","operationId":"get_turn_live_v1_chat_turn__assistant_message_id__live_get","parameters":[{"name":"assistant_message_id","in":"path","required":true,"schema":{"type":"string","title":"Assistant Message Id"}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"Redis stream cursor; pass the previous `cursor`","default":"0-0","title":"After"},"description":"Redis stream cursor; pass the previous `cursor`"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat/send":{"post":{"tags":["chat"],"summary":"Send Chat Message","description":"Start ONE Webbee turn for the calling user and return its ids.\n\nReturns immediately (fast-ack); the assistant's reply lands in the hub\nhistory and on the caller's SSE stream. Poll GET /v1/chat/messages or\nsubscribe to GET /v1/events/stream to receive it.","operationId":"send_chat_message_v1_chat_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat/messages":{"get":{"tags":["chat"],"summary":"Get Chat Messages","description":"The caller's OWN active conversation, newest-last.\n\nHub turns only by default: a per-app turn carries an ``ext_id`` and belongs\nto that app's view (/v1/apps/{app_id}/sessions/{uid}/messages). The panel's\nhub window shows them too (``include_apps``).","operationId":"get_chat_messages_v1_chat_messages_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"after_ts","in":"query","required":false,"schema":{"type":"string","description":"ISO-8601; return only messages newer than this","default":"","title":"After Ts"},"description":"ISO-8601; return only messages newer than this"},{"name":"include_apps","in":"query","required":false,"schema":{"type":"boolean","description":"also the per-app turns (the panel's hub view)","default":false,"title":"Include Apps"},"description":"also the per-app turns (the panel's hub view)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat/guest/session":{"post":{"tags":["chat"],"summary":"Create Guest Chat Session","description":"Mint a new HMAC-signed guest chat session token -- only behind a solved proof of work.","operationId":"create_guest_chat_session_v1_chat_guest_session_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GuestSessionRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["chat"],"summary":"Delete Guest Chat Session","description":"Purge guest session data and clear the guest session cookie.","operationId":"delete_guest_chat_session_v1_chat_guest_session_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/chat/guest/history":{"get":{"tags":["chat"],"summary":"Get Guest Chat History","description":"Return conversation history for a verified signed guest session token.\n\nStrictly refuses unauthenticated or mismatched session_id queries (Hole 3),\nand never creates a conversation on read-only GET (Review #5).","operationId":"get_guest_chat_history_v1_chat_guest_history_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Session Id"}},{"name":"sessionId","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Sessionid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat/guest/turn/{assistant_message_id}/live":{"get":{"tags":["chat"],"summary":"Get Guest Turn Live","description":"Live stream polling for an in-flight guest turn, scoped to the signed guest session.","operationId":"get_guest_turn_live_v1_chat_guest_turn__assistant_message_id__live_get","parameters":[{"name":"assistant_message_id","in":"path","required":true,"schema":{"type":"string","title":"Assistant Message Id"}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"Redis stream cursor; pass the previous `cursor`","default":"0-0","title":"After"},"description":"Redis stream cursor; pass the previous `cursor`"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat/guest/turn/{assistant_message_id}/stream":{"get":{"tags":["chat"],"summary":"Get Guest Turn Stream","description":"One in-flight guest turn as server-sent events, for its own signed guest session only: the panel's event\nvocabulary, allowlisted field by field (app/chat/guest_live.py) -- one connection per turn, not a poll per token.","operationId":"get_guest_turn_stream_v1_chat_guest_turn__assistant_message_id__stream_get","parameters":[{"name":"assistant_message_id","in":"path","required":true,"schema":{"type":"string","title":"Assistant Message Id"}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"Redis stream cursor to resume after","default":"0-0","title":"After"},"description":"Redis stream cursor to resume after"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat/guest":{"post":{"tags":["chat"],"summary":"Guest Chat Turn","description":"Public Guest Mode chat turn dispatched to imperal-ai-worker via IcnliSessionWorkflow.","operationId":"guest_chat_turn_v1_chat_guest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuestChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversations":{"get":{"tags":["conversations"],"summary":"List Conversations","description":"The caller's threads, pinned first, then newest (straight from the vault,\nso the thread the user is typing in shows its real count and preview).","operationId":"list_conversations_v1_conversations_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["conversations"],"summary":"Create Conversation","description":"Start a fresh thread and make it the active one of its surface.","operationId":"create_conversation_v1_conversations_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewConversation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversations/{conversation_id}/messages":{"get":{"tags":["conversations"],"summary":"Read Conversation","description":"One thread's messages, oldest-first, with a cursor for older pages.","operationId":"read_conversation_v1_conversations__conversation_id__messages_get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$","title":"Conversation Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"before_seq","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Before Seq"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversations/{conversation_id}/activate":{"post":{"tags":["conversations"],"summary":"Activate Conversation","description":"Continue an older thread: it becomes the panel's active conversation\n(the panel and the native apps share it; a connector keeps its own).","operationId":"activate_conversation_v1_conversations__conversation_id__activate_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversations/{conversation_id}":{"patch":{"tags":["conversations"],"summary":"Patch Conversation","description":"Rename, pin or archive one thread.","operationId":"patch_conversation_v1_conversations__conversation_id__patch","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchConversation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["conversations"],"summary":"Delete Conversation","description":"Delete a thread for good. If it was the live one, a fresh thread opens.","operationId":"delete_conversation_v1_conversations__conversation_id__delete","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversations/{conversation_id}/steer":{"post":{"tags":["conversations"],"summary":"Steer Terminal Conversation","description":"Inject an instruction directly into the active terminal coding session.\n\nCRITICAL SURFACE ISOLATION (ICNLI Invariant):\nAllows sending instructions to a terminal marathon session from the Panel UI\nwithout polluting or overwriting the panel's active Hub chat context.","operationId":"steer_terminal_conversation_v1_conversations__conversation_id__steer_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SteerConversation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/repos":{"get":{"tags":["memory"],"summary":"List Repos","description":"The acting user's repos: ``{\"repos\": [{\"repo_key\", \"index\", \"notes\"}]}``.","operationId":"list_repos_v1_memory_repos_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List Repos V1 Memory Repos Get"}}}}}}},"/v1/memory/repo":{"get":{"tags":["memory"],"summary":"Get Repo Memory","description":"The acting user's durable notes for one repo and their version.","operationId":"get_repo_memory_v1_memory_repo_get","parameters":[{"name":"repo_key","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]{0,199}$","title":"Repo Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Repo Memory V1 Memory Repo Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["memory"],"summary":"Put Repo Memory","description":"Replace the acting user's notes for one repo (against ``if_version`` when given).","operationId":"put_repo_memory_v1_memory_repo_put","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoMemory"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Put Repo Memory V1 Memory Repo Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["memory"],"summary":"Delete Repo","description":"Erase one repo of the acting user: everything held for it (``forget``, place ``repo:<key>``).","operationId":"delete_repo_v1_memory_repo_delete","parameters":[{"name":"repo_key","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]{0,199}$","title":"Repo Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Delete Repo V1 Memory Repo Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/index":{"get":{"tags":["memory"],"summary":"Get Index","description":"One repo's code index (read-only: the terminal rebuilds it from the tree).","operationId":"get_index_v1_memory_index_get","parameters":[{"name":"repo_key","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]{0,199}$","title":"Repo Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Index V1 Memory Index Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/facts":{"get":{"tags":["memory"],"summary":"Get Facts","description":"The acting user's facts and directives: ``{\"facts\": [...]}``.","operationId":"get_facts_v1_memory_facts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Facts V1 Memory Facts Get"}}}}}},"post":{"tags":["memory"],"summary":"Save Facts","description":"Upsert facts for the acting user (by ``fact_id``).","operationId":"save_facts_v1_memory_facts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Facts"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Save Facts V1 Memory Facts Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/facts/{fact_id}":{"delete":{"tags":["memory"],"summary":"Delete Fact","description":"Forget one of the acting user's facts: the row goes (``forget``, item ``law``).","operationId":"delete_fact_v1_memory_facts__fact_id__delete","parameters":[{"name":"fact_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-][A-Za-z0-9._:-]{0,199}$","title":"Fact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Delete Fact V1 Memory Facts  Fact Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/all":{"get":{"tags":["memory"],"summary":"All Memory","description":"Everything the vault holds for the acting user, by place (each repo -- one whose code\nindex is gone too -- and the account), as it is.","operationId":"all_memory_v1_memory_all_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response All Memory V1 Memory All Get"}}}}}}},"/v1/memory/forget":{"post":{"tags":["memory"],"summary":"Forget Memory","description":"Forget a place, a conversation, one account item, or all of it -- whole, then checked:\na forget that leaves anything behind is a 409 naming what is left.","operationId":"forget_memory_v1_memory_forget_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forget"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Forget Memory V1 Memory Forget Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/code/repos":{"get":{"tags":["memory"],"summary":"Code Repos","description":"The acting user's code catalog: each repository (where, how reached, how fresh, counts,\nthe machine it lives on) and the machines.","operationId":"code_repos_v1_memory_code_repos_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Code Repos V1 Memory Code Repos Get"}}}}}}},"/v1/memory/code/search":{"get":{"tags":["memory"],"summary":"Code Search","description":"Definitions and files of one repo matching ``q``: BM25, fused with the chunks' cosine when the\nclient sends its query ``vector`` (base64 float32, the sdk's embedder).","operationId":"code_search_v1_memory_code_search_get","parameters":[{"name":"repo_key","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]{0,199}$","title":"Repo Key"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":500,"default":"","title":"Q"}},{"name":"k","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":20,"title":"K"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Kind"}},{"name":"path_glob","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}],"title":"Path Glob"}},{"name":"vector","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":16384},{"type":"null"}],"title":"Vector"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Code Search V1 Memory Code Search Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/code/impact":{"post":{"tags":["memory"],"summary":"Code Impact","description":"What depends on the given symbols / paths of one repo.","operationId":"code_impact_v1_memory_code_impact_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeImpact"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Code Impact V1 Memory Code Impact Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/code/slice":{"post":{"tags":["memory"],"summary":"Code Slice","description":"The given definitions -- where they are, their signatures and descriptions (never a body: the vault holds the\ncode index, not the code, owner 2026-11-04) -- with who uses them and what they use.","operationId":"code_slice_v1_memory_code_slice_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeSlice"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Code Slice V1 Memory Code Slice Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/code/outline":{"get":{"tags":["memory"],"summary":"Code Outline","description":"The definitions of one file of one repo, in line order.","operationId":"code_outline_v1_memory_code_outline_get","parameters":[{"name":"repo_key","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]{0,199}$","title":"Repo Key"}},{"name":"path","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":1000,"title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Code Outline V1 Memory Code Outline Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/code/profile":{"get":{"tags":["memory"],"summary":"Code Profile","description":"One repo's profile: counts, languages, the most-used definitions.","operationId":"code_profile_v1_memory_code_profile_get","parameters":[{"name":"repo_key","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]{0,199}$","title":"Repo Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Code Profile V1 Memory Code Profile Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/code/graph":{"get":{"tags":["memory"],"summary":"Code Graph","description":"One repo's files, definitions and links (bounded).","operationId":"code_graph_v1_memory_code_graph_get","parameters":[{"name":"repo_key","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]{0,199}$","title":"Repo Key"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20000,"minimum":1,"default":2000,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Code Graph V1 Memory Code Graph Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/code/contracts":{"get":{"tags":["memory"],"summary":"Code Contracts","description":"The contract graph across the user's repos: the endpoints each provides (and the schemas the\nold maps recorded) and the route links between repos.","operationId":"code_contracts_v1_memory_code_contracts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Code Contracts V1 Memory Code Contracts Get"}}}}}}},"/v1/memory/code/sync/plan":{"post":{"tags":["memory"],"summary":"Code Sync Plan","description":"The vault's plan for a source's listing: which paths to read, which are gone, which blobs it holds.","operationId":"code_sync_plan_v1_memory_code_sync_plan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeSyncPlan"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Code Sync Plan V1 Memory Code Sync Plan Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/code/sync/apply":{"post":{"tags":["memory"],"summary":"Code Sync Apply","description":"One apply of a source's sync (files, versions with their facts and chunks, removed paths, configs);\nthe links it measured from experience (``changed together``) go to the repo's measured links.","operationId":"code_sync_apply_v1_memory_code_sync_apply_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeSyncApply"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Code Sync Apply V1 Memory Code Sync Apply Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/frame/record":{"post":{"tags":["memory"],"summary":"External Frame Record","operationId":"external_frame_record_v1_memory_frame_record_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameRecordIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response External Frame Record V1 Memory Frame Record Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/frame/final":{"post":{"tags":["memory"],"summary":"External Frame Final","operationId":"external_frame_final_v1_memory_frame_final_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameFinalIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response External Frame Final V1 Memory Frame Final Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/frame":{"post":{"tags":["memory"],"summary":"External Frame","operationId":"external_frame_v1_memory_frame_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response External Frame V1 Memory Frame Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/frame/lens":{"post":{"tags":["memory"],"summary":"External Frame Lens","operationId":"external_frame_lens_v1_memory_frame_lens_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameLensIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response External Frame Lens V1 Memory Frame Lens Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/events/stream":{"get":{"tags":["events"],"summary":"Event Stream","description":"SSE endpoint — panel connects here; filtered per-user unless service token.","operationId":"event_stream_v1_events_stream_get","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"Tenant Id"}},{"name":"token","in":"query","required":false,"schema":{"type":"string","default":"","title":"Token"}},{"name":"user_id","in":"query","required":false,"schema":{"type":"string","description":"Optional acting-user identifier. When combined with a valid service token (X-Service-Token header or ?token= query param), the SSE stream is filtered as if the request were authenticated as that user (per-user filter via _should_forward_event). The Panel SSE proxy uses this path so each browser session only receives events addressed to its own user, even though the outbound request is service-authenticated.","default":"","title":"User Id"},"description":"Optional acting-user identifier. When combined with a valid service token (X-Service-Token header or ?token= query param), the SSE stream is filtered as if the request were authenticated as that user (per-user filter via _should_forward_event). The Panel SSE proxy uses this path so each browser session only receives events addressed to its own user, even though the outbound request is service-authenticated."},{"name":"source_types","in":"query","required":false,"schema":{"type":"string","description":"Optional comma-separated filter of event source_type values (e.g. 'chat,action,confirmation,skeleton'). When omitted, all event types are forwarded (back-compat). Composes with tenant/user filter — tenant/user mismatches are still dropped.","default":"","title":"Source Types"},"description":"Optional comma-separated filter of event source_type values (e.g. 'chat,action,confirmation,skeleton'). When omitted, all event types are forwarded (back-compat). Composes with tenant/user filter — tenant/user mismatches are still dropped."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/events/stats":{"get":{"tags":["events"],"summary":"Event Stats","description":"SSE Hub stats — number of channels and connected clients.","operationId":"event_stats_v1_events_stats_get","parameters":[{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Event Stats V1 Events Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/signals/emit":{"post":{"tags":["signals"],"summary":"Emit Signal","description":"Receive a reactive signal emission from an extension or service.","operationId":"emit_signal_api_v1_signals_emit_post","parameters":[{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignalEmitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automations":{"post":{"tags":["automations"],"summary":"Create Rule","operationId":"create_rule_v1_automations_post","deprecated":true,"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Create Rule V1 Automations Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["automations"],"summary":"List Rules","operationId":"list_rules_v1_automations_get","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{},"title":"Response List Rules V1 Automations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automations/{rule_id}":{"delete":{"tags":["automations"],"summary":"Delete Rule","operationId":"delete_rule_v1_automations__rule_id__delete","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Rule Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Delete Rule V1 Automations  Rule Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automations/{rule_id}/pause":{"post":{"tags":["automations"],"summary":"Pause Rule","operationId":"pause_rule_v1_automations__rule_id__pause_post","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Rule Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Pause Rule V1 Automations  Rule Id  Pause Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automations/{rule_id}/resume":{"post":{"tags":["automations"],"summary":"Resume Rule","operationId":"resume_rule_v1_automations__rule_id__resume_post","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Rule Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Resume Rule V1 Automations  Rule Id  Resume Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scopes":{"get":{"tags":["scopes"],"summary":"List Scopes","description":"List scopes visible to this tenant (platform + tenant).","operationId":"list_scopes_v1_scopes_get","parameters":[{"name":"resource","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{},"title":"Response List Scopes V1 Scopes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["scopes"],"summary":"Create Scope","description":"Create a new scope in the registry.","operationId":"create_scope_v1_scopes_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopeCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Create Scope V1 Scopes Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scopes/effective/{user_id}":{"get":{"tags":["scopes"],"summary":"Get Effective Scopes","description":"Get effective (resolved) scopes for a user, including denied history.","operationId":"get_effective_scopes_v1_scopes_effective__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Effective Scopes V1 Scopes Effective  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scopes/{scope_id}":{"patch":{"tags":["scopes"],"summary":"Update Scope","description":"Update a scope's display_name or description.","operationId":"update_scope_v1_scopes__scope_id__patch","parameters":[{"name":"scope_id","in":"path","required":true,"schema":{"type":"integer","title":"Scope Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Update Scope V1 Scopes  Scope Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["scopes"],"summary":"Delete Scope","description":"Delete a scope (must not be system and not in use).","operationId":"delete_scope_v1_scopes__scope_id__delete","parameters":[{"name":"scope_id","in":"path","required":true,"schema":{"type":"integer","title":"Scope Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Delete Scope V1 Scopes  Scope Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audit":{"get":{"tags":["audit"],"summary":"Get Audit Log","description":"Query RBAC audit log. Admin or service token required.","operationId":"get_audit_log_v1_audit_get","parameters":[{"name":"actor_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Id"}},{"name":"target_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Type"}},{"name":"target_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Id"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/users/{user_id}/extensions":{"get":{"tags":["user_extensions"],"summary":"List User Extensions","operationId":"list_user_extensions_v1_users__user_id__extensions_get","parameters":[{"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"}}}}}}},"/v1/users/{user_id}/extensions/disable":{"post":{"tags":["user_extensions"],"summary":"Disable User Extension","operationId":"disable_user_extension_v1_users__user_id__extensions_disable_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisableBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/users/{user_id}/extensions/disable/{app_id}":{"delete":{"tags":["user_extensions"],"summary":"Enable User Extension","operationId":"enable_user_extension_v1_users__user_id__extensions_disable__app_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User 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"}}}}}}},"/v1/extensions/access":{"get":{"tags":["user_extensions"],"summary":"Batch Extensions","operationId":"batch_extensions_v1_extensions_access_get","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"Tenant Id"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/extensions/{app_id}/users":{"get":{"tags":["user_extensions"],"summary":"List Extension Users","operationId":"list_extension_users_v1_extensions__app_id__users_get","parameters":[{"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"}}}}}}},"/v1/users/{user_id}/reset-conversation":{"post":{"tags":["user_extensions"],"summary":"Reset User Conversation Endpoint","description":"Wipe a user's conversational/context state + restart their session.\n\nAuth: admin JWT or service token (same as the sibling /v1/users/* admin\nroutes). Self-vs-admin gating is enforced by the calling surface (the\nadmin-ext `reset_conversation` tool) since service-token callers are\ntrusted here. Money/billing/usage/installs are preserved.","operationId":"reset_user_conversation_endpoint_v1_users__user_id__reset_conversation_post","parameters":[{"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"}}}}}}},"/v1/me/nickname":{"get":{"tags":["me"],"summary":"Get Nickname","operationId":"get_nickname_v1_me_nickname_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["me"],"summary":"Update Nickname","operationId":"update_nickname_v1_me_nickname_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NicknameBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/extensions":{"get":{"tags":["me"],"summary":"List My Extensions","operationId":"list_my_extensions_v1_me_extensions_get","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/extensions/disable":{"post":{"tags":["me"],"summary":"Disable Extension","operationId":"disable_extension_v1_me_extensions_disable_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisableBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/extensions/disable/{app_id}":{"delete":{"tags":["me"],"summary":"Enable Extension","operationId":"enable_extension_v1_me_extensions_disable__app_id__delete","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/gmail":{"post":{"tags":["webhooks"],"summary":"Gmail Push Webhook","description":"Receive Gmail push notification from Google Pub/Sub.\n\nMust return 200 quickly — Google retries on non-2xx.\nAll heavy processing happens async via Redis pub/sub.","operationId":"gmail_push_webhook_v1_webhooks_gmail_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/ext/{app_id}/webhook/{path}":{"post":{"tags":["ext-webhooks"],"summary":"Receive Webhook","description":"Receive external webhook (POST) or OAuth callback (GET) and route to\nextension handler via DirectCallWorkflow.\n\nPOST: server-to-server hooks (Stripe events, GitHub push, etc.). Body\n      carries the payload; extension handler verifies HMAC/signature.\n\nGET:  OAuth provider 302 redirects (Spotify, GitHub, Google sign-in).\n      Body is empty; OAuth `code` + `state` ride in query_params.\n\nNo user auth — external services cannot provide user tokens. The extension\nwebhook handler receives raw headers/body/query_params and performs its\nown verification (HMAC for POST, state-token for GET OAuth, etc.).\n\nReturns whatever the handler asked for: a plain dict becomes a 200 JSON\nbody, while a dict carrying status_code/headers/body shapes the real HTTP\nresponse — required by providers whose verification handshake lives in a\nheader (Asana's X-Hook-Secret echo, Slack's Events API). Kernel/infra\nfailures still answer 200 so external services do not retry them.","operationId":"receive_webhook_v1_ext__app_id__webhook__path__post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}},{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["ext-webhooks"],"summary":"Receive Webhook","description":"Receive external webhook (POST) or OAuth callback (GET) and route to\nextension handler via DirectCallWorkflow.\n\nPOST: server-to-server hooks (Stripe events, GitHub push, etc.). Body\n      carries the payload; extension handler verifies HMAC/signature.\n\nGET:  OAuth provider 302 redirects (Spotify, GitHub, Google sign-in).\n      Body is empty; OAuth `code` + `state` ride in query_params.\n\nNo user auth — external services cannot provide user tokens. The extension\nwebhook handler receives raw headers/body/query_params and performs its\nown verification (HMAC for POST, state-token for GET OAuth, etc.).\n\nReturns whatever the handler asked for: a plain dict becomes a 200 JSON\nbody, while a dict carrying status_code/headers/body shapes the real HTTP\nresponse — required by providers whose verification handshake lives in a\nheader (Asana's X-Hook-Secret echo, Slack's Events API). Kernel/infra\nfailures still answer 200 so external services do not retry them.","operationId":"receive_webhook_v1_ext__app_id__webhook__path__post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}},{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ext/{app_id}/health":{"get":{"tags":["ext-webhooks"],"summary":"Get Ext Health","description":"Read cached health status for an extension from Redis.\n\nReturns the last health snapshot written by the kernel's health check scheduler.\nIf no data is cached, returns status=unknown.","operationId":"get_ext_health_v1_ext__app_id__health_get","parameters":[{"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"}}}}}}},"/v1/webhooks/stripe":{"post":{"tags":["webhooks"],"summary":"Stripe Webhook","operationId":"stripe_webhook_v1_webhooks_stripe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/me/settings":{"get":{"tags":["settings"],"summary":"Get My Settings","operationId":"get_my_settings_v1_me_settings_get","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["settings"],"summary":"Update My Settings","operationId":"update_my_settings_v1_me_settings_patch","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSettingsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/tenant-defaults":{"get":{"tags":["settings","settings-admin"],"summary":"Get Tenant Defaults","description":"Return tenant-default settings (admin-set; UI initial-form values).","operationId":"get_tenant_defaults_v1_admin_tenant_defaults_get","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"Tenant Id"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["settings","settings-admin"],"summary":"Patch Tenant Defaults","description":"Write tenant-default settings (admin only via X-Acting-User check).","operationId":"patch_tenant_defaults_v1_admin_tenant_defaults_patch","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"Tenant Id"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSettingsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/confirmations/active":{"get":{"tags":["confirmations"],"summary":"Get Active Confirmations","operationId":"get_active_confirmations_v1_confirmations_active_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Active Confirmations V1 Confirmations Active Get"}}}}}}},"/v1/confirmations/{confirmation_id}":{"get":{"tags":["confirmations"],"summary":"Get Confirmation","operationId":"get_confirmation_v1_confirmations__confirmation_id__get","parameters":[{"name":"confirmation_id","in":"path","required":true,"schema":{"type":"string","title":"Confirmation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Confirmation V1 Confirmations  Confirmation Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/confirmations/{confirmation_id}/confirm":{"post":{"tags":["confirmations"],"summary":"Confirm Action","operationId":"confirm_action_v1_confirmations__confirmation_id__confirm_post","parameters":[{"name":"confirmation_id","in":"path","required":true,"schema":{"type":"string","title":"Confirmation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Confirm Action V1 Confirmations  Confirmation Id  Confirm Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/confirmations/{confirmation_id}/cancel":{"post":{"tags":["confirmations"],"summary":"Cancel Action","operationId":"cancel_action_v1_confirmations__confirmation_id__cancel_post","parameters":[{"name":"confirmation_id","in":"path","required":true,"schema":{"type":"string","title":"Confirmation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Cancel Action V1 Confirmations  Confirmation Id  Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/confirmations/{confirmation_id}/accept":{"post":{"tags":["confirmations"],"summary":"Accept Action","operationId":"accept_action_v1_confirmations__confirmation_id__accept_post","parameters":[{"name":"confirmation_id","in":"path","required":true,"schema":{"type":"string","title":"Confirmation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Accept Action V1 Confirmations  Confirmation Id  Accept Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/confirmations/{confirmation_id}/reject":{"post":{"tags":["confirmations"],"summary":"Reject Action","operationId":"reject_action_v1_confirmations__confirmation_id__reject_post","parameters":[{"name":"confirmation_id","in":"path","required":true,"schema":{"type":"string","title":"Confirmation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Reject Action V1 Confirmations  Confirmation Id  Reject Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tasks/active":{"get":{"tags":["tasks"],"summary":"Get Active Tasks","operationId":"get_active_tasks_v1_tasks_active_get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Active Tasks V1 Tasks Active Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tasks/{task_id}":{"get":{"tags":["tasks"],"summary":"Get Task","operationId":"get_task_v1_tasks__task_id__get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Task V1 Tasks  Task Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tasks/{task_id}/cancel":{"post":{"tags":["tasks"],"summary":"Cancel Task","operationId":"cancel_task_v1_tasks__task_id__cancel_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"user_id","in":"query","required":false,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Cancel Task V1 Tasks  Task Id  Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/actions":{"post":{"tags":["actions"],"summary":"Record Action","description":"Record a completed action from the kernel.\n\nIdempotent on trace_id (Task A2, spec fea64cc): retries from the kernel\ndrainer hit ``INSERT ... ON DUPLICATE KEY UPDATE`` and update only the\nstatus/result/completed_at fields — first-insert audit metadata\n(received_at, severity, retention_class, pii_redaction_level,\nkernel_local_at) stays stable so federal audit timestamps cannot be\nrewritten by a replay.","operationId":"record_action_v1_actions_post","parameters":[{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["actions","actions-stats"],"summary":"List Actions","description":"List current user's actions with filtering and pagination.","operationId":"list_actions_v1_actions_get","parameters":[{"name":"app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Id"}},{"name":"action_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Per Page"}},{"name":"kwargs","in":"query","required":true,"schema":{"title":"Kwargs"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/actions/stats":{"get":{"tags":["actions","actions-stats"],"summary":"Get Usage Stats","description":"Current month usage summary for the user.","operationId":"get_usage_stats_v1_actions_stats_get","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/actions/{trace_id}":{"get":{"tags":["actions","actions-stats"],"summary":"Get Action Detail","description":"Get full action details. Ownership check: user_id must match.","operationId":"get_action_detail_v1_actions__trace_id__get","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/actions/stats/extension/{app_id}":{"get":{"tags":["actions","actions-stats"],"summary":"Get Extension Stats","description":"Developer analytics for an extension. Author check via apps table.","operationId":"get_extension_stats_v1_actions_stats_extension__app_id__get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/actions/stats/marketplace/{app_id}":{"get":{"tags":["actions","actions-stats"],"summary":"Get Marketplace Stats","description":"Public marketplace stats. Cached in Redis for 1 hour.","operationId":"get_marketplace_stats_v1_actions_stats_marketplace__app_id__get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/extensions/{app_id}/call":{"post":{"tags":["extension-call"],"summary":"Call Extension Function","description":"Execute @chat.function directly. Panel calls cached 5s.","operationId":"call_extension_function_v1_extensions__app_id__call_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/extensions/{app_id}/batch":{"post":{"tags":["extension-call"],"summary":"Batch Call","description":"Execute multiple functions in parallel. One HTTP round-trip for left+right panels.","operationId":"batch_call_v1_extensions__app_id__batch_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CallResponse"},"title":"Response Batch Call V1 Extensions  App Id  Batch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/extensions/{app_id}/operate":{"post":{"tags":["operate"],"summary":"Operate","operationId":"operate_v1_extensions__app_id__operate_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/sessions":{"post":{"tags":["agent-sessions"],"summary":"Start Session","operationId":"start_session_v1_agent_sessions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/sessions/{session_id}/result":{"post":{"tags":["agent-sessions"],"summary":"Post Result","operationId":"post_result_v1_agent_sessions__session_id__result_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/sessions/{session_id}/drop":{"post":{"tags":["agent-sessions"],"summary":"Drop Task","description":"Withdraw a task the user queued but pulled back (T-3, 2026-07-26).\n\nThe exact counterpart of /inject: same ownership check, same honest\nresponse shape. /inject is the ONLY way a line becomes kernel-owned; this\nis the ONLY way it stops being so. Until now a queued line always fired --\nthe terminal shows it as a display-only remote row it cannot retract -- so\npulling it back \"didn't really take it out of the queue\".\n\nRemoval is BY steer_iid (the handle /inject returns), never by text.\n{ok: false} is HONEST: no live session took the signal, or the task had\nalready drained into the running turn — a withdraw that lost that race is\nreported, never faked.","operationId":"drop_task_v1_agent_sessions__session_id__drop_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/sessions/{session_id}/mode":{"post":{"tags":["agent-sessions"],"summary":"Set Session Mode","description":"The terminal switched its coding mode (Shift-Tab, /mode, a remote flip it applied): relayed to the running\nsession so the kernel's consent follows it at once -- autopilot asks nothing, the others ask. {ok: false} is\nhonest: no live session took it (the next turn carries the mode in its coding_context anyway).","operationId":"set_session_mode_v1_agent_sessions__session_id__mode_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/sessions/{session_id}/inject":{"post":{"tags":["agent-sessions"],"summary":"Inject Task","description":"Mid-turn follow-up into the caller's OWN running session (spec\n2026-07-17 Unit GW). Builds THE coding-remote task_id-LESS steer req\n(build_steer_req -- NO task_id, NO coding_context) and signals new_task:\nthe kernel's mid-turn drain absorbs the task_id-less FIFO prefix into the\nRUNNING turn under the marathon's OWN task_id, so every frame stays\nvisible to the streaming terminal. A task_id-BEARING start POST is the\nWRONG vehicle here: it parks at the turn boundary, blocks later steers\nfrom flying in, and its boundary task_id adoption re-tags frames foreign\nto the watching client (recon 2026-07-17).\n\nNever creates a new turn: no billing/quota gate (the session was already\ngated at start), no stash-for-fresh-start, no session-pointer write. It\nDOES clear a stale cooperative-cancel flag (T-1, 2026-07-26) — the same\nthing the /stream start path does — because an inject is the user typing a\nNEW instruction and must not inherit the cancel of a previous turn.\nSignal failure is HONEST ({ok: false}): unlike\ninject_instruction's TG/panel callers there is no pending-steer queue\nfallback here (that queue drains through the terminal's own poll and is\ngated on coding_remote enabled) -- the terminal keeps its local queue +\nturn-end _drain_pending as the fallback, deduped kernel-side by\nsteer_iid. ONE signal attempt: Enter-while-busy wants immediate feedback,\nand the client fallback covers the miss.","operationId":"inject_task_v1_agent_sessions__session_id__inject_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InjectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/sessions/{session_id}/cancel":{"post":{"tags":["agent-sessions"],"summary":"Cancel Session","operationId":"cancel_session_v1_agent_sessions__session_id__cancel_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/sessions/{session_id}/thread":{"get":{"tags":["agent-sessions"],"summary":"Get Thread","description":"Terminal boot replay: the caller's session mind for client-side replay on\nreconnect. The mind lives in the Tenant Vault (kernel stage B1): the\nsession's snapshot row (working model + fold point) and its conversation\nthread (id = the session id) -- the window is the messages after the fold\npoint. The session_id's ownership is proven via the prefix check (_owns).\nNever 500s: an absent or unreadable mind replays as the empty shape.","operationId":"get_thread_v1_agent_sessions__session_id__thread_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/sessions/active":{"get":{"tags":["agent-sessions","agent-sessions-active"],"summary":"List Active Sessions","description":"User-JWT session discovery (T2, spec 2026-07-20): every RUNNING\ncoding/marathon workflow the caller owns, via Temporal list_workflows on\nthe EXISTING singleton imperal-hub client (zero new machinery — recon\n2026-07-20 verified the WorkflowId STARTS_WITH query live against the\nES-backed visibility store). Ownership is intrinsic to the query\n(WorkflowId prefix = imperal_id), so there is no separate ownership\nassert on the read side — unlike every other route in this file, there\nis no {session_id} path param to spoof.\n\nEach item is enriched with: `state` (k_state; a parked session keeps it\nfor 24h), `pending_consent` (T1's stream-recovered find_open_confirm —\nsurvives even a dead 300s-era k_pending nonce), `applied_mode` (T3's ACK\nkey), `terminal_online` (whether a terminal is actually proving life for\nTHIS session — the pointer OR this session's own registry freshness) and\n`status` (running | parked | orphan — see the inline note at the field).\n\n`terminal_online` used to compare the single-value pointer alone, which is\nlast-writer-wins per USER: with two tabs open it named at most one of\nthem, so a perfectly live second tab reported terminal_online:false. It\nnow asks the per-session registry too, exactly like the tab-inventory\nroute (/{user_id}/sessions) does — one meaning of \"online\", both routes.","operationId":"list_active_sessions_v1_agent_sessions_active_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/agent/sessions/{session_id}/pending-steer":{"get":{"tags":["agent-sessions","agent-sessions-remote"],"summary":"Get Pending Steer","description":"Idle-terminal pickup (liveness v2 §B): pop the OLDEST queued TG/panel\ninstruction that piled up while inject_instruction's signal attempts found\nno live turn to steer into (idle between marathon turns).\n\nSingle-item drain (final-review m3): AT MOST ONE item per call -- exactly\none RPOP (the queue is LPUSHed, so the tail IS the oldest). The client\nsubmits one instruction per idle tick anyway; handing it the whole queue\nonly parked items 2..n in client RAM through a long turn (lost if the\nterminal died). Undelivered items now stay durable in Redis until their\nown pickup poll. Each returned item carries the instruction's `iid`\n(final-review m2, additive) so the client can dedup a queued twin of a\nsignal that already landed kernel-side.\n\nPermission is RE-CHECKED here at drain time, BEFORE anything is popped,\nvia the SAME resolve_state seam /steer and /remote already use (reuse, no\nnew mechanism) -- the user may have disabled remote control, or dropped\ntelegram from the steer allowlist, in the window between an instruction\nbeing queued and this poll draining it:\n  * remote control disabled for this session -> {\"items\": []}, the queue\n    is left UNTOUCHED (never purged -- the user may re-enable before the\n    1h TTL expires it naturally).\n  * enabled -> one pop; a popped telegram-origin item whose surface has\n    since fallen out of the steer allowlist is silently DROPPED (removed\n    from the queue, never returned) rather than replayed to a revoked\n    surface -- this call then returns empty and the next poll sees the\n    next item. Panel/other-origin items are ungated by the (telegram-only)\n    steer list, mirroring the enabled-only check the /steer endpoint\n    already applies to panel-originated steering.\nNever 500s on a missing key or a corrupt/malformed entry -- popped garbage\nis dropped, not fatal (and not returned).\n\nREQUESTED MODE (mode-control spec 2026-07-17, additive): the response also\ncarries `requested_mode` -- the GETDEL of the one-shot\nimperal:coding_remote:req_mode:{session_id} slot written by the internal\n/mode endpoint (TG /mode command / ext tool), so a remote mode-flip\nrequest is delivered to EXACTLY ONE terminal poll and never replays.\nShape: {\"mode\": \"default|plan|autopilot\", \"surface\": \"<origin>\"} | null.\nThe gateway only CONVEYS the request + its origin surface -- the terminal\napplies it (autopilot only after its own local y/n confirm; the write path\nalready gated autopilot on the origin surface's steer rights). Disabled\nsession -> null AND the slot is left intact, mirroring the items-drain\nsemantics above.\n\nAPPLIED MODE ACK (T3, spec 2026-07-20): the optional `?mode=` query param\nis the terminal reporting the coding mode it is ACTUALLY running under\nright now -- recorded into imperal:coding_remote:applied_mode:{session_id}\n(TTL 1h, refreshed on every poll that includes it) so _summary/`/active`\ncan finally show the panel the REAL mode instead of guessing. Recorded\nUNCONDITIONALLY (before the enabled check below, alongside the liveness\nheartbeat) -- applied mode is a liveness-adjacent fact about the\nterminal, not a remote-control permission, so a disabled session still\nreports it truthfully. An unrecognised mode value is silently ignored\n(state.set_applied_mode no-ops on it) -- never turns this heartbeat poll\ninto a 422.\n\nTAB LABEL (T1, W4c spec 2026-07-20): the optional `?label=` query param is\nthe terminal's OWN human-readable tab name (auto-derived from its first\ntask, or set via /rename) -- sanitized (ANSI/control chars stripped,\nwhitespace collapsed, capped 32 chars) and recorded into\nimperal:coding_remote:label:{session_id} (TTL 1h, same refresh-on-every-\npoll pattern as applied mode) so the panel's per-user tab inventory\n(GET /v1/internal/coding-remote/{user_id}/sessions) can render a real\nname instead of the repo folder for every tab. Recorded UNCONDITIONALLY\n(same liveness-adjacent posture as applied mode, before the enabled\ncheck below) -- an empty/unsanitizable value is silently dropped by\nstate.set_label, never written, never a 422.\n\nATTACH-ON-POLL HINT (W4b, spec 2026-07-20, additive): the response also\ncarries `attach` -- null normally; {\"task_id\", \"last_id\", \"kind\":\n\"tool\"|\"consent\"} when a kernel-side turn is silently waiting on THIS\nidle-polling terminal. A marathon turn woken by a panel/TG message runs\nentirely kernel-side; the owning terminal only opens the SSE stream\ninside a turn of its OWN, so it has no reason to attach and the kernel\nwaits out its whole tool_wait budget (bash 3900s, default 300s) in\nsilence before parking \"unresponsive\" (I-CODING-DISPATCH-PRESENCE-PAUSED\nalready re-dispatches the same req_id once the terminal reconnects --\nthis hint is the missing nudge to reconnect BEFORE that budget burns).\nComputed ONLY when the drain above found no items -- a queued item is\nabout to start its own turn (which attaches on its own), and this keeps\nthe common (nothing-to-attach-to) path a single cheap XREVRANGE: first\nfind_open_confirm (an open consent also justifies attaching), then\nfind_open_dispatch (an open local-tool wait) -- first hit wins, `kind`\nsays which. `last_id` is the RAW stream id of the frame the hint is\nbased on, so the client can hand it straight to the stream endpoint as\nits resume point instead of replaying the whole 24h backfill.","operationId":"get_pending_steer_v1_agent_sessions__session_id__pending_steer_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"mode","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"}},{"name":"label","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/sessions/{session_id}/remote":{"get":{"tags":["agent-sessions","agent-sessions-remote"],"summary":"Get Remote","operationId":"get_remote_v1_agent_sessions__session_id__remote_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["agent-sessions","agent-sessions-remote"],"summary":"Put Remote","operationId":"put_remote_v1_agent_sessions__session_id__remote_put","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/sessions/{session_id}/stream":{"get":{"tags":["agent-sessions","agent-sessions-stream"],"summary":"Stream","operationId":"stream_v1_agent_sessions__session_id__stream_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/activity/steps/{ref}":{"get":{"tags":["activity"],"summary":"Get Step Detail","operationId":"get_step_detail_v1_activity_steps__ref__get","parameters":[{"name":"ref","in":"path","required":true,"schema":{"type":"string","title":"Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/activity/turns/{turn_ref}":{"get":{"tags":["activity"],"summary":"Get Turn Index","operationId":"get_turn_index_v1_activity_turns__turn_ref__get","parameters":[{"name":"turn_ref","in":"path","required":true,"schema":{"type":"string","title":"Turn Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/activity/recent":{"get":{"tags":["activity"],"summary":"Get Recent Turns","description":"The owner's recent turns that still have an index. The list outlives its\nindexes (every new step renews the list's 24 h, each index keeps its own, and\na deploy's cache purge drops indexes): a listed turn without one answered 404\non every panel refresh, and Wazuh banned the panel user as a web scanner\n(rule 31151, 2026-10-23).","operationId":"get_recent_turns_v1_activity_recent_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/developer/register":{"post":{"tags":["developer"],"summary":"Register","operationId":"register_v1_developer_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperRegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/developer/profile":{"get":{"tags":["developer"],"summary":"Profile","operationId":"profile_v1_developer_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperProfileResponse"}}}}}}},"/v1/developer/tier":{"put":{"tags":["developer"],"summary":"Update Tier","operationId":"update_tier_v1_developer_tier_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TierUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/developer/apps":{"get":{"tags":["developer"],"summary":"List Apps","operationId":"list_apps_v1_developer_apps_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AppResponse"},"type":"array","title":"Response List Apps V1 Developer Apps Get"}}}}}},"post":{"tags":["developer"],"summary":"Create App","operationId":"create_app_v1_developer_apps_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/developer/apps/{app_id}":{"get":{"tags":["developer"],"summary":"Get App","operationId":"get_app_v1_developer_apps__app_id__get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["developer"],"summary":"Update App","operationId":"update_app_v1_developer_apps__app_id__put","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["developer"],"summary":"Delete App","operationId":"delete_app_v1_developer_apps__app_id__delete","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppDeleteConfirm"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/developer/apps/{app_id}/_sync_manifest":{"post":{"tags":["developer"],"summary":"Sync Manifest To Db","description":"Service-only: sync platform-managed manifest fields into developer_apps.\nCalled by imperal-ext-developer's deploy_app after reading imperal.json.\nCurrently syncs: system (bool). Future: extend whitelist as needed.","operationId":"sync_manifest_to_db_v1_developer_apps__app_id___sync_manifest_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/developer/apps/{app_id}/submit":{"post":{"tags":["developer"],"summary":"Submit App","operationId":"submit_app_v1_developer_apps__app_id__submit_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppSubmitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/developer/apps/{app_id}/suspend":{"post":{"tags":["developer"],"summary":"Suspend App","operationId":"suspend_app_v1_developer_apps__app_id__suspend_post","parameters":[{"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"}}}}}}},"/v1/developer/apps/{app_id}/analytics":{"get":{"tags":["developer"],"summary":"App Analytics","operationId":"app_analytics_v1_developer_apps__app_id__analytics_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/developer/apps/{app_id}/deploys":{"get":{"tags":["developer"],"summary":"List Deploys","operationId":"list_deploys_v1_developer_apps__app_id__deploys_get","parameters":[{"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"}}}}}},"post":{"tags":["developer"],"summary":"Record Deploy","operationId":"record_deploy_v1_developer_apps__app_id__deploys_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeployRecordRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/developer/earnings":{"get":{"tags":["developer"],"summary":"Earnings","operationId":"earnings_v1_developer_earnings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EarningsResponse"}}}}}}},"/v1/developer/earnings/{app_id}":{"get":{"tags":["developer"],"summary":"Earnings By App","operationId":"earnings_by_app_v1_developer_earnings__app_id__get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EarningsByAppResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/developer/payouts/request":{"post":{"tags":["developer"],"summary":"Payout Request","operationId":"payout_request_v1_developer_payouts_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutRequestCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/developer/payouts":{"get":{"tags":["developer"],"summary":"List Payouts","operationId":"list_payouts_v1_developer_payouts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PayoutResponse"},"type":"array","title":"Response List Payouts V1 Developer Payouts Get"}}}}}}},"/v1/admin/apps/{app_id}/metadata":{"post":{"tags":["developer-admin"],"summary":"Update App Metadata","description":"Single source of truth for app name/description: write developer_apps so\nBOTH marketplace and the sidebar (which read developer_apps) reflect a rename.\nCalled by the admin Extensions settings panel.","operationId":"update_app_metadata_v1_admin_apps__app_id__metadata_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppMetadataReq"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/apps/sync-names":{"post":{"tags":["developer-admin"],"summary":"Sync App Names","description":"One-off backfill: align developer_apps.display_name with the effective\nRegistry name (what the sidebar already shows) for apps renamed via the\nadmin panel before the write-through existed. Idempotent.","operationId":"sync_app_names_v1_admin_apps_sync_names_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/apps/pending":{"get":{"tags":["developer-admin"],"summary":"Pending Apps","operationId":"pending_apps_v1_admin_apps_pending_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/apps/{app_id}/approve":{"post":{"tags":["developer-admin"],"summary":"Approve App","operationId":"approve_app_v1_admin_apps__app_id__approve_post","parameters":[{"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"}}}}}}},"/v1/admin/apps/{app_id}/reject":{"post":{"tags":["developer-admin"],"summary":"Reject App","operationId":"reject_app_v1_admin_apps__app_id__reject_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRejectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/apps/{app_id}/status":{"post":{"tags":["developer-admin"],"summary":"Set App Status","description":"Admin-override of a marketplace app's status — IMMEDIATE, no review.\nsuspended/draft pulls it off the store; active restores it at once. (A\ndeveloper reaches 'active' only via submit -> pending_review -> approve.)","operationId":"set_app_status_v1_admin_apps__app_id__status_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppStatusReq"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/apps/{app_id}/sync-pricing":{"post":{"tags":["developer-admin"],"summary":"Sync App Pricing","description":"Sync single app pricing from DB to Redis.","operationId":"sync_app_pricing_v1_admin_apps__app_id__sync_pricing_post","parameters":[{"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"}}}}}}},"/v1/admin/apps/sync-pricing":{"post":{"tags":["developer-admin"],"summary":"Sync All Pricing","description":"Bulk sync ALL active apps pricing from DB to Redis.","operationId":"sync_all_pricing_v1_admin_apps_sync_pricing_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/payouts/pending":{"get":{"tags":["developer-admin"],"summary":"Pending Payouts","operationId":"pending_payouts_v1_admin_payouts_pending_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/payouts/{payout_id}/approve":{"post":{"tags":["developer-admin"],"summary":"Approve Payout","operationId":"approve_payout_v1_admin_payouts__payout_id__approve_post","parameters":[{"name":"payout_id","in":"path","required":true,"schema":{"type":"integer","title":"Payout Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPayoutActionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/payouts/{payout_id}/reject":{"post":{"tags":["developer-admin"],"summary":"Reject Payout","operationId":"reject_payout_v1_admin_payouts__payout_id__reject_post","parameters":[{"name":"payout_id","in":"path","required":true,"schema":{"type":"integer","title":"Payout Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPayoutActionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/developer/config":{"get":{"tags":["developer-admin"],"summary":"Developer Config","operationId":"developer_config_v1_admin_developer_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/developer/tier":{"post":{"tags":["developer-admin"],"summary":"Admin Set Tier","description":"Admin/service-only: comp a developer tier WITHOUT charging the wallet.\n\nP4b least-privilege: tier comps live ONLY on this admin-gated endpoint\n(never a skip_charge flag on the user PUT /v1/developer/tier path). Sets\nthe tier + UTC cycle dates and writes an informational token_ledger audit\nrow (reason=tier_comp, amount=0) recording WHO comped WHOM.","operationId":"admin_set_tier_v1_admin_developer_tier_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTierSetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/apps/{app_id}":{"delete":{"tags":["developer-admin"],"summary":"Admin Purge App","description":"Hard-purge ANY app from every surface (admin/service only).\n\nOwner-agnostic counterpart of the developer self-delete. Pass force=true in the\nbody to delete an app that is still 'active'. confirm_name must equal app_id.","operationId":"admin_purge_app_v1_admin_apps__app_id__delete","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppDeleteConfirm"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/apps":{"get":{"tags":["developer-admin"],"summary":"Admin List Apps","description":"List ALL developer_apps (any owner/status) for the admin cross-store view.","operationId":"admin_list_apps_v1_admin_apps_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/apps/{app_id}/sessions/{user_id}/messages":{"get":{"tags":["app-sessions"],"summary":"Get App Session Messages","description":"Return the messages of the per-extension chat for (app_id, user_id).\n\nAuth: a JWT user may only read their OWN session; an internal service token\n(the Panel proxy, which resolves user_id from the authenticated session) may\nread any user. Returns ``[]`` when there is no history yet.","operationId":"get_app_session_messages_v1_apps__app_id__sessions__user_id__messages_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App 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"}}}}}}},"/v1/marketplace/apps":{"get":{"tags":["marketplace"],"summary":"List Apps","description":"Browse marketplace apps — public, no auth needed. If authenticated, each\ncard carries per-user is_installed for correct Install/Uninstall button\nstate on the listing (not just the detail page). Per-group visibility:\nrestricted apps (Sharelock) are hidden from non-members (default-DENY).","operationId":"list_apps_v1_marketplace_apps_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":200,"default":"","title":"Search"}},{"name":"category","in":"query","required":false,"schema":{"type":"string","maxLength":50,"default":"","title":"Category"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(actions|installs|rating|newest|name)$","default":"actions","title":"Sort"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":20,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/marketplace/apps/{app_id}":{"get":{"tags":["marketplace"],"summary":"Get App","description":"App detail page — public. If authenticated, includes is_installed.\nPer-group visibility: a non-member gets {} -> 404 (NOT 403; existence is\nnot confirmed).","operationId":"get_app_v1_marketplace_apps__app_id__get","parameters":[{"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"}}}}}}},"/v1/marketplace/apps/{app_id}/icon":{"get":{"tags":["marketplace"],"summary":"Get App Icon","description":"Stream the app's icon SVG — the SINGLE icon source (I-ICON-SINGLE-SOURCE).\n\nTotal endpoint: serves developer_apps.icon_svg when present, else a\ndeterministic placeholder (app initial on a stable color). NEVER 404s, so\nno surface ever needs a client-side fallback. ETag = md5(svg) gives instant\nrevalidation; max-age=300 bounds the stale window. Public — not sensitive.","operationId":"get_app_icon_v1_marketplace_apps__app_id__icon_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}},"image/svg+xml":{}}},"304":{"description":"not modified"},"404":{"description":"no icon"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/marketplace/featured":{"get":{"tags":["marketplace"],"summary":"Featured","description":"Featured apps for hero section. Per-group visibility applied so a\nrestricted app never appears in the public hero.","operationId":"featured_v1_marketplace_featured_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":6,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/marketplace/apps/{app_id}/webhooks":{"get":{"tags":["marketplace"],"summary":"Get App Webhooks","description":"Public webhook surface — returns path + method per declared\n@ext.webhook in the extension's manifest.\n\nUsed by Panel Secrets tab (2026-05-13) to display the canonical\nOAuth callback URI users must register in their Spotify / GitHub /\nGoogle developer consoles. NEVER returns secret_header value or any\nother authentication detail — that would leak server-side hook\nverification material to the public.","operationId":"get_app_webhooks_v1_marketplace_apps__app_id__webhooks_get","parameters":[{"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"}}}}}}},"/v1/marketplace/stats":{"get":{"tags":["marketplace"],"summary":"Stats","description":"Public hero stats: total non-system apps, total installs, total actions.\nCounts only apps the viewer may see (restricted apps excluded for\nnon-members).","operationId":"stats_v1_marketplace_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/marketplace/categories":{"get":{"tags":["marketplace"],"summary":"Categories","description":"Category list with counts — over the viewer's visible apps only.\n\nEach entry carries its own display name and icon, so clients render what\nthey are given instead of keeping a local emoji map. That local map is\nexactly what used to fork a category into two chips (one decorated, one\nbare) whenever a stored value differed only in case.\n\n`category` keeps its original meaning (the id you filter by), so existing\nconsumers of this endpoint keep working unchanged.","operationId":"categories_v1_marketplace_categories_get","parameters":[{"name":"lang","in":"query","required":false,"schema":{"type":"string","maxLength":16,"description":"Language tag, e.g. 'en' or 'ru'. Defaults to Accept-Language, then English.","default":"","title":"Lang"},"description":"Language tag, e.g. 'en' or 'ru'. Defaults to Accept-Language, then English."},{"name":"all","in":"query","required":false,"schema":{"type":"boolean","description":"When true, returns all 121 canonical platform categories (including empty with count=0).","default":false,"title":"All"},"description":"When true, returns all 121 canonical platform categories (including empty with count=0)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/marketplace/categories/catalog":{"get":{"tags":["marketplace"],"summary":"Categories Catalog","description":"The full canonical category catalog, grouped — for pickers.\n\nThis is what a 'choose a category' UI should render: every selectable\ncategory, grouped, translated, with an icon and search terms for local\nfiltering. It is independent of what happens to be published, so a\ndeveloper can pick a category no app uses yet.\n\nStatic and public by design: no database access and no per-viewer\nfiltering, because the catalog is the same for everyone.","operationId":"categories_catalog_v1_marketplace_categories_catalog_get","parameters":[{"name":"lang","in":"query","required":false,"schema":{"type":"string","maxLength":16,"description":"Language tag, e.g. 'en' or 'ru'. Defaults to Accept-Language, then English.","default":"","title":"Lang"},"description":"Language tag, e.g. 'en' or 'ru'. Defaults to Accept-Language, then English."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/marketplace/categories/languages":{"get":{"tags":["marketplace"],"summary":"Categories Languages","description":"Languages the category catalog can currently be served in.\n\nCoverage is reported honestly (a partially translated language is listed\nwith its real ratio) so a client can decide whether to offer it.","operationId":"categories_languages_v1_marketplace_categories_languages_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/marketplace/pricing-meta":{"get":{"tags":["marketplace"],"summary":"Pricing Meta","description":"Public, read-only platform pricing knobs for the marketing pricing\ncalculator (imperal.io/pricing): per-tier platform fee + per-action base-price\ndefaults + the $-to-credit rate. No PII / no per-app data; these are the same\nadmin-editable values driven by the Admin -> System Pricing tab, so the public\ncalculator reflects a price change without a code edit + rebuild.","operationId":"pricing_meta_v1_marketplace_pricing_meta_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/marketplace/developer/{developer_id}":{"get":{"tags":["marketplace"],"summary":"Developer Profile","description":"Public developer profile. Their restricted apps are hidden from\nnon-members (counts + listing).","operationId":"developer_profile_v1_marketplace_developer__developer_id__get","parameters":[{"name":"developer_id","in":"path","required":true,"schema":{"type":"string","title":"Developer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/marketplace/apps/{app_id}/reviews":{"get":{"tags":["marketplace"],"summary":"List Reviews","description":"List reviews — public. If authenticated, includes user vote info.","operationId":"list_reviews_v1_marketplace_apps__app_id__reviews_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(helpful|newest|oldest|highest|lowest)$","default":"helpful","title":"Sort"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":20,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["marketplace"],"summary":"Create Review","description":"Submit a review — auth required, anti-gaming enforced.","operationId":"create_review_v1_marketplace_apps__app_id__reviews_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/marketplace/reviews/{review_id}":{"put":{"tags":["marketplace"],"summary":"Update Review","description":"Edit own review.","operationId":"update_review_v1_marketplace_reviews__review_id__put","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"integer","title":"Review Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["marketplace"],"summary":"Delete Review","description":"Delete own review.","operationId":"delete_review_v1_marketplace_reviews__review_id__delete","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"integer","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/marketplace/reviews/{review_id}/vote":{"post":{"tags":["marketplace"],"summary":"Vote Review","description":"Vote review as helpful.","operationId":"vote_review_v1_marketplace_reviews__review_id__vote_post","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"integer","title":"Review Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewVoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/marketplace/apps/{app_id}/install":{"post":{"tags":["marketplace"],"summary":"Install App","description":"Install an app from marketplace -- only one the user may see (its access policy).","operationId":"install_app_v1_marketplace_apps__app_id__install_post","parameters":[{"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"}}}}}},"delete":{"tags":["marketplace"],"summary":"Uninstall App","description":"Uninstall an app.","operationId":"uninstall_app_v1_marketplace_apps__app_id__install_delete","parameters":[{"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"}}}}}}},"/v1/secrets/{ext_id}":{"get":{"tags":["secrets"],"summary":"List Secrets","operationId":"list_secrets_v1_secrets__ext_id__get","parameters":[{"name":"ext_id","in":"path","required":true,"schema":{"type":"string","title":"Ext Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/secrets/{ext_id}/{name}/meta":{"get":{"tags":["secrets"],"summary":"Secret Meta","description":"Metadata read — cheap, no decrypt, no audit row.","operationId":"secret_meta_v1_secrets__ext_id___name__meta_get","parameters":[{"name":"ext_id","in":"path","required":true,"schema":{"type":"string","title":"Ext Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/secrets/{ext_id}/{name}":{"get":{"tags":["secrets"],"summary":"Read Secret","operationId":"read_secret_v1_secrets__ext_id___name__get","parameters":[{"name":"ext_id","in":"path","required":true,"schema":{"type":"string","title":"Ext Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["secrets"],"summary":"Write Secret","operationId":"write_secret_v1_secrets__ext_id___name__put","parameters":[{"name":"ext_id","in":"path","required":true,"schema":{"type":"string","title":"Ext Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretValuePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["secrets"],"summary":"Delete Secret","operationId":"delete_secret_v1_secrets__ext_id___name__delete","parameters":[{"name":"ext_id","in":"path","required":true,"schema":{"type":"string","title":"Ext Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/secrets/{ext_id}/{name}/rotate":{"post":{"tags":["secrets"],"summary":"Rotate Secret","operationId":"rotate_secret_v1_secrets__ext_id___name__rotate_post","parameters":[{"name":"ext_id","in":"path","required":true,"schema":{"type":"string","title":"Ext Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretValuePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/voice/voices":{"get":{"tags":["voice"],"summary":"List Voices","operationId":"list_voices_v1_voice_voices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/VoiceInfo"},"type":"array","title":"Response List Voices V1 Voice Voices Get"}}}}}}},"/v1/voice/stt":{"post":{"tags":["voice"],"summary":"Stt","operationId":"stt_v1_voice_stt_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_stt_v1_voice_stt_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SttResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/voice/speak":{"post":{"tags":["voice"],"summary":"Speak","operationId":"speak_v1_voice_speak_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeakRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/voice/reply-pref":{"get":{"tags":["voice"],"summary":"Get Reply Pref","description":"The user's 'Webbee replies with voice' preference (server-persisted).","operationId":"get_reply_pref_v1_voice_reply_pref_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Reply Pref V1 Voice Reply Pref Get"}}}}}},"put":{"tags":["voice"],"summary":"Put Reply Pref","operationId":"put_reply_pref_v1_voice_reply_pref_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_ReplyPrefReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Put Reply Pref V1 Voice Reply Pref Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/connectors/telegram/webhook":{"post":{"tags":["connectors"],"summary":"Telegram Webhook","operationId":"telegram_webhook_v1_connectors_telegram_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/connectors/telegram/link":{"post":{"tags":["connectors"],"summary":"Telegram Link","operationId":"telegram_link_v1_connectors_telegram_link_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/connectors/telegram/status":{"get":{"tags":["connectors"],"summary":"Telegram Status","description":"Binding status for the current user (panel 'Connect Telegram' UI).","operationId":"telegram_status_v1_connectors_telegram_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/connectors/telegram/unlink":{"post":{"tags":["connectors"],"summary":"Telegram Unlink","operationId":"telegram_unlink_v1_connectors_telegram_unlink_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/healthz":{"get":{"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/readyz":{"get":{"summary":"Readyz","description":"Readiness probe -- unlike /healthz (pure liveness, no deps),\nthis actually pings the default-tenant DB pool + Redis with a short\ntimeout each so a monitor/LB can tell \"process is up\" apart from\n\"process is up but its dependencies are not\". Each check is\nindependently timeboxed and exception-guarded so a slow/dead\ndependency can never hang or crash the probe itself -- worst case\nit reports not-ready in ~1.5s, it never blocks.\nAdded 2026-07-29 during the SigNoz log audit (read-only ask: give\nthe gateway a real readiness route alongside the existing liveness\none).","operationId":"readyz_readyz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"ActionCreateRequest":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"chain_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chain Id"},"parent_task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Task Id"},"user_id":{"type":"string","title":"User Id"},"tenant_id":{"type":"string","title":"Tenant Id","default":"default"},"app_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Id"},"tool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Name"},"action_type":{"type":"string","title":"Action Type"},"intent_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent Type"},"status":{"type":"string","title":"Status"},"message_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Preview"},"result_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Preview"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"tokens_used":{"type":"integer","title":"Tokens Used","default":0},"heartbeat_count":{"type":"integer","title":"Heartbeat Count","default":0},"action_price":{"type":"number","title":"Action Price","default":0},"extension_price":{"type":"number","title":"Extension Price","default":0},"platform_fee":{"type":"number","title":"Platform Fee","default":0},"worker_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worker Id"},"llm_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Provider"},"llm_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Model"},"llm_steps":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Llm Steps"},"llm_total_calls":{"type":"integer","title":"Llm Total Calls","default":0},"llm_total_tokens":{"type":"integer","title":"Llm Total Tokens","default":0},"llm_per_purpose":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Llm Per Purpose"},"llm_total_cost_usd":{"type":"number","title":"Llm Total Cost Usd","default":0.0},"is_byollm_chain":{"type":"boolean","title":"Is Byollm Chain","default":false},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"kernel_local_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kernel Local At"},"pii_redaction_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pii Redaction Level","default":"mask_pii"},"retention_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Retention Class","default":"standard_90d"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity","default":"info"}},"type":"object","required":["trace_id","user_id","action_type","status"],"title":"ActionCreateRequest"},"ActivateTrialRequest":{"properties":{"plan":{"type":"string","title":"Plan"},"period":{"type":"string","title":"Period","default":"monthly"},"payment_method_id":{"type":"string","title":"Payment Method Id","default":""}},"type":"object","required":["plan"],"title":"ActivateTrialRequest","description":"Confirm a card was saved via SetupIntent, then plant the first\nsubscription period WITHOUT charging now (owner design 2026-07-29):\nthe daily renewal sweep bills it for real 30 days later."},"AdminPayoutActionRequest":{"properties":{"note":{"type":"string","maxLength":500,"title":"Note","default":""}},"type":"object","title":"AdminPayoutActionRequest"},"AdminRejectRequest":{"properties":{"reason":{"type":"string","maxLength":500,"minLength":1,"title":"Reason"}},"type":"object","required":["reason"],"title":"AdminRejectRequest"},"AdminTierSetRequest":{"properties":{"user_id":{"type":"string","maxLength":128,"minLength":1,"title":"User Id"},"tier":{"type":"string","pattern":"^(explorer|indie|studio|partner)$","title":"Tier"}},"type":"object","required":["user_id","tier"],"title":"AdminTierSetRequest"},"AgencyResponse":{"properties":{"agency_id":{"type":"string","title":"Agency Id"},"display_name":{"type":"string","title":"Display Name"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"settings":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Settings"},"theme":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Theme"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["agency_id","display_name","created_at"],"title":"AgencyResponse"},"AgencySettingsUpdate":{"properties":{"logo_url":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Logo Url"},"logo_dark_url":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Logo Dark Url"},"compliance_tier":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Compliance Tier"},"retention_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":1.0},{"type":"null"}],"title":"Retention Days"},"extra":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Extra"}},"type":"object","title":"AgencySettingsUpdate","description":"Partial settings update. Only the keys listed are validated + persisted.\n\nUnknown keys are preserved from the existing settings JSON so extensions\ncan stash arbitrary configuration without a schema migration. The keys\nwe explicitly validate:\n\n* ``logo_url``       : optional https:// URL or Panel-relative path.\n* ``logo_dark_url``  : optional; used when the Panel renders in dark mode.\n* ``compliance_tier``: ``standard`` | ``federal`` | ``enterprise``.\n* ``retention_days`` : int 1..3650."},"AgencyTheme":{"properties":{"colors":{"additionalProperties":{"$ref":"#/components/schemas/ColorPair"},"type":"object","title":"Colors"},"density":{"type":"string","enum":["compact","default","spacious"],"title":"Density","default":"default"},"radius":{"type":"string","enum":["sharp","default","rounded"],"title":"Radius","default":"default"}},"additionalProperties":false,"type":"object","title":"AgencyTheme"},"AppCreateRequest":{"properties":{"app_id":{"type":"string","maxLength":64,"minLength":2,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$","title":"App Id"},"display_name":{"type":"string","maxLength":200,"minLength":1,"title":"Display Name"},"description":{"type":"string","maxLength":2000,"title":"Description","default":""},"category":{"type":"string","maxLength":50,"title":"Category","default":"general"},"icon":{"type":"string","maxLength":200,"title":"Icon","default":""},"git_url":{"type":"string","maxLength":500,"minLength":10,"title":"Git Url"},"pricing_model":{"type":"string","pattern":"^(free|per_action|subscription)$","title":"Pricing Model","default":"free"},"pricing_config":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Pricing Config"}},"type":"object","required":["app_id","display_name","git_url"],"title":"AppCreateRequest"},"AppDeleteConfirm":{"properties":{"confirm_name":{"type":"string","maxLength":64,"minLength":1,"title":"Confirm Name"},"force":{"type":"boolean","title":"Force","default":false}},"type":"object","required":["confirm_name"],"title":"AppDeleteConfirm"},"AppMetadataReq":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"short_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Description"}},"type":"object","title":"AppMetadataReq"},"AppResponse":{"properties":{"app_id":{"type":"string","title":"App Id"},"developer_id":{"type":"string","title":"Developer Id"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"short_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Description"},"long_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Long Description"},"category":{"type":"string","title":"Category"},"icon":{"type":"string","title":"Icon"},"git_url":{"type":"string","title":"Git Url"},"status":{"type":"string","title":"Status"},"reject_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reject Reason"},"pricing_model":{"type":"string","title":"Pricing Model"},"pricing_config":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Pricing Config"},"revenue_split_dev":{"type":"integer","title":"Revenue Split Dev"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"manifest_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manifest Json"}},"type":"object","required":["app_id","developer_id","display_name","description","category","icon","git_url","status","reject_reason","pricing_model","pricing_config","revenue_split_dev","created_at","updated_at"],"title":"AppResponse"},"AppStatusReq":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"AppStatusReq"},"AppSubmitResponse":{"properties":{"status":{"type":"string","title":"Status"},"checks":{"items":{"type":"object"},"type":"array","title":"Checks"}},"type":"object","required":["status","checks"],"title":"AppSubmitResponse"},"AppUpdateRequest":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Display Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"short_description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Short Description"},"long_description":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"title":"Long Description"},"category":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Category"},"icon":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Icon"},"git_url":{"anyOf":[{"type":"string","maxLength":500,"minLength":10},{"type":"null"}],"title":"Git Url"},"pricing_model":{"anyOf":[{"type":"string","pattern":"^(free|per_action|subscription)$"},{"type":"null"}],"title":"Pricing Model"},"pricing_config":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Pricing Config"},"revenue_split_dev":{"anyOf":[{"type":"integer","maximum":95.0,"minimum":50.0},{"type":"null"}],"title":"Revenue Split Dev"}},"type":"object","title":"AppUpdateRequest"},"AutoTopUpSettings":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"threshold_pct":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Threshold Pct","default":10},"recharge_tokens":{"type":"integer","exclusiveMinimum":0.0,"title":"Recharge Tokens","default":20000},"recharge_cents":{"type":"integer","exclusiveMinimum":0.0,"title":"Recharge Cents","default":2000},"payment_method_id":{"type":"string","title":"Payment Method Id","default":""}},"type":"object","title":"AutoTopUpSettings"},"AutoTopUpUpdate":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"threshold_pct":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Threshold Pct"},"recharge_tokens":{"type":"integer","exclusiveMinimum":0.0,"title":"Recharge Tokens"},"payment_method_id":{"type":"string","title":"Payment Method Id","default":""}},"type":"object","required":["enabled","threshold_pct","recharge_tokens"],"title":"AutoTopUpUpdate"},"BatchCallItem":{"properties":{"function":{"type":"string","title":"Function"},"params":{"type":"object","title":"Params"}},"type":"object","required":["function"],"title":"BatchCallItem"},"BatchCallRequest":{"properties":{"user_id":{"type":"string","title":"User Id"},"tenant_id":{"type":"string","title":"Tenant Id","default":"default"},"calls":{"items":{"$ref":"#/components/schemas/BatchCallItem"},"type":"array","title":"Calls"}},"type":"object","required":["user_id","calls"],"title":"BatchCallRequest"},"BillingProfile":{"properties":{"country":{"type":"string","maxLength":2,"minLength":2,"title":"Country"},"address_line1":{"type":"string","maxLength":255,"minLength":1,"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line2"},"city":{"type":"string","maxLength":100,"minLength":1,"title":"City"},"postal_code":{"type":"string","maxLength":20,"minLength":1,"title":"Postal Code"},"state":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"State"},"phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Phone"}},"type":"object","required":["country","address_line1","city","postal_code"],"title":"BillingProfile"},"BillingProfileUpdate":{"properties":{"name":{"type":"string","title":"Name","default":""},"company":{"type":"string","title":"Company","default":""},"vat":{"type":"string","title":"Vat","default":""},"country":{"type":"string","title":"Country","default":""}},"type":"object","title":"BillingProfileUpdate"},"Body_stt_v1_voice_stt_post":{"properties":{"audio":{"type":"string","format":"binary","title":"Audio"}},"type":"object","required":["audio"],"title":"Body_stt_v1_voice_stt_post"},"BusinessProfile":{"properties":{"company_name":{"type":"string","maxLength":200,"minLength":1,"title":"Company Name"},"tax_id_type":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Tax Id Type"},"tax_id_value":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Tax Id Value"}},"type":"object","required":["company_name"],"title":"BusinessProfile"},"CallRequest":{"properties":{"user_id":{"type":"string","title":"User Id"},"tenant_id":{"type":"string","title":"Tenant Id","default":"default"},"function":{"type":"string","title":"Function","description":"@chat.function name"},"params":{"type":"object","title":"Params"}},"type":"object","required":["user_id","function"],"title":"CallRequest"},"CallResponse":{"properties":{"status":{"type":"string","title":"Status"},"data":{"title":"Data"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"ui":{"title":"Ui"}},"type":"object","required":["status"],"title":"CallResponse"},"ChangePasswordRequest":{"properties":{"current_password":{"type":"string","title":"Current Password"},"new_password":{"type":"string","maxLength":128,"minLength":8,"title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePasswordRequest"},"ChangePlanRequest":{"properties":{"plan_id":{"type":"string","title":"Plan Id"},"period":{"type":"string","title":"Period","default":"monthly"},"purchase_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purchase Key"}},"type":"object","required":["plan_id"],"title":"ChangePlanRequest"},"CheckoutConfirmRequest":{"properties":{"payment_intent_id":{"type":"string","title":"Payment Intent Id"}},"type":"object","required":["payment_intent_id"],"title":"CheckoutConfirmRequest"},"CheckoutRequest":{"properties":{"plan":{"type":"string","title":"Plan"},"period":{"type":"string","title":"Period","default":"monthly"},"purchase_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purchase Key"}},"type":"object","required":["plan"],"title":"CheckoutRequest"},"CliCodeRequest":{"properties":{"redirect_uri":{"type":"string","title":"Redirect Uri"},"state":{"type":"string","title":"State"},"code_challenge":{"type":"string","title":"Code Challenge"}},"type":"object","required":["redirect_uri","state","code_challenge"],"title":"CliCodeRequest"},"CliCodeResponse":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"CliCodeResponse"},"CliTokenRequest":{"properties":{"code":{"type":"string","title":"Code"},"code_verifier":{"type":"string","title":"Code Verifier"},"redirect_uri":{"type":"string","title":"Redirect Uri"}},"type":"object","required":["code","code_verifier","redirect_uri"],"title":"CliTokenRequest"},"CodeImpact":{"properties":{"repo_key":{"type":"string","pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]{0,199}$","title":"Repo Key"},"symbols":{"items":{"type":"string"},"type":"array","maxItems":200,"title":"Symbols"},"paths":{"items":{"type":"string"},"type":"array","maxItems":200,"title":"Paths"},"depth":{"type":"integer","maximum":6.0,"minimum":1.0,"title":"Depth","default":2}},"type":"object","required":["repo_key"],"title":"CodeImpact"},"CodeSlice":{"properties":{"repo_key":{"type":"string","pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]{0,199}$","title":"Repo Key"},"symbols":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Symbols"},"depth":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Depth","default":1}},"type":"object","required":["repo_key"],"title":"CodeSlice"},"CodeSyncApply":{"properties":{"files":{"items":{"type":"object"},"type":"array","maxItems":25000,"title":"Files"},"blobs":{"items":{"type":"object"},"type":"array","maxItems":5000,"title":"Blobs"},"removed":{"items":{"type":"string"},"type":"array","maxItems":25000,"title":"Removed"},"configs":{"items":{"type":"object"},"type":"array","maxItems":200,"title":"Configs"},"chunks":{"items":{"type":"object"},"type":"array","maxItems":100000,"title":"Chunks"},"measured":{"items":{"type":"object"},"type":"array","maxItems":20000,"title":"Measured"},"meta":{"type":"object","title":"Meta"}},"type":"object","title":"CodeSyncApply"},"CodeSyncPlan":{"properties":{"listing":{"items":{"type":"object"},"type":"array","maxItems":25000,"title":"Listing"},"meta":{"type":"object","title":"Meta"}},"type":"object","title":"CodeSyncPlan"},"ColorPair":{"properties":{"light":{"type":"string","pattern":"^(#[0-9a-fA-F]{6}|rgb\\([^)]+\\)|oklch\\([^)]+\\))$","title":"Light"},"dark":{"type":"string","pattern":"^(#[0-9a-fA-F]{6}|rgb\\([^)]+\\)|oklch\\([^)]+\\))$","title":"Dark"}},"additionalProperties":false,"type":"object","required":["light","dark"],"title":"ColorPair"},"ConnectionCreate":{"properties":{"kind":{"type":"string","const":"ssh","title":"Kind","default":"ssh"},"endpoint":{"type":"string","maxLength":255,"title":"Endpoint"},"label":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Label"},"username":{"type":"string","maxLength":64,"title":"Username"},"auth_mode":{"type":"string","enum":["key","password"],"title":"Auth Mode","default":"key"},"private_key":{"anyOf":[{"type":"string","maxLength":16384},{"type":"null"}],"title":"Private Key"},"password":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Password"}},"type":"object","required":["endpoint","username"],"title":"ConnectionCreate"},"ConnectionListResponse":{"properties":{"connections":{"items":{"$ref":"#/components/schemas/ConnectionPublic"},"type":"array","title":"Connections"}},"type":"object","required":["connections"],"title":"ConnectionListResponse"},"ConnectionPublic":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","title":"Kind"},"endpoint":{"type":"string","title":"Endpoint"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"status":{"type":"string","title":"Status"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_ok_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Ok At"}},"type":"object","required":["id","kind","endpoint","label","status","username","created_at","last_ok_at"],"title":"ConnectionPublic"},"ConnectionTestResult":{"properties":{"ok":{"type":"boolean","title":"Ok"},"detail":{"type":"string","title":"Detail","default":""}},"type":"object","required":["ok"],"title":"ConnectionTestResult"},"CreateAgencyRequest":{"properties":{"agency_id":{"type":"string","maxLength":50,"minLength":3,"title":"Agency Id"},"display_name":{"type":"string","maxLength":255,"minLength":1,"title":"Display Name"},"domain":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Domain"},"settings":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Settings"}},"type":"object","required":["agency_id","display_name"],"title":"CreateAgencyRequest"},"CreateKeyRequest":{"properties":{"name":{"type":"string","title":"Name"},"scopes":{"type":"string","title":"Scopes","default":"*"}},"type":"object","required":["name"],"title":"CreateKeyRequest"},"CreateRoleRequest":{"properties":{"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name","default":""},"default_scopes":{"items":{"type":"string"},"type":"array","title":"Default Scopes","default":[]},"default_attributes":{"type":"object","title":"Default Attributes","default":{}},"default_extensions":{"items":{"type":"string"},"type":"array","title":"Default Extensions","default":[]},"confirmation_policy":{"type":"string","title":"Confirmation Policy","default":"default_off"},"max_concurrent_tasks":{"type":"integer","title":"Max Concurrent Tasks","default":3},"monthly_action_limit":{"type":"integer","title":"Monthly Action Limit","default":500},"context_window":{"type":"integer","title":"Context Window","default":20}},"type":"object","required":["name"],"title":"CreateRoleRequest"},"CreateTenantRequest":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"name":{"type":"string","title":"Name"},"db_backend":{"type":"string","title":"Db Backend","default":"mariadb"},"db_config":{"$ref":"#/components/schemas/TenantDBConfig"},"isolation":{"type":"string","title":"Isolation","default":"dedicated"},"allowed_auth_methods":{"type":"string","title":"Allowed Auth Methods","default":"email,api_key"},"max_connections":{"type":"integer","title":"Max Connections","default":10},"features":{"type":"object","title":"Features","default":{}},"parent_tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Tenant Id"}},"type":"object","required":["tenant_id","name","db_config"],"title":"CreateTenantRequest"},"CreateUserRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"},"role":{"type":"string","title":"Role","default":"user"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"attributes":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Attributes"},"agency_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agency Id"}},"type":"object","required":["email","password"],"title":"CreateUserRequest"},"DeployRecordRequest":{"properties":{"commit_sha":{"type":"string","title":"Commit Sha"},"status":{"type":"string","title":"Status","default":"success"},"error_message":{"type":"string","title":"Error Message","default":""}},"type":"object","required":["commit_sha"],"title":"DeployRecordRequest"},"DeveloperProfileResponse":{"properties":{"imperal_id":{"type":"string","title":"Imperal Id"},"email":{"type":"string","title":"Email"},"nickname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nickname"},"tier":{"type":"string","title":"Tier"},"apps_count":{"type":"integer","title":"Apps Count"},"total_earnings":{"type":"integer","title":"Total Earnings"},"registered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registered At"}},"type":"object","required":["imperal_id","email","nickname","tier","apps_count","total_earnings","registered_at"],"title":"DeveloperProfileResponse"},"DeveloperRegisterRequest":{"properties":{"tier":{"type":"string","pattern":"^(explorer|indie|studio|partner)$","title":"Tier","default":"explorer"},"nickname":{"type":"string","maxLength":30,"minLength":3,"pattern":"^[a-z0-9][a-z0-9_-]{1,28}[a-z0-9]$","title":"Nickname"}},"type":"object","required":["nickname"],"title":"DeveloperRegisterRequest"},"DeviceApproveRequest":{"properties":{"user_code":{"type":"string","title":"User Code"}},"type":"object","required":["user_code"],"title":"DeviceApproveRequest"},"DeviceAuthorizeRequest":{"properties":{"code_challenge":{"type":"string","title":"Code Challenge"},"code_challenge_method":{"type":"string","title":"Code Challenge Method","default":"S256"}},"type":"object","required":["code_challenge"],"title":"DeviceAuthorizeRequest"},"DeviceAuthorizeResponse":{"properties":{"device_code":{"type":"string","title":"Device Code"},"user_code":{"type":"string","title":"User Code"},"verification_uri":{"type":"string","title":"Verification Uri"},"verification_uri_complete":{"type":"string","title":"Verification Uri Complete"},"expires_in":{"type":"integer","title":"Expires In"},"interval":{"type":"integer","title":"Interval"}},"type":"object","required":["device_code","user_code","verification_uri","verification_uri_complete","expires_in","interval"],"title":"DeviceAuthorizeResponse"},"DeviceTokenRequest":{"properties":{"device_code":{"type":"string","title":"Device Code"},"code_verifier":{"type":"string","title":"Code Verifier"}},"type":"object","required":["device_code","code_verifier"],"title":"DeviceTokenRequest"},"DisableBody":{"properties":{"app_id":{"type":"string","title":"App Id"}},"type":"object","required":["app_id"],"title":"DisableBody"},"DropRequest":{"properties":{"steer_iid":{"type":"string","title":"Steer Iid"}},"type":"object","required":["steer_iid"],"title":"DropRequest","description":"Withdraw a still-queued task by the handle /inject handed back."},"EarningsByAppResponse":{"properties":{"app_id":{"type":"string","title":"App Id"},"total_earnings":{"type":"integer","title":"Total Earnings"},"action_count":{"type":"integer","title":"Action Count"},"by_period":{"items":{"type":"object"},"type":"array","title":"By Period"}},"type":"object","required":["app_id","total_earnings","action_count","by_period"],"title":"EarningsByAppResponse"},"EarningsResponse":{"properties":{"total_earnings":{"type":"integer","title":"Total Earnings"},"total_platform_share":{"type":"integer","title":"Total Platform Share"},"pending_payout":{"type":"integer","title":"Pending Payout"},"paid_out":{"type":"integer","title":"Paid Out"}},"type":"object","required":["total_earnings","total_platform_share","pending_payout","paid_out"],"title":"EarningsResponse"},"Facts":{"properties":{"facts":{"items":{"type":"object"},"type":"array","maxItems":500,"title":"Facts"}},"type":"object","required":["facts"],"title":"Facts"},"Forget":{"properties":{"what":{"type":"string","enum":["place","conversation","law","evidence","reality","skeleton","graph","all"],"title":"What"},"key":{"type":"string","maxLength":240,"title":"Key","default":""},"project_id":{"type":"string","maxLength":240,"title":"Project Id","default":""}},"type":"object","required":["what"],"title":"Forget"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"tenant_id":{"type":"string","title":"Tenant Id","default":"default"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"FrameFinalIn":{"properties":{"session_id":{"type":"string","pattern":"^mcp-[A-Za-z0-9_.:-]{1,160}$","title":"Session Id"},"final_text":{"type":"string","maxLength":20000,"title":"Final Text","default":""},"step":{"type":"integer","minimum":0.0,"title":"Step","default":0},"repo_key":{"type":"string","pattern":"^$|^[A-Za-z0-9_-][A-Za-z0-9._-]{0,199}$","title":"Repo Key","default":""},"session_repo":{"type":"string","pattern":"^$|^[A-Za-z0-9_-][A-Za-z0-9._-]{0,199}$","title":"Session Repo","default":""},"tools":{"items":{"type":"string"},"type":"array","maxItems":200,"title":"Tools"},"withheld_seen":{"anyOf":[{"items":{"type":"string","maxLength":120},"type":"array","maxItems":400},{"type":"null"}],"title":"Withheld Seen"}},"type":"object","required":["session_id"],"title":"FrameFinalIn","description":"An external agent's final, asked about before it reaches the user (free): held while its plan has work left."},"FrameIn":{"properties":{"session_id":{"type":"string","pattern":"^mcp-[A-Za-z0-9_.:-]{1,160}$","title":"Session Id"},"step":{"type":"integer","minimum":0.0,"title":"Step","default":0},"goal":{"type":"string","maxLength":4000,"title":"Goal","default":""},"items":{"items":{"type":"object"},"type":"array","maxItems":50,"title":"Items"},"exchange":{"items":{"type":"object"},"type":"array","maxItems":60,"title":"Exchange"},"cwd":{"type":"string","maxLength":1024,"title":"Cwd","default":""},"repo_root":{"type":"string","maxLength":1024,"title":"Repo Root","default":""},"repo_key":{"type":"string","pattern":"^$|^[A-Za-z0-9_-][A-Za-z0-9._-]{0,199}$","title":"Repo Key","default":""},"memory":{"items":{"$ref":"#/components/schemas/StepMemory"},"type":"array","maxItems":20,"title":"Memory"},"calls":{"items":{"type":"object"},"type":"array","maxItems":60,"title":"Calls"},"session_repo":{"type":"string","pattern":"^$|^[A-Za-z0-9_-][A-Za-z0-9._-]{0,199}$","title":"Session Repo","default":""},"budget":{"type":"integer","maximum":200000.0,"minimum":0.0,"title":"Budget","default":0}},"type":"object","required":["session_id"],"title":"FrameIn","description":"One external step: the caller's own mcp session, what it was asked, its plan and what it did since the\nlast frame. No user_id: the session belongs to the acting caller (its id is ``mcp-<caller>-<key>``), so no body\ncan name somebody else's."},"FrameLensIn":{"properties":{"session_id":{"type":"string","pattern":"^mcp-[A-Za-z0-9_.:-]{1,160}$","title":"Session Id"},"tool":{"type":"string","enum":["state_lens","recall","vault_log_read","search_history","live_sessions","message_session"],"title":"Tool"},"args":{"type":"object","title":"Args"},"session_repo":{"type":"string","pattern":"^$|^[A-Za-z0-9_-][A-Za-z0-9._-]{0,199}$","title":"Session Repo","default":""}},"type":"object","required":["session_id","tool"],"title":"FrameLensIn","description":"One pointer the frame gave the agent (a counted line, a past answer, an offloaded output), for its own session."},"FrameRecordIn":{"properties":{"session_id":{"type":"string","pattern":"^mcp-[A-Za-z0-9_.:-]{1,160}$","title":"Session Id"},"step":{"type":"integer","minimum":0.0,"title":"Step","default":0},"goal":{"type":"string","maxLength":4000,"title":"Goal","default":""},"items":{"items":{"type":"object"},"type":"array","maxItems":50,"title":"Items"},"exchange":{"items":{"type":"object"},"type":"array","maxItems":60,"title":"Exchange"},"memory":{"items":{"$ref":"#/components/schemas/StepMemory"},"type":"array","maxItems":20,"title":"Memory"},"calls":{"items":{"type":"object"},"type":"array","maxItems":60,"title":"Calls"},"repo_key":{"type":"string","pattern":"^$|^[A-Za-z0-9_-][A-Za-z0-9._-]{0,199}$","title":"Repo Key","default":""},"session_repo":{"type":"string","pattern":"^$|^[A-Za-z0-9_-][A-Za-z0-9._-]{0,199}$","title":"Session Repo","default":""}},"type":"object","required":["session_id"],"title":"FrameRecordIn","description":"One external step written to the vault without a frame (free): its results, its memory, its calls."},"GuestChatRequest":{"properties":{"message":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Message"},"messages":{"items":{"type":"object"},"type":"array","maxItems":20,"title":"Messages"},"session_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Session Id"},"guest_token":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Guest Token"},"wait":{"type":"boolean","title":"Wait","default":true},"pow":{"anyOf":[{"$ref":"#/components/schemas/GuestPowSolution"},{"type":"null"}]}},"type":"object","title":"GuestChatRequest"},"GuestPowSolution":{"properties":{"challenge":{"type":"string","maxLength":200,"title":"Challenge"},"nonce":{"type":"string","maxLength":16,"title":"Nonce"}},"type":"object","required":["challenge","nonce"],"title":"GuestPowSolution","description":"A solved proof of work (app/chat/guest_pow.py): the price of a new guest session."},"GuestSessionRequest":{"properties":{"pow":{"anyOf":[{"$ref":"#/components/schemas/GuestPowSolution"},{"type":"null"}]}},"type":"object","title":"GuestSessionRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InjectRequest":{"properties":{"text":{"type":"string","title":"Text"},"steer_iid":{"type":"string","title":"Steer Iid","default":""}},"type":"object","required":["text"],"title":"InjectRequest"},"KeyListItem":{"properties":{"id":{"type":"string","title":"Id"},"key_prefix":{"type":"string","title":"Key Prefix"},"name":{"type":"string","title":"Name"},"scopes":{"type":"string","title":"Scopes"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","key_prefix","name","scopes","last_used_at","created_at"],"title":"KeyListItem"},"KeyResponse":{"properties":{"id":{"type":"string","title":"Id"},"key":{"type":"string","title":"Key"},"key_prefix":{"type":"string","title":"Key Prefix"},"name":{"type":"string","title":"Name"},"scopes":{"type":"string","title":"Scopes"},"created_at":{"type":"string","title":"Created At"},"notice":{"type":"string","title":"Notice","default":"This API key is not yet active for inbound authentication (coming in a later phase). Authenticate with OAuth (`imperal-mcp login`) or your panel session for now."}},"type":"object","required":["id","key","key_prefix","name","scopes","created_at"],"title":"KeyResponse"},"LedgerEntry":{"properties":{"id":{"type":"integer","title":"Id"},"transaction_id":{"type":"string","title":"Transaction Id"},"amount":{"type":"integer","title":"Amount"},"reason":{"type":"string","title":"Reason"},"app_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","transaction_id","amount","reason"],"title":"LedgerEntry"},"LimitsResponse":{"properties":{"plan":{"type":"string","title":"Plan"},"usage":{"additionalProperties":{"type":"integer"},"type":"object","title":"Usage"},"limits":{"additionalProperties":{"type":"integer"},"type":"object","title":"Limits"},"exceeded":{"items":{"type":"string"},"type":"array","title":"Exceeded"}},"type":"object","required":["plan","usage","limits","exceeded"],"title":"LimitsResponse"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"tenant_id":{"type":"string","title":"Tenant Id","default":"default"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"MessageResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"MessageResponse"},"ModeRequest":{"properties":{"mode":{"type":"string","enum":["default","plan","autopilot"],"title":"Mode"}},"type":"object","required":["mode"],"title":"ModeRequest"},"NewConversation":{"properties":{"title":{"type":"string","maxLength":200,"title":"Title","default":""},"primary_surface":{"type":"string","maxLength":50,"title":"Primary Surface","default":"web-panel"}},"type":"object","title":"NewConversation"},"NicknameBody":{"properties":{"nickname":{"type":"string","title":"Nickname"}},"type":"object","required":["nickname"],"title":"NicknameBody"},"OperateRequest":{"properties":{"user_id":{"type":"string","title":"User Id"},"tenant_id":{"type":"string","title":"Tenant Id","default":"default"},"function":{"type":"string","title":"Function","description":"the write/destructive tool name"},"params":{"type":"object","title":"Params"},"confirmation_bypassed":{"type":"boolean","title":"Confirmation Bypassed","default":false}},"type":"object","required":["user_id","function"],"title":"OperateRequest"},"PatchConversation":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"pinned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pinned"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived"}},"type":"object","title":"PatchConversation","description":"Only the fields a user may change by hand.\n\n`title_generated` is deliberately absent: it is storage bookkeeping, and\na client that could set it would be able to suppress auto-naming for a\nthread the user never named -- an \"Untitled\" row forever."},"PaymentHistoryItem":{"properties":{"payment_intent_id":{"type":"string","title":"Payment Intent Id"},"amount_cents":{"type":"integer","title":"Amount Cents"},"currency":{"type":"string","title":"Currency","default":"usd"},"tokens":{"type":"integer","title":"Tokens","default":0},"status":{"type":"string","title":"Status"},"type":{"type":"string","title":"Type","default":""},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"receipt_url":{"type":"string","title":"Receipt Url","default":""}},"type":"object","required":["payment_intent_id","amount_cents","status"],"title":"PaymentHistoryItem"},"PaymentMethodItem":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type"},"brand":{"type":"string","title":"Brand","default":""},"last4":{"type":"string","title":"Last4","default":""},"exp_month":{"type":"integer","title":"Exp Month","default":0},"exp_year":{"type":"integer","title":"Exp Year","default":0},"is_default":{"type":"boolean","title":"Is Default","default":false}},"type":"object","required":["id","type"],"title":"PaymentMethodItem"},"PayoutRequestCreate":{"properties":{"amount_tokens":{"type":"integer","minimum":10000.0,"title":"Amount Tokens"}},"type":"object","required":["amount_tokens"],"title":"PayoutRequestCreate"},"PayoutResponse":{"properties":{"id":{"type":"integer","title":"Id"},"developer_id":{"type":"string","title":"Developer Id"},"amount_tokens":{"type":"integer","title":"Amount Tokens"},"amount_usd":{"type":"string","title":"Amount Usd"},"status":{"type":"string","title":"Status"},"method":{"type":"string","title":"Method"},"admin_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Note"},"requested_at":{"type":"string","title":"Requested At"},"processed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processed At"}},"type":"object","required":["id","developer_id","amount_tokens","amount_usd","status","method","admin_note","requested_at","processed_at"],"title":"PayoutResponse"},"PlanResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"price":{"type":"number","title":"Price"},"interval":{"type":"string","title":"Interval"},"features":{"type":"object","title":"Features"},"limits":{"type":"object","title":"Limits"}},"type":"object","required":["id","name","price","interval","features","limits"],"title":"PlanResponse"},"PortalSessionResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"PortalSessionResponse"},"RefreshRequest":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"RefreshRequest"},"RegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"},"tenant_id":{"type":"string","title":"Tenant Id","default":"default"}},"type":"object","required":["email","password"],"title":"RegisterRequest"},"RegisterSessionRequest":{"properties":{"surface":{"type":"string","title":"Surface","default":"web"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"},"ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip"}},"type":"object","title":"RegisterSessionRequest"},"RemoteRequest":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"mirror":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mirror"},"steer":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Steer"}},"type":"object","title":"RemoteRequest"},"RepoMemory":{"properties":{"repo_key":{"type":"string","pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]{0,199}$","title":"Repo Key"},"entries":{"items":{"type":"object"},"type":"array","maxItems":500,"title":"Entries"},"if_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"If Version"}},"type":"object","required":["repo_key"],"title":"RepoMemory"},"ResendVerificationRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"tenant_id":{"type":"string","title":"Tenant Id","default":"default"}},"type":"object","required":["email"],"title":"ResendVerificationRequest"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","maxLength":128,"minLength":10,"title":"Token"},"new_password":{"type":"string","maxLength":128,"minLength":8,"title":"New Password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordRequest"},"ResultRequest":{"properties":{"req_id":{"type":"string","title":"Req Id"},"result":{"type":"object","title":"Result"}},"type":"object","required":["req_id"],"title":"ResultRequest"},"ReviewCreate":{"properties":{"rating":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Rating"},"title":{"type":"string","maxLength":200,"title":"Title","default":""},"body":{"type":"string","maxLength":5000,"minLength":20,"title":"Body"}},"type":"object","required":["rating","body"],"title":"ReviewCreate"},"ReviewUpdate":{"properties":{"rating":{"anyOf":[{"type":"integer","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"Rating"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"body":{"anyOf":[{"type":"string","maxLength":5000,"minLength":20},{"type":"null"}],"title":"Body"}},"type":"object","title":"ReviewUpdate"},"ReviewVoteRequest":{"properties":{"helpful":{"type":"boolean","title":"Helpful","default":true}},"type":"object","title":"ReviewVoteRequest"},"RoleResponse":{"properties":{"id":{"type":"string","title":"Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"default_scopes":{"items":{},"type":"array","title":"Default Scopes"},"default_attributes":{"type":"object","title":"Default Attributes"},"default_extensions":{"items":{},"type":"array","title":"Default Extensions"},"confirmation_policy":{"type":"string","title":"Confirmation Policy"},"max_concurrent_tasks":{"type":"integer","title":"Max Concurrent Tasks"},"monthly_action_limit":{"type":"integer","title":"Monthly Action Limit"},"context_window":{"type":"integer","title":"Context Window"},"is_system":{"type":"boolean","title":"Is System"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","tenant_id","name","display_name","default_scopes","default_attributes","default_extensions","confirmation_policy","max_concurrent_tasks","monthly_action_limit","context_window","is_system","created_at"],"title":"RoleResponse"},"RuleCreateRequest":{"properties":{"prompt":{"type":"string","title":"Prompt"},"cooldown_seconds":{"type":"integer","title":"Cooldown Seconds","default":60},"max_per_hour":{"type":"integer","title":"Max Per Hour","default":10},"max_iterations":{"type":"integer","title":"Max Iterations","default":0}},"type":"object","required":["prompt"],"title":"RuleCreateRequest","description":"Public endpoint (JWT auth) — Panel sends just prompt."},"ScopeCreate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"resource":{"type":"string","title":"Resource"},"action":{"type":"string","title":"Action"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"source":{"type":"string","title":"Source","default":"tenant"},"source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id"},"tenant_id":{"type":"string","title":"Tenant Id","default":"_platform_"}},"type":"object","required":["resource","action"],"title":"ScopeCreate"},"ScopeUpdate":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"ScopeUpdate"},"SecretValuePayload":{"properties":{"value":{"type":"string","maxLength":65536,"minLength":1,"title":"Value"}},"type":"object","required":["value"],"title":"SecretValuePayload"},"SendRequest":{"properties":{"text":{"type":"string","maxLength":500000,"minLength":1,"title":"Text"},"surface":{"type":"string","title":"Surface","default":"ios-phone"},"ext_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,128}$"},{"type":"null"}],"title":"Ext Id"},"attachments":{"items":{"type":"object"},"type":"array","maxItems":20,"title":"Attachments"}},"type":"object","required":["text"],"title":"SendRequest"},"SessionIdResponse":{"properties":{"session_id":{"type":"string","title":"Session Id"}},"type":"object","required":["session_id"],"title":"SessionIdResponse"},"SessionInfo":{"properties":{"session_id":{"type":"string","title":"Session Id"},"surface":{"type":"string","title":"Surface"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"started_at":{"type":"string","title":"Started At"},"last_seen_at":{"type":"string","title":"Last Seen At"},"current":{"type":"boolean","title":"Current","default":false}},"type":"object","required":["session_id","surface","started_at","last_seen_at"],"title":"SessionInfo"},"SessionListResponse":{"properties":{"sessions":{"items":{"$ref":"#/components/schemas/SessionInfo"},"type":"array","title":"Sessions"}},"type":"object","required":["sessions"],"title":"SessionListResponse"},"SessionValidResponse":{"properties":{"valid":{"type":"boolean","title":"Valid"}},"type":"object","required":["valid"],"title":"SessionValidResponse"},"SetCasesUidRequest":{"properties":{"cases_user_id":{"type":"string","title":"Cases User Id"}},"type":"object","required":["cases_user_id"],"title":"SetCasesUidRequest","description":"PATCH /v1/auth/users/{id}/cases-uid"},"SetupResponse":{"properties":{"client_secret":{"type":"string","title":"Client Secret"},"publishable_key":{"type":"string","title":"Publishable Key"}},"type":"object","required":["client_secret","publishable_key"],"title":"SetupResponse"},"SignalEmitRequest":{"properties":{"key":{"type":"string","title":"Key"},"value":{"title":"Value"},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["key","value"],"title":"SignalEmitRequest"},"SignupRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"},"full_name":{"type":"string","maxLength":200,"minLength":1,"title":"Full Name"},"nickname":{"type":"string","maxLength":64,"minLength":1,"title":"Nickname"},"account_type":{"type":"string","enum":["personal","business"],"title":"Account Type"},"billing":{"$ref":"#/components/schemas/BillingProfile"},"business":{"anyOf":[{"$ref":"#/components/schemas/BusinessProfile"},{"type":"null"}]},"tenant_id":{"type":"string","title":"Tenant Id","default":"default"},"plan":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Plan"}},"type":"object","required":["email","password","full_name","nickname","account_type","billing"],"title":"SignupRequest"},"SignupResponse":{"properties":{"imperal_id":{"type":"string","title":"Imperal Id"},"email":{"type":"string","format":"email","title":"Email"},"email_verified":{"type":"boolean","title":"Email Verified"},"message":{"type":"string","title":"Message"},"status_token":{"type":"string","title":"Status Token"}},"type":"object","required":["imperal_id","email","email_verified","message","status_token"],"title":"SignupResponse"},"SpeakRequest":{"properties":{"message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Id"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"voice":{"type":"string","maxLength":40,"title":"Voice","default":"alloy"}},"type":"object","title":"SpeakRequest"},"StartRequest":{"properties":{"user_id":{"type":"string","title":"User Id"},"task":{"type":"string","title":"Task"},"coding_context":{"type":"object","title":"Coding Context"},"marathon":{"type":"boolean","title":"Marathon","default":false},"goal":{"type":"string","title":"Goal","default":""},"surface":{"type":"string","title":"Surface","default":"terminal"},"steer_iid":{"type":"string","title":"Steer Iid","default":""},"slot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slot"}},"type":"object","required":["user_id","task"],"title":"StartRequest"},"SteerConversation":{"properties":{"text":{"type":"string","maxLength":10000,"minLength":1,"title":"Text"}},"type":"object","required":["text"],"title":"SteerConversation","description":"Instruction injected into an active terminal coding session."},"StepMemory":{"properties":{"kind":{"type":"string","enum":["user_request","reasoning","final","action"],"title":"Kind"},"content":{"type":"string","maxLength":4000,"title":"Content"},"call_thoughts":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":60},{"type":"null"}],"title":"Call Thoughts"}},"type":"object","required":["kind","content"],"title":"StepMemory","description":"One turn-memory entry of an external step (memory plan Task 2): the user's request, the agent's thought (one\nslot per call in ``call_thoughts``), its answer."},"StopRequest":{"properties":{"assistant_message_id":{"type":"string","maxLength":128,"minLength":1,"title":"Assistant Message Id"}},"type":"object","required":["assistant_message_id"],"title":"StopRequest"},"SttResponse":{"properties":{"text":{"type":"string","title":"Text"},"lang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"},"duration_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration S"}},"type":"object","required":["text"],"title":"SttResponse"},"SubscribeRequest":{"properties":{"plan_id":{"type":"string","title":"Plan Id"},"period":{"type":"string","title":"Period","default":"monthly"}},"type":"object","required":["plan_id"],"title":"SubscribeRequest"},"SubscriptionResponse":{"properties":{"plan":{"type":"string","title":"Plan"},"status":{"type":"string","title":"Status"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End","default":false},"billing_mode":{"type":"string","title":"Billing Mode","default":"card"},"card_required":{"type":"boolean","title":"Card Required","default":false},"contract_amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contract Amount Cents"},"billing_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Note"}},"type":"object","required":["plan","status","started_at","expires_at"],"title":"SubscriptionResponse"},"TenantDBConfig":{"properties":{"host":{"type":"string","title":"Host"},"port":{"type":"integer","title":"Port","default":3306},"database":{"type":"string","title":"Database"},"username":{"type":"string","title":"Username"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"}},"type":"object","required":["host","database","username"],"title":"TenantDBConfig","description":"Where a tenant's data lives. No password: the credential comes only from Vault\n(app/tenants/pool_manager.with_vault_credentials), so a stored copy can never go stale."},"TenantHealthResponse":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"db_backend":{"type":"string","title":"Db Backend"},"healthy":{"type":"boolean","title":"Healthy"},"message":{"type":"string","title":"Message"}},"type":"object","required":["tenant_id","db_backend","healthy","message"],"title":"TenantHealthResponse"},"TenantResponse":{"properties":{"id":{"type":"string","title":"Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"name":{"type":"string","title":"Name"},"db_backend":{"type":"string","title":"Db Backend"},"isolation":{"type":"string","title":"Isolation"},"allowed_auth_methods":{"type":"string","title":"Allowed Auth Methods"},"max_connections":{"type":"integer","title":"Max Connections"},"features":{"type":"object","title":"Features","default":{}},"is_active":{"type":"boolean","title":"Is Active","default":true},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"parent_tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Tenant Id"},"can_resell":{"type":"boolean","title":"Can Resell","default":false},"custom_pricing":{"type":"object","title":"Custom Pricing","default":{}},"ui_config":{"type":"object","title":"Ui Config","default":{}}},"additionalProperties":false,"type":"object","required":["id","tenant_id","name","db_backend","isolation","allowed_auth_methods","max_connections","created_at","updated_at"],"title":"TenantResponse","description":"OpenAPI alias of imperal_sdk.types.identity.Tenant (W1, 2026-04-27)."},"TestOptions":{"properties":{"accept_new_host_key":{"type":"boolean","title":"Accept New Host Key","default":false}},"type":"object","title":"TestOptions"},"TierUpdateRequest":{"properties":{"tier":{"type":"string","pattern":"^(explorer|indie|studio|partner)$","title":"Tier"}},"type":"object","required":["tier"],"title":"TierUpdateRequest"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["access_token","refresh_token","expires_in"],"title":"TokenResponse"},"TopUpConfigResponse":{"properties":{"publishable_key":{"type":"string","title":"Publishable Key"},"tiers":{"items":{"type":"object"},"type":"array","title":"Tiers"},"custom_min_cents":{"type":"integer","title":"Custom Min Cents"},"custom_max_cents":{"type":"integer","title":"Custom Max Cents"},"token_rate":{"type":"integer","title":"Token Rate"}},"type":"object","required":["publishable_key","tiers","custom_min_cents","custom_max_cents","token_rate"],"title":"TopUpConfigResponse"},"TopUpConfirmRequest":{"properties":{"payment_intent_id":{"type":"string","title":"Payment Intent Id"}},"type":"object","required":["payment_intent_id"],"title":"TopUpConfirmRequest"},"TopUpRequest":{"properties":{"tokens":{"type":"integer","exclusiveMinimum":0.0,"title":"Tokens","description":"Number of tokens to purchase"},"price_cents":{"type":"integer","exclusiveMinimum":0.0,"title":"Price Cents","description":"Price in cents (USD)"},"save_payment_method":{"type":"boolean","title":"Save Payment Method","default":false},"off_session":{"type":"boolean","title":"Off Session","default":false},"purchase_key":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Purchase Key"}},"type":"object","required":["tokens","price_cents"],"title":"TopUpRequest"},"TopUpResponse":{"properties":{"client_secret":{"type":"string","title":"Client Secret"},"payment_intent_id":{"type":"string","title":"Payment Intent Id"},"publishable_key":{"type":"string","title":"Publishable Key"},"succeeded":{"type":"boolean","title":"Succeeded","default":false},"requires_action":{"type":"boolean","title":"Requires Action","default":false}},"type":"object","required":["client_secret","payment_intent_id","publishable_key"],"title":"TopUpResponse"},"UpdateRoleRequest":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"default_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Default Scopes"},"default_attributes":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Default Attributes"},"default_extensions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Default Extensions"},"confirmation_policy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirmation Policy"},"max_concurrent_tasks":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Concurrent Tasks"},"monthly_action_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Monthly Action Limit"},"context_window":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Window"}},"type":"object","title":"UpdateRoleRequest"},"UpdateSettingsRequest":{"properties":{"confirmation_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Confirmation Enabled"},"confirmation_actions":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Confirmation Actions"},"confirmation_overrides":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Confirmation Overrides"},"kav_max_retries":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kav Max Retries"},"confirmation_ttl":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Confirmation Ttl"},"routing_context":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Routing Context"},"max_tool_rounds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tool Rounds"},"max_response_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Response Tokens"},"narration_history_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Narration History Limit"},"confirmation_card_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Confirmation Card Tokens"},"judge_digest_chars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Judge Digest Chars"},"planner_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Planner Max Tokens"},"chain_prior_step_max_chars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chain Prior Step Max Chars"},"chain_prior_total_max_chars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chain Prior Total Max Chars"},"hub_dispatch_max_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hub Dispatch Max Depth"},"structured_gen_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Structured Gen Max Tokens"},"automation_main_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Automation Main Max Tokens"},"automation_condition_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Automation Condition Max Tokens"},"intent_classifier_planner_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Intent Classifier Planner Max Tokens"},"prose_judge_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Prose Judge Max Tokens"},"system_handlers_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"System Handlers Max Tokens"},"responses_judge_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Responses Judge Max Tokens"},"rule_engine_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rule Engine Max Tokens"},"narrator_structured_data_chars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Narrator Structured Data Chars"},"default_max_result_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Max Result Tokens"},"list_truncate_items":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"List Truncate Items"},"classifier_fact_ledger_window":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Classifier Fact Ledger Window"},"chain_max_refs_per_args":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chain Max Refs Per Args"},"cross_turn_max_refs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cross Turn Max Refs"},"quality_ceiling_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quality Ceiling Tokens"},"string_truncate_chars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"String Truncate Chars"},"chat_max_input_chars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chat Max Input Chars"},"max_micro_context_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Micro Context Bytes"},"history_ttl_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"History Ttl Days"},"routing_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Routing Max Tokens"},"execution_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Execution Max Tokens"},"navigate_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Navigate Max Tokens"},"chain_narrative_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chain Narrative Max Tokens"},"judge_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Judge Max Tokens"},"conversational_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Conversational Max Tokens"},"step_reclassify_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Step Reclassify Max Tokens"},"tool_picker_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tool Picker Max Tokens"},"chain_arg_refs_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chain Arg Refs Max Tokens"},"semantic_verifier_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Semantic Verifier Max Tokens"},"action_narrator_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Action Narrator Max Tokens"},"notifications":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Notifications"},"coding_remote":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Coding Remote"},"proactivity_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Proactivity Enabled"},"proactivity_lock":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proactivity Lock"}},"type":"object","title":"UpdateSettingsRequest"},"UpdateTenantRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"db_config":{"anyOf":[{"$ref":"#/components/schemas/TenantDBConfig"},{"type":"null"}]},"allowed_auth_methods":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Allowed Auth Methods"},"max_connections":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Connections"},"features":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Features"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"UpdateTenantRequest"},"UpdateUserRequest":{"properties":{"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"attributes":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Attributes"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"agency_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agency Id"}},"type":"object","title":"UpdateUserRequest"},"UserDetailResponse":{"properties":{"id":{"type":"string","title":"Id"},"imperal_id":{"type":"string","title":"Imperal Id"},"email":{"type":"string","title":"Email"},"tenant_id":{"type":"string","title":"Tenant Id"},"agency_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agency Id"},"role":{"type":"string","title":"Role"},"scopes":{"items":{},"type":"array","title":"Scopes"},"scopes_in_force":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Scopes In Force"},"attributes":{"type":"object","title":"Attributes"},"is_active":{"type":"boolean","title":"Is Active"},"auth_method":{"type":"string","title":"Auth Method"},"created_at":{"type":"string","title":"Created At"},"last_login":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Login"},"nickname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nickname"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"},"cases_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cases User Id"}},"type":"object","required":["id","imperal_id","email","tenant_id","role","scopes","attributes","is_active","auth_method","created_at","last_login"],"title":"UserDetailResponse"},"UserResponse":{"properties":{"imperal_id":{"type":"string","title":"Imperal Id"},"email":{"type":"string","title":"Email"},"tenant_id":{"type":"string","title":"Tenant Id"},"agency_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agency Id"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"},"role":{"type":"string","title":"Role"},"auth_method":{"type":"string","title":"Auth Method"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes","default":[]},"attributes":{"type":"object","title":"Attributes","default":{}},"is_active":{"type":"boolean","title":"Is Active","default":true},"created_at":{"type":"string","title":"Created At"},"last_login":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Login"},"cases_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cases User Id"}},"additionalProperties":false,"type":"object","required":["imperal_id","email","tenant_id","role","auth_method","created_at"],"title":"UserResponse","description":"OpenAPI alias of imperal_sdk.types.identity.User (W1, 2026-04-27)."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyEmailRequest":{"properties":{"token":{"type":"string","maxLength":128,"minLength":10,"title":"Token"},"status_token":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Status Token"}},"type":"object","required":["token"],"title":"VerifyEmailRequest"},"VoiceInfo":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"}},"type":"object","required":["id","label"],"title":"VoiceInfo"},"WalletResponse":{"properties":{"balance":{"type":"integer","title":"Balance"},"plan":{"type":"string","title":"Plan"},"status":{"type":"string","title":"Status"},"cap":{"type":"integer","title":"Cap"},"included_tokens":{"type":"integer","title":"Included Tokens"}},"type":"object","required":["balance","plan","status","cap","included_tokens"],"title":"WalletResponse"},"_ReplyPrefReq":{"properties":{"mode":{"type":"string","title":"Mode"}},"type":"object","required":["mode"],"title":"_ReplyPrefReq"}}}}