{"openapi":"3.1.0","info":{"title":"Tracehold API","description":"Runtime Security & Trust Platform for Cloud/Ops AI Agents","version":"0.1.0"},"paths":{"/health":{"get":{"tags":["Health"],"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Get"}}}}}}},"/api/v1/auth/google/status":{"get":{"tags":["auth","auth"],"summary":"Google Status","description":"For the sign-in page: show \"Continue with Google\" only when it works.\nThe start URL is on the same host as the callback, so the state cookie\nset there comes back with it.","operationId":"google_status_api_v1_auth_google_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Google Status Api V1 Auth Google Status Get"}}}}}}},"/api/v1/auth/google":{"get":{"tags":["auth","auth"],"summary":"Google Login","description":"Redirect the user's browser to Google's OAuth2 consent screen.","operationId":"google_login_api_v1_auth_google_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/google/callback":{"get":{"tags":["auth","auth"],"summary":"Google Callback","description":"Exchange the authorisation code for the user's identity and sign in\nan existing user.","operationId":"google_callback_api_v1_auth_google_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}},{"name":"oauth_state","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oauth State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/social/status":{"get":{"tags":["auth","auth"],"summary":"Social Status","description":"For the sign-in and sign-up pages: which buttons work here.","operationId":"social_status_api_v1_auth_social_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Social Status Api V1 Auth Social Status Get"}}}}}}},"/api/v1/auth/github":{"get":{"tags":["auth","auth"],"summary":"Start","operationId":"start_api_v1_auth_github_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/github/callback":{"get":{"tags":["auth","auth"],"summary":"Callback","operationId":"callback_api_v1_auth_github_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string","default":"","title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/setup/status":{"get":{"tags":["auth"],"summary":"Setup Status","description":"Return whether first-run setup is still required.\n\n``setup_required=true`` iff the ``users`` table is empty. The frontend\nuses this to redirect unauthenticated visitors to ``/setup`` on a\nfresh install, and to refuse the setup flow once any user\n(invited, owner, anything) exists.","operationId":"setup_status_api_v1_auth_setup_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Setup Status Api V1 Auth Setup Status Get"}}}}}}},"/api/v1/auth/setup/bootstrap":{"post":{"tags":["auth"],"summary":"Setup Bootstrap","description":"Create the first owner + organization on a fresh install.\n\nRefuses (409) if any user already exists, and (403) without the setup\ntoken when the server needs one (see ``setup_refusal``). It is not\nbehind ``registration_open``: there is nobody yet to decide that.","operationId":"setup_bootstrap_api_v1_auth_setup_bootstrap_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"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"}}}}}}},"/api/v1/auth/signup/status":{"get":{"tags":["auth"],"summary":"Signup Status","description":"Whether anyone may sign up here, and what the form needs.","operationId":"signup_status_api_v1_auth_signup_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Signup Status Api V1 Auth Signup Status Get"}}}}}}},"/api/v1/auth/signup":{"post":{"tags":["auth"],"summary":"Signup","description":"A person creates an organization on the Free plan (auth/signup.py).\nNot signed in: the emailed link confirms the address and signs them in.","operationId":"signup_api_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"}}}}}}},"/api/v1/auth/verify-email":{"post":{"tags":["auth"],"summary":"Verify Email","description":"The link from the sign-up email: confirms the address, once, and\nsigns the person in (the first time they can).","operationId":"verify_email_api_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":{"$ref":"#/components/schemas/VerifiedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/verify-email/resend":{"post":{"tags":["auth"],"summary":"Resend Verification","description":"A new link to an address signed up and not yet confirmed (3 an hour\nper address). The answer is the same whether or not there is one.","operationId":"resend_verification_api_v1_auth_verify_email_resend_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Resend Verification Api V1 Auth Verify Email Resend Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login","description":"Password auth, optionally followed by a TOTP challenge.\n\nIf the account has MFA enabled and ``mfa_code`` is absent, the response\nhas ``requires_mfa: true`` instead of an access token — the frontend\nshows a second step and re-POSTs with the code filled in. A 6-digit\nnumeric input is tried as TOTP first; on failure (or if the input\nlooks like an alphabetic backup code), the backup-code list is\nconsulted and the matching entry is consumed on success so replay\nis impossible.","operationId":"login_api_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/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh Session","description":"Rotate the refresh cookie and mint a fresh access token.\n\nThe client calls this on mount and whenever the access token is\nabout to expire. The access token never leaves memory; the refresh\ntoken never leaves the httpOnly cookie. If the cookie is missing,\nexpired, or a reuse is detected, this fails 401 and the client\nfalls back to the login page.","operationId":"refresh_session_api_v1_auth_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","description":"Revoke the refresh cookie and drop the in-browser session.\n\nLogout is idempotent — a missing or already-revoked cookie still\nreturns 200 so the frontend can always clear its state.","operationId":"logout_api_v1_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Logout Api V1 Auth Logout Post"}}}}}}},"/api/v1/auth/mfa/setup":{"post":{"tags":["auth"],"summary":"Mfa Setup","description":"Begin MFA enrollment — generate a fresh secret and return the\nprovisioning URI + QR code for the authenticator app. MFA is NOT\nconsidered enabled until the user POSTs a correct TOTP to\n``/auth/mfa/verify``. Calling setup twice before verify rotates the\npending secret, which is harmless.","operationId":"mfa_setup_api_v1_auth_mfa_setup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MFASetupResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/mfa/verify":{"post":{"tags":["auth"],"summary":"Mfa Verify","description":"Confirm the pending MFA secret. On success MFA is marked enabled\nand ten fresh backup codes are returned in the response — shown\nONCE and never stored in plaintext. The user must save them now.","operationId":"mfa_verify_api_v1_auth_mfa_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MFAVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MFAConfirmResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/mfa/disable":{"post":{"tags":["auth"],"summary":"Mfa Disable","description":"Disable MFA on the current account. Requires both the current\npassword AND a fresh TOTP / backup code so a stolen session alone\ncannot remove the second factor.","operationId":"mfa_disable_api_v1_auth_mfa_disable_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MFADisableRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Mfa Disable Api V1 Auth Mfa Disable Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/mfa/status":{"get":{"tags":["auth"],"summary":"Mfa Status","operationId":"mfa_status_api_v1_auth_mfa_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MFAStatusResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_api_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/users":{"get":{"tags":["auth"],"summary":"List Users","operationId":"list_users_api_v1_auth_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserResponse"},"type":"array","title":"Response List Users Api V1 Auth Users Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/users/invite":{"post":{"tags":["auth"],"summary":"Invite User","operationId":"invite_user_api_v1_auth_users_invite_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteUserRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/users/{user_id}/resend-invite":{"post":{"tags":["auth"],"summary":"Resend Invite","operationId":"resend_invite_api_v1_auth_users__user_id__resend_invite_post","security":[{"HTTPBearer":[]}],"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/InviteUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/invite/{token}":{"get":{"tags":["auth"],"summary":"Invite Details","description":"Public: who an unused, unexpired invite is for and which organization,\nso the page says what the person is joining, and whether they accept the\nterms (an owner does). Nothing else is revealed.","operationId":"invite_details_api_v1_auth_invite__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Invite Details Api V1 Auth Invite  Token  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/invite/accept":{"post":{"tags":["auth"],"summary":"Accept Invite","description":"Public endpoint — consumes an invite token, sets the password,\nand returns a JWT so the frontend can sign the user in immediately.","operationId":"accept_invite_api_v1_auth_invite_accept_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInviteRequest"}}},"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"}}}}}}},"/api/v1/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","description":"Public endpoint — always responds 200 with a neutral message to\nprevent account enumeration. Email is sent only when the account\nexists and has a password set.","operationId":"forgot_password_api_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":{"additionalProperties":true,"type":"object","title":"Response Forgot Password Api V1 Auth Forgot Password Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password Public","description":"Public endpoint — consumes a reset token and signs the user in.","operationId":"reset_password_public_api_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletePasswordResetRequest"}}},"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"}}}}}}},"/api/v1/auth/users/{user_id}":{"put":{"tags":["auth"],"summary":"Update User","operationId":"update_user_api_v1_auth_users__user_id__put","security":[{"HTTPBearer":[]}],"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/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["auth"],"summary":"Remove User","operationId":"remove_user_api_v1_auth_users__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/me/password":{"put":{"tags":["auth"],"summary":"Change Own Password","description":"Change the current user's password (requires current password).","operationId":"change_own_password_api_v1_auth_me_password_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Change Own Password Api V1 Auth Me Password Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/users/{user_id}/password":{"put":{"tags":["auth"],"summary":"Reset User Password","description":"Admin/owner resets another user's password.","operationId":"reset_user_password_api_v1_auth_users__user_id__password_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reset User Password Api V1 Auth Users  User Id  Password Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/sse/tickets":{"post":{"tags":["auth"],"summary":"Create Sse Ticket","description":"Mint a one-shot SSE auth ticket bound to the caller.\n\nThe frontend trades a regular ``Authorization: Bearer`` request for\nan opaque short-lived ticket, then hands that ticket to\n``EventSource`` via a query param. Browsers can't set headers on\n``EventSource``, and putting the long-lived JWT in the URL would\nleak it to logs/referrers/history — this flow avoids that entirely.","operationId":"create_sse_ticket_api_v1_auth_sse_tickets_post","responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"object","title":"Response Create Sse Ticket Api V1 Auth Sse Tickets Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/org":{"get":{"tags":["auth"],"summary":"Get Org","operationId":"get_org_api_v1_auth_org_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgSettingsResponse"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["auth"],"summary":"Update Org","operationId":"update_org_api_v1_auth_org_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/org/deletion":{"post":{"tags":["auth"],"summary":"Schedule Org Deletion","description":"The owner deletes the organization: erased 14 days from now, its\naudit trail included, unless an owner or admin cancels; agents' calls\nare refused meanwhile, and every owner and admin is emailed\n(auth/org_deletion.py).","operationId":"schedule_org_deletion_api_v1_auth_org_deletion_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDeletionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDeletionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["auth"],"summary":"Cancel Org Deletion","description":"Keep the organization: an owner or admin cancels its deletion, and\nagents' calls run again.","operationId":"cancel_org_deletion_api_v1_auth_org_deletion_delete","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/org/transfer-ownership":{"post":{"tags":["auth"],"summary":"Transfer Ownership","description":"Hand the ``owner`` role to another admin in the current org.\n\nSecurity: requires current owner's password (and TOTP / backup code\nwhen MFA is enabled) so a stolen session alone cannot perform the\ntransfer. The former owner is demoted to ``admin`` atomically —\nthere is always exactly one owner per org across the transition.","operationId":"transfer_ownership_api_v1_auth_org_transfer_ownership_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferOwnershipRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferOwnershipResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/org/webhook-secret/rotate":{"post":{"tags":["auth"],"summary":"Rotate Webhook Secret","description":"Generate a fresh HMAC key for outbound webhook signing.\n\nReturns the secret *once* in the response body so the admin can\npaste it into the SIEM / Slack app's \"verify signature\" setting.\nSubsequent GET /org calls never return the secret — only metadata.\nA rotate invalidates any signature the receiver has cached: every\ndownstream integration needs the new key to continue verifying.","operationId":"rotate_webhook_secret_api_v1_auth_org_webhook_secret_rotate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Rotate Webhook Secret Api V1 Auth Org Webhook Secret Rotate Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/org/test-notification":{"post":{"tags":["auth"],"summary":"Test Notification","description":"Fire a synthetic approval notification through the selected channel.\n\nChannels: ``email``, ``slack``, ``pagerduty``, ``webhook``. The action\nis fully synthetic (``action_id=test-<hex>``), nothing audits, and\nnothing is held. This is the UI-facing analogue of the\n``python -m app.cli test-notifications`` CLI smoke — admins can\nconfirm a newly-saved webhook URL or routing key actually reaches\ntheir team before a real 3am page arrives.","operationId":"test_notification_api_v1_auth_org_test_notification_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Test Notification Api V1 Auth Org Test Notification Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/gateway/approve/{action_id}":{"post":{"tags":["gateway"],"summary":"Approve Action","description":"Owners and admins decide; a person may decide on their own agent's\ncalls as the organization allows (gateway/approvers.py).","operationId":"approve_action_api_v1_gateway_approve__action_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","title":"Action Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApprovalAction"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Approve Action Api V1 Gateway Approve  Action Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gateway/reject/{action_id}":{"post":{"tags":["gateway"],"summary":"Reject Action","operationId":"reject_action_api_v1_gateway_reject__action_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","title":"Action Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApprovalAction"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reject Action Api V1 Gateway Reject  Action Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gateway/actions":{"get":{"tags":["gateway"],"summary":"List Actions","description":"Browse all actions for the organization, with optional filters.\n\nAll filters are applied server-side — the page never loads more than\n``limit`` rows, so a customer with 10M actions still gets a fast\nresponse. The UI's \"Export\" button hits ``/actions/export`` with the\nsame filter params so the download matches the view.","operationId":"list_actions_api_v1_gateway_actions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"decision","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"}},{"name":"risk_level","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Level"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},{"name":"cloud_provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cloud Provider"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Substring match on action_identifier, tool_name, agent_id","title":"Q"},"description":"Substring match on action_identifier, tool_name, agent_id"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}},{"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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Actions Api V1 Gateway Actions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gateway/actions/export":{"get":{"tags":["gateway"],"summary":"Export Actions Stream","description":"Stream the filtered action list as NDJSON (or CSV) without the\n50-per-page cap. Solves the \"export only exports the visible rows\"\nfootgun that made the old UI's CSV button silently incomplete.\n\nNDJSON is the default because it's line-delimited and safe for\nmulti-GB orgs piping straight into a SIEM. CSV is offered as a\nconvenience for finance / compliance teams who prefer Excel; it\nis NOT the default and we stream it one row at a time so the\nserver memory footprint is bounded.\n\nOrdered by ``requested_at`` DESC to match the UI; a consumer that\nwants ascending order can sort on their side (the sequence of\nrows is stable across reruns for the same filter set).","operationId":"export_actions_stream_api_v1_gateway_actions_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"decision","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"}},{"name":"risk_level","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Level"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},{"name":"cloud_provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cloud Provider"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(ndjson|csv)$","default":"ndjson","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gateway/actions/{action_id}":{"get":{"tags":["gateway"],"summary":"Get Action","description":"Fetch a single action by ID — used by the action detail page.","operationId":"get_action_api_v1_gateway_actions__action_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","title":"Action Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Action Api V1 Gateway Actions  Action Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gateway/pending":{"get":{"tags":["gateway"],"summary":"List Pending","operationId":"list_pending_api_v1_gateway_pending_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Pending Api V1 Gateway Pending Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gateway/recently-expired":{"get":{"tags":["gateway"],"summary":"List Recently Expired","description":"Approvals that auto-rejected on TTL expiry within the given window.\n\nThe approvals page filters ``/pending`` to rows with\n``approval_expires_at > now``, which means the instant the reaper\ntransitions an expired hold to BLOCK it disappears from the queue.\nOperators who only see the \"timed out\" email then open an empty page\nand can't tell what happened. This endpoint backs a second section on\nthe approvals page that lists recently auto-rejected holds (BLOCK with\ncanonical expiry reason) so the email has a destination with context.\n\nDefault window is 24 hours: a post-mortem operator arriving the morning\nafter an overnight burst of timeouts still sees the rows, and the list\nis capped at 50 anyway so a wide window won't explode the response.","operationId":"list_recently_expired_api_v1_gateway_recently_expired_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"window_minutes","in":"query","required":false,"schema":{"type":"integer","maximum":10080,"minimum":1,"default":1440,"title":"Window Minutes"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Recently Expired Api V1 Gateway Recently Expired Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gateway/stream":{"get":{"tags":["gateway"],"summary":"Event Stream","description":"Server-Sent Events stream for real-time action feed.\n\nAuthenticates via a short-lived, single-use ticket rather than a\nraw JWT. Browsers cannot set ``Authorization`` headers on\n``EventSource``, and the previous ``?token=<JWT>`` scheme leaked\nthe session token to access logs, referrers, and browser history.\nThe client fetches a ticket from ``POST /auth/sse/tickets`` and\npasses it here; the ticket is consumed atomically on connect and\ncannot be replayed.","operationId":"event_stream_api_v1_gateway_stream_get","parameters":[{"name":"ticket","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Ticket"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/credentials/providers/status":{"get":{"tags":["credentials"],"summary":"Get Provider Status","description":"What the connector can do on each provider, and which clouds the\norganization has connected. ``providers`` covers every classified\nprovider, including the observe-only ones.","operationId":"get_provider_status_api_v1_credentials_providers_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/credentials":{"get":{"tags":["credentials"],"summary":"List Credentials","operationId":"list_credentials_api_v1_credentials_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},{"name":"issued_for_action_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issued For Action Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"active | expired","title":"Status"},"description":"active | expired"},{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Substring on agent_id, task_id, action_id, scope_summary","title":"Q"},"description":"Substring on agent_id, task_id, action_id, scope_summary"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}},{"name":"include_expired","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Expired"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Credentials Api V1 Credentials Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/credentials/export":{"get":{"tags":["credentials"],"summary":"Export Credentials Stream","description":"Stream the filtered credential list as NDJSON (or CSV) for\ncompliance / AC-6 (least privilege) audit evidence.\n\nShares ``_build_credentials_filter`` with the paged list above so\nthe download matches the view. Keyset pagination on\n``(created_at, id)`` keeps memory bounded for orgs with millions of\nhistorical credentials. A record holds a key's scope and expiry, never\nthe key: the connector minted it in the customer's cloud.","operationId":"export_credentials_stream_api_v1_credentials_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},{"name":"issued_for_action_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issued For Action Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(ndjson|csv)$","default":"ndjson","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cloud-connections/aws":{"get":{"tags":["credentials"],"summary":"Get Aws","description":"The AWS account the organization's connector acts in, and the setup\nthat gives it a role there.","operationId":"get_aws_api_v1_cloud_connections_aws_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"access","in":"query","required":false,"schema":{"enum":["read_write","servers","read_only"],"type":"string","default":"read_write","title":"Access"}},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Aws Api V1 Cloud Connections Aws Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cloud-connections/aws/cloudformation.yaml":{"get":{"tags":["credentials"],"summary":"Aws Template","operationId":"aws_template_api_v1_cloud_connections_aws_cloudformation_yaml_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/cloud-connections/gcp":{"get":{"tags":["credentials"],"summary":"Get Gcp","operationId":"get_gcp_api_v1_cloud_connections_gcp_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role","in":"query","required":false,"schema":{"enum":["editor","viewer"],"type":"string","default":"editor","title":"Role"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Gcp Api V1 Cloud Connections Gcp Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cloud-connections/azure":{"get":{"tags":["credentials"],"summary":"Get Azure","operationId":"get_azure_api_v1_cloud_connections_azure_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role","in":"query","required":false,"schema":{"enum":["contributor","reader"],"type":"string","default":"contributor","title":"Role"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Azure Api V1 Cloud Connections Azure Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cloud-connections/{provider}/environment":{"put":{"tags":["credentials"],"summary":"Set Environment","description":"Label the account: every call into it then carries this environment,\nwhich exceptions match (\"in production\") and the Overview counts.","operationId":"set_environment_api_v1_cloud_connections__provider__environment_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"enum":["aws","gcp","azure"],"type":"string","title":"Provider"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Environment Api V1 Cloud Connections  Provider  Environment Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cloud-connections/{provider}/accounts/{connection_id}":{"delete":{"tags":["credentials"],"summary":"Forget Account","description":"Forget an account no connector acts in any more (a record left over).","operationId":"forget_account_api_v1_cloud_connections__provider__accounts__connection_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"enum":["aws","gcp","azure"],"type":"string","title":"Provider"}},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Forget Account Api V1 Cloud Connections  Provider  Accounts  Connection Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cloud-connections/{provider}/check":{"post":{"tags":["credentials"],"summary":"Check","description":"Ask a connector to look for its account now, after the setup ran.","operationId":"check_api_v1_cloud_connections__provider__check_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"enum":["aws","gcp","azure"],"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Check Api V1 Cloud Connections  Provider  Check Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audit/logs":{"get":{"tags":["audit"],"summary":"List Logs","operationId":"list_logs_api_v1_audit_logs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Page Size"}},{"name":"event_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},{"name":"task_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id"}},{"name":"decision","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"}},{"name":"risk_level","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Level"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Logs Api V1 Audit Logs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audit/verify":{"get":{"tags":["audit"],"summary":"Verify Chain","description":"Verify the hash chain plus every anchor checkpoint for this org.\n\nTwo layers run here:\n\n1. The in-chain HMAC verifier — catches a tampered row as long as the\n   ``AUDIT_HMAC_KEY`` is still a secret.\n2. The anchor verifier — catches a tampered row even when the key is\n   leaked, by cross-checking each anchor's pinned ``last_entry_hash``\n   against the live chain. A successful tamper would also have to\n   rewrite every anchor mirrored to S3 Object Lock, which the attacker\n   cannot do.\n\nThe response is a single flag (``valid``) plus per-layer detail so the\nUI can surface which layer failed first.","operationId":"verify_chain_api_v1_audit_verify_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Verify Chain Api V1 Audit Verify Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/audit/anchors":{"get":{"tags":["audit"],"summary":"List Anchors","description":"Return the most recent hash-chain anchors for this org.","operationId":"list_anchors_api_v1_audit_anchors_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Anchors Api V1 Audit Anchors Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audit/anchors/run":{"post":{"tags":["audit"],"summary":"Run Anchor Now","description":"Force an immediate anchor for this org — useful after a high-risk\nchange when you want tamper-evident proof without waiting on the timer.","operationId":"run_anchor_now_api_v1_audit_anchors_run_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Run Anchor Now Api V1 Audit Anchors Run Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/audit/exports/stream":{"get":{"tags":["audit"],"summary":"Export Stream","description":"Stream the audit log as NDJSON for ingestion into a SIEM.\n\nDesigned for a cron on the customer's side that ``curl``s this\nendpoint with ``since_seq`` set to the last row it saw. One JSON\nobject per line, ordered by ``sequence_number`` ascending — a SIEM\nthat appends rows reconstructs insertion order for free.\n\nThe optional ``event_type``, ``decision``, ``risk_level``, ``since``,\nand ``until`` filters mirror the UI filters on ``/audit`` so the\n\"Export full (NDJSON)\" button downloads exactly what the user sees —\nno silently-capped \"visible rows only\" behavior.\n\nWe emit the ``X-Tracehold-Export-Manifest`` header with a URL the\nconsumer can fetch to verify the bundle after ingesting — the\nmanifest endpoint re-walks the exact same range and signs the result.","operationId":"export_stream_api_v1_audit_exports_stream_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"since_seq","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Since Seq"}},{"name":"until_seq","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Until Seq"}},{"name":"event_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"}},{"name":"decision","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"}},{"name":"risk_level","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Level"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(ndjson|csv)$","default":"ndjson","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audit/exports/manifest":{"get":{"tags":["audit"],"summary":"Export Manifest","description":"Return the signed manifest for the same range ``/exports/stream``\nwould emit. Walks the rows server-side to compute the content hash,\nso the auditor can pre-verify before committing to a long download.","operationId":"export_manifest_api_v1_audit_exports_manifest_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"since_seq","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Since Seq"}},{"name":"until_seq","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Until Seq"}},{"name":"event_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"}},{"name":"decision","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"}},{"name":"risk_level","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Level"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Export Manifest Api V1 Audit Exports Manifest Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audit/exports/bundle":{"get":{"tags":["audit"],"summary":"Export Bundle","description":"Download a ZIP containing ``audit.ndjson``, signed ``manifest.json``,\nand a plain-text ``README.txt`` with verification instructions.\n\nUsed by admins to hand an auditor a self-contained artifact. For\ncontinuous SIEM ingest, use ``/exports/stream`` instead — the bundle\nbuffers in memory and is not safe for multi-GB orgs.","operationId":"export_bundle_api_v1_audit_exports_bundle_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"since_seq","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Since Seq"}},{"name":"until_seq","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Until Seq"}},{"name":"event_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"}},{"name":"decision","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"}},{"name":"risk_level","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Level"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audit/sinks":{"get":{"tags":["audit-sinks"],"summary":"List Sinks","operationId":"list_sinks_api_v1_audit_sinks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Sinks Api V1 Audit Sinks Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["audit-sinks"],"summary":"Create Sink","operationId":"create_sink_api_v1_audit_sinks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SinkCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Sink Api V1 Audit Sinks Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/audit/sinks/{sink_id}":{"get":{"tags":["audit-sinks"],"summary":"Get Sink","operationId":"get_sink_api_v1_audit_sinks__sink_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"sink_id","in":"path","required":true,"schema":{"type":"string","title":"Sink Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Sink Api V1 Audit Sinks  Sink Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["audit-sinks"],"summary":"Update Sink","operationId":"update_sink_api_v1_audit_sinks__sink_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"sink_id","in":"path","required":true,"schema":{"type":"string","title":"Sink Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SinkUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Sink Api V1 Audit Sinks  Sink Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["audit-sinks"],"summary":"Delete Sink","operationId":"delete_sink_api_v1_audit_sinks__sink_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"sink_id","in":"path","required":true,"schema":{"type":"string","title":"Sink Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audit/sinks/{sink_id}/test":{"post":{"tags":["audit-sinks"],"summary":"Test Sink","description":"Push the most recent audit rows (up to 10) through the configured\nadapter. Doesn't advance ``last_cursor_seq`` — a regular worker tick\nwill redeliver those rows to the real cursor position.\n\nUseful pattern in the UI: operator creates a sink, clicks \"Send test\",\nsees either ``{\"status\": \"ok\", \"delivered\": N}`` or the exact error\nstring their HEC rejected the payload with. That tightens the\ndebug loop from \"wait 60 seconds and hope\" to \"immediate feedback\".","operationId":"test_sink_api_v1_audit_sinks__sink_id__test_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"sink_id","in":"path","required":true,"schema":{"type":"string","title":"Sink Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Test Sink Api V1 Audit Sinks  Sink Id  Test Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/alerts":{"get":{"tags":["alerts"],"summary":"List Alerts","operationId":"list_alerts_api_v1_alerts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},{"name":"owasp_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owasp Code"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Alerts Api V1 Alerts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/alerts/{alert_id}":{"get":{"tags":["alerts"],"summary":"Get Alert","description":"Single-alert detail for the ``/alerts/[id]`` page.\n\nReturns the same shape as the list endpoint plus the resolved\nassignee name (when set) so the UI can render it without an extra\nround-trip.","operationId":"get_alert_api_v1_alerts__alert_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","title":"Alert Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Alert Api V1 Alerts  Alert Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["alerts"],"summary":"Update Alert","description":"Partial update of an alert (status, assignee, mute).","operationId":"update_alert_api_v1_alerts__alert_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","title":"Alert Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Alert Api V1 Alerts  Alert Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/policies":{"get":{"tags":["enforcement"],"summary":"List Policies","operationId":"list_policies_api_v1_policies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PolicyResponse"},"type":"array","title":"Response List Policies Api V1 Policies Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["enforcement"],"summary":"Create Policy","operationId":"create_policy_api_v1_policies_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/policies/{policy_id}":{"get":{"tags":["enforcement"],"summary":"Get Policy","operationId":"get_policy_api_v1_policies__policy_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["enforcement"],"summary":"Update Policy","operationId":"update_policy_api_v1_policies__policy_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["enforcement"],"summary":"Delete Policy","operationId":"delete_policy_api_v1_policies__policy_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/policies/{policy_id}/rules":{"post":{"tags":["enforcement"],"summary":"Add Rule","description":"Add a rule to an existing policy.","operationId":"add_rule_api_v1_policies__policy_id__rules_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRuleCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/policies/rules/{rule_id}":{"patch":{"tags":["enforcement"],"summary":"Update Rule","description":"Partial update of a single rule.\n\nUsed by the UI for in-line rule editing and up/down priority\nreordering. Every mutation snapshots the parent policy; policies\nare read on every call, so the change lands on the very next one.","operationId":"update_rule_api_v1_policies_rules__rule_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","title":"Rule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRuleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["enforcement"],"summary":"Delete Rule","description":"Delete a single policy rule.","operationId":"delete_rule_api_v1_policies_rules__rule_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","title":"Rule Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/policies/{policy_id}/simulate":{"post":{"tags":["enforcement"],"summary":"Simulate Policy","description":"Evaluate a hypothetical action against this policy WITHOUT enforcing anything.\n\nReturns what the decision *would* be if this action came through the gateway.\nNo audit entry, no credential, no side effects.","operationId":"simulate_policy_api_v1_policies__policy_id__simulate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/policies/dryrun":{"post":{"tags":["enforcement"],"summary":"Dryrun Policy","description":"Evaluate a candidate rule against recent actions without saving it.\n\nThe UI calls this with the in-progress rule before the user clicks\nsave. No policy row is written, no audit entry is created, no\ncredential is issued. The response just says: out of the last N\nactions, M would match, and K would flip decision.","operationId":"dryrun_policy_api_v1_policies_dryrun_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryrunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryrunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/policies/{policy_id}/versions":{"get":{"tags":["enforcement"],"summary":"List Policy Versions","description":"History of changes to a policy, newest first.","operationId":"list_policy_versions_api_v1_policies__policy_id__versions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PolicyVersionSummary"},"title":"Response List Policy Versions Api V1 Policies  Policy Id  Versions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/policies/{policy_id}/versions/{version_num}":{"get":{"tags":["enforcement"],"summary":"Get Policy Version","description":"Full snapshot for one historical version (for diff/restore views).","operationId":"get_policy_version_api_v1_policies__policy_id__versions__version_num__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}},{"name":"version_num","in":"path","required":true,"schema":{"type":"integer","title":"Version Num"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyVersionDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/policies/{policy_id}/versions/{version_num}/restore":{"post":{"tags":["enforcement"],"summary":"Restore Policy Version","description":"Restore a policy to a previous snapshot.\n\nRather than mutating existing rows in place, this replaces the\ncurrent rules with the snapshot's rules and appends a new version\nrow marked ``Restored from vN``. Earlier versions are kept intact\nso the history is append-only.","operationId":"restore_policy_version_api_v1_policies__policy_id__versions__version_num__restore_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}},{"name":"version_num","in":"path","required":true,"schema":{"type":"integer","title":"Version Num"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/adversarial/scenarios":{"get":{"tags":["adversarial"],"summary":"List Scenarios","operationId":"list_scenarios_api_v1_adversarial_scenarios_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Scenarios Api V1 Adversarial Scenarios Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/adversarial/coverage":{"get":{"tags":["adversarial"],"summary":"Get Coverage","description":"Return per-ASI-code × per-risk-tier coverage from the most recent completed run.\nFalls back to static scenario presence if no run has been completed yet.","operationId":"get_coverage_api_v1_adversarial_coverage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Coverage Api V1 Adversarial Coverage Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/adversarial/schedule":{"get":{"tags":["adversarial"],"summary":"Get Schedule","operationId":"get_schedule_api_v1_adversarial_schedule_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleResponse"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["adversarial"],"summary":"Update Schedule","description":"Pin a per-org schedule row. First save takes over from env vars.","operationId":"update_schedule_api_v1_adversarial_schedule_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/adversarial/run":{"post":{"tags":["adversarial"],"summary":"Run Tests","description":"Execute all adversarial scenarios through the live gateway.","operationId":"run_tests_api_v1_adversarial_run_post","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Run Tests Api V1 Adversarial Run Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/adversarial/runs":{"get":{"tags":["adversarial"],"summary":"List Runs","operationId":"list_runs_api_v1_adversarial_runs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Runs Api V1 Adversarial Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/adversarial/runs/{run_id}":{"get":{"tags":["adversarial"],"summary":"Get Run","operationId":"get_run_api_v1_adversarial_runs__run_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Run Api V1 Adversarial Runs  Run Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/remediation/suggestions/{action_id}":{"get":{"tags":["remediation"],"summary":"Get Suggestions","description":"Return the LLM-generated safe alternative and relevant playbooks for an action.","operationId":"get_suggestions_api_v1_remediation_suggestions__action_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","title":"Action Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Suggestions Api V1 Remediation Suggestions  Action Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/remediation/suggestions":{"get":{"tags":["remediation"],"summary":"Get Suggestions Bulk","description":"Return safe alternatives for multiple action IDs in one request.","operationId":"get_suggestions_bulk_api_v1_remediation_suggestions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"action_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[],"title":"Action Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Suggestions Bulk Api V1 Remediation Suggestions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/remediation/playbooks":{"get":{"tags":["remediation"],"summary":"List Playbooks","operationId":"list_playbooks_api_v1_remediation_playbooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Playbooks Api V1 Remediation Playbooks Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/compliance/coverage":{"get":{"tags":["compliance"],"summary":"Get Coverage","description":"Return NIST and OWASP control coverage based on audit log data.","operationId":"get_coverage_api_v1_compliance_coverage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Coverage Api V1 Compliance Coverage Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/compliance/credentials/history":{"get":{"tags":["compliance"],"summary":"Credential History","operationId":"credential_history_api_v1_compliance_credentials_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Credential History Api V1 Compliance Credentials History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/compliance/export/incident":{"post":{"tags":["compliance"],"summary":"Export Incident","description":"Generate a compliance evidence bundle for a specific action/incident.","operationId":"export_incident_api_v1_compliance_export_incident_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"action_id","in":"query","required":true,"schema":{"type":"string","description":"Action ID to build evidence bundle for","title":"Action Id"},"description":"Action ID to build evidence bundle for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Export Incident Api V1 Compliance Export Incident Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/compliance/export/bundle":{"post":{"tags":["compliance"],"summary":"Export Bundle","description":"Generate a date-range compliance evidence bundle as a ZIP file.","operationId":"export_bundle_api_v1_compliance_export_bundle_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/dashboard/overview":{"get":{"tags":["dashboard"],"summary":"Overview","operationId":"overview_api_v1_dashboard_overview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"enum":["24h","7d","30d"],"type":"string","default":"7d","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Overview Api V1 Dashboard Overview Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/demo-request":{"post":{"tags":["Public"],"summary":"Submit a Book-a-Demo form","description":"Public, unauthenticated endpoint used by the marketing site. Rate-limited per IP. Honeypot-protected. Never returns the internal ID.","operationId":"submit_demo_request_api_v1_public_demo_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemoRequestCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemoRequestAck"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/design-partner-application":{"post":{"tags":["Public"],"summary":"Submit a design-partner application","description":"Public, unauthenticated endpoint used by the /design-partners marketing page. Same rate-limiting + honeypot pattern as /demo-request; uses its own per-IP counter namespace so the two forms don't share a budget.","operationId":"submit_design_partner_application_api_v1_public_design_partner_application_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesignPartnerApplicationCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesignPartnerApplicationAck"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/demo-requests":{"get":{"tags":["Admin · Demo Requests"],"summary":"List Demo Requests","operationId":"list_demo_requests_api_v1_admin_demo_requests_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"undelivered_only","in":"query","required":false,"schema":{"type":"boolean","description":"When true, only return requests where the sales-notification email has not yet successfully delivered (i.e. sales_email_sent_at is null). Use this to spot leads that silently rotted.","default":false,"title":"Undelivered Only"},"description":"When true, only return requests where the sales-notification email has not yet successfully delivered (i.e. sales_email_sent_at is null). Use this to spot leads that silently rotted."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DemoRequestAdminItem"},"title":"Response List Demo Requests Api V1 Admin Demo Requests Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/design-partner-applications":{"get":{"tags":["Admin · Design Partner Applications"],"summary":"List Design Partner Applications","operationId":"list_design_partner_applications_api_v1_admin_design_partner_applications_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"undelivered_only","in":"query","required":false,"schema":{"type":"boolean","description":"When true, only return applications where the sales-notification email has not yet successfully delivered. Use to spot leads that silently rotted.","default":false,"title":"Undelivered Only"},"description":"When true, only return applications where the sales-notification email has not yet successfully delivered. Use to spot leads that silently rotted."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DesignPartnerApplicationAdminItem"},"title":"Response List Design Partner Applications Api V1 Admin Design Partner Applications Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/servers":{"get":{"tags":["servers"],"summary":"List Servers","operationId":"list_servers_api_v1_servers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MCPServerResponse"},"type":"array","title":"Response List Servers Api V1 Servers Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["servers"],"summary":"Create Server","operationId":"create_server_api_v1_servers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPServerCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPServerWithTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/servers/catalog/search":{"get":{"tags":["servers"],"summary":"Catalog Search","description":"Search every action the connector can run, beyond the curated\ncatalog (for AWS, every API operation), with the organization's levels.","operationId":"catalog_search_api_v1_servers_catalog_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":100,"title":"Q"}},{"name":"provider","in":"query","required":false,"schema":{"type":"string","default":"aws","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CatalogAction"},"title":"Response Catalog Search Api V1 Servers Catalog Search Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/servers/catalog":{"get":{"tags":["servers"],"summary":"Catalog","operationId":"catalog_api_v1_servers_catalog_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"}},{"name":"service","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service"}},{"name":"risk_level","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Level"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CatalogAction"},"title":"Response Catalog Api V1 Servers Catalog Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/servers/{server_id}":{"get":{"tags":["servers"],"summary":"Get Server","operationId":"get_server_api_v1_servers__server_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPServerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["servers"],"summary":"Update Server","operationId":"update_server_api_v1_servers__server_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPServerUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPServerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["servers"],"summary":"Delete Server","operationId":"delete_server_api_v1_servers__server_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/servers/{server_id}/accounts":{"put":{"tags":["servers"],"summary":"Set Server Account","description":"Which of the organization's accounts in a cloud this server acts in.","operationId":"set_server_account_api_v1_servers__server_id__accounts_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerAccountIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPServerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/servers/{server_id}/rotate-token":{"post":{"tags":["servers"],"summary":"Rotate Token","operationId":"rotate_token_api_v1_servers__server_id__rotate_token_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPServerWithTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/servers/{server_id}/mode-preview":{"get":{"tags":["servers"],"summary":"Mode Preview","description":"Summarise decisions on this server's action stream over the window.\n\nUsed by the monitor → production confirmation modal so the operator\ncan see \"15 actions would have been blocked, 3 held for approval\"\nbefore flipping execution on. Read-only; no side effects.","operationId":"mode_preview_api_v1_servers__server_id__mode_preview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModePreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/servers/{server_id}/tools":{"post":{"tags":["servers"],"summary":"Add Tools","operationId":"add_tools_api_v1_servers__server_id__tools_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MCPServerToolCreate"},"title":"Tools"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MCPServerToolResponse"},"title":"Response Add Tools Api V1 Servers  Server Id  Tools Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["servers"],"summary":"List Tools","operationId":"list_tools_api_v1_servers__server_id__tools_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MCPServerToolResponse"},"title":"Response List Tools Api V1 Servers  Server Id  Tools Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/servers/{server_id}/tools/{tool_id}":{"patch":{"tags":["servers"],"summary":"Set Tool Risk","description":"Set how risky a tool is on this server (for the customer's own MCP\ntools, whose risk Tracehold can only guess from the name).","operationId":"set_tool_risk_api_v1_servers__server_id__tools__tool_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}},{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPServerToolRisk"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPServerToolResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["servers"],"summary":"Remove Tool","operationId":"remove_tool_api_v1_servers__server_id__tools__tool_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}},{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/servers/{server_id}/tools/unused":{"delete":{"tags":["servers"],"summary":"Remove Unused Tools","description":"Right sizing: remove every tool the server has had for 30 days and\nthe agent never called in them. A removed tool cannot be called at all.","operationId":"remove_unused_tools_api_v1_servers__server_id__tools_unused_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Unused Tools Api V1 Servers  Server Id  Tools Unused Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/servers/{server_id}/tools/remove":{"post":{"tags":["servers"],"summary":"Remove Tools","description":"Remove several tools at once: one audit entry, and one notice to the\nagents connected to the server. All or nothing.","operationId":"remove_tools_api_v1_servers__server_id__tools_remove_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPServerToolsRemove"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Tools Api V1 Servers  Server Id  Tools Remove Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/servers/suggest-tools":{"post":{"tags":["servers"],"summary":"Suggest Tools","operationId":"suggest_tools_api_v1_servers_suggest_tools_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaSuggestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaSuggestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/plans":{"get":{"tags":["billing"],"summary":"List Plans","operationId":"list_plans_api_v1_billing_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PlanPublic"},"type":"array","title":"Response List Plans Api V1 Billing Plans Get"}}}}}}},"/api/v1/billing/summary":{"get":{"tags":["billing"],"summary":"Get Summary","operationId":"get_summary_api_v1_billing_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSummary"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/trial":{"post":{"tags":["billing"],"summary":"Start Trial","description":"Start the organization's one 14-day Team trial now, no card.","operationId":"start_trial_api_v1_billing_trial_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/checkout":{"post":{"tags":["billing"],"summary":"Start Checkout","operationId":"start_checkout_api_v1_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/sync":{"post":{"tags":["billing"],"summary":"Sync With Stripe","description":"Back from Checkout or the portal: read the subscription from Stripe\nnow rather than wait for its webhook.","operationId":"sync_with_stripe_api_v1_billing_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSummary"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/portal":{"post":{"tags":["billing"],"summary":"Open Portal","operationId":"open_portal_api_v1_billing_portal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/saml/status":{"get":{"tags":["auth","saml"],"summary":"Saml Status","description":"Does the email's org have SSO enabled?\n\nAlways responds 200 — returning ``enabled=false`` for unknown orgs\nmeans an attacker can't enumerate tenant slugs by probing this\nendpoint. The org slug is only returned when ``enabled=true``.","operationId":"saml_status_api_v1_auth_saml_status_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","minLength":3,"title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SAMLStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/saml/{org_slug}/metadata":{"get":{"tags":["auth","saml"],"summary":"Saml Metadata","description":"Return the SP metadata XML for the IdP admin to import.\n\nServed unauthenticated because that's what SAML metadata is for —\nthe cert an admin downloads is public by design. We still 404 when\nthe org doesn't exist rather than leak that information through\na 500.","operationId":"saml_metadata_api_v1_auth_saml__org_slug__metadata_get","parameters":[{"name":"org_slug","in":"path","required":true,"schema":{"type":"string","title":"Org Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/saml/{org_slug}/login":{"get":{"tags":["auth","saml"],"summary":"Saml Login","description":"Start an SP-initiated SSO flow.\n\nBuilds a signed ``AuthnRequest`` and redirects the browser to the\nIdP's SSO URL with a ``RelayState`` we'll echo back on ACS. We do\nnot attempt to sign the AuthnRequest here (``authnRequestsSigned``\nis False in the OneLogin settings) — most IdPs accept unsigned\nAuthnRequests and the assertion signature is what actually matters\nfor trust.","operationId":"saml_login_api_v1_auth_saml__org_slug__login_get","parameters":[{"name":"org_slug","in":"path","required":true,"schema":{"type":"string","title":"Org Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/saml/{org_slug}/acs":{"post":{"tags":["auth","saml"],"summary":"Saml Acs","description":"Consume the ``SAMLResponse`` POST from the IdP.\n\npython3-saml verifies the signature, timestamps (``NotBefore`` /\n``NotOnOrAfter``), audience restriction, destination, and issuer.\nIf any check fails we reject with 401 — a passing check means the\nassertion is genuinely from the configured IdP.\n\nOn success we pull ``email`` + ``full_name`` out of the assertion,\nJIT-provision the user, issue a Tracehold JWT, and redirect the\nbrowser to the frontend's ``/auth/callback?token=...`` page.","operationId":"saml_acs_api_v1_auth_saml__org_slug__acs_post","parameters":[{"name":"org_slug","in":"path","required":true,"schema":{"type":"string","title":"Org Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/saml/config":{"get":{"tags":["auth","saml"],"summary":"Get Config","operationId":"get_config_api_v1_auth_saml_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SAMLConfigOut"},{"type":"null"}],"title":"Response Get Config Api V1 Auth Saml Config Get"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["auth","saml"],"summary":"Put Config","operationId":"put_config_api_v1_auth_saml_config_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SAMLConfigIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SAMLConfigOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["auth","saml"],"summary":"Delete Config","operationId":"delete_config_api_v1_auth_saml_config_delete","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/saml/metadata-fields":{"get":{"tags":["auth","saml"],"summary":"Metadata Fields","description":"Return the SP URL trio so admins can copy/paste into their IdP.\n\nShown in the Settings → Security → SAML card. This is the cheap,\nalways-available surface — even when ``python3-saml`` is missing\nthe admin can still see the URLs they need.","operationId":"metadata_fields_api_v1_auth_saml_metadata_fields_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SPMetadata"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/orgs":{"get":{"tags":["admin"],"summary":"List Orgs","description":"List every organisation with provisioning + lightweight ops signals.","operationId":"list_orgs_api_v1_admin_orgs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrgListItem"},"type":"array","title":"Response List Orgs Api V1 Admin Orgs Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["admin"],"summary":"Create Org","description":"Provision a brand-new customer organisation.\n\nCreates the ``Organization`` row, a first ``User`` with ``role=owner``\nand a 7-day invite token, then tries to email the magic link. The\nowner sets their own password on first click; Tracehold staff never\nsee or handle the customer's password.","operationId":"create_org_api_v1_admin_orgs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrgRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrgResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/orgs/{org_id}":{"patch":{"tags":["admin"],"summary":"Update Org","description":"Patch plan + quota fields on an existing org.\n\nStaff-only. The org's own owner edits cosmetic settings (name,\nenforcement mode, webhook) via /auth/org; plan and hard quota caps\nlive here so a customer can't raise their own limits.","operationId":"update_org_api_v1_admin_orgs__org_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgListItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["admin"],"summary":"Get Org Detail","description":"Full detail for a single org — used by the ``/admin/[orgId]`` page.","operationId":"get_org_detail_api_v1_admin_orgs__org_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Org","description":"Erase an organization at its request: every row it owns, its audit\ntrail included (admin/erase.py), in one transaction.\n\n``?confirm_slug=<slug>`` must match as a deliberate speed bump, and the\norganization must be suspended first (the reversible step). Tracehold's\nown organization, and one still paying through Stripe, are refused. The\nerase is recorded on Tracehold's own trail, naming the staff member.","operationId":"delete_org_api_v1_admin_orgs__org_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"confirm_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirm Slug"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/resend-owner-invite":{"post":{"tags":["admin"],"summary":"Resend Owner Invite","description":"Regenerate the magic link for the org's first owner.\n\nUseful when the initial delivery failed or the 24h token expired\nbefore the customer clicked it. Refuses if the owner has already\naccepted (``provisioned_at`` set) so we never clobber a live account.","operationId":"resend_owner_invite_api_v1_admin_orgs__org_id__resend_owner_invite_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendOwnerInviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/suspend":{"post":{"tags":["admin"],"summary":"Suspend Org","description":"Flip ``org.status`` to ``suspended``. Gateway fails every tool call\nclosed with a clear error until resumed.","operationId":"suspend_org_api_v1_admin_orgs__org_id__suspend_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuspendOrgRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgListItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/resume":{"post":{"tags":["admin"],"summary":"Resume Org","description":"Return a suspended org to ``active``.","operationId":"resume_org_api_v1_admin_orgs__org_id__resume_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgListItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/superusers":{"get":{"tags":["admin"],"summary":"List Superusers","description":"List every user flagged as ``is_superuser=True`` + their home org.","operationId":"list_superusers_api_v1_admin_superusers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SuperuserListItem"},"type":"array","title":"Response List Superusers Api V1 Admin Superusers Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["admin"],"summary":"Promote Superuser","description":"Flip ``is_superuser=True`` for an existing user, looked up by email.","operationId":"promote_superuser_api_v1_admin_superusers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoteSuperuserRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuperuserListItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/superusers/{user_id}":{"delete":{"tags":["admin"],"summary":"Demote Superuser","description":"Strip the ``is_superuser`` flag. Refuses to demote yourself.\n\nPrevents a support flow where a panicked operator accidentally\nlocks out all Tracehold staff from the admin panel.","operationId":"demote_superuser_api_v1_admin_superusers__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/status":{"get":{"tags":["status"],"summary":"Status","description":"Return current health of each platform component.\n\nIntentionally unauthenticated: a status page that requires login is\nuseless during an outage. No tenant data is exposed — only component\nhealth, registry sizes, and deploy metadata.","operationId":"status_api_v1_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Status Api V1 Status Get"}}}}}}},"/api/v1/sessions":{"get":{"tags":["sessions"],"summary":"List Sessions","description":"Agent sessions, most recently active first, with what happened in each\n(on Free, those active in the last 7 days).","operationId":"list_sessions_api_v1_sessions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Server Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Sessions Api V1 Sessions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sessions/{session_id}":{"get":{"tags":["sessions"],"summary":"Get Session","description":"One session and every call in it, oldest first: the timeline.","operationId":"get_session_api_v1_sessions__session_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Session Api V1 Sessions  Session Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ai-agents":{"get":{"tags":["sessions"],"summary":"List Ai Agents","description":"Agents acting through MCP servers, with their last 7 days.","operationId":"list_ai_agents_api_v1_ai_agents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Ai Agents Api V1 Ai Agents Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/integrations/slack":{"get":{"tags":["integrations"],"summary":"Get Slack","operationId":"get_slack_api_v1_integrations_slack_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Slack Api V1 Integrations Slack Get"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["integrations"],"summary":"Connect Slack","description":"Check the token, post a hello to the channel, save only if both work.","operationId":"connect_slack_api_v1_integrations_slack_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectSlack"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Connect Slack Api V1 Integrations Slack Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["integrations"],"summary":"Disconnect Slack","operationId":"disconnect_slack_api_v1_integrations_slack_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Disconnect Slack Api V1 Integrations Slack Delete"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/integrations/slack/test":{"post":{"tags":["integrations"],"summary":"Test Slack","operationId":"test_slack_api_v1_integrations_slack_test_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Test Slack Api V1 Integrations Slack Test Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/connectors":{"get":{"tags":["connectors"],"summary":"List Connectors","operationId":"list_connectors_api_v1_connectors_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Connectors Api V1 Connectors Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["connectors"],"summary":"Create Connector","description":"The token is shown once; only its hash is kept.","operationId":"create_connector_api_v1_connectors_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConnector"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Connector Api V1 Connectors Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/upstreams":{"get":{"tags":["connectors"],"summary":"List Upstreams","description":"The organization's own MCP servers, as their connectors report them.","operationId":"list_upstreams_api_v1_upstreams_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Upstreams Api V1 Upstreams Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/connectors/cloudformation.yaml":{"get":{"tags":["connectors"],"summary":"Connector Template","operationId":"connector_template_api_v1_connectors_cloudformation_yaml_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/connectors/installers/{kind}":{"get":{"tags":["connectors"],"summary":"Connector Installer","description":"Another way to start a connector, filled in for this organization.","operationId":"connector_installer_api_v1_connectors_installers__kind__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind"}},{"name":"access","in":"query","required":false,"schema":{"type":"string","pattern":"^(ReadWrite|ReadOnly)$","default":"ReadWrite","title":"Access"}}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connectors/{connector_id}":{"patch":{"tags":["connectors"],"summary":"Update Connector","operationId":"update_connector_api_v1_connectors__connector_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","title":"Connector Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConnector"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Connector Api V1 Connectors  Connector Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["connectors"],"summary":"Delete Connector","operationId":"delete_connector_api_v1_connectors__connector_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","title":"Connector Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Connector Api V1 Connectors  Connector Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connectors/{connector_id}/token":{"post":{"tags":["connectors"],"summary":"Replace Connector Token","description":"A new token, shown once, for a lost or leaked one.","operationId":"replace_connector_token_api_v1_connectors__connector_id__token_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","title":"Connector Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Replace Connector Token Api V1 Connectors  Connector Id  Token Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connector/heartbeat":{"post":{"tags":["connectors"],"summary":"Heartbeat","operationId":"heartbeat_api_v1_connector_heartbeat_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Heartbeat"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Heartbeat Api V1 Connector Heartbeat Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connector/upstreams":{"post":{"tags":["connectors"],"summary":"Report Upstreams","description":"The tools of the MCP servers this connector runs for the customer.","operationId":"report_upstreams_api_v1_connector_upstreams_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamReport"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Report Upstreams Api V1 Connector Upstreams Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connector/audit":{"get":{"tags":["connectors"],"summary":"Audit Since","description":"The organization's audit entries after ``after``, oldest first, for\nthe connector's archive in the customer's own bucket.","operationId":"audit_since_api_v1_connector_audit_get","parameters":[{"name":"after","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"After"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":500,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Audit Since Api V1 Connector Audit Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connector/goodbye":{"post":{"tags":["connectors"],"summary":"Goodbye","description":"A clean stop: shown offline at once, so calls fail closed right away\ninstead of waiting for the heartbeat to lapse. When it was last seen is kept.","operationId":"goodbye_api_v1_connector_goodbye_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Goodbye Api V1 Connector Goodbye Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connector/jobs/next":{"get":{"tags":["connectors"],"summary":"Next Job","description":"Long poll: answers as soon as there is work, else 204 after ``wait``.\nStops as soon as the connector hangs up, so a stopped connector claims nothing.","operationId":"next_job_api_v1_connector_jobs_next_get","parameters":[{"name":"wait","in":"query","required":false,"schema":{"type":"number","maximum":30,"minimum":0,"default":25.0,"title":"Wait"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connector/jobs/{job_id}/result":{"post":{"tags":["connectors"],"summary":"Job Result","description":"Record what happened. For an executed call this closes the action in\nthe audit chain here, whether or not the agent is still waiting.","operationId":"job_result_api_v1_connector_jobs__job_id__result_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResult"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Job Result Api V1 Connector Jobs  Job Id  Result Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/classification/overrides":{"get":{"tags":["classification"],"summary":"List Overrides","operationId":"list_overrides_api_v1_classification_overrides_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RiskOverrideOut"},"type":"array","title":"Response List Overrides Api V1 Classification Overrides Get"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["classification"],"summary":"Set Override","description":"Rate an action, or every action a pattern matches, for the whole\norganization. Audited, with what it was before.","operationId":"set_override_api_v1_classification_overrides_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskOverrideIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskOverrideOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/classification/overrides/{override_id}":{"delete":{"tags":["classification"],"summary":"Remove Override","operationId":"remove_override_api_v1_classification_overrides__override_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"override_id","in":"path","required":true,"schema":{"type":"string","title":"Override Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Override Api V1 Classification Overrides  Override Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/classification/rate":{"get":{"tags":["classification"],"summary":"Rate","description":"The level this action gets in the organization, and why.","operationId":"rate_api_v1_classification_rate_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"action","in":"query","required":true,"schema":{"type":"string","maxLength":255,"title":"Action"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/classification/preview":{"post":{"tags":["classification"],"summary":"Preview","description":"What would change, judged on the last 30 days of calls: how many\ncalls the rule covers, and what each server's guardrails would decide\nfor them. Exceptions still come first, as they would.","operationId":"preview_api_v1_classification_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/classification/suggest":{"post":{"tags":["classification"],"summary":"Suggest Level","description":"A model's suggestion for one of your own MCP servers' tools\n(\"mcp:<server>:<tool>\"), with a reason. Nothing is saved: a person\ndecides, and decisions never use the model.","operationId":"suggest_level_api_v1_classification_suggest_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"action","in":"query","required":true,"schema":{"type":"string","maxLength":300,"title":"Action"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Suggest Level Api V1 Classification Suggest Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/oauth/requests/{request_id}":{"get":{"tags":["agent-sign-in"],"summary":"Consent Request","operationId":"consent_request_api_v1_oauth_requests__request_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Consent Request Api V1 Oauth Requests  Request Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["agent-sign-in"],"summary":"Answer Consent","operationId":"answer_consent_api_v1_oauth_requests__request_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentAnswer"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Answer Consent Api V1 Oauth Requests  Request Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/oauth/sign-ins":{"get":{"tags":["agent-sign-in"],"summary":"List Sign Ins","description":"The organization's agents signed in as people: which app, for whom,\non which server, and their calls.","operationId":"list_sign_ins_api_v1_oauth_sign_ins_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Server Id"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}},{"name":"include_stopped","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Stopped"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Sign Ins Api V1 Oauth Sign Ins Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/oauth/sign-ins/{grant_id}/stop":{"post":{"tags":["agent-sign-in"],"summary":"Stop Sign In","operationId":"stop_sign_in_api_v1_oauth_sign_ins__grant_id__stop_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Stop Sign In Api V1 Oauth Sign Ins  Grant Id  Stop Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/oauth/people/{user_id}/stop":{"post":{"tags":["agent-sign-in"],"summary":"Stop Person","description":"Stop every agent signed in as this person, on every server.","operationId":"stop_person_api_v1_oauth_people__user_id__stop_post","security":[{"HTTPBearer":[]}],"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","additionalProperties":{"type":"integer"},"title":"Response Stop Person Api V1 Oauth People  User Id  Stop Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp/{server_id}/":{"post":{"tags":["mcp-protocol"],"summary":"Mcp Endpoint","description":"MCP JSON-RPC 2.0 endpoint.\n\nAgents connect to this endpoint to discover and call tools.\nAuth is via Bearer token (separate from dashboard JWT).","operationId":"mcp_endpoint_mcp__server_id___post","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["mcp-protocol"],"summary":"Mcp Stream","description":"Streamable HTTP's stream from server to agent: an agent keeps it open\nand is told when the server's tools change, so it fetches the new list\nwithout reconnecting. Without Redis there is no stream (405, as the spec\nallows); agents then see changes when they reconnect.","operationId":"mcp_stream_mcp__server_id___get","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/oauth-protected-resource/mcp/{server_id}/":{"get":{"tags":["agent-sign-in"],"summary":"Protected Resource","description":"RFC 9728: which authorization server signs people in to this MCP\nserver. Only a server that takes a sign-in has one.","operationId":"protected_resource__well_known_oauth_protected_resource_mcp__server_id___get","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/oauth-authorization-server":{"get":{"tags":["agent-sign-in"],"summary":"Authorization Server","operationId":"authorization_server__well_known_oauth_authorization_server_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/register":{"post":{"tags":["agent-sign-in"],"summary":"Register","description":"RFC 7591: an agent app registers itself (no account needed; it can do\nnothing until a person allows it).","operationId":"register_oauth_register_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/authorize":{"get":{"tags":["agent-sign-in"],"summary":"Authorize","description":"Checks the request, then sends the person to the app, where they sign\nin (if they have not) and allow or deny the agent.","operationId":"authorize_oauth_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/token":{"post":{"tags":["agent-sign-in"],"summary":"Token","operationId":"token_oauth_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/revoke":{"post":{"tags":["agent-sign-in"],"summary":"Revoke","description":"RFC 7009: an app signing out. Always 200, known token or not.","operationId":"revoke_oauth_revoke_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v2/":{"get":{"tags":["registry"],"summary":"Base","description":"Registry API check: 200 for a valid connector token (docker login).","operationId":"base_v2__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v2/{name}/manifests/{reference}":{"get":{"tags":["registry"],"summary":"Manifest","operationId":"manifest_v2__name__manifests__reference__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"reference","in":"path","required":true,"schema":{"type":"string","title":"Reference"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"head":{"tags":["registry"],"summary":"Manifest","operationId":"manifest_v2__name__manifests__reference__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"reference","in":"path","required":true,"schema":{"type":"string","title":"Reference"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/{name}/blobs/{digest}":{"get":{"tags":["registry"],"summary":"Blob","operationId":"blob_v2__name__blobs__digest__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"digest","in":"path","required":true,"schema":{"type":"string","title":"Digest"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"head":{"tags":["registry"],"summary":"Blob","operationId":"blob_v2__name__blobs__digest__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"digest","in":"path","required":true,"schema":{"type":"string","title":"Digest"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/{name}/tags/list":{"get":{"tags":["registry"],"summary":"Tags","operationId":"tags_v2__name__tags_list_get","parameters":[{"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"}}}}}}}},"components":{"schemas":{"AcceptInviteRequest":{"properties":{"token":{"type":"string","title":"Token"},"new_password":{"type":"string","title":"New Password"},"accept_terms":{"type":"boolean","title":"Accept Terms","default":false}},"type":"object","required":["token","new_password"],"title":"AcceptInviteRequest"},"AdminUserRow":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"role":{"type":"string","title":"Role"},"is_active":{"type":"boolean","title":"Is Active"},"is_superuser":{"type":"boolean","title":"Is Superuser"},"provisioned_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provisioned At"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","email","role","is_active","is_superuser","created_at"],"title":"AdminUserRow","description":"User row for the admin detail page."},"AlertUpdateRequest":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"assigned_to_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To User Id"},"mute_for":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mute For"}},"type":"object","title":"AlertUpdateRequest","description":"Partial update — any omitted field is left alone.\n\nPhase 4.4 extends the original status-only payload with assignee\nand mute primitives so the detail page can claim ownership, hand\noff, or silence a noisy detector for a window."},"ApprovalAction":{"properties":{"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"}},"type":"object","title":"ApprovalAction"},"BillingSummary":{"properties":{"plan":{"type":"string","title":"Plan"},"display_name":{"type":"string","title":"Display Name"},"plan_status":{"type":"string","title":"Plan Status"},"plan_current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Plan Current Period End"},"plan_cancel_at_period_end":{"type":"boolean","title":"Plan Cancel At Period End"},"rate_limit_rpm":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Rpm"},"limits":{"$ref":"#/components/schemas/PlanLimitsOut"},"features":{"items":{"type":"string"},"type":"array","title":"Features"},"usage":{"$ref":"#/components/schemas/Usage"},"trial_ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Ends At"},"trial_available":{"type":"boolean","title":"Trial Available","default":false},"paid_through":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid Through"},"renewal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renewal"},"grace_ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Grace Ends At"},"billed_agents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Billed Agents"},"has_stripe_customer":{"type":"boolean","title":"Has Stripe Customer"},"billing_configured":{"type":"boolean","title":"Billing Configured","description":"True iff the server has Stripe configured. When false the UI hides upgrade buttons and renders billing as 'contact sales'."}},"type":"object","required":["plan","display_name","plan_status","plan_current_period_end","plan_cancel_at_period_end","rate_limit_rpm","limits","features","usage","has_stripe_customer","billing_configured"],"title":"BillingSummary","description":"Current billing state for the caller's org."},"CatalogAction":{"properties":{"action_identifier":{"type":"string","title":"Action Identifier"},"provider":{"type":"string","title":"Provider"},"service":{"type":"string","title":"Service"},"action_name":{"type":"string","title":"Action Name"},"risk_level":{"type":"string","title":"Risk Level"},"risk_source":{"type":"string","title":"Risk Source","default":"tracehold"},"risk_reason":{"type":"string","title":"Risk Reason","default":""},"builtin_risk_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Builtin Risk Level"},"suggested_tool_name":{"type":"string","title":"Suggested Tool Name"},"suggested_description":{"type":"string","title":"Suggested Description"},"category":{"type":"string","title":"Category"},"executes":{"type":"boolean","title":"Executes"}},"type":"object","required":["action_identifier","provider","service","action_name","risk_level","suggested_tool_name","suggested_description","category","executes"],"title":"CatalogAction"},"ChangePasswordRequest":{"properties":{"current_password":{"type":"string","title":"Current Password"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePasswordRequest"},"CheckoutRequest":{"properties":{"plan":{"type":"string","const":"team","title":"Plan"}},"type":"object","required":["plan"],"title":"CheckoutRequest"},"CheckoutResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"CheckoutResponse"},"CompletePasswordResetRequest":{"properties":{"token":{"type":"string","title":"Token"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["token","new_password"],"title":"CompletePasswordResetRequest"},"ConnectSlack":{"properties":{"bot_token":{"type":"string","maxLength":300,"minLength":20,"title":"Bot Token"},"signing_secret":{"type":"string","maxLength":128,"minLength":16,"title":"Signing Secret"},"channel":{"type":"string","maxLength":100,"minLength":2,"title":"Channel"}},"type":"object","required":["bot_token","signing_secret","channel"],"title":"ConnectSlack"},"ConsentAnswer":{"properties":{"allow":{"type":"boolean","title":"Allow"}},"type":"object","required":["allow"],"title":"ConsentAnswer"},"CreateConnector":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"CreateConnector"},"CreateOrgRequest":{"properties":{"org_name":{"type":"string","maxLength":255,"minLength":1,"title":"Org Name"},"org_slug":{"type":"string","maxLength":100,"minLength":3,"title":"Org Slug"},"plan":{"type":"string","maxLength":32,"title":"Plan","default":"free"},"admin_email":{"type":"string","format":"email","title":"Admin Email"},"admin_full_name":{"type":"string","maxLength":255,"minLength":1,"title":"Admin Full Name"}},"type":"object","required":["org_name","org_slug","admin_email","admin_full_name"],"title":"CreateOrgRequest","description":"Create a new customer organisation and its first owner user.\n\nThe owner is created with no password — just an invite token — so the\nplaintext-password footgun of ``create-admin`` never applies to\ncustomer-provisioned orgs. The magic link is emailed by default, and\nreturned in the response only when SMTP is not configured (matches the\nper-org ``/users/invite`` fallback)."},"CreateOrgResponse":{"properties":{"org_id":{"type":"string","title":"Org Id"},"org_name":{"type":"string","title":"Org Name"},"org_slug":{"type":"string","title":"Org Slug"},"plan":{"type":"string","title":"Plan"},"owner":{"$ref":"#/components/schemas/UserResponse"},"invite_expires_at":{"type":"string","title":"Invite Expires At"},"email_sent":{"type":"boolean","title":"Email Sent"},"magic_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Magic Link"},"message":{"type":"string","title":"Message"}},"type":"object","required":["org_id","org_name","org_slug","plan","owner","invite_expires_at","email_sent","message"],"title":"CreateOrgResponse","description":"Return shape mirrors the per-org invite response so the same UI\npattern (\"email sent\" vs \"copy the link\") works."},"DemoRequestAck":{"properties":{"status":{"type":"string","const":"received","title":"Status","default":"received"},"tracking_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Id"}},"type":"object","title":"DemoRequestAck","description":"Response returned to the client after a successful submission.\n\nReturns a short `tracking_id` the submitter can reference in follow-ups\n(e.g. \"Hi — quoting demo request #TH-3F9A2…\"). Never exposes the\ninternal UUID."},"DemoRequestAdminItem":{"properties":{"id":{"type":"string","title":"Id"},"tracking_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"team_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Size"},"use_case":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Use Case"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"sales_email_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sales Email Sent At"},"sales_email_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sales Email Error"},"ack_email_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ack Email Sent At"}},"type":"object","required":["id","tracking_id","name","email","company","role","team_size","use_case","status","created_at","sales_email_sent_at","sales_email_error","ack_email_sent_at"],"title":"DemoRequestAdminItem","description":"Admin-visible row in the sales inbox. Includes delivery metadata."},"DemoRequestCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"company":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Company"},"role":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Role"},"team_size":{"anyOf":[{"type":"string","enum":["1-10","11-50","51-200","201-1000","1000+"]},{"type":"null"}],"title":"Team Size"},"use_case":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Use Case"},"how_heard":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"How Heard"},"source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Source"},"website":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Website"}},"type":"object","required":["name","email"],"title":"DemoRequestCreate","description":"Input schema for the public Book-a-Demo form.\n\nThe `website` field is a honeypot. A real human will never see it;\nbots that auto-fill every input will set it, and the endpoint will\nsilently drop any submission where it is non-empty."},"DesignPartnerApplicationAck":{"properties":{"status":{"type":"string","const":"received","title":"Status","default":"received"},"tracking_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Id"}},"type":"object","title":"DesignPartnerApplicationAck"},"DesignPartnerApplicationAdminItem":{"properties":{"id":{"type":"string","title":"Id"},"tracking_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"company":{"type":"string","title":"Company"},"pitch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pitch"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"sales_email_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sales Email Sent At"},"sales_email_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sales Email Error"},"ack_email_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ack Email Sent At"}},"type":"object","required":["id","tracking_id","name","email","company","pitch","status","created_at","sales_email_sent_at","sales_email_error","ack_email_sent_at"],"title":"DesignPartnerApplicationAdminItem"},"DesignPartnerApplicationCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"company":{"type":"string","maxLength":200,"minLength":1,"title":"Company"},"pitch":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Pitch"},"source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Source"},"website":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Website"}},"type":"object","required":["name","email","company"],"title":"DesignPartnerApplicationCreate","description":"Input schema for the public /design-partners form.\n\nThe `website` field is a honeypot, same pattern as DemoRequestCreate."},"DryrunMatch":{"properties":{"action_id":{"type":"string","title":"Action Id"},"action_identifier":{"type":"string","title":"Action Identifier"},"cloud_provider":{"type":"string","title":"Cloud Provider"},"risk_level":{"type":"string","title":"Risk Level"},"historical_decision":{"type":"string","title":"Historical Decision"},"would_decide":{"type":"string","title":"Would Decide"},"requested_at":{"type":"string","title":"Requested At"},"acting_for":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acting For"}},"type":"object","required":["action_id","action_identifier","cloud_provider","risk_level","historical_decision","would_decide","requested_at"],"title":"DryrunMatch"},"DryrunRequest":{"properties":{"effect":{"type":"string","title":"Effect"},"conditions":{"additionalProperties":true,"type":"object","title":"Conditions"},"limit":{"type":"integer","title":"Limit","default":100},"sample_size":{"type":"integer","title":"Sample Size","default":5}},"type":"object","required":["effect","conditions"],"title":"DryrunRequest","description":"Candidate rule to evaluate against the last N actions of this org.\n\nThe UI uses this before persisting a new rule — it shows the operator\nexactly which recent actions would flip decision, so a \"block all\nCRITICAL\" rule does not get shipped without them seeing it catches\nlegitimate work."},"DryrunResponse":{"properties":{"scanned":{"type":"integer","title":"Scanned"},"matched":{"type":"integer","title":"Matched"},"would_change":{"type":"integer","title":"Would Change"},"by_decision":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Decision"},"sample":{"items":{"$ref":"#/components/schemas/DryrunMatch"},"type":"array","title":"Sample"}},"type":"object","required":["scanned","matched","would_change","by_decision","sample"],"title":"DryrunResponse"},"EnvironmentIn":{"properties":{"environment":{"anyOf":[{"type":"string","enum":["prod","staging","dev"]},{"type":"null"}],"title":"Environment"},"connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Id"}},"type":"object","title":"EnvironmentIn"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Heartbeat":{"properties":{"version":{"type":"string","maxLength":50,"title":"Version","default":""},"hostname":{"type":"string","maxLength":255,"title":"Hostname","default":""},"install":{"type":"string","maxLength":32,"pattern":"^[a-z-]*$","title":"Install","default":""},"identities":{"additionalProperties":{"type":"string"},"type":"object","title":"Identities"},"accounts":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Accounts"},"ceiling":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Ceiling"},"audit_bucket":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Audit Bucket"},"mcp_port":{"anyOf":[{"type":"integer","maximum":65535.0,"minimum":1.0},{"type":"null"}],"title":"Mcp Port"}},"type":"object","title":"Heartbeat"},"InviteUserRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"full_name":{"type":"string","title":"Full Name"},"role":{"type":"string","title":"Role","default":"member"}},"type":"object","required":["email","full_name"],"title":"InviteUserRequest"},"InviteUserResponse":{"properties":{"user":{"$ref":"#/components/schemas/UserResponse"},"invite_expires_at":{"type":"string","title":"Invite Expires At"},"email_sent":{"type":"boolean","title":"Email Sent"},"magic_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Magic Link"},"message":{"type":"string","title":"Message"}},"type":"object","required":["user","invite_expires_at","email_sent","message"],"title":"InviteUserResponse"},"JobResult":{"properties":{"result":{"additionalProperties":true,"type":"object","title":"Result"}},"type":"object","required":["result"],"title":"JobResult"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"mfa_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfa Code"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"LoginResponse":{"properties":{"requires_mfa":{"type":"boolean","title":"Requires Mfa","default":false},"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"user":{"anyOf":[{"$ref":"#/components/schemas/UserResponse"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"LoginResponse"},"MCPServerCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"cloud_providers":{"type":"string","title":"Cloud Providers","default":"aws"},"deploy_mode":{"type":"string","enum":["sandbox","production"],"title":"Deploy Mode","default":"sandbox"},"guardrails":{"anyOf":[{"type":"string"},{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Guardrails"},"rate_limit_rpm":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Rate Limit Rpm","default":60},"rate_limit_read_rpm":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Rate Limit Read Rpm","default":120},"rate_limit_write_rpm":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Rate Limit Write Rpm","default":60},"rate_limit_destructive_rpm":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Rate Limit Destructive Rpm","default":20},"rate_limit_critical_rpm":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Rate Limit Critical Rpm","default":5},"persona_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona Description"},"connect_with":{"type":"string","enum":["token","sign_in"],"title":"Connect With","default":"token"}},"type":"object","required":["name"],"title":"MCPServerCreate"},"MCPServerResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","title":"Status"},"deploy_mode":{"type":"string","title":"Deploy Mode"},"connect_with":{"type":"string","title":"Connect With","default":"token"},"cloud_providers":{"type":"string","title":"Cloud Providers"},"guardrails":{"additionalProperties":{"type":"string"},"type":"object","title":"Guardrails"},"guardrails_preset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guardrails Preset"},"guardrails_badge":{"type":"string","title":"Guardrails Badge"},"rate_limit_rpm":{"type":"integer","title":"Rate Limit Rpm"},"rate_limit_read_rpm":{"type":"integer","title":"Rate Limit Read Rpm"},"rate_limit_write_rpm":{"type":"integer","title":"Rate Limit Write Rpm"},"rate_limit_destructive_rpm":{"type":"integer","title":"Rate Limit Destructive Rpm"},"rate_limit_critical_rpm":{"type":"integer","title":"Rate Limit Critical Rpm"},"persona_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona Description"},"cloud_accounts":{"additionalProperties":{"type":"string"},"type":"object","title":"Cloud Accounts"},"linked_agent_id":{"type":"string","title":"Linked Agent Id"},"tool_count":{"type":"integer","title":"Tool Count"},"endpoint_url":{"type":"string","title":"Endpoint Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"created_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Email"},"last_client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Client Name"},"last_client_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Client Version"},"last_connected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Connected At"},"last_call_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Call At"},"last_auth_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Auth Error"},"last_auth_error_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Auth Error At"}},"type":"object","required":["id","name","description","status","deploy_mode","cloud_providers","guardrails","guardrails_preset","guardrails_badge","rate_limit_rpm","rate_limit_read_rpm","rate_limit_write_rpm","rate_limit_destructive_rpm","rate_limit_critical_rpm","persona_description","linked_agent_id","tool_count","endpoint_url","created_at"],"title":"MCPServerResponse"},"MCPServerToolCreate":{"properties":{"action_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Identifier"},"upstream":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Upstream"},"upstream_tool":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Upstream Tool"},"tool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Name"},"tool_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Description"},"input_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Schema"},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","title":"MCPServerToolCreate","description":"A catalog action (``action_identifier``), or a tool of the customer's\nown MCP server (``upstream`` and ``upstream_tool``, as their connector\nreported it)."},"MCPServerToolResponse":{"properties":{"id":{"type":"string","title":"Id"},"action_identifier":{"type":"string","title":"Action Identifier"},"upstream":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upstream"},"tool_name":{"type":"string","title":"Tool Name"},"tool_description":{"type":"string","title":"Tool Description"},"risk_level":{"type":"string","title":"Risk Level"},"risk_source":{"type":"string","title":"Risk Source","default":"tracehold"},"risk_reason":{"type":"string","title":"Risk Reason","default":""},"builtin_risk_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Builtin Risk Level"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"enabled":{"type":"boolean","title":"Enabled"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"calls_30d":{"type":"integer","title":"Calls 30D","default":0},"last_called_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Called At"}},"type":"object","required":["id","action_identifier","tool_name","tool_description","risk_level","input_schema","enabled"],"title":"MCPServerToolResponse"},"MCPServerToolRisk":{"properties":{"risk_level":{"anyOf":[{"type":"string","enum":["READ","WRITE","DESTRUCTIVE","CRITICAL"]},{"type":"null"}],"title":"Risk Level"}},"type":"object","title":"MCPServerToolRisk"},"MCPServerToolsRemove":{"properties":{"tool_ids":{"items":{"type":"string"},"type":"array","maxItems":500,"minItems":1,"title":"Tool Ids"}},"type":"object","required":["tool_ids"],"title":"MCPServerToolsRemove","description":"Several of a server's tools, removed at once."},"MCPServerUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"type":"string","enum":["active","paused","disabled"]},{"type":"null"}],"title":"Status"},"deploy_mode":{"anyOf":[{"type":"string","enum":["sandbox","production"]},{"type":"null"}],"title":"Deploy Mode"},"guardrails":{"anyOf":[{"type":"string"},{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Guardrails"},"rate_limit_rpm":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":1.0},{"type":"null"}],"title":"Rate Limit Rpm"},"rate_limit_read_rpm":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":1.0},{"type":"null"}],"title":"Rate Limit Read Rpm"},"rate_limit_write_rpm":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":1.0},{"type":"null"}],"title":"Rate Limit Write Rpm"},"rate_limit_destructive_rpm":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":1.0},{"type":"null"}],"title":"Rate Limit Destructive Rpm"},"rate_limit_critical_rpm":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":1.0},{"type":"null"}],"title":"Rate Limit Critical Rpm"},"persona_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona Description"},"connect_with":{"anyOf":[{"type":"string","enum":["token","sign_in"]},{"type":"null"}],"title":"Connect With"}},"type":"object","title":"MCPServerUpdate"},"MCPServerWithTokenResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","title":"Status"},"deploy_mode":{"type":"string","title":"Deploy Mode"},"connect_with":{"type":"string","title":"Connect With","default":"token"},"cloud_providers":{"type":"string","title":"Cloud Providers"},"guardrails":{"additionalProperties":{"type":"string"},"type":"object","title":"Guardrails"},"guardrails_preset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guardrails Preset"},"guardrails_badge":{"type":"string","title":"Guardrails Badge"},"rate_limit_rpm":{"type":"integer","title":"Rate Limit Rpm"},"rate_limit_read_rpm":{"type":"integer","title":"Rate Limit Read Rpm"},"rate_limit_write_rpm":{"type":"integer","title":"Rate Limit Write Rpm"},"rate_limit_destructive_rpm":{"type":"integer","title":"Rate Limit Destructive Rpm"},"rate_limit_critical_rpm":{"type":"integer","title":"Rate Limit Critical Rpm"},"persona_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona Description"},"cloud_accounts":{"additionalProperties":{"type":"string"},"type":"object","title":"Cloud Accounts"},"linked_agent_id":{"type":"string","title":"Linked Agent Id"},"tool_count":{"type":"integer","title":"Tool Count"},"endpoint_url":{"type":"string","title":"Endpoint Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"created_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Email"},"last_client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Client Name"},"last_client_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Client Version"},"last_connected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Connected At"},"last_call_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Call At"},"last_auth_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Auth Error"},"last_auth_error_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Auth Error At"},"auth_token":{"type":"string","title":"Auth Token"},"plan_notice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Notice"}},"type":"object","required":["id","name","description","status","deploy_mode","cloud_providers","guardrails","guardrails_preset","guardrails_badge","rate_limit_rpm","rate_limit_read_rpm","rate_limit_write_rpm","rate_limit_destructive_rpm","rate_limit_critical_rpm","persona_description","linked_agent_id","tool_count","endpoint_url","created_at","auth_token"],"title":"MCPServerWithTokenResponse","description":"Returned only on creation — includes the plaintext auth token."},"MFAConfirmResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"backup_codes":{"items":{"type":"string"},"type":"array","title":"Backup Codes"},"message":{"type":"string","title":"Message","default":"MFA is now enabled. Save these backup codes somewhere safe — they will not be shown again."}},"type":"object","required":["enabled","backup_codes"],"title":"MFAConfirmResponse"},"MFADisableRequest":{"properties":{"current_password":{"type":"string","title":"Current Password"},"code":{"type":"string","title":"Code"}},"type":"object","required":["current_password","code"],"title":"MFADisableRequest"},"MFASetupResponse":{"properties":{"secret":{"type":"string","title":"Secret"},"provisioning_uri":{"type":"string","title":"Provisioning Uri"},"qr_code_data_url":{"type":"string","title":"Qr Code Data Url"}},"type":"object","required":["secret","provisioning_uri","qr_code_data_url"],"title":"MFASetupResponse","description":"Enrollment payload — shown ONCE. The caller must verify a code before\nMFA is actually enabled on the account."},"MFAStatusResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"enabled_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enabled At"},"backup_codes_remaining":{"type":"integer","title":"Backup Codes Remaining","default":0}},"type":"object","required":["enabled"],"title":"MFAStatusResponse"},"MFAVerifyRequest":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"MFAVerifyRequest"},"ModePreviewExample":{"properties":{"action_id":{"type":"string","title":"Action Id"},"action_identifier":{"type":"string","title":"Action Identifier"},"decision":{"type":"string","title":"Decision"},"matched_rule_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Rule Name"},"requested_at":{"type":"string","format":"date-time","title":"Requested At"}},"type":"object","required":["action_id","action_identifier","decision","matched_rule_name","requested_at"],"title":"ModePreviewExample","description":"A recent action the UI can show as \"this would have been blocked\"."},"ModePreviewResponse":{"properties":{"server_id":{"type":"string","title":"Server Id"},"server_name":{"type":"string","title":"Server Name"},"current_deploy_mode":{"type":"string","title":"Current Deploy Mode"},"window_days":{"type":"integer","title":"Window Days"},"total_actions":{"type":"integer","title":"Total Actions"},"by_decision":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Decision"},"top_rules":{"items":{"$ref":"#/components/schemas/ModePreviewRuleHit"},"type":"array","title":"Top Rules"},"recent_would_block":{"items":{"$ref":"#/components/schemas/ModePreviewExample"},"type":"array","title":"Recent Would Block"}},"type":"object","required":["server_id","server_name","current_deploy_mode","window_days","total_actions","by_decision","top_rules","recent_would_block"],"title":"ModePreviewResponse","description":"Answer to the \"what would change if I flipped to production?\" question.\n\nAggregates the action stream of the server's linked agent over the\nwindow. The counts themselves are independent of deploy_mode: actions\nalready carry the policy decision that *would* apply under the current\nguardrails; we just surface them so the operator can see the\nblast radius of flipping execution on."},"ModePreviewRuleHit":{"properties":{"rule_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Id"},"rule_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Name"},"policy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Id"},"policy_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Name"},"effect":{"type":"string","title":"Effect"},"hits":{"type":"integer","title":"Hits"}},"type":"object","required":["rule_id","rule_name","policy_id","policy_name","effect","hits"],"title":"ModePreviewRuleHit","description":"Top-N aggregate of a policy rule across the preview window."},"OrgDeletionRequest":{"properties":{"confirm_slug":{"type":"string","title":"Confirm Slug"},"current_password":{"type":"string","title":"Current Password"},"mfa_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfa Code"}},"type":"object","required":["confirm_slug","current_password"],"title":"OrgDeletionRequest","description":"The owner deletes the organization: its slug typed, and their\npassword (and two-factor code when it is on), so a session alone\ncannot."},"OrgDeletionResponse":{"properties":{"scheduled_for":{"type":"string","format":"date-time","title":"Scheduled For"}},"type":"object","required":["scheduled_for"],"title":"OrgDeletionResponse"},"OrgDetailResponse":{"properties":{"org":{"$ref":"#/components/schemas/OrgListItem"},"users":{"items":{"$ref":"#/components/schemas/AdminUserRow"},"type":"array","title":"Users"}},"type":"object","required":["org","users"],"title":"OrgDetailResponse"},"OrgListItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"plan":{"type":"string","title":"Plan"},"status":{"type":"string","title":"Status","default":"active"},"suspended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suspended At"},"suspended_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suspended Reason"},"deletion_scheduled_for":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deletion Scheduled For"},"action_quota_monthly":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Action Quota Monthly"},"rate_limit_rpm":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Rpm"},"trial_ends_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trial Ends At"},"plan_status":{"type":"string","title":"Plan Status","default":"active"},"plan_cancel_at_period_end":{"type":"boolean","title":"Plan Cancel At Period End","default":false},"plan_current_period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Current Period End"},"billed_by_card":{"type":"boolean","title":"Billed By Card","default":false},"paid_through":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paid Through"},"renewal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renewal"},"created_at":{"type":"string","title":"Created At"},"user_count":{"type":"integer","title":"User Count"},"pending_invite_count":{"type":"integer","title":"Pending Invite Count"},"owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"},"owner_provisioned":{"type":"boolean","title":"Owner Provisioned","default":false},"actions_24h":{"type":"integer","title":"Actions 24H","default":0},"actions_7d":{"type":"integer","title":"Actions 7D","default":0},"mcp_server_count":{"type":"integer","title":"Mcp Server Count","default":0},"last_action_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Action At"},"people_with_agents_30d":{"type":"integer","title":"People With Agents 30D","default":0},"token_agents":{"type":"integer","title":"Token Agents","default":0}},"type":"object","required":["id","name","slug","plan","created_at","user_count","pending_invite_count"],"title":"OrgListItem","description":"One row in the superuser-only ``/admin/orgs`` list.\n\nIncludes provisioning metadata plus lightweight operational signals\n(last gateway call, 24h/7d action counts, MCP server count) so staff\ncan tell at a glance which orgs are active versus dormant versus\nstuck."},"OrgSettingsResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"fail_mode":{"type":"string","title":"Fail Mode"},"mfa_required":{"type":"boolean","title":"Mfa Required","default":false},"webhook_signing_enabled":{"type":"boolean","title":"Webhook Signing Enabled","default":false},"pagerduty_enabled":{"type":"boolean","title":"Pagerduty Enabled","default":false},"pagerduty_critical_only":{"type":"boolean","title":"Pagerduty Critical Only","default":true},"default_approval_ttl_minutes":{"type":"integer","title":"Default Approval Ttl Minutes","default":30},"email_enabled":{"type":"boolean","title":"Email Enabled","default":false},"admins_approve_own":{"type":"boolean","title":"Admins Approve Own","default":true},"members_approve_own_up_to":{"type":"string","title":"Members Approve Own Up To","default":"none"},"deletion_scheduled_for":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deletion Scheduled For"},"deletion_requested_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deletion Requested By"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"},"webhook_configured":{"type":"boolean","title":"Webhook Configured","default":false}},"type":"object","required":["id","name","slug","fail_mode"],"title":"OrgSettingsResponse","description":"GET and PUT /auth/org: the organization plus its event webhook.\n\nThe webhook address goes only to owners and admins, who set it (and\ncould point it anywhere): it often carries the receiver's own token in\nits path or query. Members and viewers learn only that one is set. It is\nnot a field of OrganizationResponse because every member receives that\none inside UserResponse, validated from the ORM object's attributes, so\na field named after the column would copy it."},"OrgUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"fail_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fail Mode"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"},"mfa_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Mfa Required"},"pagerduty_routing_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pagerduty Routing Key"},"pagerduty_critical_only":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pagerduty Critical Only"},"default_approval_ttl_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Approval Ttl Minutes"},"admins_approve_own":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Admins Approve Own"},"members_approve_own_up_to":{"anyOf":[{"type":"string","enum":["none","WRITE","DESTRUCTIVE"]},{"type":"null"}],"title":"Members Approve Own Up To"}},"type":"object","title":"OrgUpdateRequest"},"OrganizationResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"fail_mode":{"type":"string","title":"Fail Mode"},"mfa_required":{"type":"boolean","title":"Mfa Required","default":false},"webhook_signing_enabled":{"type":"boolean","title":"Webhook Signing Enabled","default":false},"pagerduty_enabled":{"type":"boolean","title":"Pagerduty Enabled","default":false},"pagerduty_critical_only":{"type":"boolean","title":"Pagerduty Critical Only","default":true},"default_approval_ttl_minutes":{"type":"integer","title":"Default Approval Ttl Minutes","default":30},"email_enabled":{"type":"boolean","title":"Email Enabled","default":false},"admins_approve_own":{"type":"boolean","title":"Admins Approve Own","default":true},"members_approve_own_up_to":{"type":"string","title":"Members Approve Own Up To","default":"none"},"deletion_scheduled_for":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deletion Scheduled For"},"deletion_requested_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deletion Requested By"}},"type":"object","required":["id","name","slug","fail_mode"],"title":"OrganizationResponse"},"PersonaSuggestRequest":{"properties":{"description":{"type":"string","minLength":5,"title":"Description"},"cloud_providers":{"items":{"type":"string"},"type":"array","title":"Cloud Providers","default":["aws"]}},"type":"object","required":["description"],"title":"PersonaSuggestRequest"},"PersonaSuggestResponse":{"properties":{"suggested_tools":{"items":{"$ref":"#/components/schemas/CatalogAction"},"type":"array","title":"Suggested Tools"},"critical_asked":{"items":{"$ref":"#/components/schemas/CatalogAction"},"type":"array","title":"Critical Asked","default":[]}},"type":"object","required":["suggested_tools"],"title":"PersonaSuggestResponse"},"PlanLimitsOut":{"properties":{"agents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agents"},"cloud_accounts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cloud Accounts"},"people":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"People"},"history_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"History Days"}},"type":"object","required":["agents","cloud_accounts","people","history_days"],"title":"PlanLimitsOut","description":"None means no limit."},"PlanPublic":{"properties":{"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"price_usd_per_agent_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Usd Per Agent Month"},"min_agents_billed":{"type":"integer","title":"Min Agents Billed"},"limits":{"$ref":"#/components/schemas/PlanLimitsOut"},"rate_limit_rpm":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Rpm"},"features":{"items":{"type":"string"},"type":"array","title":"Features"},"highlights":{"items":{"type":"string"},"type":"array","title":"Highlights"},"checkoutable":{"type":"boolean","title":"Checkoutable"}},"type":"object","required":["name","display_name","description","price_usd_per_agent_month","min_agents_billed","limits","rate_limit_rpm","features","highlights","checkoutable"],"title":"PlanPublic"},"PolicyCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"priority":{"type":"integer","title":"Priority","default":100},"is_active":{"type":"boolean","title":"Is Active","default":true},"simulation_mode":{"type":"boolean","title":"Simulation Mode","default":false},"owasp_tags":{"items":{"type":"string"},"type":"array","title":"Owasp Tags","default":[]},"nist_controls":{"items":{"type":"string"},"type":"array","title":"Nist Controls","default":[]},"rules":{"items":{"$ref":"#/components/schemas/PolicyRuleCreate"},"type":"array","title":"Rules","default":[]}},"type":"object","required":["name"],"title":"PolicyCreate"},"PolicyResponse":{"properties":{"id":{"type":"string","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"priority":{"type":"integer","title":"Priority"},"is_active":{"type":"boolean","title":"Is Active"},"simulation_mode":{"type":"boolean","title":"Simulation Mode"},"owasp_tags":{"items":{"type":"string"},"type":"array","title":"Owasp Tags"},"nist_controls":{"items":{"type":"string"},"type":"array","title":"Nist Controls"},"rules":{"items":{"$ref":"#/components/schemas/PolicyRuleResponse"},"type":"array","title":"Rules","default":[]}},"type":"object","required":["id","organization_id","name","description","priority","is_active","simulation_mode","owasp_tags","nist_controls"],"title":"PolicyResponse"},"PolicyRuleCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"effect":{"type":"string","title":"Effect"},"priority":{"type":"integer","title":"Priority","default":100},"conditions":{"additionalProperties":true,"type":"object","title":"Conditions","default":{}},"required_approvals":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Required Approvals","default":1},"approval_ttl_minutes":{"type":"integer","maximum":1440.0,"minimum":0.0,"title":"Approval Ttl Minutes","default":0},"nist_control":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nist Control"},"owasp_control":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owasp Control"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["name","effect"],"title":"PolicyRuleCreate"},"PolicyRuleResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"effect":{"type":"string","title":"Effect"},"priority":{"type":"integer","title":"Priority"},"conditions":{"additionalProperties":true,"type":"object","title":"Conditions"},"required_approvals":{"type":"integer","title":"Required Approvals"},"approval_ttl_minutes":{"type":"integer","title":"Approval Ttl Minutes"},"nist_control":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nist Control"},"owasp_control":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owasp Control"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","name","description","effect","priority","conditions","required_approvals","approval_ttl_minutes","nist_control","owasp_control","is_active"],"title":"PolicyRuleResponse"},"PolicyRuleUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"effect":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effect"},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority"},"conditions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Conditions"},"required_approvals":{"anyOf":[{"type":"integer","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"Required Approvals"},"approval_ttl_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Approval Ttl Minutes"},"nist_control":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nist Control"},"owasp_control":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owasp Control"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"PolicyRuleUpdate","description":"Partial update for a single rule.\n\nOnly present fields are applied, so the UI can send {priority: 20}\nto nudge ordering without touching name/effect/conditions."},"PolicyUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"simulation_mode":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Simulation Mode"},"owasp_tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Owasp Tags"},"nist_controls":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Nist Controls"}},"type":"object","title":"PolicyUpdate"},"PolicyVersionDetail":{"properties":{"id":{"type":"string","title":"Id"},"version_num":{"type":"integer","title":"Version Num"},"change_summary":{"type":"string","title":"Change Summary"},"changed_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changed By User Id"},"changed_by_user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changed By User Email"},"created_at":{"type":"string","title":"Created At"},"snapshot":{"additionalProperties":true,"type":"object","title":"Snapshot"}},"type":"object","required":["id","version_num","change_summary","changed_by_user_id","created_at","snapshot"],"title":"PolicyVersionDetail","description":"History row with the full snapshot for diff/restore views."},"PolicyVersionSummary":{"properties":{"id":{"type":"string","title":"Id"},"version_num":{"type":"integer","title":"Version Num"},"change_summary":{"type":"string","title":"Change Summary"},"changed_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changed By User Id"},"changed_by_user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changed By User Email"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","version_num","change_summary","changed_by_user_id","created_at"],"title":"PolicyVersionSummary","description":"Lightweight row for the history list — no snapshot payload."},"PortalResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"PortalResponse"},"PreviewIn":{"properties":{"pattern":{"type":"string","title":"Pattern"},"risk_level":{"type":"string","enum":["READ","WRITE","DESTRUCTIVE","CRITICAL"],"title":"Risk Level"}},"type":"object","required":["pattern","risk_level"],"title":"PreviewIn"},"PreviewOut":{"properties":{"days":{"type":"integer","title":"Days"},"calls":{"type":"integer","title":"Calls"},"level_changes":{"type":"integer","title":"Level Changes"},"would_run":{"type":"integer","title":"Would Run"},"would_ask":{"type":"integer","title":"Would Ask"},"would_block":{"type":"integer","title":"Would Block"},"decisions_changed":{"type":"integer","title":"Decisions Changed"},"actions":{"items":{"type":"string"},"type":"array","title":"Actions"}},"type":"object","required":["days","calls","level_changes","would_run","would_ask","would_block","decisions_changed","actions"],"title":"PreviewOut"},"PromoteSuperuserRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"PromoteSuperuserRequest"},"RatingOut":{"properties":{"action_identifier":{"type":"string","title":"Action Identifier"},"risk_level":{"type":"string","title":"Risk Level"},"source":{"type":"string","title":"Source"},"reason":{"type":"string","title":"Reason"},"builtin_level":{"type":"string","title":"Builtin Level"},"builtin_reason":{"type":"string","title":"Builtin Reason"}},"type":"object","required":["action_identifier","risk_level","source","reason","builtin_level","builtin_reason"],"title":"RatingOut"},"RegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"full_name":{"type":"string","title":"Full Name"},"organization_name":{"type":"string","title":"Organization Name"},"organization_slug":{"type":"string","title":"Organization Slug"}},"type":"object","required":["email","password","full_name","organization_name","organization_slug"],"title":"RegisterRequest"},"ResendOwnerInviteResponse":{"properties":{"owner":{"$ref":"#/components/schemas/UserResponse"},"invite_expires_at":{"type":"string","title":"Invite Expires At"},"email_sent":{"type":"boolean","title":"Email Sent"},"magic_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Magic Link"},"message":{"type":"string","title":"Message"}},"type":"object","required":["owner","invite_expires_at","email_sent","message"],"title":"ResendOwnerInviteResponse"},"ResendVerificationRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ResendVerificationRequest"},"ResetPasswordRequest":{"properties":{"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["new_password"],"title":"ResetPasswordRequest","description":"Admin/owner can reset another user's password."},"RiskOverrideIn":{"properties":{"pattern":{"type":"string","title":"Pattern"},"risk_level":{"type":"string","enum":["READ","WRITE","DESTRUCTIVE","CRITICAL"],"title":"Risk Level"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["pattern","risk_level"],"title":"RiskOverrideIn"},"RiskOverrideOut":{"properties":{"id":{"type":"string","title":"Id"},"pattern":{"type":"string","title":"Pattern"},"risk_level":{"type":"string","enum":["READ","WRITE","DESTRUCTIVE","CRITICAL"],"title":"Risk Level"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"builtin_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Builtin Level"},"builtin_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Builtin Reason"}},"type":"object","required":["id","pattern","risk_level","note"],"title":"RiskOverrideOut"},"SAMLConfigIn":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"idp_entity_id":{"type":"string","maxLength":2048,"minLength":1,"title":"Idp Entity Id"},"idp_sso_url":{"type":"string","maxLength":2048,"minLength":1,"title":"Idp Sso Url"},"idp_x509_cert":{"type":"string","minLength":64,"title":"Idp X509 Cert"},"attr_email":{"type":"string","title":"Attr Email","default":"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"},"attr_full_name":{"type":"string","title":"Attr Full Name","default":"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"},"force_sso":{"type":"boolean","title":"Force Sso","default":false}},"type":"object","required":["idp_entity_id","idp_sso_url","idp_x509_cert"],"title":"SAMLConfigIn","description":"Request body for creating or updating an org's SAML config.\n\nThe ``enabled`` flag gates live traffic — admins can save a config\nwith ``enabled=false`` first, verify via the metadata/test endpoints,\nthen flip it on."},"SAMLConfigOut":{"properties":{"id":{"type":"string","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"enabled":{"type":"boolean","title":"Enabled"},"idp_entity_id":{"type":"string","title":"Idp Entity Id"},"idp_sso_url":{"type":"string","title":"Idp Sso Url"},"idp_x509_cert_fingerprint":{"type":"string","title":"Idp X509 Cert Fingerprint"},"attr_email":{"type":"string","title":"Attr Email"},"attr_full_name":{"type":"string","title":"Attr Full Name"},"force_sso":{"type":"boolean","title":"Force Sso"},"last_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","organization_id","enabled","idp_entity_id","idp_sso_url","idp_x509_cert_fingerprint","attr_email","attr_full_name","force_sso","last_login_at","created_at","updated_at"],"title":"SAMLConfigOut"},"SAMLStatus":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"organization_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Slug"},"force_sso":{"type":"boolean","title":"Force Sso","default":false}},"type":"object","required":["enabled"],"title":"SAMLStatus","description":"Public, unauthenticated: does this org have SSO enabled?\n\nReturned from ``GET /auth/saml/status?email=...`` so the login\npage can route a user to the right IdP without leaking whether\nthe org actually exists (we always return a response, but\n``enabled=false`` for unknown orgs)."},"SPMetadata":{"properties":{"sp_entity_id":{"type":"string","title":"Sp Entity Id"},"sp_acs_url":{"type":"string","title":"Sp Acs Url"},"sp_sls_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sp Sls Url"},"metadata_url":{"type":"string","title":"Metadata Url"}},"type":"object","required":["sp_entity_id","sp_acs_url","metadata_url"],"title":"SPMetadata","description":"The SP metadata fields an admin pastes into the IdP."},"ScheduleResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"cadence":{"type":"string","title":"Cadence"},"hour_utc":{"type":"integer","title":"Hour Utc"},"minute_utc":{"type":"integer","title":"Minute Utc"},"day_of_week":{"type":"integer","title":"Day Of Week"},"next_run_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Run At"},"last_run_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Run At"},"last_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Run Id"},"has_override":{"type":"boolean","title":"Has Override"}},"type":"object","required":["enabled","cadence","hour_utc","minute_utc","day_of_week","next_run_at","last_run_at","last_run_id","has_override"],"title":"ScheduleResponse"},"ScheduleUpdateRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true},"cadence":{"type":"string","title":"Cadence","default":"daily"},"hour_utc":{"type":"integer","maximum":23.0,"minimum":0.0,"title":"Hour Utc","default":3},"minute_utc":{"type":"integer","maximum":59.0,"minimum":0.0,"title":"Minute Utc","default":0},"day_of_week":{"type":"integer","maximum":6.0,"minimum":0.0,"title":"Day Of Week","default":1}},"type":"object","title":"ScheduleUpdateRequest"},"ServerAccountIn":{"properties":{"provider":{"type":"string","enum":["aws","gcp","azure"],"title":"Provider"},"connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Id"}},"type":"object","required":["provider"],"title":"ServerAccountIn","description":"The account a server acts in, in one cloud; null clears the choice."},"SignupRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"full_name":{"type":"string","maxLength":255,"minLength":1,"title":"Full Name"},"organization_name":{"type":"string","maxLength":255,"minLength":2,"title":"Organization Name"},"accept_terms":{"type":"boolean","title":"Accept Terms"},"turnstile_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turnstile Token"}},"type":"object","required":["email","password","full_name","organization_name","accept_terms"],"title":"SignupRequest","description":"Self-serve sign-up (auth/signup.py): a new organization on Free."},"SignupResponse":{"properties":{"user":{"$ref":"#/components/schemas/UserResponse"},"email_sent":{"type":"boolean","title":"Email Sent","default":false},"verify_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verify Link"}},"type":"object","required":["user"],"title":"SignupResponse","description":"Signed up, not signed in: the emailed link confirms the address and\nsigns the person in the first time."},"SimulateRequest":{"properties":{"action_identifier":{"type":"string","title":"Action Identifier"},"cloud_provider":{"type":"string","title":"Cloud Provider","default":"aws"},"risk_level":{"type":"string","title":"Risk Level","default":"CRITICAL"},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters","default":{}},"agent_id":{"type":"string","title":"Agent Id","default":"simulate-agent"},"task_id":{"type":"string","title":"Task Id","default":"simulate-task"},"guardrails":{"anyOf":[{"type":"string"},{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Guardrails"},"blast_radius_score":{"type":"number","title":"Blast Radius Score","default":0.5},"blast_radius_environment":{"type":"string","title":"Blast Radius Environment","default":"unknown"}},"type":"object","required":["action_identifier"],"title":"SimulateRequest","description":"Hypothetical action to test against a specific policy."},"SimulateResponse":{"properties":{"decision":{"type":"string","title":"Decision"},"reason":{"type":"string","title":"Reason"},"matched_rule_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Rule Id"},"matched_rule_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Rule Name"},"matched_policy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Policy Id"},"simulation_mode":{"type":"boolean","title":"Simulation Mode"},"policy_id":{"type":"string","title":"Policy Id"}},"type":"object","required":["decision","reason","matched_rule_id","matched_rule_name","matched_policy_id","simulation_mode","policy_id"],"title":"SimulateResponse"},"SinkCreateRequest":{"properties":{"sink_type":{"type":"string","title":"Sink Type","description":"'splunk_hec' | 'datadog_logs'"},"display_name":{"type":"string","maxLength":128,"minLength":1,"title":"Display Name"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["sink_type","display_name","config"],"title":"SinkCreateRequest"},"SinkUpdateRequest":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Display Name"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"type":"object","title":"SinkUpdateRequest"},"SuperuserListItem":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"organization_id":{"type":"string","title":"Organization Id"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"}},"type":"object","required":["id","email","organization_id"],"title":"SuperuserListItem"},"SuspendOrgRequest":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"}},"type":"object","title":"SuspendOrgRequest"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"user":{"$ref":"#/components/schemas/UserResponse"}},"type":"object","required":["access_token","user"],"title":"TokenResponse"},"TransferOwnershipRequest":{"properties":{"target_user_id":{"type":"string","title":"Target User Id"},"current_password":{"type":"string","title":"Current Password"},"mfa_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfa Code"}},"type":"object","required":["target_user_id","current_password"],"title":"TransferOwnershipRequest","description":"Hand the ``owner`` role to another admin in the same org.\n\nThe caller must re-enter their current password so a stolen session\nalone cannot perform the transfer. If the owner has MFA enabled,\n``mfa_code`` is also required. Target must already be an admin in\nthe same org (see service-layer invariants)."},"TransferOwnershipResponse":{"properties":{"new_owner":{"$ref":"#/components/schemas/UserResponse"},"former_owner":{"$ref":"#/components/schemas/UserResponse"},"message":{"type":"string","title":"Message"}},"type":"object","required":["new_owner","former_owner","message"],"title":"TransferOwnershipResponse"},"TrialResponse":{"properties":{"trial_ends_at":{"type":"string","format":"date-time","title":"Trial Ends At"}},"type":"object","required":["trial_ends_at"],"title":"TrialResponse"},"UpdateConnector":{"properties":{"agent_url":{"anyOf":[{"type":"string","maxLength":512,"pattern":"^(https?://[A-Za-z0-9.-]+(:\\d{1,5})?/?)?$"},{"type":"null"}],"title":"Agent Url"}},"type":"object","title":"UpdateConnector"},"UpdateOrgRequest":{"properties":{"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"},"action_quota_monthly":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Action Quota Monthly"},"rate_limit_rpm":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Rpm"},"trial_ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Ends At"},"paid_through":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid Through"}},"type":"object","title":"UpdateOrgRequest","description":"Staff-only updates to plan + quota knobs on an existing org.\n\nEvery field is optional so the UI can patch a single dropdown without\nround-tripping the whole row. Pass ``null`` to action_quota_monthly\nor rate_limit_rpm to remove the cap."},"UpdateUserRequest":{"properties":{"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"UpdateUserRequest"},"UpstreamReport":{"properties":{"servers":{"items":{"$ref":"#/components/schemas/UpstreamServerReport"},"type":"array","maxItems":50,"title":"Servers"}},"type":"object","title":"UpstreamReport"},"UpstreamServerReport":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"pattern":"^[A-Za-z0-9_.-]+$","title":"Name"},"tools":{"items":{"$ref":"#/components/schemas/UpstreamToolReport"},"type":"array","maxItems":500,"title":"Tools"},"error":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Error"}},"type":"object","required":["name"],"title":"UpstreamServerReport"},"UpstreamToolReport":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}],"title":"Description"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"annotations":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Annotations"}},"type":"object","required":["name"],"title":"UpstreamToolReport"},"Usage":{"properties":{"agents":{"type":"integer","title":"Agents"},"cloud_accounts":{"type":"integer","title":"Cloud Accounts"},"people":{"type":"integer","title":"People"},"active_agents_this_month":{"type":"integer","title":"Active Agents This Month"}},"type":"object","required":["agents","cloud_accounts","people","active_agents_this_month"],"title":"Usage","description":"What the organization has now, as its plan counts it."},"UserResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"type":"string","title":"Full Name"},"role":{"type":"string","title":"Role"},"is_active":{"type":"boolean","title":"Is Active"},"organization_id":{"type":"string","title":"Organization Id"},"organization":{"anyOf":[{"$ref":"#/components/schemas/OrganizationResponse"},{"type":"null"}]},"mfa_enabled":{"type":"boolean","title":"Mfa Enabled","default":false},"is_superuser":{"type":"boolean","title":"Is Superuser","default":false},"email_verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Email Verified At"},"provisioned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Provisioned At"}},"type":"object","required":["id","email","full_name","role","is_active","organization_id"],"title":"UserResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifiedResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"user":{"$ref":"#/components/schemas/UserResponse"},"verified":{"type":"boolean","title":"Verified","default":true},"email":{"type":"string","title":"Email"}},"type":"object","required":["access_token","user","email"],"title":"VerifiedResponse","description":"The address is confirmed, and the person is signed in."},"VerifyEmailRequest":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"VerifyEmailRequest"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}