{"openapi":"3.1.0","info":{"title":"SealGate v1 API","description":"Open-source MCP security, aggregation, and monitoring. Self-hosted MCP proxy.","version":"0.16.0"},"paths":{"/api/v1/billing/balance":{"get":{"summary":"Get Balance","description":"This org's balance, ceilings and usage over one window's current period.\n\nOrg admin throughout: what an organisation is spending, and who among its\nmembers may spend it, are both its own business.","operationId":"get_balance_api_v1_billing_balance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"window","in":"query","required":false,"schema":{"type":"string","default":"month","title":"Window"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/rates":{"get":{"summary":"Get Rates","description":"What each metered action currently costs, the free ones included.\n\nVisible to any org admin: a member wondering why a call cost what it did\nshould be able to find out without asking us. Prices are the same for every\norg, so nothing here is scoped - and nothing here can be changed through\nthe API at all, which is deliberate.","operationId":"get_rates_api_v1_billing_rates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/retention":{"put":{"summary":"Set Retention","description":"How long per-call usage detail is kept for this organisation.\n\n**Org admin, not a billing grant.** This is a data-retention control that\nhappens to point at billing rows: it decides how long a firehose of per-call\nevidence sits in the database, which is the same question\n``/tenant/audit-log-retention`` and ``/tenant/session-log-retention`` answer\nfor the other two log tables, and those are an admin's to set. Requiring a\nbilling grant here meant an admin could shorten every other retention window\nin Settings > Data and not this one, which is not a policy anybody chose.\n\nIt cannot be used to hide a charge: the ledger and the wallets are never\naged out, only the detail behind a movement, and the floor and ceiling on\nthe window are enforced in :mod:`src.billing.retention` regardless.","operationId":"set_retention_api_v1_billing_retention_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetRetentionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/caps":{"put":{"summary":"Set Cap","description":"Set a member's spend ceiling, or the org-wide default.\n\n**Org admin, not a billing grant.** A ceiling creates no money: it is a rate\nlimit inside the organisation's own pool, so raising one lets a member draw\ncredits the org already has faster, and the pool stays bounded by what was\ngranted either way. Who may spend an organisation's budget is the same shape\nof decision as who holds which role in it - the admin's, not the vendor's.\n\nWhat does create money is granting credits, and what sets the price is the\nrate card; both live in the CLI behind ``BILLING_DB_URL`` and neither is\nreachable from here.\n\nA cap is a rate limit inside a period, never an allocation of the pool -\nunused headroom on one seat stays spendable by another. Returns the whole\nrefreshed picture so a caller never has to re-fetch to stay consistent.","operationId":"set_cap_api_v1_billing_caps_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCapRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/caps/{user_id}":{"delete":{"summary":"Clear Cap","description":"Remove one member's own ceilings, so the org default governs them again.\n\nOrg admin, for the reason set out on ``set_cap``: taking a ceiling away\ncreates no money either.\n\nNot the same as setting each window to inherit. That leaves the row in\nplace, and a row is what puts somebody in the members table at all, so they\nwould go on being listed with the organisation's figures shown as theirs.\nSee :func:`~src.billing.admin.clear_member_caps`.\n\nAnswers 200 whether or not there was a row to remove: the caller wanted\nthis member to have no ceilings of their own, and afterwards they do not.","operationId":"clear_cap_api_v1_billing_caps__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/checkout":{"post":{"summary":"Create Checkout","description":"Start a Checkout session for a credit pack.\n\nWrites nothing: the org and the amount ride along as Stripe metadata and\nonly become a balance once the webhook confirms the payment settled.","operationId":"create_checkout_api_v1_billing_checkout_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequestBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/codes/redeem":{"post":{"summary":"Redeem Code","description":"Present a referral or promo code and take the credits.\n\nAny signed-in member, not just an admin: a code is given to a person, and\nneeding an administrator to type it in would defeat the point. The credits\nland in their organisation's pool, which is where every other credit lives.\n\nRate limited at the brute-force tier - a short code is a guessable one,\nand this endpoint moves money.","operationId":"redeem_code_api_v1_billing_codes_redeem_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemCodeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedemptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/codes/mine":{"get":{"summary":"My Referral Code","description":"The caller's own referral code, minted on first ask and stable after.\n\nA GET that writes on its first call, deliberately: the page that shows\nsomebody their code is the page that creates it, and a separate \"generate\"\nbutton would be a step with one possible answer.","operationId":"my_referral_code_api_v1_billing_codes_mine_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralCodeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/me":{"get":{"summary":"Get My Usage","description":"What the signed-in member has spent, and what will stop them next.\n\nAny member, not just an admin: when a ceiling quietly turns the expensive\nwork off, the person it happened to should be able to find out why without\nasking an administrator.\n\nScoped to them by ``request.state``, so there is nothing to pass and no way\nto ask about somebody else.","operationId":"get_my_usage_api_v1_billing_me_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyUsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/domain-info":{"get":{"tags":["auth-public"],"summary":"Get Domain Info","description":"Return SSO-only status for a given email domain.\n\nPublic endpoint (no auth). Used by the login page to decide whether to\nshow only SSO or all auth options.","operationId":"get_domain_info_api_v1_auth_domain_info_get","parameters":[{"name":"domain","in":"query","required":true,"schema":{"type":"string","description":"Email domain (e.g. example.com)","title":"Domain"},"description":"Email domain (e.g. example.com)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Get Domain Info Api V1 Auth Domain Info Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/user-exists":{"get":{"tags":["auth-public"],"summary":"Check User Exists","description":"Return whether a user with the given email exists in auth.users.\n\nPublic endpoint (no auth, rate-limited). Used by the login page to\ndecide whether to show a sign-in form or a sign-up form.","operationId":"check_user_exists_api_v1_auth_user_exists_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","description":"Email address to check","title":"Email"},"description":"Email address to check"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Check User Exists Api V1 Auth User Exists Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/device/code":{"post":{"tags":["device-auth"],"summary":"Issue Device Code","description":"Issue a short-lived device grant that always requires human approval.","operationId":"issue_device_code_api_v1_auth_device_code_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceCodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceCodeResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceTokenErrorResponse"}}}},"429":{"description":"Rate limit exceeded. The response is JSON and includes a Retry-After header; the grant's interval and slow_down responses remain authoritative."},"503":{"description":"A unique device authorization code could not be allocated"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}]}},"/api/v1/auth/device/token":{"post":{"tags":["device-auth"],"summary":"Redeem Device Code","description":"Poll a device grant and atomically exchange an approval once.","operationId":"redeem_device_code_api_v1_auth_device_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceTokenResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceTokenErrorResponse"}}}},"429":{"description":"Rate limit exceeded. The response is JSON and includes a Retry-After header; the grant's interval and slow_down responses remain authoritative."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}]}},"/api/v1/auth/device/requests/{user_code}":{"get":{"tags":["device-auth"],"summary":"Get Device Request","description":"Look up a device grant by its human-entered code without exposing secrets.","operationId":"get_device_request_api_v1_auth_device_requests__user_code__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_code","in":"path","required":true,"schema":{"type":"string","title":"User Code"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceAuthorizationStatusResponse"}}}},"401":{"description":"A valid human API key is required"},"403":{"description":"The authenticated user is not authorized for this organization"},"404":{"description":"Device authorization request not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/device/requests/{user_code}/approve":{"post":{"tags":["device-auth"],"summary":"Approve Device Request","description":"Bind a pending grant to the authenticated human and their organization.","operationId":"approve_device_request_api_v1_auth_device_requests__user_code__approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_code","in":"path","required":true,"schema":{"type":"string","title":"User Code"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceAuthorizationStatusResponse"}}}},"401":{"description":"A valid human API key is required"},"403":{"description":"The authenticated user is not authorized for this organization"},"404":{"description":"Device authorization request not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/device/requests/{user_code}/deny":{"post":{"tags":["device-auth"],"summary":"Deny Device Request","description":"Deny a pending grant; denial never creates or binds a client credential.","operationId":"deny_device_request_api_v1_auth_device_requests__user_code__deny_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_code","in":"path","required":true,"schema":{"type":"string","title":"User Code"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceAuthorizationStatusResponse"}}}},"401":{"description":"A valid human API key is required"},"403":{"description":"The authenticated user is not authorized for this organization"},"404":{"description":"Device authorization request not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/device/revoke":{"post":{"tags":["device-auth"],"summary":"Revoke Client Credential","description":"Revoke the client installation represented by the bearer credential.","operationId":"revoke_client_credential_api_v1_auth_device_revoke_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevocationResponse"}}}},"401":{"description":"A valid, active client installation credential is required"},"403":{"description":"The client credential lacks the required scope"}},"security":[{"ClientBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}]}},"/api/v1/user/client-installations":{"get":{"tags":["client-installations"],"summary":"List Client Installations","description":"List only the authenticated human's client installations.","operationId":"list_client_installations_api_v1_user_client_installations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClientInstallationResponse"},"title":"Response List Client Installations Api V1 User Client Installations Get"}}}},"401":{"description":"A valid human API key is required"},"403":{"description":"The authenticated user is not authorized for this organization"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/client-installations/{installation_id}":{"delete":{"tags":["client-installations"],"summary":"Delete Client Installation","description":"Revoke one installation, strictly scoped to the authenticated human.","operationId":"delete_client_installation_api_v1_user_client_installations__installation_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"installation_id","in":"path","required":true,"schema":{"type":"string","title":"Installation Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"A valid human API key is required"},"403":{"description":"The authenticated user is not authorized for this organization"},"404":{"description":"Client installation not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/oauth/authorizations/{authorization_id}":{"get":{"tags":["oauth-consent"],"summary":"Get Authorization","description":"Describe a pending authorization so the user can decide on it.","operationId":"get_authorization_api_v1_oauth_authorizations__authorization_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization_id","in":"path","required":true,"schema":{"type":"string","title":"Authorization Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/oauth/authorizations/{authorization_id}/consent":{"post":{"tags":["oauth-consent"],"summary":"Decide Authorization","description":"Record the user's decision and return where to send the browser next.\n\nA denial still redirects to the client, per RFC 6749 §4.1.2.1: the client\nneeds to hear ``access_denied`` rather than hang waiting for a callback.","operationId":"decide_authorization_api_v1_oauth_authorizations__authorization_id__consent_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization_id","in":"path","required":true,"schema":{"type":"string","title":"Authorization Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentDecisionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentDecisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/oauth/grants":{"get":{"tags":["oauth-consent"],"summary":"List Grants","description":"The user's live OAuth connections, for the connected-agents view.","operationId":"list_grants_api_v1_oauth_grants_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GrantResponse"},"title":"Response List Grants Api V1 Oauth Grants Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/oauth/grants/{grant_id}":{"delete":{"tags":["oauth-consent"],"summary":"Revoke Grant","description":"Disconnect one agent. Scoped to the caller's own grants.","operationId":"revoke_grant_api_v1_oauth_grants__grant_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/client/mcp-requests":{"get":{"tags":["client-stdio"],"summary":"List Mcp Requests","description":"List only requests owned by the principal in its bound organisation.","operationId":"list_mcp_requests_api_v1_client_mcp_requests_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpRequestListResponse"}}}},"401":{"description":"A valid client installation credential is required"},"403":{"description":"The client credential lacks the required scope"}},"security":[{"ClientBearer":[]}]},"post":{"tags":["client-stdio"],"summary":"Create Mcp Request","description":"Submit an exact-device-bound stdio request for human approval.","operationId":"create_mcp_request_api_v1_client_mcp_requests_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientCreateMcpRequestBody"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMcpRequestResponse"}}}},"401":{"description":"A valid client installation credential is required"},"403":{"description":"The client credential lacks the required scope"},"409":{"description":"The device is unavailable or a pending request conflicts"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ClientBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}]}},"/api/v1/client/mcp-requests/{name}":{"delete":{"tags":["client-stdio"],"summary":"Withdraw Mcp Request","description":"Withdraw this user's pending request by name, without touching servers.","operationId":"withdraw_mcp_request_api_v1_client_mcp_requests__name__delete","security":[{"ClientBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"A valid client installation credential is required"},"403":{"description":"The client credential lacks the required scope"},"404":{"description":"A matching pending request was not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/client/servers":{"get":{"tags":["client-stdio"],"summary":"List Servers","description":"List stdio servers bound to this principal's exact device row.","operationId":"list_servers_api_v1_client_servers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientServerListResponse"}}}},"401":{"description":"A valid client installation credential is required"},"403":{"description":"The client credential lacks the required scope"}},"security":[{"ClientBearer":[]}]}},"/api/v1/sessions":{"get":{"summary":"List Sessions","operationId":"list_sessions_api_v1_sessions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page","default":50,"title":"Per Page"},"description":"Items per page"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by user ID","title":"User Id"},"description":"Filter by user ID"},{"name":"agent_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by agent name","title":"Agent Name"},"description":"Filter by agent name"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter sessions created after (ISO datetime)","title":"Created After"},"description":"Filter sessions created after (ISO datetime)"},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter sessions created before (ISO datetime)","title":"Created Before"},"description":"Filter sessions created before (ISO datetime)"},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","pattern":"^(created_at|last_activity_at|duration_ms|tool_call_count)$","description":"Sort field","default":"created_at","title":"Sort By"},"description":"Sort field"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"desc","title":"Sort Order"},"description":"Sort order"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Text search: user email, agent name, tool names, session ID","title":"Q"},"description":"Text search: user email, agent name, tool names, session ID"},{"name":"user_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by user email(s), comma-separated","title":"User Email"},"description":"Filter by user email(s), comma-separated"},{"name":"tf_private","in":"query","required":false,"schema":{"type":"boolean","description":"Filter sessions with private data access","default":false,"title":"Tf Private"},"description":"Filter sessions with private data access"},{"name":"tf_untrusted","in":"query","required":false,"schema":{"type":"boolean","description":"Filter sessions with untrusted content exposure","default":false,"title":"Tf Untrusted"},"description":"Filter sessions with untrusted content exposure"},{"name":"tf_external","in":"query","required":false,"schema":{"type":"boolean","description":"Filter sessions with external communication","default":false,"title":"Tf External"},"description":"Filter sessions with external communication"},{"name":"risk","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by risk level(s), comma-separated (Low/Medium/High)","title":"Risk"},"description":"Filter by risk level(s), comma-separated (Low/Medium/High)"},{"name":"acl","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by ACL level(s), comma-separated","title":"Acl"},"description":"Filter by ACL level(s), comma-separated"},{"name":"dur_min_ms","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Minimum session duration in milliseconds","title":"Dur Min Ms"},"description":"Minimum session duration in milliseconds"},{"name":"dur_max_ms","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum session duration in milliseconds","title":"Dur Max Ms"},"description":"Maximum session duration in milliseconds"},{"name":"min_tool_calls","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Minimum tool call count","title":"Min Tool Calls"},"description":"Minimum tool call count"},{"name":"max_tool_calls","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum tool call count","title":"Max Tool Calls"},"description":"Maximum tool call count"},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_SessionSummary_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sessions/daily-stats":{"get":{"summary":"Get Session Daily Stats","description":"Sessions per (UTC day, user) in [start, end), scoped like ``GET /sessions``.","operationId":"get_session_daily_stats_api_v1_sessions_daily_stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"start","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"Window start (inclusive, UTC if naive)","title":"Start"},"description":"Window start (inclusive, UTC if naive)"},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window end (exclusive, UTC if naive)","title":"End"},"description":"Window end (exclusive, UTC if naive)"},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionDailyStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sessions/{session_id}":{"get":{"summary":"Get Session","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"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sessions/{session_id}/end":{"post":{"summary":"End Session Endpoint","operationId":"end_session_endpoint_api_v1_sessions__session_id__end_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndSessionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response End Session Endpoint Api V1 Sessions  Session Id  End Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/web-agent-sessions":{"get":{"summary":"List Web Agent Sessions","description":"List web-agent sessions visible to the caller, latest activity first.","operationId":"list_web_agent_sessions_api_v1_web_agent_sessions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page","default":50,"title":"Per Page"},"description":"Items per page"},{"name":"agent","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by web agent, e.g. chatgpt","title":"Agent"},"description":"Filter by web agent, e.g. chatgpt"},{"name":"user_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by user email(s), comma-separated","title":"User Email"},"description":"Filter by user email(s), comma-separated"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Text search: tools, apps, user email, conversation","title":"Q"},"description":"Text search: tools, apps, user email, conversation"},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_WebAgentSessionSummary_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/web-agent-sessions/{session_id}":{"get":{"summary":"Get Web Agent Session","description":"One web-agent session with all of its calls.","operationId":"get_web_agent_session_api_v1_web_agent_sessions__session_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebAgentSessionDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users":{"get":{"summary":"List Users","operationId":"list_users_api_v1_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Items per page","default":50,"title":"Per Page"},"description":"Items per page"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Search email","title":"Q"},"description":"Search email"},{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by role","title":"Role"},"description":"Filter by role"},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_UserSummary_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/pending":{"get":{"summary":"List Pending Users","description":"List users awaiting admin approval - PENDING keys only.\n\nA revoked user is not waiting on anything, and listing them here invited an\nadmin to re-approve someone who had just been offboarded.","operationId":"list_pending_users_api_v1_users_pending_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingUsersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/stale":{"get":{"summary":"Audit Stale Users","description":"Dry-run: return orphaned user IDs without deleting (OWNER only).\n\nReports user IDs that have data in local SQLite but no matching entry in Supabase.\nUse DELETE /users/stale to actually clean them up.","operationId":"audit_stale_users_api_v1_users_stale_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrphanedUsersAuditResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Clear Stale Users","description":"Remove orphaned user data (OWNER only).\n\nTwo modes:\n1. email_pattern provided: delete sessions matching pattern.\n2. No pattern: clean up data for user_ids not in auth.users.","operationId":"clear_stale_users_api_v1_users_stale_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StaleUsersRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaleUsersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/session-stats":{"get":{"summary":"Get User Session Stats","description":"Roll each visible user's sessions up into the Users page overview.\n\nScoped exactly like ``GET /api/v1/sessions``: an ADMIN sees their own org,\nan OWNER sees their org unless they cleared the domain filter. Users with no\nsessions are simply absent - the page renders them as zeroes.","operationId":"get_user_session_stats_api_v1_users_session_stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Restrict the rollup to a single user ID","title":"User Id"},"description":"Restrict the rollup to a single user ID"},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSessionStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/{user_id}":{"get":{"summary":"Get User","operationId":"get_user_api_v1_users__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete User","description":"Delete a user and all their data.\n\nRemoves everything that grants access immediately. The user's audit and\nsession logs are *not* deleted here: ``cleanup_user_data`` tombstones them\nonto the fixed 7-day deleted-user retention window instead.\n\nOnly ordinary (USER-role) members can be deleted - see\n``_assert_target_deletable`` - and, like the other destructive member\nactions, the call is gated on a fresh email-OTP step-up token in\n``X-SealGate-Step-Up-Token``. An OWNER deleting an admin is additionally\nblocked (409 ``LAST_ADMIN``) when that admin is the org's last active one\nand other members remain, so the deletion can never orphan the org.","operationId":"delete_user_api_v1_users__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteUserResponse"}}}},"401":{"description":"Step-up re-authentication required or failed. ``code`` is one of STEP_UP_REQUIRED, STEP_UP_TOKEN_INVALID, STEP_UP_TOKEN_MISMATCH, STEP_UP_TOKEN_STALE; the dashboard reacts by (re)opening the OTP re-auth modal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPErrorResponse"}}}},"403":{"description":"TARGET_IS_OWNER: owner accounts are never deletable. TARGET_IS_ADMIN: an admin caller must demote a fellow admin to a regular user before deleting them.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPErrorResponse"}}}},"409":{"description":"LAST_ADMIN: deleting this admin would leave an organisation with other members but no active admin. Promote another member to admin first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/{user_id}/api-keys":{"get":{"summary":"Get User Api Keys","description":"List API keys for a specific user. ADMIN sees own domain; OWNER sees all.","operationId":"get_user_api_keys_api_v1_users__user_id__api_keys_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","additionalProperties":true}},"title":"Response Get User Api Keys Api V1 Users  User Id  Api Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/{user_id}/approve":{"post":{"summary":"Approve User","operationId":"approve_user_api_v1_users__user_id__approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Approve User Api V1 Users  User Id  Approve Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/{user_id}/disable":{"post":{"summary":"Disable User","operationId":"disable_user_api_v1_users__user_id__disable_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Disable User Api V1 Users  User Id  Disable Post"}}}},"409":{"description":"LAST_ADMIN: disabling this admin would leave an organisation with other members but no active admin. Promote another member to admin first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/{user_id}/unapprove":{"post":{"summary":"Unapprove User","description":"Revoke a user's approval by disabling all their API keys.\n\nWrites DISABLED, not PENDING: the account has been through approval, and\nthe pending queue would hand a revoked key the pending allowlist.","operationId":"unapprove_user_api_v1_users__user_id__unapprove_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserActionResponse"}}}},"409":{"description":"LAST_ADMIN: unapproving this admin would leave an organisation with other members but no active admin. Promote another member to admin first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/{user_id}/approve-as-admin":{"post":{"summary":"Approve As Admin","description":"Approve a user and set their role to admin. ADMIN may only act on users in their own org; OWNER may act on any.","operationId":"approve_as_admin_api_v1_users__user_id__approve_as_admin_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/{user_id}/demote-to-user":{"post":{"summary":"Demote To User","description":"Demote a user to the USER role while keeping their account ACTIVE.\n\nThis is the inverse of ``approve-as-admin``: it lowers the account role to\nUSER and leaves the api_keys active, so the person keeps ordinary\n(non-admin) access. Contrast with ``unapprove`` / ``disable``, which\n*deactivate* the keys and lock the user out entirely - using those to\n\"demote\" an admin was the original bug (the account was disabled, not\ndemoted, and the role never changed). ADMIN may only act on users in their\nown org; OWNER may act on any. Owners cannot be demoted here, and the org's\nlast active admin cannot be demoted while other members remain (409\n``LAST_ADMIN``) - that would orphan the org.","operationId":"demote_to_user_api_v1_users__user_id__demote_to_user_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserActionResponse"}}}},"409":{"description":"LAST_ADMIN: demoting this admin would leave an organisation with other members but no active admin. Promote another member to admin first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/access-control/roles":{"get":{"summary":"List Roles","operationId":"list_roles_api_v1_access_control_roles_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/RoleDefinitionSchema"}},{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignmentSchema"}}]},"title":"Response List Roles Api V1 Access Control Roles Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/access-control/roles/definitions":{"post":{"summary":"Create Role","operationId":"create_role_api_v1_access_control_roles_definitions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRoleRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleDefinitionSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update Role","operationId":"update_role_api_v1_access_control_roles_definitions_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleDefinitionSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/access-control/roles/definitions/{role}":{"delete":{"summary":"Delete Role","operationId":"delete_role_api_v1_access_control_roles_definitions__role__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role","in":"path","required":true,"schema":{"type":"string","title":"Role"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/access-control/roles/definitions/reorder":{"put":{"summary":"Reorder Roles","description":"Atomically renumber role priorities for the caller's org.\n\n``body.roles`` is an authoritative ordered list; index 0 becomes priority\n0 (highest), index 1 becomes priority 1, etc. The list must contain\nexactly the set of roles currently defined in the org - any mismatch\nreturns 409 so stale clients don't silently clobber concurrent edits.","operationId":"reorder_roles_api_v1_access_control_roles_definitions_reorder_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderRolesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RoleDefinitionSchema"},"title":"Response Reorder Roles Api V1 Access Control Roles Definitions Reorder Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/access-control/roles/assignments":{"post":{"summary":"Assign Role","operationId":"assign_role_api_v1_access_control_roles_assignments_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignRoleRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleAssignmentSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/access-control/roles/assignments/{user_id}":{"delete":{"summary":"Remove Role Assignment","operationId":"remove_role_assignment_api_v1_access_control_roles_assignments__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"role","in":"query","required":true,"schema":{"type":"string","description":"Role name to remove","title":"Role"},"description":"Role name to remove"},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/access-control/summary":{"get":{"summary":"Access Control Summary","operationId":"access_control_summary_api_v1_access_control_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessControlSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/access-control/server-enablements":{"get":{"summary":"List Server Enablements","operationId":"list_server_enablements_api_v1_access_control_server_enablements_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ServerEnablementSchema"},"title":"Response List Server Enablements Api V1 Access Control Server Enablements Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Set Server Enablement","operationId":"set_server_enablement_api_v1_access_control_server_enablements_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetServerEnablementRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerEnablementSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/access-control/server-enablements/{enablement_id}":{"delete":{"summary":"Delete Server Enablement","operationId":"delete_server_enablement_api_v1_access_control_server_enablements__enablement_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"enablement_id","in":"path","required":true,"schema":{"type":"integer","title":"Enablement Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/access-control/enablements":{"get":{"summary":"List Element Enablements","operationId":"list_element_enablements_api_v1_access_control_enablements_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ElementEnablementSchema"},"title":"Response List Element Enablements Api V1 Access Control Enablements Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Set Element Enablement","operationId":"set_element_enablement_api_v1_access_control_enablements_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetEnablementRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElementEnablementSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/access-control/enablements/{enablement_id}":{"delete":{"summary":"Delete Element Enablement","operationId":"delete_element_enablement_api_v1_access_control_enablements__enablement_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"enablement_id","in":"path","required":true,"schema":{"type":"integer","title":"Enablement Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"204":{"description":"Successful Response"},"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","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Items per page","default":50,"title":"Per Page"},"description":"Items per page"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Search by name","title":"Q"},"description":"Search by name"},{"name":"my_mcps","in":"query","required":false,"schema":{"type":"boolean","description":"When true (the My MCPs page), hide stdio_tunnel servers that are globally disabled and have no override row for the calling user - they belong to someone else's device and would only show as a confusing 'disabled' card.","default":false,"title":"My Mcps"},"description":"When true (the My MCPs page), hide stdio_tunnel servers that are globally disabled and have no override row for the calling user - they belong to someone else's device and would only show as a confusing 'disabled' card."},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_ServerSummary_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Servers"],"summary":"Create Server","operationId":"create_server_api_v1_servers_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateServerRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerDetail"}}}},"400":{"description":"Invalid request (e.g. global domain, missing command and url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPErrorResponse"}}}},"401":{"description":"stdio_tunnel adds require a fresh Supabase login - missing, stale, or mismatched X-SealGate-Step-Up-Token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPErrorResponse"}}}},"409":{"description":"A server with this name already exists in the domain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/servers/fingerprints":{"get":{"tags":["Servers"],"summary":"List Server Fingerprints","description":"Return one (name, fingerprint) entry per org-registered server.\n\nReads raw row data only - no template substitution, no decryption. Servers\nare skipped only when they have neither a command nor a URL (broken config).\n\n`X-SealGate-Secret-Key` is accepted (and parsed for validation) but unused by\nthe current fingerprint algorithm; see module docstring for the rationale\nand for the resolved-config helper that's available if user-scoped\nfingerprints are ever needed.","operationId":"list_server_fingerprints_api_v1_servers_fingerprints_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"X-SealGate-Secret-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Sealgate-Secret-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerFingerprintsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/servers/elements/search":{"get":{"tags":["Servers"],"summary":"Search Server Elements","description":"Rank every element of the organisation's servers against ``q``.\n\nA hit carries a clipped description and an argument summary only; read\n``GET /servers/{name}/elements/{element}`` for the full schema of one.","operationId":"search_server_elements_api_v1_servers_elements_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Words to look for.","title":"Q"},"description":"Words to look for."},{"name":"server","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only this server's elements.","title":"Server"},"description":"Only this server's elements."},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"tool, resource or prompt; default every kind.","title":"Kind"},"description":"tool, resource or prompt; default every kind."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Hits to return, best first.","default":10,"title":"Limit"},"description":"Hits to return, best first."},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElementSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/servers/{name}/elements/{element}":{"get":{"tags":["Servers"],"summary":"Get Server Element","description":"One element of one server in full: description, schemas, enabled state.","operationId":"get_server_element_api_v1_servers__name__elements__element__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"element","in":"path","required":true,"schema":{"type":"string","title":"Element"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElementMetadataEntry"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/servers/{name}":{"get":{"tags":["Servers"],"summary":"Get Server","operationId":"get_server_api_v1_servers__name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Servers"],"summary":"Update Server","operationId":"update_server_api_v1_servers__name__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateServerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Servers"],"summary":"Delete Server","operationId":"delete_server_api_v1_servers__name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/servers/{name}/refresh-icon":{"post":{"tags":["Servers"],"summary":"Refresh Server Icon","description":"Re-run the logo.dev lookup for *name* and persist the resolved URL.\n\nReturns a ``RefreshIconResult`` describing the outcome so the dashboard can\ntell the admin what happened instead of silently swapping the icon for a\nmonogram. When the lookup yields nothing because a domain can't be derived,\nany previously-stored guess is cleared (an admin clicking the button on a\nserver whose URL has changed is explicitly asking to drop the stale guess).\nWhen ``LOGO_DEV_TOKEN`` is unset the feature is simply not configured, so\nthe existing icon is left untouched rather than being wiped.","operationId":"refresh_server_icon_api_v1_servers__name__refresh_icon_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshIconResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/servers/{name}/env":{"post":{"tags":["Servers"],"summary":"Update Server Env","description":"Push new env values for a stdio_tunnel server to its device.\n\nForwards the values to the daemon and blocks until it re-spawns the\nserver with them (so the dashboard only sees success once the server is\nactually running). Values are never persisted server-side; only the\ndaemon holds them. Stored env var names are unchanged - this is the\n\"re-supply a value\" path for a server that's missing or has a stale key.","operationId":"update_server_env_api_v1_servers__name__env_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateServerEnvRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/servers/{name}/element-metadata":{"get":{"tags":["Servers"],"summary":"Get Server Element Metadata","description":"Return stored element metadata (descriptions, schemas) from interface lock DB.\n\nReturns the most recently discovered tools, resources, and prompts for a server,\nincluding descriptions and input schemas stored during interface locking.\nEach entry carries the caller's effective hierarchy state (enabled) and\ntheir user-level override value (user_enabled) so the UI can mirror what\nthe MCP mount exposes.\nFor the builtin server, returns static metadata from known tool definitions.","operationId":"get_server_element_metadata_api_v1_servers__name__element_metadata_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerElementMetadataResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/servers/{name}/validate":{"post":{"tags":["Servers"],"summary":"Validate Server","operationId":"validate_server_api_v1_servers__name__validate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"X-SealGate-Secret-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Sealgate-Secret-Key"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidateServerRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateServerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/policies":{"get":{"summary":"List Policies","operationId":"list_policies_api_v1_policies_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page","default":50,"title":"Per Page"},"description":"Items per page"},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_PolicyRuleSchema_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Policy","operationId":"create_policy_api_v1_policies_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePolicyRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRuleSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/policies/overview":{"get":{"summary":"Policy Overview","operationId":"policy_overview_api_v1_policies_overview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyOverviewStats"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/policies/{rule_id}":{"put":{"summary":"Update Policy","operationId":"update_policy_api_v1_policies__rule_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","title":"Rule Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePolicyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRuleSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Policy","operationId":"delete_policy_api_v1_policies__rule_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","title":"Rule Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/policies/{rule_id}/test":{"post":{"summary":"Test Policy","operationId":"test_policy_api_v1_policies__rule_id__test_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","title":"Rule Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyTestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyTestResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/policies/evaluate":{"post":{"summary":"Evaluate Rule","description":"Evaluate a complete rule against a given context (for interactive testing).\n\nRuns the real engine rather than a simplified copy, so the panel can never\ndisagree with what enforcement would actually do.","operationId":"evaluate_rule_api_v1_policies_evaluate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluateRuleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluateRuleResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin-chat":{"post":{"summary":"Admin Chat","operationId":"admin_chat_api_v1_admin_chat_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin-chat/preview":{"post":{"summary":"Admin Chat Preview","description":"The diff for a proposed write as of now.\n\nThe page calls this when the admin clicks Apply on a card: if the snapshot\nthe card was drawn from no longer matches (``fingerprint``), the host shows\nthe fresh diff instead of applying, so a change made in the meantime is\nreviewed rather than overwritten.","operationId":"admin_chat_preview_api_v1_admin_chat_preview_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin-chat/skills":{"get":{"summary":"Admin Chat Skills","description":"The caller's saved skills, for the composer's picker.\n\nMetadata only: the turn reads a skill's content itself when a message\ninvokes it, so the page never carries instructions it does not need.","operationId":"admin_chat_skills_api_v1_admin_chat_skills_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChatSkill"},"title":"Response Admin Chat Skills Api V1 Admin Chat Skills Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin-chat/status":{"get":{"summary":"Admin Chat Status","operationId":"admin_chat_status_api_v1_admin_chat_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminChatStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin-chat/conversations":{"get":{"summary":"List Conversations","operationId":"list_conversations_api_v1_admin_chat_conversations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConversationSummary"},"title":"Response List Conversations Api V1 Admin Chat Conversations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin-chat/conversations/{conversation_id}":{"get":{"summary":"Get Conversation","operationId":"get_conversation_api_v1_admin_chat_conversations__conversation_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Save Conversation","description":"Create or replace the transcript; the id is the page's, minted client-side.\n\nWithout ``messages`` only the title changes (a rename).","operationId":"save_conversation_api_v1_admin_chat_conversations__conversation_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveConversationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Conversation","operationId":"delete_conversation_api_v1_admin_chat_conversations__conversation_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/observability/trifecta":{"get":{"summary":"Get Trifecta Summary","description":"Get a summary of trifecta events within the requested rolling window.","operationId":"get_trifecta_summary_api_v1_observability_trifecta_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"time_period","in":"query","required":false,"schema":{"type":"string","description":"Rolling window: 24h, 7d, 30d","default":"24h","title":"Time Period"},"description":"Rolling window: 24h, 7d, 30d"},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrifectaSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/observability/trifecta/events":{"get":{"summary":"List Trifecta Events","description":"List trifecta events with pagination and date filters.","operationId":"list_trifecta_events_api_v1_observability_trifecta_events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Results per page","default":20,"title":"Per Page"},"description":"Results per page"},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter events after this date","title":"Created After"},"description":"Filter events after this date"},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter events before this date","title":"Created Before"},"description":"Filter events before this date"},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_TrifectaEvent_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/observability/audit-log":{"get":{"summary":"List Audit Log","description":"List audit log entries with pagination and filters.","operationId":"list_audit_log_api_v1_observability_audit_log_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Results per page","default":20,"title":"Per Page"},"description":"Results per page"},{"name":"actor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by actor user ID","title":"Actor"},"description":"Filter by actor user ID"},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by action type","title":"Action"},"description":"Filter by action type"},{"name":"resource_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by resource type","title":"Resource Type"},"description":"Filter by resource type"},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter entries after this date","title":"Created After"},"description":"Filter entries after this date"},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter entries before this date","title":"Created Before"},"description":"Filter entries before this date"},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_AuditEntry_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/approvals":{"get":{"summary":"List Approvals","description":"List approval requests. USER sees own, ADMIN+ sees domain.","operationId":"list_approvals_api_v1_approvals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Results per page","default":20,"title":"Per Page"},"description":"Results per page"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status: pending, approved, denied","title":"Status"},"description":"Filter by status: pending, approved, denied"},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_ApprovalRequest_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/approvals/{approval_id}/approve":{"post":{"summary":"Approve Request","description":"Approve a blocked trifecta action. ADMIN+ only.","operationId":"approve_request_api_v1_approvals__approval_id__approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"approval_id","in":"path","required":true,"schema":{"type":"integer","title":"Approval Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApproveAction"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequest"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/approvals/{approval_id}/deny":{"post":{"summary":"Deny Request","description":"Deny a blocked trifecta action. ADMIN+ only.","operationId":"deny_request_api_v1_approvals__approval_id__deny_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"approval_id","in":"path","required":true,"schema":{"type":"integer","title":"Approval Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DenyAction"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequest"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/approvals/action":{"post":{"summary":"Approve Or Deny Action","description":"Approve or deny a tool/resource/prompt for the current session.\n\nThe v1 equivalent of POST /api/approve_or_deny. Either an authenticated\ncaller (dashboard, desktop app - restricted to their own sessions) or a\nsingle-use action token authorises the request; one with neither is refused.\nWhy the token path exists: see the ``action_router`` comment above.","operationId":"approve_or_deny_action_api_v1_approvals_action_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveOrDenyAction"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Approve Or Deny Action Api V1 Approvals Action Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domain-key/status":{"get":{"summary":"Domain key status","description":"Return whether the caller's org has a domain key registered.","operationId":"get_domain_key_status_api_v1_domain_key_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainKeyStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domain-key/register":{"post":{"summary":"Register a domain key","description":"Register (or overwrite) an organisation-level encryption key hash.\n\nOnce registered, admin-set secrets are encrypted at rest using\nthe org key (passed via the composite secret key's admin: segment).","operationId":"register_domain_key_api_v1_domain_key_register_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterDomainKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterDomainKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domain-key/roll":{"post":{"summary":"Roll the domain key","description":"Roll the domain key: re-encrypt all admin-set (scope='global') secrets.\n\nThe admin must provide their current composite key in the\n``X-SealGate-Secret-Key`` header so the server can extract the old\ndomain key for decryption.  The operation is atomic.","operationId":"roll_domain_key_api_v1_domain_key_roll_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollDomainKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollDomainKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domain-key/reset":{"post":{"summary":"Reset the domain key and delete admin-set encrypted values","description":"Reset the organization encryption key.\n\nDeletes only admin-set encrypted template values for the organization -\nthose whose parent field has ``set_by_user=False`` (the field declares\nthat the value is admin-controlled and encrypted under the org key).\nUser-set values (``set_by_user=True``) stay untouched: they're encrypted\nunder each user's personal key, so an org-key rotation can't reach them.\nThen registers the new key hash. This is irreversible.","operationId":"reset_domain_key_api_v1_domain_key_reset_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetDomainKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetDomainKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/org-key/exists":{"get":{"summary":"Check if organization key exists","description":"Return whether the caller's org has a key registered. Available to all authenticated users.","operationId":"org_key_exists_api_v1_org_key_exists_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Org Key Exists Api V1 Org Key Exists Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/org-key/verify":{"post":{"summary":"Verify an organization key","description":"Verify an organization key against the stored hash.","operationId":"verify_org_key_api_v1_org_key_verify_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyOrgKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyOrgKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domains":{"get":{"summary":"List Domains","description":"List all managed domains with approval status, toggles, user counts. OWNER only.","operationId":"list_domains_api_v1_domains_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DomainSummary"},"title":"Response List Domains Api V1 Domains Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domains/{org_id}/approve":{"patch":{"summary":"Approve Domain","description":"Approve or reject an org. OWNER only.","operationId":"approve_domain_api_v1_domains__org_id__approve_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveDomainRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domains/{org_id}/deactivate":{"patch":{"summary":"Deactivate Domain","description":"Deactivate an org and all its users' API keys. OWNER only.","operationId":"deactivate_domain_api_v1_domains__org_id__deactivate_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeactivateDomainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domains/{org_id}":{"delete":{"summary":"Delete Org","description":"Permanently delete an organisation and all associated users and their data. OWNER only.","operationId":"delete_org_api_v1_domains__org_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteOrgResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domains/{org_id}/auto-approve":{"patch":{"summary":"Toggle Auto Approve","description":"Toggle auto-approve-new-users for an org. OWNER only.","operationId":"toggle_auto_approve_api_v1_domains__org_id__auto_approve_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoApproveDomainRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domains/{org_id}/sso-only":{"patch":{"summary":"Set Sso Only","description":"Set SSO-only mode for a domain. OWNER only.\n\nWrites to SQLite DomainConfig (keyed by email domain because the login\npage looks it up pre-auth) and PostgreSQL email_domain_backend_urls.","operationId":"set_sso_only_api_v1_domains__org_id__sso_only_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetDomainSsoOnlyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domains/{org_id}/auto-quarantine-mcp":{"patch":{"summary":"Set Auto Quarantine Mcp","description":"Toggle MCP auto-quarantine for an org. OWNER only. Writes to SQLite org_config.","operationId":"set_auto_quarantine_mcp_api_v1_domains__org_id__auto_quarantine_mcp_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoQuarantineMcpRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domains/{org_id}/stdio-tunnel-enabled":{"patch":{"summary":"Set Stdio Tunnel Enabled","description":"Toggle the stdio_tunnel feature for an org. OWNER only.\n\nOff by default - gates the entire stdiod daemon feature per\nREQUIREMENTS.md decision 11. When false, both the\n``/api/v1/stdio-tunnel/ws`` upgrade and ``POST /api/v1/servers``\nwith ``transport_type='stdio_tunnel'`` are rejected for this org.","operationId":"set_stdio_tunnel_enabled_api_v1_domains__org_id__stdio_tunnel_enabled_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetStdioTunnelEnabledRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domains/{org_id}/store-call-data":{"patch":{"summary":"Set Store Call Data","description":"Toggle call-data storage for an org. OWNER only. Writes to SQLite org_config.","operationId":"set_store_call_data_api_v1_domains__org_id__store_call_data_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetDomainStoreCallDataRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domains/{org_id}/backend-urls":{"patch":{"summary":"Set Backend Urls","description":"Set MCP and API backend URLs for an org. OWNER only.","operationId":"set_backend_urls_api_v1_domains__org_id__backend_urls_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetDomainBackendUrlsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domains/{org_id}/org-type":{"patch":{"summary":"Set Org Type","description":"Change an organisation's type. OWNER only.\n\nPromoting to 'enterprise' creates a verified org_domains row binding the\norg to a single email domain (explicit via body.domain, or inferred from\nthe sole member's email). Demoting to 'self_serve' removes all\norg_domains rows for the org.","operationId":"set_org_type_api_v1_domains__org_id__org_type_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOrgTypeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/settings/auto-approve-new-domains":{"get":{"summary":"Get Auto Approve New Domains","description":"Get the global auto-approve-new-domains setting. OWNER only.","operationId":"get_auto_approve_new_domains_api_v1_settings_auto_approve_new_domains_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoApproveNewDomainsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Set Auto Approve New Domains","description":"Set the global auto-approve-new-domains setting. OWNER only.\n\nStored on the edison.watch organisation row (column physically named\n``default_approve_all_new_domains``). When enabled, any newly created\ndomain gets ``approve_all_new_users=True`` by default.","operationId":"set_auto_approve_new_domains_api_v1_settings_auto_approve_new_domains_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoApproveNewDomainsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoApproveNewDomainsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ownership/transfer":{"post":{"summary":"Transfer Ownership","description":"Grant ownership to another user. OWNER only.\n\nThis is a multi-owner model: the caller remains owner, and the target\nuser is promoted to owner.","operationId":"transfer_ownership_api_v1_ownership_transfer_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferOwnershipRequest"}}}},"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"}}}}}}},"/api/v1/agents":{"get":{"summary":"List Agents","description":"List registered agents. ADMIN sees domain agents, OWNER sees all.","operationId":"list_agents_api_v1_agents_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page","default":50,"title":"Per Page"},"description":"Items per page"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Search by agent name","title":"Q"},"description":"Search by agent name"},{"name":"agent_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by agent type","title":"Agent Type"},"description":"Filter by agent type"},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","description":"Include archived agents (owner only)","default":false,"title":"Include Archived"},"description":"Include archived agents (owner only)"},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_AgentSummary_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Agent","description":"Register a new agent. Owner may specify target domain.","operationId":"create_agent_api_v1_agents_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agents/{agent_name}":{"patch":{"summary":"Update Agent","description":"Update (archive/restore) an agent. ADMIN can only modify domain agents.","operationId":"update_agent_api_v1_agents__agent_name__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_name","in":"path","required":true,"schema":{"type":"string","title":"Agent Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Agent","description":"Delete an agent by name. ADMIN can only delete domain agents.","operationId":"delete_agent_api_v1_agents__agent_name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_name","in":"path","required":true,"schema":{"type":"string","title":"Agent Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/config":{"get":{"summary":"Get Full Config","description":"Full configuration dump (admin/owner/user scoped).","operationId":"get_full_config_api_v1_config_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"global","title":"Scope"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FullConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/config/settings":{"put":{"summary":"Update App Settings","description":"Update app-level settings (server, logging).","operationId":"update_app_settings_api_v1_config_settings_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAppSettingsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAppSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/config/siem":{"get":{"summary":"Get Siem Config","description":"Get SIEM configuration for the caller's domain (or specified domain for owners).","operationId":"get_siem_config_api_v1_config_siem_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSiemConfigResponse"}}}},"403":{"description":"Enterprise organisations only"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update Siem Config","description":"Update SIEM configuration for the caller's domain (or specified domain for owners).","operationId":"update_siem_config_api_v1_config_siem_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSiemConfigRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSiemConfigResponse"}}}},"403":{"description":"Enterprise organisations only"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/backend-urls":{"get":{"summary":"Get Tenant Backend Urls","description":"Get backend URLs. Owner sees all domains; admin sees only their own domain.","operationId":"get_tenant_backend_urls_api_v1_tenant_backend_urls_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantBackendUrlsOwnerResponse"},{"$ref":"#/components/schemas/TenantBackendUrlsAdminResponse"}],"title":"Response Get Tenant Backend Urls Api V1 Tenant Backend Urls Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Set Tenant Backend Urls","description":"Set backend URLs. Admin: caller's domain. Owner: must specify email_domain.","operationId":"set_tenant_backend_urls_api_v1_tenant_backend_urls_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetTenantBackendUrlsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetTenantBackendUrlsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Tenant Backend Urls","description":"Remove backend URLs. Admin: caller's domain. Owner: must pass email_domain query param.","operationId":"delete_tenant_backend_urls_api_v1_tenant_backend_urls_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"email_domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Domain"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteTenantBackendUrlsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/auto-quarantine-mcp":{"patch":{"summary":"Set Auto Quarantine Mcp","description":"Set auto-quarantine MCP flag.\n\nAdmin: caller's own org. Owner: must specify ``org_id`` and it must equal\nthe caller's own org_id (owners can only toggle their own organisation).","operationId":"set_auto_quarantine_mcp_api_v1_tenant_auto_quarantine_mcp_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAutoQuarantineMcpRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAutoQuarantineMcpResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/stdio-tunnel-enabled":{"patch":{"summary":"Set Stdio Tunnel Enabled Tenant","description":"Set the org's stdio_tunnel rollout flag.\n\nAdmin: caller's own org. Owner: must specify ``org_id`` and it must equal\nthe caller's own org_id (same contract as auto-quarantine above).\n\nEnabling is step-up gated: turning the flag on lets every user in the org\ntunnel local processes through the backend, so it requires fresh proof of\nidentity (email OTP in ``X-SealGate-Step-Up-Token``) like the other\nprivileged admin actions. Disabling only reduces capability and is not\ngated.","operationId":"set_stdio_tunnel_enabled_tenant_api_v1_tenant_stdio_tunnel_enabled_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetStdioTunnelEnabledTenantRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetStdioTunnelEnabledTenantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/store-call-data":{"patch":{"summary":"Set Store Call Data Tenant","description":"Set the org's tool-call data retention flag.\n\nAdmin: caller's own org. Owner: must specify ``org_id`` and it must equal\nthe caller's own org_id (same contract as auto-quarantine / stdio-tunnel).\n\nOff by default (privacy-first): only tool-call metadata is stored. When\nenabled, full call parameters and results are persisted for this org's\nsessions. Lets an org admin control their own data-retention posture\nwithout going through the deployment owner. The flag lives only on the\nruntime-DB ``OrgConfig`` row; the enforcement point is\n``session_tracking_lifecycle.persist_session_to_db``.","operationId":"set_store_call_data_tenant_api_v1_tenant_store_call_data_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetStoreCallDataTenantRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetStoreCallDataTenantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/lethal-trifecta-blocking":{"patch":{"summary":"Set Lethal Trifecta Blocking Tenant","description":"Set the org's lethal-trifecta enforcement flag.\n\nAdmin: caller's own org. Owner: must specify ``org_id`` and it must equal\nthe caller's own org_id (same contract as auto-quarantine / store-call-data).\n\nOff by default: the gateway keeps tracking the trifecta legs (Sessions view,\nSIEM) but allows a trifecta-completing write through. When enabled, such a\nwrite is blocked or held for approval. The flag lives only on the runtime-DB\n``OrgConfig`` row; the enforcement point is\n``data_access_tracker.DataAccessTracker`` via\n``org_runtime_flags.is_trifecta_blocking_enabled``. Surfaced and toggled on\nthe Guardrails page.","operationId":"set_lethal_trifecta_blocking_tenant_api_v1_tenant_lethal_trifecta_blocking_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetLethalTrifectaBlockingTenantRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetLethalTrifectaBlockingTenantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/store-call-data/purge":{"post":{"summary":"Purge Stored Call Data Tenant","description":"Delete stored tool-call parameters and results for the org's sessions.\n\nAdmin: caller's own org. Owner: must specify ``org_id`` and it must equal\nthe caller's own org_id (same contract as the store-call-data toggle).\n\nTurning ``store_call_data`` off stops new capture but leaves payloads\nwritten while it was on. This purges those payloads (``parameters`` and\n``result``) from every session row for the org, keeping session and\nper-call metadata (tool name, timestamps, status, ACL, trifecta flags)\nintact. Irreversible; idempotent.","operationId":"purge_stored_call_data_tenant_api_v1_tenant_store_call_data_purge_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurgeStoredCallDataTenantRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurgeStoredCallDataTenantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/step-up-reuse":{"get":{"summary":"Get Step Up Reuse Settings","description":"Return the caller's organisation-level step-up reuse policy.","operationId":"get_step_up_reuse_settings_api_v1_tenant_step_up_reuse_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepUpReuseSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update Step Up Reuse Settings","description":"Update how long admins may reuse a successful email-OTP step-up.","operationId":"update_step_up_reuse_settings_api_v1_tenant_step_up_reuse_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStepUpReuseSettingsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepUpReuseSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/display-name":{"get":{"summary":"Get Org Display Name","description":"Get the display name for the caller's organisation (admin/owner).\n\nOwners may pass ?email_domain=... to query another domain.","operationId":"get_org_display_name_api_v1_tenant_display_name_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"email_domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Domain"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDisplayNameResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Set Org Display Name","description":"Set (or clear) the display name for the caller's organisation. Admin or owner.","operationId":"set_org_display_name_api_v1_tenant_display_name_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOrgDisplayNameRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDisplayNameResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/audit-log-retention":{"get":{"summary":"Get Audit Log Retention","description":"Return the caller org's audit-log retention setting (null = 120-day default).","operationId":"get_audit_log_retention_api_v1_tenant_audit_log_retention_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLogRetentionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Set Audit Log Retention","description":"Set the audit-log retention window (in days) for an org.\n\nAdmin: caller's own org. Owner: must specify ``org_id`` equal to their own,\nand the value also governs system logs. Null falls back to the 120-day\n(4-month) default; 365 is the ceiling and there is no keep-forever option.","operationId":"set_audit_log_retention_api_v1_tenant_audit_log_retention_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAuditLogRetentionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLogRetentionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/session-log-retention":{"get":{"summary":"Get Session Log Retention","description":"Return the caller org's per-tier session-log retention (null = 120-day default).","operationId":"get_session_log_retention_api_v1_tenant_session_log_retention_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionLogRetentionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Set Session Log Retention","description":"Set per-risk-tier session-log retention windows (in days) for an org.\n\nAdmin: caller's own org. Owner: must specify their own ``org_id`` and the\nvalues also govern system logs. Partial update: only tier fields present in\nthe body change (explicit null resets a tier to the 120-day default).","operationId":"set_session_log_retention_api_v1_tenant_session_log_retention_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSessionLogRetentionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionLogRetentionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/events":{"get":{"tags":["events"],"summary":"SSE event stream","description":"Server-Sent Events stream for real-time client events (tool calls, permission changes, approval requests). Supports auth via Authorization header or api_key query param.","operationId":"sse_events_api_v1_events_get","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key (alternative to Authorization header)","title":"Api Key"},"description":"API key (alternative to Authorization header)"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Client source identifier (e.g. 'desktop' for Electron app)","title":"Source"},"description":"Client source identifier (e.g. 'desktop' for Electron app)"}],"responses":{"200":{"description":"SSE stream","content":{"application/json":{"schema":{}},"text/event-stream":{}}},"401":{"description":"Missing or invalid API key"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/events/dev/server-log":{"post":{"tags":["events"],"summary":"Emit a synthetic mcp_server_log SSE event (dev only)","description":"Fires a fake mcp_server_log event for the calling user so the dashboard's toast + notification bell can be tested end to end without breaking a real MCP server. Only available with EDISON_DEV=1.","operationId":"dev_emit_server_log_api_v1_events_dev_server_log_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevEmitServerLogRequest"}}},"required":true},"responses":{"200":{"description":"Event emitted","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Dev Emit Server Log Api V1 Events Dev Server Log Post"}}}},"401":{"description":"Missing or invalid API key"},"404":{"description":"Not available outside dev mode"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}]}},"/api/v1/admin/logs/stream":{"get":{"tags":["events"],"summary":"SSE admin log stream","description":"Server-Sent Events stream for real-time server logs (OWNER only). Supports auth via Authorization header or api_key query param. Optional server-side filters for log level and source.","operationId":"admin_logs_stream_api_v1_admin_logs_stream_get","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key (alternative to Authorization header)","title":"Api Key"},"description":"API key (alternative to Authorization header)"},{"name":"level","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by min log level: DEBUG, INFO, WARNING, ERROR, CRITICAL","title":"Level"},"description":"Filter by min log level: DEBUG, INFO, WARNING, ERROR, CRITICAL"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source: http (access logs) or app (application logs)","title":"Source"},"description":"Filter by source: http (access logs) or app (application logs)"}],"responses":{"200":{"description":"SSE log stream","content":{"application/json":{"schema":{}},"text/event-stream":{}}},"401":{"description":"Missing or invalid API key"},"403":{"description":"Insufficient permissions (requires OWNER)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/devices/{device_ref_id}/scope":{"patch":{"summary":"Set Device Scope","description":"Flip a device between personal and shared scope (admin + step-up).\n\nSame step-up gate as stdio_tunnel server creation: scope changes alter\nwho can execute commands on a real machine, so they require a freshly\nre-authenticated admin.","operationId":"set_device_scope_api_v1_devices__device_ref_id__scope_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"device_ref_id","in":"path","required":true,"schema":{"type":"integer","title":"Device Ref Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetDeviceScopeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetDeviceScopeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/stdio-tunnel/leases":{"get":{"summary":"List Leases","description":"Unexpired exclusive-server leases in the caller's org.","operationId":"list_leases_api_v1_stdio_tunnel_leases_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLeasesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/stdio-tunnel/leases/release":{"post":{"summary":"Release Lease","description":"Release a lease - your own, or (``force`` + admin) anyone's.","operationId":"release_lease_api_v1_stdio_tunnel_leases_release_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseLeaseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseLeaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/profile":{"get":{"summary":"Get Profile","description":"Return the authenticated caller's profile information.","operationId":"get_profile_api_v1_user_profile_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/settings":{"get":{"summary":"Get Settings","description":"Return the authenticated caller's personal settings.","operationId":"get_settings_api_v1_user_settings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update Settings","description":"Update the authenticated caller's personal settings.","operationId":"update_settings_api_v1_user_settings_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserSettingsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/register-desktop-login":{"post":{"summary":"Register Desktop Login","description":"Record that the desktop client logged in for this user.\n\nIdempotent: if the user already has an mcp_sessions row, this is a no-op.\nCreates a lightweight session entry so the onboarding checklist can detect\nthat the user has signed in to the desktop app.","operationId":"register_desktop_login_api_v1_user_register_desktop_login_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/client-status":{"get":{"summary":"Get Client Status","description":"Return the connectivity status of the desktop client for the current user.\n\n- **connected** (green): desktop client has an active SSE connection and encryption keys\n  are configured.\n- **misconfigured** (yellow): desktop client is connected but encryption keys are missing\n  or there are other configuration issues.\n- **disconnected** (red): no active desktop SSE connection.","operationId":"get_client_status_api_v1_user_client_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/activation-status":{"get":{"summary":"Get Activation Status","description":"Two-stage onboarding signal for the waiting room: connected -> activated.\n\n- **connected**: an AI client has reached this user's gateway at least once.\n  Session rows are created on the client's first MCP request (including the\n  tools/list issued right after the initialize handshake), so this flips\n  before any tool is called. Desktop-login pseudo-sessions and SealGate's own\n  demo traffic don't count - see ``_NON_CLIENT_AGENT_TYPES``.\n- **activated**: the user's first successful non-builtin tool call went\n  through the gateway (stamped by ``src/activation.py``).\n\nCheap enough to poll every few seconds from the onboarding waiting room.","operationId":"get_activation_status_api_v1_user_activation_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivationStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/track":{"put":{"summary":"Set Onboarding Track","description":"Store the caller's onboarding track (US-201).\n\nCalled once post-auth: with the track declared by the entry URL when there\nwas one, otherwise with the answer to the single fork question. Idempotent;\nlater calls overwrite (a user re-running onboarding may re-choose). The\n``OnboardingTrack`` Literal on the request schema 422s anything else.","operationId":"set_onboarding_track_api_v1_user_track_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOnboardingTrackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOnboardingTrackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/domain-config":{"get":{"summary":"Get User Domain Config","description":"Get runtime config for the authenticated user's org + email domain.","operationId":"get_user_domain_config_api_v1_user_domain_config_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDomainConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/backend-urls":{"get":{"summary":"Get User Backend Urls","description":"Get the MCP base URL for the caller's organisation.","operationId":"get_user_backend_urls_api_v1_user_backend_urls_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":"Response Get User Backend Urls Api V1 User Backend Urls Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/account":{"delete":{"summary":"Delete Own Account","description":"Permanently delete the calling user's account and all their data.\n\nSame cleanup as the admin delete (immediate removal of keys, secrets,\nenablements and OAuth tokens; audit/session logs tombstoned onto the\n7-day deleted-user retention window; the org is deleted too once its\nlast API key is gone) - but scoped strictly to the caller and gated on\na fresh email-OTP step-up token in ``X-SealGate-Step-Up-Token``.","operationId":"delete_own_account_api_v1_user_account_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteUserResponse"}}}},"401":{"description":"Step-up re-authentication required or failed. ``code`` is one of STEP_UP_REQUIRED, STEP_UP_TOKEN_INVALID, STEP_UP_TOKEN_MISMATCH, STEP_UP_TOKEN_STALE; the dashboard reacts by (re)opening the OTP re-auth modal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"LAST_ADMIN: the caller is the only active admin of an organisation that still has other members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/secret-key/register":{"post":{"summary":"Register Secret Key","description":"Register the hash of the user's composite sealgate_secret_key.\n\nStores only the hash of the user: part for future verification.\nIf domain_key_hash is provided, it is validated against the domain's stored hash.","operationId":"register_secret_key_api_v1_user_secret_key_register_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterSecretKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterSecretKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/secret-key/verify":{"post":{"summary":"Verify Secret Key","description":"Verify a secret key against the server-stored hash.\n\nParses the composite key, hashes the user: part, and compares it against\nthe stored hash. If a domain part is present, also verifies against\nthe domain's stored hash.","operationId":"verify_secret_key_api_v1_user_secret_key_verify_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifySecretKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifySecretKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/secret-key/roll":{"post":{"summary":"Roll Secret Key","description":"Roll the user part of the composite key: re-encrypt all user-scope values.\n\nThe admin: (domain) part is preserved unchanged. The operation is atomic.","operationId":"roll_secret_key_api_v1_user_secret_key_roll_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollSecretKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollSecretKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/secret-key/reset":{"post":{"summary":"Reset Secret Key","description":"Reset the user's encryption key, permanently deleting personal credentials.\n\nDeletes only personal template values for this user - those whose parent\nfield has ``set_by_user=True`` (the field declares that each user supplies\ntheir own value, encrypted under their personal key). Admin-set values\n(``set_by_user=False``) stay untouched: they're encrypted under the org\nkey, so a personal-key rotation can't reach them. Requires confirm=True.","operationId":"reset_secret_key_api_v1_user_secret_key_reset_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetSecretKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetSecretKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/server-toggle":{"post":{"summary":"Toggle Server For Self","description":"Toggle a server's enablement for the current user.\n\nUsers can disable servers for themselves to avoid polluting their context window,\neven if an admin has globally enabled the server. This creates a user-specific\nenablement override.","operationId":"toggle_server_for_self_api_v1_user_server_toggle_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserServerToggleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserServerToggleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/element-overrides":{"get":{"summary":"List Element Overrides","description":"List the current user's element enablement overrides.","operationId":"list_element_overrides_api_v1_user_element_overrides_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserElementOverrideSchema"},"title":"Response List Element Overrides Api V1 User Element Overrides Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/element-toggle":{"post":{"summary":"Toggle Element For Self","description":"Toggle an element's (tool/resource/prompt) enablement for the current user.\n\nUsers can disable individual tools to reduce context window pollution.","operationId":"toggle_element_for_self_api_v1_user_element_toggle_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserElementToggleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserElementToggleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/server-element-permissions/{server_name}":{"get":{"summary":"List User Server Element Permissions","description":"Per-element resolved permissions for the caller on a given server.\n\nRuns the same user > role > global hierarchy as the MCP mount, returning\na flat list of elements with their effective enablement and flags. This\nis what the MCP tester should render - the admin /permissions/* endpoints\nreturn raw rows across all scopes and the frontend previously dropped\nrole-level data when trying to resolve client-side.","operationId":"list_user_server_element_permissions_api_v1_user_server_element_permissions__server_name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server_name","in":"path","required":true,"schema":{"type":"string","title":"Server Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserServerElementPermissionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api-keys/{api_key_param}/status":{"patch":{"summary":"Update Api Key Status","description":"Enable or disable an API key.\n\nAdmins can only manage keys for users in their domain.\nOwners can manage any key.","operationId":"update_api_key_status_api_v1_api_keys__api_key_param__status_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"api_key_param","in":"path","required":true,"schema":{"type":"string","title":"Api Key Param"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApiKeyStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApiKeyStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api-keys/{api_key_param}/role":{"patch":{"summary":"Update Api Key Role","description":"Change an API key's role.","operationId":"update_api_key_role_api_v1_api_keys__api_key_param__role_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"api_key_param","in":"path","required":true,"schema":{"type":"string","title":"Api Key Param"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApiKeyRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApiKeyRoleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/status":{"get":{"summary":"Mcp Status","description":"Get status of configured MCP servers. Lightweight query - no secrets needed.","operationId":"mcp_status_api_v1_mcp_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/mounted":{"get":{"summary":"Get Mounted Servers","description":"Get list of currently mounted MCP servers for the authenticated user.","operationId":"get_mounted_servers_api_v1_mcp_mounted_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MountedServersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/reinitialize":{"post":{"summary":"Reinitialize All","description":"Reinitialize all MCP servers for all users (admin only).","operationId":"reinitialize_all_api_v1_mcp_reinitialize_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReinitializeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/reinitialize-user":{"post":{"summary":"Reinitialize User","description":"Reinitialize MCP servers for the current user.","operationId":"reinitialize_user_api_v1_mcp_reinitialize_user_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"X-SealGate-Secret-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Sealgate-Secret-Key"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReinitializeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/reset":{"post":{"summary":"Reset Mcp","description":"Scoped MCP state reset (admin only).\n\nMutation endpoints call ``invalidate_per_user_mcp_instances`` directly\nwhen config changes - this route is the manual ops escape hatch for\nthe same operation. With no body it resets every instance in the\ncaller's org; pass ``scope`` to narrow it.","operationId":"reset_mcp_api_v1_mcp_reset_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResetRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/tool-schemas":{"get":{"summary":"Get Tool Schemas","description":"Return cached tool schemas keyed by server and tool name.","operationId":"get_tool_schemas_api_v1_mcp_tool_schemas_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSchemasResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/mount/{server_name}":{"post":{"summary":"Mount Server","description":"Dynamically mount a server by name (admin only).","operationId":"mount_server_api_v1_mcp_mount__server_name__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server_name","in":"path","required":true,"schema":{"type":"string","title":"Server Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MountServerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Unmount Server","description":"Unmount a previously mounted server (admin only).","operationId":"unmount_server_api_v1_mcp_mount__server_name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server_name","in":"path","required":true,"schema":{"type":"string","title":"Server Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnmountServerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/oauth/initiate/{server_name}":{"post":{"summary":"Initiate Oauth","description":"Start an OAuth flow for a Direct MCP server.\n\nPerforms discovery, client registration, PKCE generation, and returns\nthe authorization URL that the frontend should open in a popup.","operationId":"initiate_oauth_api_v1_mcp_oauth_initiate__server_name__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server_name","in":"path","required":true,"schema":{"type":"string","title":"Server Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OAuthInitiateRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthInitiateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/oauth/flow-result/{state}":{"get":{"summary":"Get Oauth Flow Result","description":"Poll for the outcome of an in-flight OAuth flow.\n\nThe popup's ``postMessage`` back to the opener is unreliable on\nservers like Sentry where Chrome's Cross-Origin-Opener-Policy\nsevers ``window.opener``.  The dashboard polls this endpoint with\nthe ``state`` it got from ``/initiate`` to learn the authoritative\nserver-side outcome.\n\nOwnership is enforced: only the user who initiated the flow can\nread its result.","operationId":"get_oauth_flow_result_api_v1_mcp_oauth_flow_result__state__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"state","in":"path","required":true,"schema":{"type":"string","title":"State"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthFlowResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/oauth/status":{"get":{"summary":"Get All Status","description":"Get OAuth status for all configured MCP servers.","operationId":"get_all_status_api_v1_mcp_oauth_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthStatusAllResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/oauth/status/{server_name}":{"get":{"summary":"Get Server Status","description":"Get OAuth status for a specific MCP server.","operationId":"get_server_status_api_v1_mcp_oauth_status__server_name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server_name","in":"path","required":true,"schema":{"type":"string","title":"Server Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/oauth/test-connection/{server_name}":{"post":{"summary":"Test Connection","description":"Test connection to a remote MCP server using stored OAuth tokens.","operationId":"test_connection_api_v1_mcp_oauth_test_connection__server_name__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server_name","in":"path","required":true,"schema":{"type":"string","title":"Server Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OAuthTestConnectionRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthTestConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/oauth/tokens/{server_name}":{"delete":{"summary":"Clear Tokens","description":"Clear stored OAuth tokens for a server (admin only).","operationId":"clear_tokens_api_v1_mcp_oauth_tokens__server_name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server_name","in":"path","required":true,"schema":{"type":"string","title":"Server Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthTokenOperationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/oauth/refresh/{server_name}":{"post":{"summary":"Refresh Status","description":"Refresh OAuth status for a server (admin only).","operationId":"refresh_status_api_v1_mcp_oauth_refresh__server_name__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server_name","in":"path","required":true,"schema":{"type":"string","title":"Server Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthRefreshResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/oauth-encryption/status":{"get":{"tags":["OAuth encryption"],"summary":"Get Oauth Encryption Status","description":"Return durable, redacted encryption status for the caller's own org.","operationId":"get_oauth_encryption_status_api_v1_admin_oauth_encryption_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthEncryptionStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/oauth-encryption/migrate":{"post":{"tags":["OAuth encryption"],"summary":"Migrate Oauth Encryption","description":"Encrypt plaintext or rewrap previous-key blobs after step-up auth.","operationId":"migrate_oauth_encryption_api_v1_admin_oauth_encryption_migrate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthEncryptionMigrationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthEncryptionMigrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/oauth/client-metadata.json":{"get":{"summary":"Client Metadata Document","description":"Serve our OAuth Client ID Metadata Document (CIMD).\n\nAuthorization servers that support URL-based client IDs\n(``client_id_metadata_document_supported``, e.g. WorkOS AuthKit backing\nMCP-UI servers like mcp.gmailmcp.com) fetch this document at authorize\ntime instead of requiring Dynamic Client Registration. The ``client_id``\nclaim MUST equal the URL the document is served from, and the flow that\nreferences it always uses this same origin for its redirect URI.\n\nUnauthenticated by design - the AS fetches it server-to-server with no\nSealGate credentials. ``Cache-Control: no-store`` on purpose: the URLs in\nthe body are derived from the request's Host, and letting a shared cache\nstore a Host-reflected document under the canonical URL would be a cache\n-poisoning primitive (attacker-controlled ``redirect_uris``).","operationId":"client_metadata_document_api_v1_mcp_oauth_client_metadata_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/mcp/oauth/callback":{"get":{"summary":"Oauth Callback","description":"Handle the OAuth redirect from the authorization server.\n\nThis endpoint is called by the OAuth provider after the user authorizes.\nIt exchanges the authorization code for tokens, stores them, and returns\nHTML that notifies the parent window via ``postMessage`` and closes the popup.","operationId":"oauth_callback_api_v1_mcp_oauth_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp-requests":{"get":{"summary":"List My Requests","description":"List the current user's MCP server requests.","operationId":"list_my_requests_api_v1_mcp_requests_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpRequestListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Request","description":"Submit a new MCP server permission request.\n\nThin adapter over :func:`src.mcp_server_requests.submit_mcp_server_request`\n(the shared service core, also driven by the ``builtin_register_new_mcp_url``\nchat tool).","operationId":"create_request_api_v1_mcp_requests_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMcpRequestBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMcpRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp-requests/{request_id}":{"delete":{"summary":"Withdraw Request","description":"Withdraw a pending MCP server request.","operationId":"withdraw_request_api_v1_mcp_requests__request_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawMcpRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/mcp-requests":{"get":{"summary":"List All Requests","description":"List all MCP server requests (admin: domain-scoped, owner: all).","operationId":"list_all_requests_api_v1_admin_mcp_requests_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpRequestListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/mcp-requests/{request_id}/approve":{"post":{"summary":"Approve Request","description":"Approve a pending MCP server request.","operationId":"approve_request_api_v1_admin_mcp_requests__request_id__approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApproveMcpRequestBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveMcpRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/mcp-requests/approve-all":{"post":{"summary":"Approve All Requests","description":"Bulk-approve all visible pending requests.","operationId":"approve_all_requests_api_v1_admin_mcp_requests_approve_all_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveAllMcpRequestsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/mcp-requests/{request_id}/reject":{"post":{"summary":"Reject Request","description":"Reject a pending MCP server request.","operationId":"reject_request_api_v1_admin_mcp_requests__request_id__reject_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RejectMcpRequestBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectMcpRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/mcp-requests/{request_id}/validate":{"post":{"summary":"Validate Request","description":"Validate a pending MCP server request by launching it and discovering capabilities.\n\nThis lets an admin test a requested server *before* approving it, so they\ncan see what tools/resources/prompts it exposes and whether it starts at all.","operationId":"validate_request_api_v1_admin_mcp_requests__request_id__validate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateMcpRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/templates/servers":{"get":{"summary":"List All Template Configs","description":"Get all admin template configurations.","operationId":"list_all_template_configs_api_v1_templates_servers_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllAdminTemplateConfigsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/templates/servers/{name}":{"get":{"summary":"Get Template Config","description":"Get admin template configuration for a specific server.","operationId":"get_template_config_api_v1_templates_servers__name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTemplateConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Set Template Config","description":"Set or update admin template configuration for a server.\n\nIf X-SealGate-Secret-Key header contains a composite key with an admin segment,\nthe domain key is extracted and used to encrypt admin secrets at rest.","operationId":"set_template_config_api_v1_templates_servers__name__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"X-SealGate-Secret-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Sealgate-Secret-Key"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAdminTemplateConfigRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTemplateConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Template Config","description":"Delete admin template configuration for a server.","operationId":"delete_template_config_api_v1_templates_servers__name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTemplateConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/templates/servers/{name}/set-by-user":{"put":{"summary":"Update Set By User","description":"Toggle whether template fields are set by user or admin.","operationId":"update_set_by_user_api_v1_templates_servers__name__set_by_user_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSetByUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSetByUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/templates/servers/{name}/fields/{field_key}/required":{"put":{"summary":"Update Field Required","description":"Toggle whether a template field is required or optional.","operationId":"update_field_required_api_v1_templates_servers__name__fields__field_key__required_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"field_key","in":"path","required":true,"schema":{"type":"string","title":"Field Key"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFieldRequiredRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFieldRequiredResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/templates/servers/{name}/fields/{field_key}/set-by-user":{"put":{"summary":"Update Field Set By User","description":"Toggle whether a single template field is set by user or admin.","operationId":"update_field_set_by_user_api_v1_templates_servers__name__fields__field_key__set_by_user_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"field_key","in":"path","required":true,"schema":{"type":"string","title":"Field Key"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFieldSetByUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFieldSetByUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/templates/servers/{name}/verify-credentials":{"post":{"summary":"Verify Credentials","description":"Save credentials for verification, then return them for testing.","operationId":"verify_credentials_api_v1_templates_servers__name__verify_credentials_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyCredentialsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyCredentialsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/templates/":{"get":{"summary":"List User Template Configs","description":"Get all user template configurations.","operationId":"list_user_template_configs_api_v1_user_templates__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllUserTemplateConfigsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/templates/{name}":{"get":{"summary":"Get User Template Config","description":"Get user template configuration for a specific server.","operationId":"get_user_template_config_api_v1_user_templates__name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserTemplateConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Set User Template Config","description":"Set or update user template configuration for a server.\n\nFor stdio_tunnel servers, the values live on the device (in the daemon's\nenv_store) and are never stored server-side: the frontend posts plaintext\n(no encryption, no sealgate_secret_key) and the backend only records\nis_local marker rows so the dashboard's needs_config check clears. Relay\nof the value to the daemon's env_store is deferred. For HTTP servers the\nexisting encrypted-store path is used.","operationId":"set_user_template_config_api_v1_user_templates__name__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"X-SealGate-Secret-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Sealgate-Secret-Key"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetUserTemplateConfigRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserTemplateConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete User Template Config","description":"Delete user template configuration for a server.","operationId":"delete_user_template_config_api_v1_user_templates__name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserTemplateConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/signup-templates/{slug}":{"get":{"summary":"Get Template","description":"Resolve an enabled template by slug (US-101: config lives server-side).","operationId":"get_template_api_v1_signup_templates__slug__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/signup-templates/{slug}/preflight":{"get":{"summary":"Preflight Local Install","description":"RUNTIME availability check for a template's local-install path (US-106).\n\nThe stdiod device-auth mechanism is being reworked; agents and the connect\nflow must gate on this response, never on static assumptions.","operationId":"preflight_local_install_api_v1_signup_templates__slug__preflight_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupTemplatePreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/signup-templates/{slug}/provision":{"post":{"summary":"Provision Template","description":"US-103: idempotent provisioning for the calling user.\n\nThe /start/{slug} page awaits this before rendering, so servers/ACLs/\npolicies/quota exist before the first dashboard view (FR-11).","operationId":"provision_template_api_v1_user_signup_templates__slug__provision_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupTemplateProvisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/signup-templates/status":{"get":{"summary":"Get Status","description":"Per-user provision + quota state (US-104 dashboard BYO card).","operationId":"get_status_api_v1_user_signup_templates_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SignupTemplateStatusResponse"},"title":"Response Get Status Api V1 User Signup Templates Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/permissions/tool":{"get":{"summary":"Get Tool Permissions","description":"Get all tool permissions (domain-scoped to caller's domain).","operationId":"get_tool_permissions_api_v1_permissions_tool_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Update Tool Permissions","description":"Update tool permissions.","operationId":"update_tool_permissions_api_v1_permissions_tool_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePermissionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePermissionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/permissions/resource":{"get":{"summary":"Get Resource Permissions","description":"Get all resource permissions (domain-scoped to caller's domain).","operationId":"get_resource_permissions_api_v1_permissions_resource_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Update Resource Permissions","description":"Update resource permissions.","operationId":"update_resource_permissions_api_v1_permissions_resource_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePermissionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePermissionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/permissions/prompt":{"get":{"summary":"Get Prompt Permissions","description":"Get all prompt permissions (domain-scoped to caller's domain).","operationId":"get_prompt_permissions_api_v1_permissions_prompt_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Update Prompt Permissions","description":"Update prompt permissions.","operationId":"update_prompt_permissions_api_v1_permissions_prompt_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePermissionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePermissionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/permissions":{"delete":{"summary":"Delete Permission","description":"Delete a specific permission entry.\n\nAll parameters are required as query params:\n- user_id: User ID or role ID (e.g. \"role:finance\")\n- server_name: Server name\n- permission_type: tool, resource, or prompt\n- permission_key: The permission key to delete\n\nReturns 200 when a permission was deleted, 204 when nothing matched.","operationId":"delete_permission_api_v1_permissions_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"server_name","in":"query","required":true,"schema":{"type":"string","title":"Server Name"}},{"name":"permission_type","in":"query","required":true,"schema":{"type":"string","title":"Permission Type"}},{"name":"permission_key","in":"query","required":true,"schema":{"type":"string","title":"Permission Key"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePermissionResponse"}}}},"204":{"description":"Nothing to delete"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/server/{name}/interface-locking":{"get":{"summary":"Get Interface Locking Status","description":"Get interface locking status for a server.","operationId":"get_interface_locking_status_api_v1_server__name__interface_locking_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InterfaceLockingStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Set Interface Locking Status","description":"Enable or disable interface locking for a server.","operationId":"set_interface_locking_status_api_v1_server__name__interface_locking_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetInterfaceLockingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetInterfaceLockingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/server-metrics":{"get":{"tags":["Server Metrics"],"summary":"Get Server Metrics","operationId":"get_server_metrics_api_v1_server_metrics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"description":"Time window in days","default":30,"title":"Days"},"description":"Time window in days"},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/config-perms/run":{"post":{"summary":"Run Autoconfig","description":"Generate AI permission flags on the backend using the server-side LLM key, then cache results.","operationId":"run_autoconfig_api_v1_config_perms_run_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoconfigRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoconfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/config-perms/refine":{"post":{"summary":"Refine Autoconfig","description":"Re-classify MCP elements using the LLM, guided by user feedback text.","operationId":"refine_autoconfig_api_v1_config_perms_refine_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoconfigRefineRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoconfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/config-perms/cache":{"get":{"summary":"Get Autoconfig Cache","description":"Get autoconfig cache entries for the caller's org. Owner sees all.","operationId":"get_autoconfig_cache_api_v1_config_perms_cache_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Server"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoconfigCacheResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Clear Autoconfig Cache","description":"Clear the autoconfig cache for the caller's org. Owner can specify org_id.","operationId":"clear_autoconfig_cache_api_v1_config_perms_cache_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Server"}},{"name":"org_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearAutoconfigCacheResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/config-perms/review":{"get":{"summary":"List Pending Reviews","description":"List auto-applied, not-yet-reviewed labels for the caller's org.","operationId":"list_pending_reviews_api_v1_config_perms_review_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"server","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Server"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoLabelReviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/config-perms/review/accept":{"post":{"summary":"Accept Auto Labels","description":"Mark auto-applied labels as human-reviewed.\n\nWith ``items`` omitted, accepts every unreviewed label on the server\n(\"Accept all\"). With ``items``, accepts only those elements - used after\na per-item confirm or override.","operationId":"accept_auto_labels_api_v1_config_perms_review_accept_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptAutoLabelsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptAutoLabelsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/config-perms/review/dismiss":{"post":{"summary":"Dismiss Setup Card","description":"Permanently dismiss the Overview \"Setting up <server>\" setup card.\n\nThe card is otherwise driven by ``auto_label_pending`` and reappears on\nevery page load until labeling finishes - which never happens for a server\nthat is waiting on OAuth authorization the admin chooses not to grant. This\nsets a durable ``setup_card_dismissed`` marker so the server drops out of\n``pending_label_servers``. It does not touch labeling or the auto-applied\nlabel review queue; re-approving the server resets the marker.","operationId":"dismiss_setup_card_api_v1_config_perms_review_dismiss_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DismissSetupCardRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DismissSetupCardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/seed-quarantine":{"post":{"summary":"Seed Quarantine Request","description":"Create a demo quarantine request for the onboarding walkthrough.\n\nUnlike the normal create flow, this always marks the request as\nquarantined and never auto-approves, regardless of the caller's role.\nIdempotent: returns the existing pending request if one exists.","operationId":"seed_quarantine_request_api_v1_demo_seed_quarantine_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Seed Quarantine Request Api V1 Demo Seed Quarantine Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/finalize-quarantine":{"post":{"summary":"Finalize Quarantine","description":"Seed fake tool elements for the demo server so it shows as active/green.","operationId":"finalize_quarantine_api_v1_demo_finalize_quarantine_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Finalize Quarantine Api V1 Demo Finalize Quarantine Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/shadow-connector":{"delete":{"summary":"Delete Shadow Connector","description":"Delete all shadow-connector demo data.","operationId":"delete_shadow_connector_api_v1_demo_shadow_connector_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Shadow Connector Api V1 Demo Shadow Connector Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/chat":{"post":{"summary":"Demo Chat","operationId":"demo_chat_api_v1_demo_chat_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemoChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/notification-channels":{"get":{"summary":"Get Notification Channels","description":"Return the caller's notification channel preferences (defaults merged in).","operationId":"get_notification_channels_api_v1_user_notification_channels_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationChannelsPrefs"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Put Notification Channels","description":"Replace the caller's notification channel preferences.","operationId":"put_notification_channels_api_v1_user_notification_channels_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationChannelsPrefs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationChannelsPrefs"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/notification-channels/status":{"get":{"summary":"Get Notification Channels Status","description":"Report whether each channel can actually deliver an approval prompt today.","operationId":"get_notification_channels_status_api_v1_user_notification_channels_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationChannelsStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/notification-channels/test":{"post":{"summary":"Test Notification Channel","description":"Send a real test notification on one channel and report what happened.","operationId":"test_notification_channel_api_v1_user_notification_channels_test_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestChannelRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestChannelResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/notification-channels/telegram/link":{"post":{"summary":"Link Telegram Chat","description":"Mint a pairing code so the Telegram bot can bind itself to this user.\n\nThe user opens the returned deep link (or sends ``/start <code>`` to the bot);\nthe webhook then stores that chat as their Telegram destination. Codes are\nsingle-use and expire, so one leaking cannot redirect someone's approvals.","operationId":"link_telegram_chat_api_v1_user_notification_channels_telegram_link_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramLinkResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/notification-channels/slack/link":{"post":{"summary":"Link Slack Dm","description":"Bind the caller's own Slack DM as their Slack approval destination.\n\nA hand-typed channel ID is the weaker setup: point it at a shared channel\nand everyone in that channel gets working Approve/Deny buttons for *this*\nuser's held tool calls. Here the destination is derived from identity - the\ncaller's SealGate account email is looked up in the workspace and the DM with\nthat person is opened - so the buttons reach only them.\n\nReports failures as ``ok=false`` with a reason rather than raising, matching\n``.../test``: a setup step that cannot complete is news for the user, not a\nserver error.","operationId":"link_slack_dm_api_v1_user_notification_channels_slack_link_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackLinkResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/slack/actions":{"post":{"summary":"Slack Actions","description":"Slack interactivity endpoint (block_actions payloads from approval buttons).","operationId":"slack_actions_api_v1_integrations_slack_actions_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}]}},"/api/v1/integrations/telegram/webhook":{"post":{"summary":"Telegram Webhook","description":"Telegram bot webhook (callback_query updates from approval buttons).","operationId":"telegram_webhook_api_v1_integrations_telegram_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Response Telegram Webhook Api V1 Integrations Telegram Webhook Post"}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}]}},"/api/v1/insights/latest":{"get":{"summary":"Get Latest Insights","description":"Get the latest AI-generated security insights snapshot.","operationId":"get_latest_insights_api_v1_insights_latest_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsightsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights/refresh":{"post":{"summary":"Refresh Insights","description":"Manually trigger an insights refresh.","operationId":"refresh_insights_api_v1_insights_refresh_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsightsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights/session-security":{"get":{"summary":"Get Session Security Insights","description":"Return sessions with trifecta flags created within the rolling window.","operationId":"get_session_security_insights_api_v1_insights_session_security_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionSecurityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cache/users/refresh":{"post":{"summary":"Refresh Users Cache","description":"Drop the users+keys TTL cache. Cheap (one dict pop).","operationId":"refresh_users_cache_api_v1_cache_users_refresh_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Refresh Users Cache Api V1 Cache Users Refresh Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/slack-invite":{"get":{"summary":"Get Slack Invite","description":"Return the caller's suggested per-org Slack channel name (for display).","operationId":"get_slack_invite_api_v1_slack_invite_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackInviteInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/slack-invite/request":{"post":{"summary":"Request Slack Invite","description":"Record a user's intent to connect and ping the SealGate team.\n\nFrictionless by design: one click here, and we send them a Slack Connect\ninvite. Always reports success - the internal ping is best-effort.","operationId":"request_slack_invite_api_v1_slack_invite_request_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackInviteRequestResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/app/release-channel":{"get":{"tags":["app"],"summary":"Release Channel","description":"Report the desktop release channel; safe to call before sign-in.","operationId":"release_channel_api_v1_app_release_channel_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseChannelResponse"}}}}}}},"/api/v1/health":{"get":{"summary":"Health","operationId":"health_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Api V1 Health Get"}}}}}}},"/api/v1/devices":{"get":{"tags":["stdio_tunnel","stdio_tunnel"],"summary":"List Devices","description":"List devices for the caller's org. Admin-scoped via get_current_user.","operationId":"list_devices_api_v1_devices_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDevicesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/devices/{device_ref_id}":{"delete":{"tags":["stdio_tunnel","stdio_tunnel"],"summary":"Delete Device","description":"Remove a device and its bound stdio_tunnel servers for the caller's org.","operationId":"delete_device_api_v1_devices__device_ref_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"device_ref_id","in":"path","required":true,"schema":{"type":"integer","title":"Device Ref Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/devices/{device_ref_id}/migrate":{"post":{"tags":["stdio_tunnel","stdio_tunnel"],"summary":"Migrate Device Servers","description":"Repoint a retired device's stdio servers at its replacement row.\n\nServers are bound to `Devices.id`, so a machine that re-registered under a\nnew device row leaves its servers pointing at the old one: invisible to the\ndaemon and still holding their names. Deleting the old device would drop\nthem; this moves them instead, names untouched.","operationId":"migrate_device_servers_api_v1_devices__device_ref_id__migrate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"device_ref_id","in":"path","required":true,"schema":{"type":"integer","title":"Device Ref Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain override (OWNER only)","title":"Domain"},"description":"Domain override (OWNER only)"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrateDeviceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrateDeviceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AcceptAutoLabelsRequest":{"properties":{"server":{"type":"string","title":"Server","description":"MCP server name"},"items":{"anyOf":[{"items":{"$ref":"#/components/schemas/AutoLabelItemRef"},"type":"array"},{"type":"null"}],"title":"Items","description":"Specific elements to mark reviewed. Omit (null) to accept every unreviewed auto-applied label on the server."}},"type":"object","required":["server"],"title":"AcceptAutoLabelsRequest","description":"Request body for POST config-perms/review/accept."},"AcceptAutoLabelsResponse":{"properties":{"reviewed":{"type":"integer","title":"Reviewed","description":"Number of labels marked reviewed"},"server":{"type":"string","title":"Server","description":"Server name"}},"type":"object","required":["reviewed","server"],"title":"AcceptAutoLabelsResponse","description":"Response for POST config-perms/review/accept."},"AccessControlSummary":{"properties":{"role_count":{"type":"integer","title":"Role Count","description":"Number of role definitions"},"server_count":{"type":"integer","title":"Server Count","description":"Number of server enablements"},"element_enablements":{"type":"integer","title":"Element Enablements","description":"Number of element enablement overrides"},"server_enablements":{"type":"integer","title":"Server Enablements","description":"Number of server enablement overrides"}},"type":"object","required":["role_count","server_count","element_enablements","server_enablements"],"title":"AccessControlSummary"},"ActivationStatusResponse":{"properties":{"connected":{"type":"boolean","title":"Connected","description":"An AI client has reached the caller's gateway at least once (a real MCP session row exists; created on the client's first request, including the tools/list at connect time)"},"connected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Connected At","description":"When the first AI client session was seen"},"client":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client","description":"Most recently seen client id (e.g. 'claude-code', 'cursor')"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name","description":"Display name of the most recently seen client (e.g. 'Claude Code')"},"activated":{"type":"boolean","title":"Activated","description":"The user has made their first successful non-builtin tool call"},"first_tool_call_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Tool Call At","description":"When the first real tool call went through the gateway"},"first_tool_call_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Tool Call Name","description":"Prefixed name of the first real tool call"},"track":{"anyOf":[{"type":"string","enum":["agent","ciso","developer"]},{"type":"null"}],"title":"Track","description":"Onboarding track (US-201). Null until the entry URL or the fork question assigns one."}},"type":"object","required":["connected","activated"],"title":"ActivationStatusResponse","description":"Two-stage onboarding signal: connected (handshake seen) -> activated (first real call)."},"AdminChatRequest":{"properties":{"messages":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Messages","description":"UIMessage history"}},"additionalProperties":true,"type":"object","title":"AdminChatRequest","description":"Body of ``POST /admin-chat``: what ``useChat``'s ``DefaultChatTransport`` posts.\n\n``messages`` is the full ``UIMessage[]`` history; ``id``/``trigger``/\n``messageId`` ride along and are ignored."},"AdminChatStatus":{"properties":{"model":{"type":"string","title":"Model","description":"Model id in provider/name form"},"llm_configured":{"type":"boolean","title":"Llm Configured","description":"Whether the model's provider key is set"},"tool_count":{"type":"integer","title":"Tool Count","description":"Number of tools the admin MCP server exposes"}},"type":"object","required":["model","llm_configured","tool_count"],"title":"AdminChatStatus","description":"What the Chat page needs to know before its first message."},"AdminTemplateConfigResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation result","default":"ok"},"server_name":{"type":"string","title":"Server Name","description":"MCP server name"},"config":{"additionalProperties":true,"type":"object","title":"Config","description":"Current configuration"}},"type":"object","required":["server_name"],"title":"AdminTemplateConfigResponse","description":"Response for admin template config operations."},"AgentDetail":{"properties":{"id":{"type":"integer","title":"Id","description":"Agent primary key"},"name":{"type":"string","title":"Name","description":"Unique agent name"},"agent_id":{"type":"string","title":"Agent Id","description":"Unique agent identifier in agent:HEX format"},"agent_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Type","description":"Agent type or category"},"domain":{"type":"string","title":"Domain","description":"Email domain the agent belongs to"},"archived":{"type":"boolean","title":"Archived","description":"Whether the agent is archived"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the agent was created"},"user_id":{"type":"string","title":"User Id","description":"User ID of the agent creator"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the agent was last updated"}},"type":"object","required":["id","name","agent_id","domain","archived","created_at","user_id","updated_at"],"title":"AgentDetail"},"AgentSessionCount":{"properties":{"name":{"type":"string","title":"Name","description":"Agent name"},"count":{"type":"integer","title":"Count","description":"Sessions this user ran with that agent"}},"type":"object","required":["name","count"],"title":"AgentSessionCount"},"AgentSummary":{"properties":{"id":{"type":"integer","title":"Id","description":"Agent primary key"},"name":{"type":"string","title":"Name","description":"Unique agent name"},"agent_id":{"type":"string","title":"Agent Id","description":"Unique agent identifier in agent:HEX format"},"agent_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Type","description":"Agent type or category"},"domain":{"type":"string","title":"Domain","description":"Email domain the agent belongs to"},"archived":{"type":"boolean","title":"Archived","description":"Whether the agent is archived"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the agent was created"}},"type":"object","required":["id","name","agent_id","domain","archived","created_at"],"title":"AgentSummary"},"AllAdminTemplateConfigsResponse":{"properties":{"configs":{"additionalProperties":true,"type":"object","title":"Configs","description":"Admin configs keyed by server name"}},"type":"object","required":["configs"],"title":"AllAdminTemplateConfigsResponse","description":"Response listing all admin template configurations."},"AllUserTemplateConfigsResponse":{"properties":{"configs":{"additionalProperties":true,"type":"object","title":"Configs","description":"User configs keyed by server name"}},"type":"object","required":["configs"],"title":"AllUserTemplateConfigsResponse","description":"Response listing all user template configurations."},"ApprovalRequest":{"properties":{"id":{"type":"integer","title":"Id","description":"Approval request ID"},"session_id":{"type":"string","title":"Session Id","description":"Session that triggered the approval request"},"tool_name":{"type":"string","title":"Tool Name","description":"Name of the tool requesting approval"},"tool_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Params","description":"Parameters passed to the tool"},"user_id":{"type":"string","title":"User Id","description":"User who initiated the tool call"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email","description":"Email of the user who initiated the tool call"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name","description":"Name of the agent that made the call"},"trifecta_flags":{"items":{"type":"string"},"type":"array","title":"Trifecta Flags","description":"Trifecta flags that triggered the block"},"risk":{"anyOf":[{"$ref":"#/components/schemas/RiskInfo"},{"type":"null"}],"description":"Persisted plain-language risk analysis for this block (the same explanation shown in the user's approval popup); null for older sessions without it"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"What held the call: 'trifecta'/'trifecta_prevent' for a lethal-trifecta gate, 'policy_approval' for a policy rule's require_approval action"},"policy_rule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Rule","description":"Name of the policy rule that required approval, when applicable"},"status":{"type":"string","title":"Status","description":"Approval status: pending, approved, denied"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the approval request was created"}},"type":"object","required":["id","session_id","tool_name","user_id","status","created_at"],"title":"ApprovalRequest"},"ApproveAction":{"properties":{"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional note explaining the approval"}},"type":"object","title":"ApproveAction"},"ApproveAllMcpRequestsResponse":{"properties":{"approved":{"type":"integer","title":"Approved","description":"Number of requests approved"},"failed":{"type":"integer","title":"Failed","description":"Number of requests that failed"},"total":{"type":"integer","title":"Total","description":"Total pending requests processed"},"errors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Errors","description":"Error messages for failed approvals"}},"type":"object","required":["approved","failed","total"],"title":"ApproveAllMcpRequestsResponse"},"ApproveDomainRequest":{"properties":{"is_approved":{"type":"boolean","title":"Is Approved","description":"Whether to approve the domain"}},"type":"object","required":["is_approved"],"title":"ApproveDomainRequest","description":"Request to approve or reject a domain."},"ApproveMcpRequestBody":{"properties":{"reviewer_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Notes","description":"Optional reviewer notes"},"name_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Override","description":"Override the server name (for deduplication)"}},"type":"object","title":"ApproveMcpRequestBody"},"ApproveMcpRequestResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation result","default":"success"},"message":{"type":"string","title":"Message","description":"Human-readable message"},"server_id":{"type":"integer","title":"Server Id","description":"Created server ID"},"request_id":{"type":"integer","title":"Request Id","description":"Approved request ID"},"server_name":{"type":"string","title":"Server Name","description":"Final (sanitized) name of the created server. Lets the dashboard continue straight into the post-approve setup steps (the setup stepper resolves OAuth status via GET /mcp/oauth/status/{name})."}},"type":"object","required":["message","server_id","request_id","server_name"],"title":"ApproveMcpRequestResponse"},"ApproveOrDenyAction":{"properties":{"session_id":{"type":"string","title":"Session Id","description":"Session to approve/deny"},"kind":{"type":"string","title":"Kind","description":"Kind of action: tool, resource, or prompt"},"name":{"type":"string","title":"Name","description":"Name of the tool/resource/prompt"},"command":{"type":"string","title":"Command","description":"Command: approve, deny, or approve_and_remember"},"action_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Token","description":"Single-use token minted by the notification dispatcher for one pending approval; it authorises exactly the (session_id, kind, name) it was minted for and is ignored when the caller is already authenticated. Why an unauthenticated caller may send it: the action_router comment in src/api/v1/routes/approvals.py."}},"type":"object","required":["session_id","kind","name","command"],"title":"ApproveOrDenyAction"},"AssignRoleRequest":{"properties":{"user_id":{"type":"string","title":"User Id","description":"User ID to assign the role to"},"role":{"type":"string","title":"Role","description":"Role name to assign"}},"type":"object","required":["user_id","role"],"title":"AssignRoleRequest"},"AuditEntry":{"properties":{"id":{"type":"integer","title":"Id","description":"Audit log entry ID"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"When the action occurred"},"user_id":{"type":"string","title":"User Id","description":"User who performed the action"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email","description":"Email of the user who performed the action"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Surface that performed the action when it was not a person at the dashboard: admin-chat (a confirmation card the admin applied) or admin-chat-code (a script the code runner executed)"},"domain":{"type":"string","title":"Domain","description":"Domain in which the action occurred"},"action":{"type":"string","title":"Action","description":"Action performed (e.g. approve_user, create_role, update_policy)"},"resource_type":{"type":"string","title":"Resource Type","description":"Type of resource affected (e.g. user, role, policy, server)"},"resource_id":{"type":"string","title":"Resource Id","description":"Identifier of the affected resource"},"old_value":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Old Value","description":"Previous state of the resource before the change"},"new_value":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"New Value","description":"New state of the resource after the change"},"request_status":{"type":"string","title":"Request Status","description":"HTTP status of the request (e.g. success, error)"}},"type":"object","required":["id","timestamp","user_id","domain","action","resource_type","resource_id","request_status"],"title":"AuditEntry"},"AuditLogRetentionResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation status","default":"ok"},"org_id":{"type":"string","title":"Org Id","description":"Org the setting applies to"},"audit_log_retention_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audit Log Retention Days","description":"Current retention in days; null means the 120-day (4-month) default applies."}},"type":"object","required":["org_id"],"title":"AuditLogRetentionResponse","description":"Response for the GET/PATCH /api/v1/tenant/audit-log-retention endpoints."},"AutoApproveDomainRequest":{"properties":{"approve_all_new_users":{"type":"boolean","title":"Approve All New Users","description":"Auto-approve all new users from this domain"}},"type":"object","required":["approve_all_new_users"],"title":"AutoApproveDomainRequest","description":"Request to toggle auto-approve for a domain."},"AutoApproveNewDomainsRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"When true, new domains get approve_all_new_users=True by default"}},"type":"object","required":["enabled"],"title":"AutoApproveNewDomainsRequest","description":"Request to toggle the global auto-approve-new-domains setting."},"AutoApproveNewDomainsResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Current value of auto-approve-new-domains"}},"type":"object","required":["enabled"],"title":"AutoApproveNewDomainsResponse","description":"Response for auto-approve-new-domains setting."},"AutoLabelItemRef":{"properties":{"item_type":{"type":"string","title":"Item Type","description":"Element type: tool, resource, or prompt"},"item_name":{"type":"string","title":"Item Name","description":"Element name"}},"type":"object","required":["item_type","item_name"],"title":"AutoLabelItemRef","description":"Reference to one labelled element inside a server."},"AutoLabelReviewItem":{"properties":{"item_type":{"type":"string","title":"Item Type","description":"Element type: tool, resource, or prompt"},"item_name":{"type":"string","title":"Item Name","description":"Element name"},"flags":{"additionalProperties":true,"type":"object","title":"Flags","description":"Applied permission flags (trifecta booleans + acl)"},"reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning","description":"LLM's one-line explanation for why it chose these flags"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Element description from interface-lock metadata"}},"type":"object","required":["item_type","item_name"],"title":"AutoLabelReviewItem","description":"One auto-applied, not-yet-reviewed labelled element."},"AutoLabelReviewResponse":{"properties":{"servers":{"items":{"$ref":"#/components/schemas/AutoLabelReviewServer"},"type":"array","title":"Servers","description":"Servers with pending reviews"},"total":{"type":"integer","title":"Total","description":"Total unreviewed labels across all servers"},"pending_label_servers":{"items":{"type":"string"},"type":"array","title":"Pending Label Servers","description":"Server names where auto_label_pending is True - the LLM labeling has not yet started or is still in progress"}},"type":"object","required":["servers","total"],"title":"AutoLabelReviewResponse","description":"Response for GET config-perms/review."},"AutoLabelReviewServer":{"properties":{"server_name":{"type":"string","title":"Server Name","description":"Server name"},"server_id":{"type":"integer","title":"Server Id","description":"Server ID"},"items":{"items":{"$ref":"#/components/schemas/AutoLabelReviewItem"},"type":"array","title":"Items","description":"Unreviewed labelled elements"}},"type":"object","required":["server_name","server_id","items"],"title":"AutoLabelReviewServer","description":"All unreviewed auto-applied labels for one server."},"AutoQuarantineMcpRequest":{"properties":{"auto_quarantine_other_mcp_servers":{"type":"boolean","title":"Auto Quarantine Other Mcp Servers","description":"When true, the client auto-quarantines non-SealGate MCP servers"}},"type":"object","required":["auto_quarantine_other_mcp_servers"],"title":"AutoQuarantineMcpRequest","description":"Request to toggle MCP auto-quarantine for a domain."},"AutoconfigCacheEntry":{"properties":{"id":{"type":"integer","title":"Id","description":"Cache entry ID"},"server_id":{"type":"integer","title":"Server Id","description":"Server ID"},"server_name":{"type":"string","title":"Server Name","description":"Server name"},"item_type":{"type":"string","title":"Item Type","description":"Item type (tool, resource, prompt)"},"item_name":{"type":"string","title":"Item Name","description":"Item name"},"flags":{"additionalProperties":true,"type":"object","title":"Flags","description":"Permission flags"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain","description":"Domain (owner only)"}},"type":"object","required":["id","server_id","server_name","item_type","item_name"],"title":"AutoconfigCacheEntry","description":"A single autoconfig cache entry."},"AutoconfigCacheResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/AutoconfigCacheEntry"},"type":"array","title":"Entries","description":"Cache entries"},"count":{"type":"integer","title":"Count","description":"Number of entries"},"server":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Server","description":"Server filter applied"}},"type":"object","required":["entries","count"],"title":"AutoconfigCacheResponse","description":"Response for GET config-perms/cache."},"AutoconfigRefineRequest":{"properties":{"server":{"type":"string","title":"Server","description":"MCP server name"},"tools":{"items":{"type":"string"},"type":"array","title":"Tools","description":"Tool names to re-classify"},"resources":{"items":{"type":"string"},"type":"array","title":"Resources","description":"Resource names to re-classify"},"prompts":{"items":{"type":"string"},"type":"array","title":"Prompts","description":"Prompt names to re-classify"},"current_flags":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Current Flags","description":"Map of '<type>:<item_name>' (e.g. 'tool:search') -> current permission flags to give the LLM as baseline. Namespacing by type avoids collisions when a tool and resource share the same name. Flat name-only keys are still accepted for back-compat."},"feedback":{"type":"string","title":"Feedback","description":"User feedback/instructions to adjust classifications"}},"type":"object","required":["server","feedback"],"title":"AutoconfigRefineRequest","description":"Request body for refining AI autoconfig results with user feedback."},"AutoconfigResponse":{"properties":{"server":{"type":"string","title":"Server","description":"MCP server name"},"tools":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tools","description":"Tool permission flags (includes 'reasoning' per item)"},"resources":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Resources","description":"Resource permission flags"},"prompts":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Prompts","description":"Prompt permission flags"},"descriptions":{"additionalProperties":{"type":"string"},"type":"object","title":"Descriptions","description":"Element name → human-readable description from interface-lock metadata"}},"type":"object","required":["server"],"title":"AutoconfigResponse","description":"Response from AI permission auto-configuration."},"AutoconfigRunRequest":{"properties":{"server":{"type":"string","title":"Server","description":"MCP server name"},"tools":{"items":{"type":"string"},"type":"array","title":"Tools","description":"Tool names to classify"},"resources":{"items":{"type":"string"},"type":"array","title":"Resources","description":"Resource names to classify"},"prompts":{"items":{"type":"string"},"type":"array","title":"Prompts","description":"Prompt names to classify"}},"type":"object","required":["server"],"title":"AutoconfigRunRequest","description":"Request body for running AI autoconfig on the backend."},"BalanceResponse":{"properties":{"org_id":{"type":"string","title":"Org Id"},"balance":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Balance"},"granted":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Granted"},"default_caps":{"additionalProperties":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},"type":"object","title":"Default Caps"},"window":{"type":"string","title":"Window"},"period":{"type":"string","title":"Period"},"periods":{"additionalProperties":{"type":"string"},"type":"object","title":"Periods"},"mine":{"$ref":"#/components/schemas/MemberStatusOut"},"by_meter":{"items":{"$ref":"#/components/schemas/MeterSpend"},"type":"array","title":"By Meter"},"by_user_meter":{"items":{"$ref":"#/components/schemas/UserMeterSpend"},"type":"array","title":"By User Meter","default":[]},"by_user":{"items":{"$ref":"#/components/schemas/UserSpend"},"type":"array","title":"By User"},"caps":{"items":{"$ref":"#/components/schemas/UserCap"},"type":"array","title":"Caps"},"gates":{"items":{"$ref":"#/components/schemas/GateOut"},"type":"array","title":"Gates","default":[]},"usage_retention_days":{"type":"integer","title":"Usage Retention Days","default":120},"usage_retention_is_default":{"type":"boolean","title":"Usage Retention Is Default","default":true},"topped_up":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Topped Up","default":"0"},"out_of_credits":{"type":"boolean","title":"Out Of Credits","default":false},"low_balance_credits":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Low Balance Credits","default":"100"},"stripe_enabled":{"type":"boolean","title":"Stripe Enabled","default":false}},"type":"object","required":["org_id","balance","granted","default_caps","window","period","periods","mine","by_meter","by_user","caps"],"title":"BalanceResponse","description":"What an org has, is allowed, and has spent this period."},"Body_import_config_db_api_config_import_db_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_import_config_db_api_config_import_db_post"},"Body_import_sessions_db_api_config_import_sessions_db_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_import_sessions_db_api_config_import_sessions_db_post"},"ChangeDiff":{"properties":{"kind":{"type":"string","enum":["create","update","delete"],"title":"Kind"},"label":{"type":"string","title":"Label"},"fingerprint":{"type":"string","title":"Fingerprint"},"fields":{"items":{"$ref":"#/components/schemas/FieldChange"},"type":"array","title":"Fields"},"after":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"After"},"lines":{"items":{"$ref":"#/components/schemas/DiffLine"},"type":"array","title":"Lines"},"truncated":{"type":"boolean","title":"Truncated"},"adds":{"type":"integer","title":"Adds"},"dels":{"type":"integer","title":"Dels"}},"type":"object","required":["kind","label","fingerprint","lines","truncated","adds","dels"],"title":"ChangeDiff","description":"What a proposed write would change, as the confirmation card paints it.\n\nBuilt by ``src.admin_mcp.preview.build_diff``; travels on the tool part's\n``callProviderMetadata.sealgate.diff`` and as the preview route's answer.\n``fields`` is what the card shows first (the changed fields, as words);\n``lines`` is the JSON line diff behind its toggle."},"ChannelStatusItem":{"properties":{"channel":{"type":"string","title":"Channel","description":"One of: web, desktop, slack, telegram"},"enabled":{"type":"boolean","title":"Enabled","description":"Whether the user switched this channel on","default":false},"deployment_configured":{"type":"boolean","title":"Deployment Configured","description":"Whether this deployment has credentials to deliver on the channel","default":true},"destination_set":{"type":"boolean","title":"Destination Set","description":"Whether a destination is known","default":true},"ready":{"type":"boolean","title":"Ready","description":"deployment_configured AND destination_set","default":false},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail","description":"Human-readable reason when not ready"}},"type":"object","required":["channel"],"title":"ChannelStatusItem","description":"Delivery readiness for one channel, for the settings UI."},"ChatSkill":{"properties":{"name":{"type":"string","title":"Name","description":"Skill slug; typed as /name or $name in the composer"},"description":{"type":"string","title":"Description","description":"Summary from the skill's frontmatter, may be empty","default":""},"size_bytes":{"type":"integer","title":"Size Bytes","description":"Size of the SKILL.md document","default":0},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"ISO timestamp of the last save"}},"type":"object","required":["name"],"title":"ChatSkill","description":"One saved skill as the composer's picker lists it (no content)."},"CheckoutRequestBody":{"properties":{"credits":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Credits","description":"How many credits to buy."},"success_url":{"type":"string","title":"Success Url","description":"Where Stripe returns the buyer on success."},"cancel_url":{"type":"string","title":"Cancel Url","description":"Where Stripe returns the buyer on cancel."}},"type":"object","required":["credits","success_url","cancel_url"],"title":"CheckoutRequestBody","description":"Buy a pack of credits."},"CheckoutResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"}},"type":"object","required":["checkout_url"],"title":"CheckoutResponse","description":"Where to send the buyer."},"ClearAutoconfigCacheResponse":{"properties":{"cleared":{"type":"integer","title":"Cleared","description":"Number of entries cleared"},"server":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Server","description":"Server filter applied"}},"type":"object","required":["cleared"],"title":"ClearAutoconfigCacheResponse","description":"Response for DELETE config-perms/cache."},"ClientCreateMcpRequestBody":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"display_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Display Name"},"command":{"type":"string","maxLength":500,"minLength":1,"title":"Command"},"args":{"items":{"type":"string"},"type":"array","maxItems":1000,"title":"Args"}},"additionalProperties":false,"type":"object","required":["name","command"],"title":"ClientCreateMcpRequestBody","description":"The only stdio request fields accepted from stdiod."},"ClientInstallationResponse":{"properties":{"id":{"type":"string","title":"Id"},"device_id":{"type":"string","title":"Device Id"},"client_id":{"type":"string","title":"Client Id"},"scope":{"items":{"type":"string"},"type":"array","title":"Scope"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"}},"type":"object","required":["id","device_id","client_id","scope","metadata","created_at","updated_at","last_used_at","revoked_at"],"title":"ClientInstallationResponse"},"ClientServerEntry":{"properties":{"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"enabled":{"type":"boolean","title":"Enabled"},"tool_count":{"type":"integer","title":"Tool Count"},"device_id":{"type":"string","title":"Device Id"}},"type":"object","required":["name","display_name","enabled","tool_count","device_id"],"title":"ClientServerEntry"},"ClientServerListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ClientServerEntry"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ClientServerListResponse"},"ClientStatusResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Connectivity status: 'connected' (green), 'misconfigured' (yellow), or 'disconnected' (red)"},"has_secret_key":{"type":"boolean","title":"Has Secret Key","description":"Whether encryption keys are configured","default":false},"clients":{"items":{"$ref":"#/components/schemas/DesktopClientInfo"},"type":"array","title":"Clients","description":"Connected desktop client details"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At","description":"Last activity timestamp of any desktop session"},"issues":{"items":{"type":"string"},"type":"array","title":"Issues","description":"List of misconfiguration issues (populated in 'misconfigured' state)"}},"type":"object","required":["status"],"title":"ClientStatusResponse"},"ConsentDecisionRequest":{"properties":{"approve":{"type":"boolean","title":"Approve"},"seed":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Seed"},"wrapped_secret_key":{"anyOf":[{"type":"string","maxLength":8192},{"type":"null"}],"title":"Wrapped Secret Key"}},"type":"object","required":["approve"],"title":"ConsentDecisionRequest"},"ConsentDecisionResponse":{"properties":{"redirect_url":{"type":"string","title":"Redirect Url"}},"type":"object","required":["redirect_url"],"title":"ConsentDecisionResponse"},"ConsentRequestResponse":{"properties":{"authorization_id":{"type":"string","title":"Authorization Id"},"grant_id":{"type":"string","title":"Grant Id"},"client_id":{"type":"string","title":"Client Id"},"client_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Label"},"redirect_uri":{"type":"string","title":"Redirect Uri"},"redirect_host":{"type":"string","title":"Redirect Host"},"is_loopback_redirect":{"type":"boolean","title":"Is Loopback Redirect"},"redirect_scheme":{"type":"string","title":"Redirect Scheme"},"is_native_app_redirect":{"type":"boolean","title":"Is Native App Redirect"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"wrap_context":{"type":"string","title":"Wrap Context"}},"type":"object","required":["authorization_id","grant_id","client_id","redirect_uri","redirect_host","is_loopback_redirect","redirect_scheme","is_native_app_redirect","scopes","wrap_context"],"title":"ConsentRequestResponse","description":"What the consent screen renders before the user decides."},"ConversationDetail":{"properties":{"id":{"type":"string","title":"Id","description":"Conversation id (minted by the page)"},"title":{"type":"string","title":"Title","description":"First user message, trimmed"},"message_count":{"type":"integer","title":"Message Count","description":"Messages in the transcript"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"messages":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Messages","description":"UIMessage history"}},"type":"object","required":["id","title","message_count","created_at","updated_at","messages"],"title":"ConversationDetail"},"ConversationSummary":{"properties":{"id":{"type":"string","title":"Id","description":"Conversation id (minted by the page)"},"title":{"type":"string","title":"Title","description":"First user message, trimmed"},"message_count":{"type":"integer","title":"Message Count","description":"Messages in the transcript"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","title","message_count","created_at","updated_at"],"title":"ConversationSummary"},"CreateAgentRequest":{"properties":{"name":{"type":"string","title":"Name","description":"Agent name (must be unique per domain)"},"agent_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Type","description":"Optional agent type/category"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain","description":"Target domain (owner only; must be in owner domain list)"}},"type":"object","required":["name"],"title":"CreateAgentRequest"},"CreateMcpRequestBody":{"properties":{"name":{"type":"string","title":"Name","description":"Proposed server name"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Human-readable server label"},"command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Command","description":"Command for stdio servers"},"args":{"items":{},"type":"array","title":"Args","description":"Command-line arguments"},"env":{"additionalProperties":{"type":"string"},"type":"object","title":"Env","description":"Environment variables"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"URL for HTTP/SSE servers"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Custom HTTP headers for HTTP/SSE servers"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"Server type: stdio, sse, http"},"hostname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hostname","description":"Machine the server was discovered on. Sent by the detector daemon for local (stdio) servers so approval can resolve the stdiod device and gate on it being online."},"source_app":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source App","description":"App where server was discovered"},"source_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Path","description":"Config file path"},"roots":{"items":{"type":"string"},"type":"array","title":"Roots","description":"Root paths"},"from_marketplace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Marketplace Id","description":"Marketplace ID"},"justification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Justification","description":"Reason for request"},"template_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Template Fields","description":"Template field definitions for detected secrets"},"origin":{"anyOf":[{"type":"string","enum":["quarantine_watcher","dashboard"]},{"type":"null"}],"title":"Origin","description":"Where the request was raised. 'dashboard' for a request a user filed by hand in the dashboard (My Connectors, marketplace, /add-mcp); it is never quarantined and lands in the new-server-requests queue. Omitted means 'quarantine_watcher' (the desktop client's detector), so clients that predate this field keep landing in the quarantine queue while the org's auto-quarantine flag is on."}},"type":"object","required":["name"],"title":"CreateMcpRequestBody"},"CreateMcpRequestResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation result","default":"success"},"message":{"type":"string","title":"Message","description":"Human-readable message"},"request_id":{"type":"integer","title":"Request Id","description":"Created request ID"},"auto_approved":{"type":"boolean","title":"Auto Approved","description":"True if the backend immediately approved the request (admin/owner submitter). Clients should skip any follow-up approve call when this is set.","default":false}},"type":"object","required":["message","request_id"],"title":"CreateMcpRequestResponse"},"CreatePolicyRequest":{"properties":{"name":{"type":"string","title":"Name","description":"Rule name"},"rule_id":{"type":"string","title":"Rule Id","description":"Unique rule identifier"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Rule description"},"cel_expression":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cel Expression","description":"CEL filter expression"},"phase":{"type":"string","title":"Phase","description":"Evaluation phase: pre or post. A post-phase rule cannot carry a require_approval action - the tool has already run by then","default":"pre"},"status":{"type":"string","title":"Status","description":"Rule status: enabled, disabled, or tentative","default":"enabled"},"priority":{"type":"integer","title":"Priority","description":"Rule priority","default":0},"principal_scope":{"anyOf":[{"$ref":"#/components/schemas/PrincipalScopeSchema"},{"type":"null"}],"description":"Principal scope"},"resource_scope":{"anyOf":[{"$ref":"#/components/schemas/ResourceScopeSchema"},{"type":"null"}],"description":"Resource scope"},"actions":{"items":{"$ref":"#/components/schemas/PolicyActionInput"},"type":"array","title":"Actions","description":"Policy actions"}},"type":"object","required":["name","rule_id"],"title":"CreatePolicyRequest"},"CreateRoleRequest":{"properties":{"role":{"type":"string","title":"Role","description":"Role name (alphanumeric, hyphens, underscores)"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Human-readable description"}},"type":"object","required":["role"],"title":"CreateRoleRequest"},"CreateServerRequest":{"properties":{"name":{"type":"string","title":"Name","description":"Server MCP prefix name (alphanumeric only: a-zA-Z0-9)"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Human-readable display name (defaults to name)"},"command":{"type":"string","title":"Command","description":"Server command (required for local servers)","default":""},"args":{"items":{"type":"string"},"type":"array","title":"Args","description":"Command-line arguments"},"env":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","title":"Env","description":"Environment variables"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"Remote server URL (direct mode, no mcp-remote)"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Custom HTTP headers for remote servers"},"enabled":{"type":"boolean","title":"Enabled","description":"Whether to enable the server","default":true},"template_fields":{"anyOf":[{"$ref":"#/components/schemas/TemplateFieldsInput"},{"type":"null"}],"description":"Template field definitions (from marketplace)"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version","description":"Server version"},"from_marketplace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Marketplace Id","description":"Marketplace server ID this was installed from"},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon Url","description":"Manual override icon URL (skips logo.dev lookup)"},"transport_type":{"type":"string","title":"Transport Type","description":"Transport: 'http' (remote URL) or 'stdio_tunnel' (proxied via daemon)","default":"http"},"concurrency":{"type":"string","title":"Concurrency","description":"stdio_tunnel on a shared device only: 'concurrent' (default, calls from all users interleave) or 'exclusive' (one user holds a lease at a time). Ignored for other transports.","default":"concurrent"},"device_ref_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Device Ref Id","description":"Required when transport_type='stdio_tunnel'. Identifies the target ``Devices.id`` (surrogate) the subprocess should run on - frontend gets it from GET /api/v1/devices. Replaces the previous string ``device_id`` so a shared hostname under two different users no longer collides."},"working_dir":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Working Dir","description":"Optional working directory for stdio_tunnel subprocesses"}},"type":"object","required":["name"],"title":"CreateServerRequest"},"CustomHttpConfig":{"properties":{"url":{"type":"string","title":"Url","description":"Custom HTTP endpoint URL","default":""},"method":{"type":"string","title":"Method","description":"HTTP method (POST, PUT)","default":"POST"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","description":"Custom HTTP headers"},"timeout":{"type":"number","title":"Timeout","description":"Connection timeout in seconds","default":10.0},"verify_ssl":{"type":"boolean","title":"Verify Ssl","description":"Verify SSL certificates","default":true},"include_metadata":{"type":"boolean","title":"Include Metadata","description":"Include event metadata in request","default":true}},"type":"object","title":"CustomHttpConfig","description":"Custom HTTP endpoint settings."},"DayBucket":{"properties":{"date":{"type":"string","title":"Date","description":"ISO date string (YYYY-MM-DD)"},"sessions":{"type":"integer","title":"Sessions","description":"Sessions that used this server on this day"},"tool_calls":{"type":"integer","title":"Tool Calls","description":"Tool calls to this server on this day"}},"type":"object","required":["date","sessions","tool_calls"],"title":"DayBucket"},"DeactivateDomainResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Action result status","default":"success"},"email_domain":{"type":"string","title":"Email Domain","description":"The domain that was deactivated"},"is_approved":{"type":"boolean","title":"Is Approved","description":"Domain approval status (always False)","default":false},"deactivated_users":{"type":"integer","title":"Deactivated Users","description":"Number of users deactivated"},"deactivated_keys":{"type":"integer","title":"Deactivated Keys","description":"Number of API keys deactivated"}},"type":"object","required":["email_domain","deactivated_users","deactivated_keys"],"title":"DeactivateDomainResponse","description":"Response for deactivating a domain."},"DeleteOrgResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Action result status","default":"deleted"},"email_domain":{"type":"string","title":"Email Domain","description":"The domain that was deleted"},"deleted_users":{"type":"integer","title":"Deleted Users","description":"Number of users deleted"},"total_deleted":{"type":"integer","title":"Total Deleted","description":"Total records deleted across all tables"}},"type":"object","required":["email_domain","deleted_users","total_deleted"],"title":"DeleteOrgResponse","description":"Response for deleting an organisation and all its data."},"DeletePermissionResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation result","default":"ok"},"message":{"type":"string","title":"Message","description":"Result message","default":"Permission deleted"}},"type":"object","title":"DeletePermissionResponse","description":"Response for permission deletion."},"DeleteTenantBackendUrlsResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation status","default":"ok"},"email_domain":{"type":"string","title":"Email Domain","description":"Domain whose URLs were removed"},"message":{"type":"string","title":"Message","description":"Descriptive message"}},"type":"object","required":["email_domain","message"],"title":"DeleteTenantBackendUrlsResponse","description":"Response for DELETE /api/v1/tenant/backend-urls."},"DeleteUserResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation result","default":"success"},"user_id":{"type":"string","title":"User Id","description":"Deleted user ID"},"total_deleted":{"type":"integer","title":"Total Deleted","description":"Total records deleted across all tables"}},"type":"object","required":["user_id","total_deleted"],"title":"DeleteUserResponse"},"DemoChatRequest":{"properties":{"message":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Message"},"messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Messages"}},"additionalProperties":true,"type":"object","title":"DemoChatRequest","description":"Body of POST /demo/chat.\n\nThe frontend uses the Vercel AI SDK's ``useChat``/``DefaultChatTransport``,\nwhich posts ``{id, messages, trigger, messageId}`` (UIMessage array). The\nlegacy ``{message}`` shape is still accepted for older clients/tests. The\ndemo agent is fully scripted, so the content is only logged - never fed to\na model."},"DenyAction":{"properties":{"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional note explaining the denial"}},"type":"object","title":"DenyAction"},"DesktopClientInfo":{"properties":{"client_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Ip","description":"IP address of the connected desktop client"},"connected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Connected At","description":"When the desktop client connected"}},"type":"object","title":"DesktopClientInfo"},"DevEmitServerLogRequest":{"properties":{"server_name":{"type":"string","title":"Server Name","default":"dev-test-server"},"level":{"type":"string","enum":["warning","error"],"title":"Level","default":"warning"},"title":{"type":"string","title":"Title","default":"Server not responding (timed out)"},"lines":{"items":{"type":"string"},"type":"array","title":"Lines"},"category":{"type":"string","enum":["health","startup"],"title":"Category","default":"startup"}},"type":"object","title":"DevEmitServerLogRequest","description":"Synthetic mcp_server_log payload for local testing."},"DeviceAuthorizationStatusResponse":{"properties":{"client_id":{"type":"string","title":"Client Id"},"scope":{"items":{"type":"string"},"type":"array","title":"Scope"},"status":{"type":"string","enum":["pending","approved","denied","consumed","expired"],"title":"Status"},"device_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Label"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"client_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Version"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["client_id","scope","status","device_label","platform","client_version","created_at","expires_at"],"title":"DeviceAuthorizationStatusResponse"},"DeviceCodeRequest":{"properties":{"client_id":{"type":"string","maxLength":50,"title":"Client Id","description":"Device client identifier: stdiod, desktop, or mobile"},"scope":{"items":{"type":"string"},"type":"array","maxItems":4,"minItems":1,"title":"Scope"},"code_challenge":{"type":"string","maxLength":43,"minLength":43,"pattern":"^[A-Za-z0-9_-]{43}$","title":"Code Challenge","description":"Base64url-encoded SHA-256 PKCE challenge"},"code_challenge_method":{"type":"string","const":"S256","title":"Code Challenge Method"},"device_label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Device Label"},"platform":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Platform"},"client_version":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Client Version"},"client_installation_id":{"anyOf":[{"type":"string","maxLength":36,"minLength":1},{"type":"null"}],"title":"Client Installation Id"}},"type":"object","required":["client_id","scope","code_challenge","code_challenge_method"],"title":"DeviceCodeRequest"},"DeviceCodeResponse":{"properties":{"device_code":{"type":"string","title":"Device Code"},"user_code":{"type":"string","title":"User Code"},"verification_uri":{"type":"string","title":"Verification Uri"},"verification_uri_complete":{"type":"string","title":"Verification Uri Complete"},"expires_in":{"type":"integer","title":"Expires In"},"interval":{"type":"integer","title":"Interval"}},"type":"object","required":["device_code","user_code","verification_uri","verification_uri_complete","expires_in","interval"],"title":"DeviceCodeResponse"},"DeviceSummary":{"properties":{"id":{"type":"integer","title":"Id","description":"Surrogate ``Devices.id``. Authoritative identifier - frontend passes this back as ``device_ref_id`` when creating a stdio_tunnel server."},"device_id":{"type":"string","title":"Device Id","description":"Wire-level device label the daemon advertises (hostname by default). Not unique across users sharing a machine; use ``id`` for any binding."},"label":{"type":"string","title":"Label"},"hostname":{"type":"string","title":"Hostname"},"os":{"type":"string","title":"Os"},"client_version":{"type":"string","title":"Client Version"},"status":{"type":"string","title":"Status","description":"One of: online, offline, disabled."},"current_user":{"type":"boolean","title":"Current User","description":"True iff this Devices row represents a daemon identity that has signed in. Live status is resolved independently by row id.","default":false},"last_seen_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Seen At"},"scope":{"type":"string","title":"Scope","description":"'personal' (default): only the owning user may access this device's stdio_tunnel servers. 'shared': org infrastructure - its servers use normal org access control. Mutated via PATCH /devices/{id}/scope (admin + step-up).","default":"personal"},"server_count":{"type":"integer","title":"Server Count","default":0},"servers":{"items":{"type":"string"},"type":"array","title":"Servers","description":"Names of the stdio_tunnel MCP servers bound to this device, sorted alphabetically. ``server_count`` is ``len(servers)``; both are kept so existing callers reading the count don't break."},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"The Supabase user_id of the daemon owner."},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email","description":"Email of the daemon owner, resolved from user_id. Lets admins tell which device belongs to whom."}},"type":"object","required":["id","device_id","label","hostname","os","client_version","status"],"title":"DeviceSummary"},"DeviceTokenErrorResponse":{"properties":{"error":{"type":"string","enum":["authorization_pending","slow_down","access_denied","expired_token","invalid_grant","invalid_client","invalid_scope"],"title":"Error"}},"type":"object","required":["error"],"title":"DeviceTokenErrorResponse"},"DeviceTokenRequest":{"properties":{"client_id":{"type":"string","maxLength":50,"title":"Client Id"},"device_code":{"type":"string","maxLength":256,"minLength":32,"title":"Device Code"},"code_verifier":{"type":"string","maxLength":128,"minLength":43,"pattern":"^[A-Za-z0-9._~-]+$","title":"Code Verifier"}},"type":"object","required":["client_id","device_code","code_verifier"],"title":"DeviceTokenRequest"},"DeviceTokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","const":"Bearer","title":"Token Type","default":"Bearer"},"client_installation_id":{"type":"string","title":"Client Installation Id"},"device_id":{"type":"string","title":"Device Id"},"scope":{"items":{"type":"string"},"type":"array","title":"Scope"},"user_id":{"type":"string","title":"User Id"},"org_id":{"type":"string","title":"Org Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"The approving user's SealGate API key. Present only for clients that sign the human in on their behalf (desktop); always null for stdiod."}},"type":"object","required":["access_token","client_installation_id","device_id","scope","user_id","org_id"],"title":"DeviceTokenResponse"},"DiffLine":{"properties":{"t":{"type":"string","enum":["+","-"," "],"title":"T"},"s":{"type":"string","title":"S"}},"type":"object","required":["t","s"],"title":"DiffLine","description":"One line of a before/after preview: added, removed, or unchanged context."},"DismissSetupCardRequest":{"properties":{"server":{"type":"string","title":"Server","description":"MCP server name whose setup card to dismiss"}},"type":"object","required":["server"],"title":"DismissSetupCardRequest","description":"Request body for POST config-perms/review/dismiss."},"DismissSetupCardResponse":{"properties":{"server":{"type":"string","title":"Server","description":"Server name"},"dismissed":{"type":"boolean","title":"Dismissed","description":"True if a matching server was marked dismissed (False if none matched)"}},"type":"object","required":["server","dismissed"],"title":"DismissSetupCardResponse","description":"Response for POST config-perms/review/dismiss."},"DomainActionResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Action result status","default":"success"},"email_domain":{"type":"string","title":"Email Domain","description":"The domain that was modified"}},"type":"object","required":["email_domain"],"title":"DomainActionResponse","description":"Response for a domain mutation action."},"DomainKeyStatusResponse":{"properties":{"has_domain_key":{"type":"boolean","title":"Has Domain Key","description":"Whether a domain key is registered"},"email_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Domain","description":"Email domain the key belongs to"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"When the domain key expires"},"days_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Remaining","description":"Days until key expires (negative if expired)"},"expired":{"type":"boolean","title":"Expired","description":"Whether the domain key has expired","default":false}},"type":"object","required":["has_domain_key"],"title":"DomainKeyStatusResponse"},"DomainSummary":{"properties":{"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id","description":"Supabase organisation UUID owning the domain"},"email_domain":{"type":"string","title":"Email Domain","description":"Email domain name (e.g. 'acme.com')"},"is_approved":{"type":"boolean","title":"Is Approved","description":"Whether the domain is approved for access"},"approve_all_new_users":{"type":"boolean","title":"Approve All New Users","description":"Auto-approve all new users from this domain"},"sso_only":{"type":"boolean","title":"Sso Only","description":"Only SAML SSO login allowed for this domain"},"auto_quarantine_other_mcp_servers":{"type":"boolean","title":"Auto Quarantine Other Mcp Servers","description":"Client auto-quarantines non-SealGate MCP servers"},"store_call_data":{"type":"boolean","title":"Store Call Data","description":"Persist full tool call parameters and results"},"user_count":{"type":"integer","title":"User Count","description":"Total number of users in this domain"},"pending_user_count":{"type":"integer","title":"Pending User Count","description":"Number of users pending approval in this domain"},"mcp_base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Base Url","description":"MCP server base URL for this domain"},"api_base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Base Url","description":"API server base URL for this domain"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the domain was first registered"},"org_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Type","description":"Organisation type: 'self_serve' or 'enterprise'"},"org_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Name","description":"Display name for the organisation"}},"type":"object","required":["email_domain","is_approved","approve_all_new_users","sso_only","auto_quarantine_other_mcp_servers","store_call_data","user_count","pending_user_count"],"title":"DomainSummary","description":"Summary of a managed organisation (one row per email domain today)."},"EditionCapabilitiesResponse":{"properties":{"server_catalog":{"type":"boolean","title":"Server Catalog","description":"Marketplace, add-server, MCP requests, server admin pages.","default":true},"org_admin":{"type":"boolean","title":"Org Admin","description":"Users, roles, access control, policies, guardrails, domains.","default":true},"observability":{"type":"boolean","title":"Observability","description":"Overview, audit logs, log stream, SIEM.","default":true},"tool_permissions":{"type":"boolean","title":"Tool Permissions","description":"Access-control matrix and per-tool ACLs for the caller's own servers.","default":true},"onboarding":{"type":"boolean","title":"Onboarding","description":"In-dashboard connect flow: onboarding tour and Connect Agent.","default":true},"user_invites":{"type":"boolean","title":"User Invites","description":"Inviting other people into the caller's organisation.","default":true},"stdio_tunnel_optional":{"type":"boolean","title":"Stdio Tunnel Optional","description":"Whether the local stdio tunnel is an admin-switchable rollout gate.","default":true}},"type":"object","title":"EditionCapabilitiesResponse","description":"The subset of `src.edition.EditionCapabilities` the dashboard needs.\n\nOnly the flags that gate a visible surface are exposed; mount and wire-level\ncapabilities stay server-side because no client decision depends on them."},"ElementEnablementSchema":{"properties":{"id":{"type":"integer","title":"Id","description":"Enablement ID"},"user_id":{"type":"string","title":"User Id","description":"User/scope identifier"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email","description":"User email address (resolved from user ID)"},"element_id":{"type":"integer","title":"Element Id","description":"MCP server element ID"},"element_name":{"type":"string","title":"Element Name","description":"Element name"},"server_name":{"type":"string","title":"Server Name","description":"Parent server name"},"enabled":{"type":"boolean","title":"Enabled","description":"Whether the element is enabled"},"locked":{"type":"boolean","title":"Locked","description":"Only meaningful on user-scoped disable rows: when true the user cannot re-enable the element and the override is hidden from the user-facing element-metadata (admin-enforced disable).","default":false},"scope":{"type":"string","title":"Scope","description":"Scope: user, role, or global"},"domain":{"type":"string","title":"Domain","description":"Domain scope"}},"type":"object","required":["id","user_id","element_id","element_name","server_name","enabled","scope","domain"],"title":"ElementEnablementSchema"},"ElementMetadataEntry":{"properties":{"name":{"type":"string","title":"Name","description":"Element name"},"compacted_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compacted Name","description":"Client-facing tool name after server-prefixing + length compaction (tools only); matches the alias the AI client actually sees. The raw `name` remains the permission/autoconfig identity. None for resources/prompts and when no server context is available."},"description":{"type":"string","title":"Description","description":"Element description from interface lock","default":""},"input_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Schema","description":"Input JSON schema (tools only)"},"output_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Schema","description":"Output JSON schema (tools only)"},"arguments":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Arguments","description":"Prompt arguments (prompts only)"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime Type","description":"MIME type (resources only)"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri","description":"Resource URI (resources only)"},"enabled":{"type":"boolean","title":"Enabled","description":"Effective enabled state for the caller after resolving the user > role > global hierarchy. Matches what the MCP mount exposes for this user.","default":true},"user_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"User Enabled","description":"User-level enablement override. null=no override (follows admin setting), false=user disabled themselves."}},"type":"object","required":["name"],"title":"ElementMetadataEntry"},"ElementSearchHit":{"properties":{"server":{"type":"string","title":"Server","description":"Server the element belongs to"},"kind":{"type":"string","title":"Kind","description":"tool, resource or prompt"},"name":{"type":"string","title":"Name","description":"Element name, the permission key"},"compacted_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compacted Name","description":"Client-facing name after prefixing and compaction (tools only)"},"description":{"type":"string","title":"Description","description":"Description, clipped to a few hundred characters","default":""},"arguments":{"items":{"type":"string"},"type":"array","title":"Arguments","description":"One line per top-level argument: `name: type (required)`"}},"type":"object","required":["server","kind","name"],"title":"ElementSearchHit","description":"One element matched by GET /servers/elements/search, kept small on purpose.\n\nThe search exists so a caller (the admin chat agent) can find one tool\namong every server's without reading every catalogue; a hit therefore\ncarries a clipped description and an argument summary, and the full\nschema is one more call away (GET /servers/{name}/elements/{element})."},"ElementSearchResponse":{"properties":{"query":{"type":"string","title":"Query","description":"The search as it was run"},"total":{"type":"integer","title":"Total","description":"How many elements matched, before the limit"},"items":{"items":{"$ref":"#/components/schemas/ElementSearchHit"},"type":"array","title":"Items"}},"type":"object","required":["query","total"],"title":"ElementSearchResponse"},"EndSessionRequest":{"properties":{"reason":{"type":"string","title":"Reason","description":"Reason the session ended","default":"unknown"}},"type":"object","title":"EndSessionRequest"},"ErrorResponse":{"properties":{"error":{"type":"string","title":"Error","description":"Human-readable error message"},"code":{"type":"string","title":"Code","description":"Machine-readable error code"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details","description":"Additional error details"}},"type":"object","required":["error","code"],"title":"ErrorResponse"},"EvaluateRuleRequest":{"properties":{"rule":{"additionalProperties":true,"type":"object","title":"Rule","description":"Full rule object to evaluate"},"context":{"additionalProperties":true,"type":"object","title":"Context","description":"Evaluation context with principal, resource, tool, session fields"}},"type":"object","required":["rule","context"],"title":"EvaluateRuleRequest"},"EvaluateRuleResult":{"properties":{"matched_rules":{"items":{"type":"string"},"type":"array","title":"Matched Rules","description":"IDs of matched rules"},"block":{"type":"boolean","title":"Block","description":"Whether the rule blocks the action","default":false},"block_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Block Reason","description":"Reason for blocking"},"require_approval":{"type":"boolean","title":"Require Approval","description":"Whether the rule holds the call for a human decision","default":false},"approval_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approval Reason","description":"Reason shown to the human when approval is required"},"approval_channels":{"items":{"type":"string"},"type":"array","title":"Approval Channels","description":"Channels the approval prompt is pinned to"},"approval_timeout_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Approval Timeout S","description":"Seconds the call is held awaiting a decision"},"approval_on_timeout":{"type":"string","title":"Approval On Timeout","description":"What happens when nobody answers in time; always 'deny' now that fail open is deprecated","default":"deny"},"allow_override":{"type":"boolean","title":"Allow Override","description":"Whether an allow override was applied","default":false},"mark_private":{"type":"boolean","title":"Mark Private","description":"Mark session as private data access","default":false},"mark_untrusted":{"type":"boolean","title":"Mark Untrusted","description":"Mark session as untrusted content","default":false},"mark_write":{"type":"boolean","title":"Mark Write","description":"Mark session as external write","default":false},"set_acl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Set Acl","description":"ACL level to set"},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Session tags to apply"}},"type":"object","title":"EvaluateRuleResult"},"FieldChange":{"properties":{"key":{"type":"string","title":"Key"},"before":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before"},"after":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After"}},"type":"object","required":["key","before","after"],"title":"FieldChange","description":"One top-level field of the record, before and after the write; ``None`` is absent."},"FullConfigResponse":{"properties":{"config":{"additionalProperties":true,"type":"object","title":"Config","description":"Configuration data"}},"type":"object","required":["config"],"title":"FullConfigResponse","description":"Full configuration dump (structure varies by role/scope)."},"GateOut":{"properties":{"action":{"type":"string","title":"Action"},"status":{"type":"string","title":"Status"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["action","status","reason"],"title":"GateOut","description":"One metered action and whether the next call may use it."},"GetSiemConfigResponse":{"properties":{"domain":{"type":"string","title":"Domain","description":"Email domain this config applies to"},"siem":{"$ref":"#/components/schemas/SiemConfigResponse","description":"SIEM configuration"}},"type":"object","required":["domain","siem"],"title":"GetSiemConfigResponse","description":"Response for GET /api/v1/config/siem."},"GrantResponse":{"properties":{"id":{"type":"string","title":"Id"},"client_id":{"type":"string","title":"Client Id"},"client_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Label"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"has_secret_key":{"type":"boolean","title":"Has Secret Key"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"}},"type":"object","required":["id","client_id","scopes","has_secret_key"],"title":"GrantResponse"},"HTTPErrorResponse":{"properties":{"detail":{"$ref":"#/components/schemas/ErrorResponse"}},"type":"object","required":["detail"],"title":"HTTPErrorResponse","description":"Envelope matching FastAPI's actual error body: ``{\"detail\": ErrorResponse}``.\n\nUse this as the ``model`` in route ``responses={}`` so the generated OpenAPI\nschema (and frontend TypeScript types) correctly describe error payloads."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InsightsResponse":{"properties":{"insights":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Insights","description":"List of AI-generated insights"},"generated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generated At","description":"When insights were generated (ISO 8601)"},"next_run_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Run At","description":"Next scheduled generation (ISO 8601)"},"refreshing":{"type":"boolean","title":"Refreshing","description":"Whether a refresh is in progress","default":false},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error","description":"Last error message if any"},"interval_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Interval Seconds","description":"Refresh interval in seconds"}},"type":"object","title":"InsightsResponse","description":"Response for insights endpoints (dynamic structure from InsightService)."},"InterfaceLockingStatusResponse":{"properties":{"server_name":{"type":"string","title":"Server Name","description":"MCP server name"},"interface_locking_enabled":{"type":"boolean","title":"Interface Locking Enabled","description":"Whether interface locking is enabled"}},"type":"object","required":["server_name","interface_locking_enabled"],"title":"InterfaceLockingStatusResponse","description":"Response for GET interface-locking."},"LeaseSummary":{"properties":{"device_ref_id":{"type":"integer","title":"Device Ref Id"},"server_name":{"type":"string","title":"Server Name"},"user_id":{"type":"string","title":"User Id"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"acquired_at":{"type":"string","title":"Acquired At"},"last_call_at":{"type":"string","title":"Last Call At"}},"type":"object","required":["device_ref_id","server_name","user_id","acquired_at","last_call_at"],"title":"LeaseSummary"},"ListDevicesResponse":{"properties":{"devices":{"items":{"$ref":"#/components/schemas/DeviceSummary"},"type":"array","title":"Devices"}},"type":"object","required":["devices"],"title":"ListDevicesResponse"},"ListLeasesResponse":{"properties":{"leases":{"items":{"$ref":"#/components/schemas/LeaseSummary"},"type":"array","title":"Leases"}},"type":"object","required":["leases"],"title":"ListLeasesResponse"},"McpRequestEntry":{"properties":{"id":{"type":"integer","title":"Id","description":"Request ID"},"requester_user_id":{"type":"string","title":"Requester User Id","description":"Requester user UUID"},"name":{"type":"string","title":"Name","description":"Proposed server name"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Human-readable server label"},"command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Command","description":"Command for stdio servers"},"args":{"items":{},"type":"array","title":"Args","description":"Command-line arguments"},"env":{"additionalProperties":{"type":"string"},"type":"object","title":"Env","description":"Environment variables"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"URL for HTTP/SSE servers"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","description":"Custom HTTP headers for HTTP/SSE servers"},"server_type":{"type":"string","title":"Server Type","description":"Server type: stdio, sse, or http","default":"stdio"},"source_app":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source App","description":"App where server was discovered"},"source_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Path","description":"Config file path"},"roots":{"items":{"type":"string"},"type":"array","title":"Roots","description":"Root paths"},"from_marketplace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Marketplace Id","description":"Marketplace ID"},"justification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Justification","description":"User's reason for requesting"},"template_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Template Fields","description":"Template field definitions"},"status":{"type":"string","title":"Status","description":"Request status: pending, approved, rejected","default":"pending"},"quarantined":{"type":"boolean","title":"Quarantined","description":"True if a non-admin raised the request while the org's auto-quarantine flag was on. Requests filed from the dashboard (origin 'dashboard') are never quarantined. Distinguishes the dashboard's quarantine queue from the new-server-requests queue.","default":false},"reviewer_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer User Id","description":"Reviewer user UUID"},"reviewer_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Notes","description":"Reviewer notes"},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon Url","description":"Brand icon URL (e.g. logo.dev) resolved from the server URL at submission time, for rendering in the pending-requests list. Null when no logo could be derived."},"hostname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hostname","description":"Machine the server was discovered on (local/stdio requests)"},"device_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Status","description":"Online status of the host's stdiod device for a stdio request: 'online', 'offline', or 'unknown'. Null for HTTP/SSE requests. The Approve action is only allowed when this is 'online'."},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"Creation timestamp (ISO 8601)"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"Last update timestamp (ISO 8601)"}},"type":"object","required":["id","requester_user_id","name"],"title":"McpRequestEntry"},"McpRequestListResponse":{"properties":{"requests":{"items":{"$ref":"#/components/schemas/McpRequestEntry"},"type":"array","title":"Requests","description":"List of MCP server requests"}},"type":"object","required":["requests"],"title":"McpRequestListResponse"},"McpServerStatusEntry":{"properties":{"name":{"type":"string","title":"Name","description":"Server name"},"enabled":{"type":"boolean","title":"Enabled","description":"Whether the server is enabled"}},"type":"object","required":["name","enabled"],"title":"McpServerStatusEntry"},"McpStatusResponse":{"properties":{"servers":{"items":{"$ref":"#/components/schemas/McpServerStatusEntry"},"type":"array","title":"Servers","description":"List of configured MCP servers"}},"type":"object","required":["servers"],"title":"McpStatusResponse"},"MemberStatusOut":{"properties":{"spent":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Spent"},"cap":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Cap"},"window":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Window"}},"type":"object","required":["spent","cap","window"],"title":"MemberStatusOut","description":"The signed-in member's own position, for the sidebar meter."},"MeterSpend":{"properties":{"meter":{"type":"string","title":"Meter"},"usage_type":{"type":"string","title":"Usage Type"},"unit":{"type":"string","title":"Unit"},"quantity":{"type":"integer","title":"Quantity"},"credits":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Credits"}},"type":"object","required":["meter","usage_type","unit","quantity","credits"],"title":"MeterSpend","description":"One line of this period's usage."},"MigrateDeviceRequest":{"properties":{"target_device_ref_id":{"type":"integer","title":"Target Device Ref Id","description":"Devices.id of the live row that should own the servers."},"force":{"type":"boolean","title":"Force","description":"Proceed even when the two rows look like different machines. The comparison is a guard against mistakes, not proof of identity.","default":false}},"type":"object","required":["target_device_ref_id"],"title":"MigrateDeviceRequest","description":"Move a retired device's stdio servers onto its replacement row."},"MigrateDeviceResponse":{"properties":{"detail":{"type":"string","title":"Detail"},"servers_moved":{"type":"integer","title":"Servers Moved","default":0}},"type":"object","required":["detail"],"title":"MigrateDeviceResponse","description":"Result of moving one device's stdio servers onto another device row."},"MountServerResponse":{"properties":{"mounted":{"type":"boolean","title":"Mounted","description":"Whether the server was mounted successfully"},"server":{"type":"string","title":"Server","description":"Server name"}},"type":"object","required":["mounted","server"],"title":"MountServerResponse"},"MountedServerEntry":{"properties":{"name":{"type":"string","title":"Name","description":"Server name"},"config":{"additionalProperties":true,"type":"object","title":"Config","description":"Server configuration"},"mounted":{"type":"boolean","title":"Mounted","description":"Whether the server is mounted","default":true}},"type":"object","required":["name"],"title":"MountedServerEntry"},"MountedServersResponse":{"properties":{"mounted_servers":{"items":{"$ref":"#/components/schemas/MountedServerEntry"},"type":"array","title":"Mounted Servers","description":"List of currently mounted servers"}},"type":"object","required":["mounted_servers"],"title":"MountedServersResponse"},"MyCeilingOut":{"properties":{"window":{"type":"string","title":"Window"},"spent":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Spent"},"cap":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Cap"},"period_start":{"type":"string","title":"Period Start"},"resets_on":{"type":"string","title":"Resets On"}},"type":"object","required":["window","spent","cap","period_start","resets_on"],"title":"MyCeilingOut","description":"One ceiling a member is subject to, and where they stand in it."},"MyUsageResponse":{"properties":{"spent_this_month":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Spent This Month"},"ceilings":{"items":{"$ref":"#/components/schemas/MyCeilingOut"},"type":"array","title":"Ceilings"}},"type":"object","required":["spent_this_month","ceilings"],"title":"MyUsageResponse","description":"A member's own position. Says nothing about anyone else's.\n\nDeliberately carries no pool balance and no colleague's figures: a member\nneeds to know what will stop their next call, not what the organisation is\nspending."},"NotificationChannelsPrefs":{"properties":{"web":{"$ref":"#/components/schemas/ToggleChannelPref","default":{"enabled":true}},"desktop":{"$ref":"#/components/schemas/ToggleChannelPref","default":{"enabled":true}},"slack":{"$ref":"#/components/schemas/SlackChannelPref","default":{"enabled":false,"channel_id":""}},"telegram":{"$ref":"#/components/schemas/TelegramChannelPref","default":{"enabled":false,"chat_id":""}}},"type":"object","title":"NotificationChannelsPrefs","description":"Full channel-preference document (request and response body)."},"NotificationChannelsStatus":{"properties":{"channels":{"items":{"$ref":"#/components/schemas/ChannelStatusItem"},"type":"array","title":"Channels"},"telegram_bot_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Telegram Bot Username","description":"Bot username for building t.me pairing links, when configured"}},"type":"object","title":"NotificationChannelsStatus","description":"Per-channel readiness plus anything the UI needs to finish setup."},"OAuthEncryptionCounts":{"properties":{"plaintext":{"type":"integer","title":"Plaintext","default":0},"current":{"type":"integer","title":"Current","default":0},"previous":{"type":"integer","title":"Previous","default":0},"unknown":{"type":"integer","title":"Unknown","default":0},"corrupt":{"type":"integer","title":"Corrupt","default":0},"empty":{"type":"integer","title":"Empty","default":0}},"type":"object","title":"OAuthEncryptionCounts"},"OAuthEncryptionMigrationRequest":{"properties":{"mode":{"type":"string","enum":["encrypt_plaintext","rewrap_previous"],"title":"Mode"}},"type":"object","required":["mode"],"title":"OAuthEncryptionMigrationRequest"},"OAuthEncryptionMigrationResponse":{"properties":{"mode":{"type":"string","enum":["encrypt_plaintext","rewrap_previous"],"title":"Mode"},"migrated":{"type":"integer","title":"Migrated"},"already_current":{"type":"integer","title":"Already Current"},"skipped_concurrent":{"type":"integer","title":"Skipped Concurrent"},"locked":{"type":"integer","title":"Locked"},"corrupt":{"type":"integer","title":"Corrupt"},"status":{"$ref":"#/components/schemas/OAuthEncryptionStatusResponse"}},"type":"object","required":["mode","migrated","already_current","skipped_concurrent","locked","corrupt","status"],"title":"OAuthEncryptionMigrationResponse"},"OAuthEncryptionStatusResponse":{"properties":{"status":{"type":"string","enum":["unconfigured","unprotected","migration_required","ready","locked","misconfigured","corrupt"],"title":"Status"},"severity":{"type":"string","enum":["none","warning","error"],"title":"Severity"},"current_key_configured":{"type":"boolean","title":"Current Key Configured"},"current_key_valid":{"type":"boolean","title":"Current Key Valid"},"previous_key_configured":{"type":"boolean","title":"Previous Key Configured"},"previous_key_valid":{"type":"boolean","title":"Previous Key Valid"},"counts":{"$ref":"#/components/schemas/OAuthEncryptionCounts"},"available_actions":{"items":{"type":"string"},"type":"array","title":"Available Actions"},"alert_id":{"type":"string","title":"Alert Id"},"title":{"type":"string","title":"Title"},"message":{"type":"string","title":"Message"},"remediation":{"type":"string","title":"Remediation"},"settings_path":{"type":"string","title":"Settings Path"}},"type":"object","required":["status","severity","current_key_configured","current_key_valid","previous_key_configured","previous_key_valid","counts","alert_id","title","message","remediation","settings_path"],"title":"OAuthEncryptionStatusResponse"},"OAuthFlowResultResponse":{"properties":{"state":{"type":"string","title":"State","description":"OAuth state nonce"},"status":{"type":"string","title":"Status","description":"pending | complete | not_found"},"success":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Success","description":"True/False once status is complete"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message","description":"Error message on failure"},"server_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Server Name","description":"MCP server name"}},"type":"object","required":["state","status"],"title":"OAuthFlowResultResponse","description":"Polled by the dashboard opener while the popup is running.\n\n``postMessage`` from the popup is unreliable under Chrome's COOP\n(e.g. ``sentry.io``), so the opener polls this endpoint for the\nauthoritative server-side outcome."},"OAuthInitiateRequest":{"properties":{"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes","description":"OAuth scopes to request"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name","description":"Client name for OAuth registration"}},"type":"object","title":"OAuthInitiateRequest"},"OAuthInitiateResponse":{"properties":{"authorization_url":{"type":"string","title":"Authorization Url","description":"URL to open in browser for user authorization"},"state":{"type":"string","title":"State","description":"OAuth state nonce (for correlation)"}},"type":"object","required":["authorization_url","state"],"title":"OAuthInitiateResponse"},"OAuthRefreshResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation result","default":"refreshed"},"server_name":{"type":"string","title":"Server Name","description":"MCP server name"},"oauth_status":{"type":"string","title":"Oauth Status","description":"Updated OAuth status"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message","description":"Error message if applicable"},"token_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Expires At","description":"Token expiration (ISO 8601)"},"has_refresh_token":{"type":"boolean","title":"Has Refresh Token","description":"Whether a refresh token is available","default":false},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes","description":"OAuth scopes"}},"type":"object","required":["server_name","oauth_status"],"title":"OAuthRefreshResponse"},"OAuthServerStatusEntry":{"properties":{"server_name":{"type":"string","title":"Server Name","description":"MCP server name"},"status":{"type":"string","title":"Status","description":"OAuth status (unknown, not_required, needs_auth, authenticated, error, expired, credentials_rejected)"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message","description":"Error message if status is error"},"token_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Expires At","description":"Token expiration time (ISO 8601)"},"has_refresh_token":{"type":"boolean","title":"Has Refresh Token","description":"Whether a refresh token is available","default":false},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes","description":"OAuth scopes"}},"type":"object","required":["server_name","status"],"title":"OAuthServerStatusEntry"},"OAuthStatusAllResponse":{"properties":{"oauth_status":{"additionalProperties":{"$ref":"#/components/schemas/OAuthServerStatusEntry"},"type":"object","title":"Oauth Status","description":"OAuth status keyed by server name"}},"type":"object","required":["oauth_status"],"title":"OAuthStatusAllResponse"},"OAuthStatusResponse":{"properties":{"server_name":{"type":"string","title":"Server Name","description":"MCP server name"},"mcp_url":{"type":"string","title":"Mcp Url","description":"MCP server URL"},"status":{"type":"string","title":"Status","description":"OAuth status"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message","description":"Error message if applicable"},"token_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Expires At","description":"Token expiration (ISO 8601)"},"has_refresh_token":{"type":"boolean","title":"Has Refresh Token","description":"Whether a refresh token is available","default":false},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes","description":"OAuth scopes"},"client_name":{"type":"string","title":"Client Name","description":"OAuth client name","default":"SealGate MCP Gateway"}},"type":"object","required":["server_name","mcp_url","status"],"title":"OAuthStatusResponse"},"OAuthTestConnectionRequest":{"properties":{"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes","description":"OAuth scopes to request"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name","description":"Client name for OAuth registration"}},"type":"object","title":"OAuthTestConnectionRequest"},"OAuthTestConnectionResponse":{"properties":{"status":{"type":"string","title":"Status","description":"connection_successful, oauth_required or credentials_rejected"},"message":{"type":"string","title":"Message","description":"Human-readable status message"},"server_name":{"type":"string","title":"Server Name","description":"MCP server name"}},"type":"object","required":["status","message","server_name"],"title":"OAuthTestConnectionResponse"},"OAuthTokenOperationResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation result"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Human-readable message"},"server_name":{"type":"string","title":"Server Name","description":"MCP server name"}},"type":"object","required":["status","server_name"],"title":"OAuthTokenOperationResponse"},"OrgDisplayNameResponse":{"properties":{"email_domain":{"type":"string","title":"Email Domain","description":"The caller's email domain"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Current display name, or null if not set"}},"type":"object","required":["email_domain"],"title":"OrgDisplayNameResponse","description":"Response for GET/PATCH /api/v1/tenant/display-name."},"OrphanedUsersAuditResponse":{"properties":{"orphaned_user_ids":{"items":{"type":"string"},"type":"array","title":"Orphaned User Ids","description":"User IDs with data in SQLite but not in Supabase"},"orphaned_record_estimate":{"type":"integer","title":"Orphaned Record Estimate","description":"Approximate number of records that would be deleted"}},"type":"object","required":["orphaned_user_ids","orphaned_record_estimate"],"title":"OrphanedUsersAuditResponse"},"PaginatedResponse_AgentSummary_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AgentSummary"},"type":"array","title":"Items","description":"Page of results"},"total":{"type":"integer","title":"Total","description":"Total number of items across all pages"},"page":{"type":"integer","title":"Page","description":"Current page number (1-indexed)"},"per_page":{"type":"integer","title":"Per Page","description":"Number of items per page"},"total_pages":{"type":"integer","title":"Total Pages","description":"Total number of pages"}},"type":"object","required":["items","total","page","per_page","total_pages"],"title":"PaginatedResponse[AgentSummary]"},"PaginatedResponse_ApprovalRequest_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ApprovalRequest"},"type":"array","title":"Items","description":"Page of results"},"total":{"type":"integer","title":"Total","description":"Total number of items across all pages"},"page":{"type":"integer","title":"Page","description":"Current page number (1-indexed)"},"per_page":{"type":"integer","title":"Per Page","description":"Number of items per page"},"total_pages":{"type":"integer","title":"Total Pages","description":"Total number of pages"}},"type":"object","required":["items","total","page","per_page","total_pages"],"title":"PaginatedResponse[ApprovalRequest]"},"PaginatedResponse_AuditEntry_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AuditEntry"},"type":"array","title":"Items","description":"Page of results"},"total":{"type":"integer","title":"Total","description":"Total number of items across all pages"},"page":{"type":"integer","title":"Page","description":"Current page number (1-indexed)"},"per_page":{"type":"integer","title":"Per Page","description":"Number of items per page"},"total_pages":{"type":"integer","title":"Total Pages","description":"Total number of pages"}},"type":"object","required":["items","total","page","per_page","total_pages"],"title":"PaginatedResponse[AuditEntry]"},"PaginatedResponse_PolicyRuleSchema_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PolicyRuleSchema"},"type":"array","title":"Items","description":"Page of results"},"total":{"type":"integer","title":"Total","description":"Total number of items across all pages"},"page":{"type":"integer","title":"Page","description":"Current page number (1-indexed)"},"per_page":{"type":"integer","title":"Per Page","description":"Number of items per page"},"total_pages":{"type":"integer","title":"Total Pages","description":"Total number of pages"}},"type":"object","required":["items","total","page","per_page","total_pages"],"title":"PaginatedResponse[PolicyRuleSchema]"},"PaginatedResponse_ServerSummary_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ServerSummary"},"type":"array","title":"Items","description":"Page of results"},"total":{"type":"integer","title":"Total","description":"Total number of items across all pages"},"page":{"type":"integer","title":"Page","description":"Current page number (1-indexed)"},"per_page":{"type":"integer","title":"Per Page","description":"Number of items per page"},"total_pages":{"type":"integer","title":"Total Pages","description":"Total number of pages"}},"type":"object","required":["items","total","page","per_page","total_pages"],"title":"PaginatedResponse[ServerSummary]"},"PaginatedResponse_SessionSummary_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SessionSummary"},"type":"array","title":"Items","description":"Page of results"},"total":{"type":"integer","title":"Total","description":"Total number of items across all pages"},"page":{"type":"integer","title":"Page","description":"Current page number (1-indexed)"},"per_page":{"type":"integer","title":"Per Page","description":"Number of items per page"},"total_pages":{"type":"integer","title":"Total Pages","description":"Total number of pages"}},"type":"object","required":["items","total","page","per_page","total_pages"],"title":"PaginatedResponse[SessionSummary]"},"PaginatedResponse_TrifectaEvent_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TrifectaEvent"},"type":"array","title":"Items","description":"Page of results"},"total":{"type":"integer","title":"Total","description":"Total number of items across all pages"},"page":{"type":"integer","title":"Page","description":"Current page number (1-indexed)"},"per_page":{"type":"integer","title":"Per Page","description":"Number of items per page"},"total_pages":{"type":"integer","title":"Total Pages","description":"Total number of pages"}},"type":"object","required":["items","total","page","per_page","total_pages"],"title":"PaginatedResponse[TrifectaEvent]"},"PaginatedResponse_UserSummary_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UserSummary"},"type":"array","title":"Items","description":"Page of results"},"total":{"type":"integer","title":"Total","description":"Total number of items across all pages"},"page":{"type":"integer","title":"Page","description":"Current page number (1-indexed)"},"per_page":{"type":"integer","title":"Per Page","description":"Number of items per page"},"total_pages":{"type":"integer","title":"Total Pages","description":"Total number of pages"}},"type":"object","required":["items","total","page","per_page","total_pages"],"title":"PaginatedResponse[UserSummary]"},"PaginatedResponse_WebAgentSessionSummary_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WebAgentSessionSummary"},"type":"array","title":"Items","description":"Page of results"},"total":{"type":"integer","title":"Total","description":"Total number of items across all pages"},"page":{"type":"integer","title":"Page","description":"Current page number (1-indexed)"},"per_page":{"type":"integer","title":"Per Page","description":"Number of items per page"},"total_pages":{"type":"integer","title":"Total Pages","description":"Total number of pages"}},"type":"object","required":["items","total","page","per_page","total_pages"],"title":"PaginatedResponse[WebAgentSessionSummary]"},"PendingUserEntry":{"properties":{"user_id":{"type":"string","title":"User Id","description":"User UUID"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"User email address"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain","description":"Email domain"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"API key creation timestamp"}},"type":"object","required":["user_id"],"title":"PendingUserEntry"},"PendingUsersResponse":{"properties":{"pending_users":{"items":{"$ref":"#/components/schemas/PendingUserEntry"},"type":"array","title":"Pending Users","description":"List of pending user entries"}},"type":"object","required":["pending_users"],"title":"PendingUsersResponse"},"PermissionsResponse":{"properties":{"permissions":{"additionalProperties":true,"type":"object","title":"Permissions","description":"Permissions keyed by server_name, then permission_key"}},"type":"object","required":["permissions"],"title":"PermissionsResponse","description":"Response containing permissions data (dynamic nested structure)."},"PolicyActionInput":{"properties":{"action_type":{"type":"string","title":"Action Type","description":"Action type: block, require_approval, allow_override, mark_private, mark_untrusted, mark_write, set_acl, add_tag"},"acl_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acl Level","description":"ACL level for set_acl action"},"tag_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag Key","description":"Tag key for add_tag action"},"tag_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag Value","description":"Tag value for add_tag action"},"block_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Block Reason","description":"Block reason for block action"},"approval_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approval Reason","description":"Plain-language reason shown to the human deciding (require_approval action)"},"approval_channels":{"items":{"type":"string"},"type":"array","title":"Approval Channels","description":"Channels to pin the approval prompt to, drawn from the shared channel vocabulary (APPROVAL_CHANNELS in src/notifications/base.py; the rejection message lists the accepted values); empty uses the requesting user's own notification preferences"},"approval_timeout_s":{"anyOf":[{"type":"number","maximum":3600.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Approval Timeout S","description":"How long to hold the call awaiting a decision; null uses the server default"},"approval_on_timeout":{"anyOf":[{"type":"string","enum":["deny","allow"]},{"type":"null"}],"title":"Approval On Timeout","description":"What happens when nobody answers in time; null means deny (fail closed). 'allow' (fail open) is deprecated: it is rejected on write and reported as 'deny'"}},"type":"object","required":["action_type"],"title":"PolicyActionInput","description":"A policy action as a *write* accepts it: same shape, minus fail-open gates.\n\nReads and writes need different answers for ``approval_on_timeout=\"allow\"``.\nA stored rule must keep rendering, so :class:`PolicyActionSchema` reports it\nas the ``\"deny\"`` it now behaves as; a request *asking* for fail-open is\nasking for behaviour that no longer exists, and accepting it would silently\nstore the opposite of what the admin wrote. Rejecting it in a ``mode=\"before\"``\nfield validator gets in ahead of that normalization, and points the 422 at the\noffending action and field rather than at the whole list."},"PolicyActionSchema":{"properties":{"action_type":{"type":"string","title":"Action Type","description":"Action type: block, require_approval, allow_override, mark_private, mark_untrusted, mark_write, set_acl, add_tag"},"acl_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acl Level","description":"ACL level for set_acl action"},"tag_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag Key","description":"Tag key for add_tag action"},"tag_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag Value","description":"Tag value for add_tag action"},"block_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Block Reason","description":"Block reason for block action"},"approval_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approval Reason","description":"Plain-language reason shown to the human deciding (require_approval action)"},"approval_channels":{"items":{"type":"string"},"type":"array","title":"Approval Channels","description":"Channels to pin the approval prompt to, drawn from the shared channel vocabulary (APPROVAL_CHANNELS in src/notifications/base.py; the rejection message lists the accepted values); empty uses the requesting user's own notification preferences"},"approval_timeout_s":{"anyOf":[{"type":"number","maximum":3600.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Approval Timeout S","description":"How long to hold the call awaiting a decision; null uses the server default"},"approval_on_timeout":{"anyOf":[{"type":"string","enum":["deny","allow"]},{"type":"null"}],"title":"Approval On Timeout","description":"What happens when nobody answers in time; null means deny (fail closed). 'allow' (fail open) is deprecated: it is rejected on write and reported as 'deny'"}},"type":"object","required":["action_type"],"title":"PolicyActionSchema"},"PolicyOverviewStats":{"properties":{"total_rules":{"type":"integer","title":"Total Rules","description":"Total number of policy rules"},"enabled_count":{"type":"integer","title":"Enabled Count","description":"Number of enabled rules","default":0},"disabled_count":{"type":"integer","title":"Disabled Count","description":"Number of disabled rules","default":0},"tentative_count":{"type":"integer","title":"Tentative Count","description":"Number of tentative/draft rules","default":0},"pre_phase_count":{"type":"integer","title":"Pre Phase Count","description":"Number of pre-phase rules","default":0},"post_phase_count":{"type":"integer","title":"Post Phase Count","description":"Number of post-phase rules","default":0},"action_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Action Counts","description":"Count of each action type"}},"type":"object","required":["total_rules"],"title":"PolicyOverviewStats"},"PolicyRuleSchema":{"properties":{"id":{"type":"integer","title":"Id","description":"Database row ID"},"rule_id":{"type":"string","title":"Rule Id","description":"Unique rule identifier"},"name":{"type":"string","title":"Name","description":"Human-readable rule name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Rule description"},"cel_expression":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cel Expression","description":"CEL filter expression"},"phase":{"type":"string","title":"Phase","description":"Evaluation phase: pre or post. A post-phase rule cannot carry a require_approval action - the tool has already run by then","default":"pre"},"status":{"type":"string","title":"Status","description":"Rule status: enabled, disabled, or tentative","default":"enabled"},"priority":{"type":"integer","title":"Priority","description":"Rule priority (higher evaluated first)","default":0},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain","description":"Domain scope (None = global)"},"principal_scope":{"$ref":"#/components/schemas/PrincipalScopeSchema","description":"Who the rule applies to"},"resource_scope":{"$ref":"#/components/schemas/ResourceScopeSchema","description":"What resources the rule targets"},"actions":{"items":{"$ref":"#/components/schemas/PolicyActionSchema"},"type":"array","title":"Actions","description":"Actions to take when rule matches"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Last update timestamp"}},"type":"object","required":["id","rule_id","name","created_at","updated_at"],"title":"PolicyRuleSchema"},"PolicyTestRequest":{"properties":{"sample_data":{"additionalProperties":true,"type":"object","title":"Sample Data","description":"Sample evaluation context data"}},"type":"object","required":["sample_data"],"title":"PolicyTestRequest"},"PolicyTestResult":{"properties":{"matched":{"type":"boolean","title":"Matched","description":"Whether the policy matched the sample data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if evaluation failed"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details","description":"Additional evaluation details"}},"type":"object","required":["matched"],"title":"PolicyTestResult"},"PreviewRequest":{"properties":{"tool":{"type":"string","title":"Tool","description":"Write tool name, e.g. update_role"},"arguments":{"additionalProperties":true,"type":"object","title":"Arguments","description":"The proposed arguments"}},"type":"object","required":["tool"],"title":"PreviewRequest","description":"``POST /admin-chat/preview``: recompute a proposed write's diff right now."},"PreviewResponse":{"properties":{"diff":{"anyOf":[{"$ref":"#/components/schemas/ChangeDiff"},{"type":"null"}],"description":"The diff the card renders; null when there is no snapshot"}},"type":"object","title":"PreviewResponse"},"PrincipalScopeSchema":{"properties":{"is_global":{"type":"boolean","title":"Is Global","description":"Whether the rule applies to all users","default":true},"include_roles":{"items":{"type":"string"},"type":"array","title":"Include Roles","description":"Roles to include"},"include_users":{"items":{"type":"string"},"type":"array","title":"Include Users","description":"Users to include"},"exclude_roles":{"items":{"type":"string"},"type":"array","title":"Exclude Roles","description":"Roles to exclude"},"exclude_users":{"items":{"type":"string"},"type":"array","title":"Exclude Users","description":"Users to exclude"}},"type":"object","title":"PrincipalScopeSchema"},"PurgeStoredCallDataTenantRequest":{"properties":{"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id","description":"Target organisation UUID. Required for OWNER callers and must equal the caller's own org; ignored for ADMIN callers."}},"type":"object","title":"PurgeStoredCallDataTenantRequest","description":"Request body for POST /api/v1/tenant/store-call-data/purge."},"PurgeStoredCallDataTenantResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation status","default":"ok"},"email_domain":{"type":"string","title":"Email Domain","description":"Domain whose stored call data was purged"},"sessions_purged":{"type":"integer","title":"Sessions Purged","description":"Number of session rows that had payloads stripped"},"calls_purged":{"type":"integer","title":"Calls Purged","description":"Number of tool calls whose parameters/results were removed"}},"type":"object","required":["email_domain","sessions_purged","calls_purged"],"title":"PurgeStoredCallDataTenantResponse","description":"Response for POST /api/v1/tenant/store-call-data/purge."},"RateOut":{"properties":{"meter":{"type":"string","title":"Meter"},"usage_type":{"type":"string","title":"Usage Type"},"usage_name":{"type":"string","title":"Usage Name"},"unit":{"type":"string","title":"Unit"},"dims":{"additionalProperties":{"type":"string"},"type":"object","title":"Dims"},"credits":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Credits"},"gated":{"type":"boolean","title":"Gated","default":true}},"type":"object","required":["meter","usage_type","usage_name","unit","dims","credits"],"title":"RateOut","description":"What one unit of one thing costs, and what it is."},"RatesResponse":{"properties":{"rates":{"items":{"$ref":"#/components/schemas/RateOut"},"type":"array","title":"Rates"}},"type":"object","required":["rates"],"title":"RatesResponse","description":"The whole rate card, for a member wondering what a call cost.\n\nIncludes the actions that cost nothing. A card that only listed the priced\nones would leave every other action unexplained, and \"it was not in the\ntable\" is not an answer to \"what did this cost me\"."},"RedeemCodeRequest":{"properties":{"code":{"type":"string","maxLength":64,"minLength":1,"title":"Code","description":"Case and dashes are ignored"}},"type":"object","required":["code"],"title":"RedeemCodeRequest","description":"A code somebody has typed or arrived with."},"RedemptionResponse":{"properties":{"code":{"type":"string","title":"Code"},"credits":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Credits"},"referrer_credits":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Referrer Credits"},"referrer_skipped":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referrer Skipped"}},"type":"object","required":["code","credits","referrer_credits"],"title":"RedemptionResponse","description":"What redeeming actually paid, which is not always what the code advertises."},"ReferralCodeResponse":{"properties":{"code":{"type":"string","title":"Code"},"redeemer_credits":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Redeemer Credits"},"referrer_credits":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Referrer Credits"},"redeemed_count":{"type":"integer","title":"Redeemed Count"},"max_redemptions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Redemptions"}},"type":"object","required":["code","redeemer_credits","referrer_credits","redeemed_count"],"title":"ReferralCodeResponse","description":"The caller's own referral code, and what sharing it is worth."},"RefreshIconResult":{"properties":{"server":{"$ref":"#/components/schemas/ServerDetail","description":"The server after the refresh attempt"},"status":{"type":"string","enum":["updated","token_missing","no_domain","error"],"title":"Status","description":"Outcome of the logo.dev lookup"},"message":{"type":"string","title":"Message","description":"Human-readable outcome, shown verbatim in the dashboard"}},"type":"object","required":["server","status","message"],"title":"RefreshIconResult","description":"Outcome of a logo.dev icon refresh (``POST /servers/{name}/refresh-icon``).\n\nThe old endpoint returned a bare ``ServerDetail`` and silently produced a\n``null`` icon whenever the lookup couldn't resolve (no token, no derivable\ndomain), so the dashboard button looked like it did nothing. This envelope\nlets the dashboard show the admin what happened - in particular that\n``LOGO_DEV_TOKEN`` is not configured - and pick a toast variant."},"RegisterDomainKeyRequest":{"properties":{"domain_key_hash":{"type":"string","maxLength":64,"minLength":64,"title":"Domain Key Hash","description":"SHA-256 hex hash of the domain key"},"email_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Domain","description":"Target domain (owner-only override; admins use their own)"}},"type":"object","required":["domain_key_hash"],"title":"RegisterDomainKeyRequest"},"RegisterDomainKeyResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the registration succeeded"},"email_domain":{"type":"string","title":"Email Domain","description":"Domain the key was registered for"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"When the domain key expires"}},"type":"object","required":["success","email_domain"],"title":"RegisterDomainKeyResponse"},"RegisterSecretKeyRequest":{"properties":{"user_key_hash":{"type":"string","maxLength":64,"minLength":64,"title":"User Key Hash","description":"SHA-256 hex hash of user: part"},"domain_key_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Key Hash","description":"SHA-256 hex hash of admin: part (optional)"}},"type":"object","required":["user_key_hash"],"title":"RegisterSecretKeyRequest"},"RegisterSecretKeyResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether registration succeeded"},"has_secret_key":{"type":"boolean","title":"Has Secret Key","description":"Secret key is now registered"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"When the secret key expires"}},"type":"object","required":["success","has_secret_key"],"title":"RegisterSecretKeyResponse"},"ReinitializeResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation status","default":"ok"},"total_enabled":{"type":"integer","title":"Total Enabled","description":"Number of enabled servers"},"enabled_servers":{"items":{"type":"string"},"type":"array","title":"Enabled Servers","description":"Names of enabled servers"},"total_users":{"type":"integer","title":"Total Users","description":"Number of users reinitialized"},"message":{"type":"string","title":"Message","description":"Status message"},"warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warning","description":"Warning about missing secret key"}},"type":"object","required":["total_enabled","enabled_servers","total_users","message"],"title":"ReinitializeResponse"},"RejectMcpRequestBody":{"properties":{"reviewer_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Notes","description":"Reason for rejection"}},"type":"object","title":"RejectMcpRequestBody"},"RejectMcpRequestResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation result","default":"success"},"message":{"type":"string","title":"Message","description":"Human-readable message","default":"Request rejected successfully"},"request_id":{"type":"integer","title":"Request Id","description":"Rejected request ID"}},"type":"object","required":["request_id"],"title":"RejectMcpRequestResponse"},"ReleaseChannelResponse":{"properties":{"channel":{"type":"string","title":"Channel","description":"Either \"stable\" or \"prerelease\".","examples":["stable"]}},"type":"object","required":["channel"],"title":"ReleaseChannelResponse","description":"The desktop release track this deployment offers."},"ReleaseLeaseRequest":{"properties":{"device_ref_id":{"type":"integer","title":"Device Ref Id"},"server_name":{"type":"string","title":"Server Name"},"force":{"type":"boolean","title":"Force","description":"Release someone else's lease. Requires an admin role.","default":false}},"type":"object","required":["device_ref_id","server_name"],"title":"ReleaseLeaseRequest"},"ReleaseLeaseResponse":{"properties":{"released":{"type":"boolean","title":"Released"},"holder_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Holder User Id"}},"type":"object","required":["released"],"title":"ReleaseLeaseResponse"},"ReorderRolesRequest":{"properties":{"roles":{"items":{"type":"string"},"type":"array","title":"Roles","description":"Role names in desired order (index 0 = highest priority)"}},"type":"object","required":["roles"],"title":"ReorderRolesRequest","description":"Authoritative ordered list of role names for the caller's org.\n\nServer renumbers ``priority`` to match the order of ``roles`` (index 0 →\nhighest priority). The list must contain exactly the set of roles that\ncurrently exist in the org; any mismatch (missing, extra, or unknown\nrole) is rejected with 409 CONFLICT so stale clients can't clobber a\nconcurrent edit."},"ResetDomainKeyRequest":{"properties":{"domain_key_hash":{"type":"string","maxLength":64,"minLength":64,"title":"Domain Key Hash","description":"SHA-256 hex hash of the new domain key"}},"type":"object","required":["domain_key_hash"],"title":"ResetDomainKeyRequest"},"ResetDomainKeyResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the reset succeeded"},"email_domain":{"type":"string","title":"Email Domain","description":"Domain the key was reset for"},"deleted":{"type":"integer","title":"Deleted","description":"Number of encrypted values deleted"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"When the new domain key expires"}},"type":"object","required":["success","email_domain","deleted"],"title":"ResetDomainKeyResponse"},"ResetRequest":{"properties":{"scope":{"type":"string","enum":["global","role","user"],"title":"Scope","description":"Reset scope. 'global' drops every instance in the caller's org. 'role' drops users in the named role (excluding those with a user-level override for server_name). 'user' drops a single user.","default":"global"},"role_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Name","description":"Role name. Required when scope='role'."},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User UUID. Required when scope='user'."},"server_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Server Name","description":"Server name whose enablement triggered the reset. Required when scope='role' so role-mates with a user-level override are skipped."}},"type":"object","title":"ResetRequest","description":"Optional body for POST /mcp/reset.\n\nThe route is the admin escape hatch for the same scoped invalidation\nthat mutation endpoints call automatically. All fields default to a\nwhole-org reset for the caller's domain."},"ResetResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation status","default":"ok"},"message":{"type":"string","title":"Message","description":"Status message"},"instances_dropped":{"type":"integer","title":"Instances Dropped","description":"Number of per-user MCP instances that were torn down.","default":0}},"type":"object","required":["message"],"title":"ResetResponse"},"ResetSecretKeyRequest":{"properties":{"new_key_hash":{"type":"string","maxLength":64,"minLength":64,"title":"New Key Hash","description":"SHA-256 hex hash of new key"},"confirm":{"type":"boolean","title":"Confirm","description":"Must be True to confirm destructive reset"}},"type":"object","required":["new_key_hash","confirm"],"title":"ResetSecretKeyRequest"},"ResetSecretKeyResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether reset succeeded"},"deleted":{"type":"integer","title":"Deleted","description":"Number of encrypted values deleted"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"When the new secret key expires"}},"type":"object","required":["success","deleted"],"title":"ResetSecretKeyResponse"},"ResourceScopeSchema":{"properties":{"element_types":{"items":{"type":"string"},"type":"array","title":"Element Types","description":"Element types: tool, resource, prompt"},"servers":{"items":{"type":"string"},"type":"array","title":"Servers","description":"MCP server names"},"name_patterns":{"items":{"type":"string"},"type":"array","title":"Name Patterns","description":"Regex patterns for element names"}},"type":"object","title":"ResourceScopeSchema"},"RevocationResponse":{"properties":{"status":{"type":"string","const":"revoked","title":"Status","default":"revoked"}},"type":"object","title":"RevocationResponse"},"RiskAnalysisEntry":{"properties":{"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp","description":"When the block fired"},"kind":{"type":"string","title":"Kind","description":"Element kind: tool, resource, or prompt","default":"tool"},"name":{"type":"string","title":"Name","description":"Prefixed name of the blocked element","default":""},"reason":{"type":"string","title":"Reason","description":"Block reason, e.g. trifecta or trifecta_prevent","default":""},"risk":{"$ref":"#/components/schemas/RiskInfo","description":"The plain-language risk explanation"}},"type":"object","required":["risk"],"title":"RiskAnalysisEntry","description":"One trifecta block's analysis, as persisted in the session history."},"RiskInfo":{"properties":{"title":{"type":"string","title":"Title","description":"Short action description, e.g. 'Agent wants to send email'","default":""},"headline":{"type":"string","title":"Headline","description":"One-line risk headline","default":""},"summary":{"type":"string","title":"Summary","description":"Plain-language explanation of why this was risky","default":""},"legs":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Legs","description":"Trifecta legs (private/untrusted/external) with their sources"},"server_name":{"type":"string","title":"Server Name","description":"Server the blocked element belongs to","default":""},"acl_level":{"type":"string","title":"Acl Level","description":"Highest ACL level touched this session","default":""},"risk_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Level","description":"Severity: low, medium, high, or critical"},"policy_rule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Rule","description":"Name of the policy rule that required approval (policy_approval blocks only)"},"source":{"type":"string","title":"Source","description":"How the summary was produced: template or llm","default":"template"}},"type":"object","title":"RiskInfo","description":"Plain-language risk explanation for a blocked action (matches the SSE risk block)."},"RoleAssignmentSchema":{"properties":{"id":{"type":"integer","title":"Id","description":"Assignment ID"},"user_id":{"type":"string","title":"User Id","description":"User ID assigned to the role"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email","description":"User email address (resolved from user ID)"},"role_id":{"type":"integer","title":"Role Id","description":"Role definition ID"},"role_name":{"type":"string","title":"Role Name","description":"Role name"},"domain":{"type":"string","title":"Domain","description":"Domain scope"}},"type":"object","required":["id","user_id","role_id","role_name","domain"],"title":"RoleAssignmentSchema"},"RoleDefinitionSchema":{"properties":{"id":{"type":"integer","title":"Id","description":"Role definition ID"},"role":{"type":"string","title":"Role","description":"Role name"},"domain":{"type":"string","title":"Domain","description":"Domain scope"},"priority":{"type":"integer","title":"Priority","description":"Ordinal rank within the org (0 = highest priority). Priorities form a dense, contiguous sequence 0..N-1 and are mutated only via the reorder endpoint."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Human-readable role description"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp"}},"type":"object","required":["id","role","domain","priority","created_at"],"title":"RoleDefinitionSchema"},"RollDomainKeyRequest":{"properties":{"new_domain_key":{"type":"string","title":"New Domain Key","description":"New domain key (base64)"}},"type":"object","required":["new_domain_key"],"title":"RollDomainKeyRequest"},"RollDomainKeyResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the roll succeeded"},"email_domain":{"type":"string","title":"Email Domain","description":"Domain the key was rolled for"},"re_encrypted":{"type":"integer","title":"Re Encrypted","description":"Number of secrets re-encrypted"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"When the new domain key expires"}},"type":"object","required":["success","email_domain","re_encrypted"],"title":"RollDomainKeyResponse"},"RollSecretKeyRequest":{"properties":{"old_key":{"type":"string","minLength":1,"title":"Old Key","description":"Current full composite key"},"new_user_part":{"type":"string","minLength":1,"title":"New User Part","description":"New user: part (base64)"},"new_user_part_hash":{"type":"string","maxLength":64,"minLength":64,"title":"New User Part Hash","description":"SHA-256 hex hash of new user part"}},"type":"object","required":["old_key","new_user_part","new_user_part_hash"],"title":"RollSecretKeyRequest"},"RollSecretKeyResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether roll succeeded"},"re_encrypted":{"type":"integer","title":"Re Encrypted","description":"Number of values re-encrypted"},"new_composite_key":{"type":"string","title":"New Composite Key","description":"New composite key with domain part preserved"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"When the new secret key expires"}},"type":"object","required":["success","re_encrypted","new_composite_key"],"title":"RollSecretKeyResponse"},"SaveConversationRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Title to set; omit to keep the current one"},"messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Messages","description":"Full UIMessage history; omit to keep the saved one (a rename)"}},"type":"object","title":"SaveConversationRequest"},"ServerDetail":{"properties":{"id":{"type":"integer","title":"Id","description":"Server ID"},"name":{"type":"string","title":"Name","description":"Server MCP prefix name (alphanumeric)"},"display_name":{"type":"string","title":"Display Name","description":"Human-readable display name"},"command":{"type":"string","title":"Command","description":"Server command"},"enabled":{"type":"boolean","title":"Enabled","description":"Whether the server is enabled (admin/global level)"},"tool_count":{"type":"integer","title":"Tool Count","description":"Number of registered tools/elements"},"needs_config":{"type":"boolean","title":"Needs Config","description":"Whether the server has unconfigured required template fields"},"domain":{"type":"string","title":"Domain","description":"Domain this server belongs to"},"is_builtin":{"type":"boolean","title":"Is Builtin","description":"Whether this is the builtin server (auto-provisioned for all domains)","default":false},"user_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"User Enabled","description":"User-level enablement override. null=no override (follows admin setting), false=user disabled"},"parent_enabled":{"type":"boolean","title":"Parent Enabled","description":"Effective enabled state from role/global hierarchy, ignoring any user-level override. When this is false and user_enabled is true, the user override is load-bearing - disabling it cannot be undone by the user."},"user_locked":{"type":"boolean","title":"User Locked","description":"Whether the caller's enablement override is admin-locked. When true the user cannot toggle it themselves (the toggle endpoint returns 403); the dashboard warns before a disable attempt.","default":false},"config_warnings":{"items":{"type":"string"},"type":"array","title":"Config Warnings","description":"Human-readable warnings about missing configuration (e.g. missing credentials)"},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon Url","description":"Remote icon URL (e.g. resolved via logo.dev from the server's MCP URL)"},"runtime_health":{"anyOf":[{"$ref":"#/components/schemas/ServerRuntimeHealth"},{"type":"null"}],"description":"Live mount + ping health, or null when no per-user MCP instance exists for the caller yet. Independent of the config-state fields above."},"authenticated_user_emails":{"items":{"type":"string"},"type":"array","title":"Authenticated User Emails","description":"Email addresses of users who have invoked tools on this server (derived from session data)."},"transport_type":{"type":"string","title":"Transport Type","description":"Transport: 'http' (remote URL) or 'stdio_tunnel' (proxied via daemon).","default":"http"},"device_ref_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Device Ref Id","description":"Surrogate ``Devices.id`` this stdio_tunnel server is bound to. Authoritative for write paths; the string ``device_id`` below is a denormalized display label."},"device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id","description":"Human-readable device label (wire-level ``device_id`` the daemon advertises) for the bound Devices row. Derived from the FK; not unique across users sharing a hostname."},"device_owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Owner Email","description":"Email of the user who owns the device this stdio_tunnel server runs on; null for HTTP servers or when the Devices row is missing. Lets the dashboard distinguish 'Local' (admin's own device) from 'Local - <email>' (another user's device)."},"device_owner_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Owner User Id","description":"user_id of the device owner for this stdio_tunnel server; null for HTTP servers or when the Devices row is missing. The device owner is the only override scope allowed on a local server, so the dashboard uses this to target the enable/disable + lock override from the Servers and Access Control pages."},"elements":{"items":{"$ref":"#/components/schemas/ServerElement"},"type":"array","title":"Elements","description":"Server elements (tools, resources, prompts)"},"template_fields":{"items":{"$ref":"#/components/schemas/TemplateFieldSchema"},"type":"array","title":"Template Fields","description":"Template fields requiring configuration"},"args":{"items":{"type":"string"},"type":"array","title":"Args","description":"Command-line arguments"},"env":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","title":"Env","description":"Environment variables"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"Remote server URL (direct mode)"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","description":"Custom HTTP headers"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version","description":"Server version"},"from_marketplace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Marketplace Id","description":"Marketplace ID this server was installed from"}},"type":"object","required":["id","name","display_name","command","enabled","tool_count","needs_config","domain","parent_enabled"],"title":"ServerDetail"},"ServerElement":{"properties":{"id":{"type":"integer","title":"Id","description":"Element ID"},"name":{"type":"string","title":"Name","description":"Element name (permission_key)"},"compacted_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compacted Name","description":"Client-facing tool name after server-prefixing + length compaction (tools only); matches the alias the AI client actually sees. The raw `name`/`permission_key` remains the identity. None for resources/prompts."},"type":{"type":"string","title":"Type","description":"Element type: tool, resource, or prompt"},"permission_key":{"type":"string","title":"Permission Key","description":"Permission key for this element"},"server_name":{"type":"string","title":"Server Name","description":"Parent server name"}},"type":"object","required":["id","name","type","permission_key","server_name"],"title":"ServerElement"},"ServerElementMetadataResponse":{"properties":{"server_name":{"type":"string","title":"Server Name","description":"Server name"},"tools":{"items":{"$ref":"#/components/schemas/ElementMetadataEntry"},"type":"array","title":"Tools","description":"Tool metadata"},"resources":{"items":{"$ref":"#/components/schemas/ElementMetadataEntry"},"type":"array","title":"Resources","description":"Resource metadata"},"prompts":{"items":{"$ref":"#/components/schemas/ElementMetadataEntry"},"type":"array","title":"Prompts","description":"Prompt metadata"}},"type":"object","required":["server_name"],"title":"ServerElementMetadataResponse"},"ServerEnablementSchema":{"properties":{"id":{"type":"integer","title":"Id","description":"Server enablement ID"},"user_id":{"type":"string","title":"User Id","description":"User/scope identifier"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email","description":"User email address (resolved from user ID)"},"server_name":{"type":"string","title":"Server Name","description":"Server name"},"enabled":{"type":"boolean","title":"Enabled","description":"Whether the server is enabled"},"locked":{"type":"boolean","title":"Locked","description":"Only meaningful on user-scoped disable rows: when true the user cannot re-enable the server and the override is hidden from the user-facing server summary (admin-enforced disable).","default":false},"domain":{"type":"string","title":"Domain","description":"Domain scope"}},"type":"object","required":["id","user_id","server_name","enabled","domain"],"title":"ServerEnablementSchema"},"ServerFingerprint":{"properties":{"name":{"type":"string","title":"Name","description":"Server MCP prefix name"},"fingerprint":{"type":"string","title":"Fingerprint","description":"16-char hex fingerprint"},"status":{"type":"string","title":"Status","description":"Lifecycle status of this server in the caller's org. 'registered' = approved server from TemplateMcpServerDefinitions. 'requested' = pending admin review in mcp_server_requests. Both should be treated as 'known' by the desktop client so re-detection of the same plugin silently re-quarantines instead of prompting the user again."}},"type":"object","required":["name","fingerprint","status"],"title":"ServerFingerprint","description":"Identifier pair returned by GET /servers/fingerprints.\n\nThe fingerprint is a 16-char prefix of sha256(identifier), where identifier\nis `name:command:args` for stdio servers (args joined by single space) or\n`name:url` for HTTP servers - matching the desktop client's\ngetServerFingerprint() in seenServersStore.ts so the two sides can be\ncompared without exposing the underlying configuration."},"ServerFingerprintsResponse":{"properties":{"org_id":{"type":"string","title":"Org Id","description":"UUID of the caller's org (from request.state.domain). Clients MUST verify this matches their own locally-cached org_id before applying the fingerprints - a mismatch indicates the API key has been re-scoped to a different org and the seen-store should not be mutated."},"fingerprints":{"items":{"$ref":"#/components/schemas/ServerFingerprint"},"type":"array","title":"Fingerprints","description":"One entry per org-registered server whose config can be fully resolved"}},"type":"object","required":["org_id"],"title":"ServerFingerprintsResponse","description":"Response shape for GET /servers/fingerprints."},"ServerMetricEntry":{"properties":{"server_name":{"type":"string","title":"Server Name","description":"MCP server name"},"total_sessions":{"type":"integer","title":"Total Sessions","description":"Total sessions in the window"},"total_tool_calls":{"type":"integer","title":"Total Tool Calls","description":"Total tool calls in the window"},"daily":{"items":{"$ref":"#/components/schemas/DayBucket"},"type":"array","title":"Daily","description":"Per-day breakdown"}},"type":"object","required":["server_name","total_sessions","total_tool_calls","daily"],"title":"ServerMetricEntry"},"ServerMetricsResponse":{"properties":{"metrics":{"items":{"$ref":"#/components/schemas/ServerMetricEntry"},"type":"array","title":"Metrics","description":"Per-server usage metrics"},"days":{"type":"integer","title":"Days","description":"Time window in days"}},"type":"object","required":["metrics","days"],"title":"ServerMetricsResponse"},"ServerRuntimeHealth":{"properties":{"state":{"type":"string","enum":["ok","starting","degraded"],"title":"State"},"error_kind":{"anyOf":[{"type":"string","enum":["auth_required","oauth_encryption_error","forbidden","rate_limited","upstream_error","http_error","timeout","unreachable","mount_failed","no_tools","unknown"]},{"type":"null"}],"title":"Error Kind","description":"Discriminating reason for state='degraded'. Always null when state in ('ok','starting')."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Short user-facing label (derived from error_kind)"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail","description":"Longer error message tail"},"last_check_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Check At"},"consecutive_failures":{"type":"integer","title":"Consecutive Failures","default":0},"next_check_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Check At"}},"type":"object","required":["state"],"title":"ServerRuntimeHealth","description":"Live runtime health of a mounted MCP server.\n\nDistinct from configuration state (`enabled`, `needs_config`,\n`config_warnings`) - this only describes the *running* server. None when\nruntime info isn't available (e.g. SingleUserMCP not yet created for the\ncaller).\n\nThe state is intentionally 3-valued. Everything that used to be\n`unreachable` / `mount_failed` / `unknown` is now ``state=\"degraded\"``\nwith a discriminating ``error_kind``; the frontend renders user-facing\nlabels keyed off ``error_kind`` so the wording stays honest (a 401 reads\n\"Needs authorization\" rather than getting promoted to \"Unreachable\" after\nN consecutive failures)."},"ServerSummary":{"properties":{"id":{"type":"integer","title":"Id","description":"Server ID"},"name":{"type":"string","title":"Name","description":"Server MCP prefix name (alphanumeric)"},"display_name":{"type":"string","title":"Display Name","description":"Human-readable display name"},"command":{"type":"string","title":"Command","description":"Server command"},"enabled":{"type":"boolean","title":"Enabled","description":"Whether the server is enabled (admin/global level)"},"tool_count":{"type":"integer","title":"Tool Count","description":"Number of registered tools/elements"},"needs_config":{"type":"boolean","title":"Needs Config","description":"Whether the server has unconfigured required template fields"},"domain":{"type":"string","title":"Domain","description":"Domain this server belongs to"},"is_builtin":{"type":"boolean","title":"Is Builtin","description":"Whether this is the builtin server (auto-provisioned for all domains)","default":false},"user_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"User Enabled","description":"User-level enablement override. null=no override (follows admin setting), false=user disabled"},"parent_enabled":{"type":"boolean","title":"Parent Enabled","description":"Effective enabled state from role/global hierarchy, ignoring any user-level override. When this is false and user_enabled is true, the user override is load-bearing - disabling it cannot be undone by the user."},"user_locked":{"type":"boolean","title":"User Locked","description":"Whether the caller's enablement override is admin-locked. When true the user cannot toggle it themselves (the toggle endpoint returns 403); the dashboard warns before a disable attempt.","default":false},"config_warnings":{"items":{"type":"string"},"type":"array","title":"Config Warnings","description":"Human-readable warnings about missing configuration (e.g. missing credentials)"},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon Url","description":"Remote icon URL (e.g. resolved via logo.dev from the server's MCP URL)"},"runtime_health":{"anyOf":[{"$ref":"#/components/schemas/ServerRuntimeHealth"},{"type":"null"}],"description":"Live mount + ping health, or null when no per-user MCP instance exists for the caller yet. Independent of the config-state fields above."},"authenticated_user_emails":{"items":{"type":"string"},"type":"array","title":"Authenticated User Emails","description":"Email addresses of users who have invoked tools on this server (derived from session data)."},"transport_type":{"type":"string","title":"Transport Type","description":"Transport: 'http' (remote URL) or 'stdio_tunnel' (proxied via daemon).","default":"http"},"device_ref_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Device Ref Id","description":"Surrogate ``Devices.id`` this stdio_tunnel server is bound to. Authoritative for write paths; the string ``device_id`` below is a denormalized display label."},"device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id","description":"Human-readable device label (wire-level ``device_id`` the daemon advertises) for the bound Devices row. Derived from the FK; not unique across users sharing a hostname."},"device_owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Owner Email","description":"Email of the user who owns the device this stdio_tunnel server runs on; null for HTTP servers or when the Devices row is missing. Lets the dashboard distinguish 'Local' (admin's own device) from 'Local - <email>' (another user's device)."},"device_owner_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Owner User Id","description":"user_id of the device owner for this stdio_tunnel server; null for HTTP servers or when the Devices row is missing. The device owner is the only override scope allowed on a local server, so the dashboard uses this to target the enable/disable + lock override from the Servers and Access Control pages."}},"type":"object","required":["id","name","display_name","command","enabled","tool_count","needs_config","domain","parent_enabled"],"title":"ServerSummary"},"SessionDailyStatsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SessionDayStats"},"type":"array","title":"Items","description":"One entry per (day, user) with at least one session in range"}},"type":"object","required":["items"],"title":"SessionDailyStatsResponse"},"SessionDayStats":{"properties":{"date":{"type":"string","format":"date","title":"Date","description":"UTC calendar day the sessions were created"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User the sessions belong to"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email","description":"Email of that user"},"sessions":{"type":"integer","title":"Sessions","description":"Sessions created that day"},"tool_calls":{"type":"integer","title":"Tool Calls","description":"Tool calls across those sessions"},"trifecta_blocks":{"type":"integer","title":"Trifecta Blocks","description":"Lethal-trifecta blocks across those sessions"},"non_builtin_tool_calls":{"type":"integer","title":"Non Builtin Tool Calls","description":"Tool calls to a connector's tool rather than a SealGate builtin"}},"type":"object","required":["date","sessions","tool_calls","trifecta_blocks","non_builtin_tool_calls"],"title":"SessionDayStats"},"SessionDetail":{"properties":{"id":{"type":"string","title":"Id","description":"Session identifier"},"correlation_id":{"type":"string","title":"Correlation Id","description":"Correlation ID linking related events"},"session_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Token","description":"SealGate session token the LLM client holds in context for token-based sessions (from builtin_obtain_session_token); null otherwise"},"user_id":{"type":"string","title":"User Id","description":"Authenticated user ID"},"user_email":{"type":"string","title":"User Email","description":"User email address"},"agent_name":{"type":"string","title":"Agent Name","description":"Name of the AI agent"},"agent_type":{"type":"string","title":"Agent Type","description":"Type/category of the agent"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Session start timestamp"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At","description":"Timestamp of the last tool call activity"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms","description":"Total session duration in milliseconds"},"tool_call_count":{"type":"integer","title":"Tool Call Count","description":"Number of tool calls in this session"},"status":{"type":"string","title":"Status","description":"Session status (active, completed, error)"},"trifecta_flags":{"items":{"type":"string"},"type":"array","title":"Trifecta Flags","description":"Trifecta security flags triggered"},"trifecta_disposition":{"type":"string","title":"Trifecta Disposition","description":"Worst outcome (denied > expired > approved) of any trifecta write gated for approval this session; 'pending' is a transient in-flight state. One of: none, pending, approved, expired, denied","default":"none"},"trifecta_block_count":{"type":"integer","title":"Trifecta Block Count","description":"Number of trifecta writes gated for approval this session","default":0},"block_severity":{"type":"string","title":"Block Severity","description":"Severity of trifecta blocks for dashboard colouring: none, low, medium, high","default":"none"},"acl_level":{"type":"string","title":"Acl Level","description":"Highest ACL level (PUBLIC, PRIVATE, SECRET)","default":"PUBLIC"},"tool_names":{"items":{"type":"string"},"type":"array","title":"Tool Names","description":"Distinct tool names invoked in this session"},"tool_calls":{"items":{"$ref":"#/components/schemas/ToolCallSchema"},"type":"array","title":"Tool Calls","description":"Ordered list of tool calls in this session"},"data_access_summary":{"additionalProperties":true,"type":"object","title":"Data Access Summary","description":"Summary of data access patterns during session"},"risk_analysis":{"items":{"$ref":"#/components/schemas/RiskAnalysisEntry"},"type":"array","title":"Risk Analysis","description":"History of trifecta block analyses (the approval-popup explanations)"}},"type":"object","required":["id","correlation_id","user_id","user_email","agent_name","agent_type","created_at","tool_call_count","status","trifecta_flags","tool_calls","data_access_summary"],"title":"SessionDetail"},"SessionLogRetentionResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation status","default":"ok"},"org_id":{"type":"string","title":"Org Id","description":"Org the setting applies to"},"session_log_retention_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Session Log Retention Days","description":"Low / no-risk retention in days; null means the 120-day default applies."},"session_log_retention_days_medium":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Session Log Retention Days Medium","description":"Medium-risk retention in days; null means the 120-day default applies."},"session_log_retention_days_high":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Session Log Retention Days High","description":"High-risk retention in days; null means the 120-day default applies."}},"type":"object","required":["org_id"],"title":"SessionLogRetentionResponse","description":"Response for the GET/PATCH /api/v1/tenant/session-log-retention endpoints."},"SessionSecurityResponse":{"properties":{"sessions":{"items":{"$ref":"#/components/schemas/SessionSummary"},"type":"array","title":"Sessions"},"window_days":{"type":"integer","title":"Window Days"},"window_start":{"type":"string","title":"Window Start"}},"type":"object","required":["sessions","window_days","window_start"],"title":"SessionSecurityResponse"},"SessionSummary":{"properties":{"id":{"type":"string","title":"Id","description":"Session identifier"},"correlation_id":{"type":"string","title":"Correlation Id","description":"Correlation ID linking related events"},"session_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Token","description":"SealGate session token the LLM client holds in context for token-based sessions (from builtin_obtain_session_token); null otherwise"},"user_id":{"type":"string","title":"User Id","description":"Authenticated user ID"},"user_email":{"type":"string","title":"User Email","description":"User email address"},"agent_name":{"type":"string","title":"Agent Name","description":"Name of the AI agent"},"agent_type":{"type":"string","title":"Agent Type","description":"Type/category of the agent"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Session start timestamp"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At","description":"Timestamp of the last tool call activity"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms","description":"Total session duration in milliseconds"},"tool_call_count":{"type":"integer","title":"Tool Call Count","description":"Number of tool calls in this session"},"status":{"type":"string","title":"Status","description":"Session status (active, completed, error)"},"trifecta_flags":{"items":{"type":"string"},"type":"array","title":"Trifecta Flags","description":"Trifecta security flags triggered"},"trifecta_disposition":{"type":"string","title":"Trifecta Disposition","description":"Worst outcome (denied > expired > approved) of any trifecta write gated for approval this session; 'pending' is a transient in-flight state. One of: none, pending, approved, expired, denied","default":"none"},"trifecta_block_count":{"type":"integer","title":"Trifecta Block Count","description":"Number of trifecta writes gated for approval this session","default":0},"block_severity":{"type":"string","title":"Block Severity","description":"Severity of trifecta blocks for dashboard colouring: none, low, medium, high","default":"none"},"acl_level":{"type":"string","title":"Acl Level","description":"Highest ACL level (PUBLIC, PRIVATE, SECRET)","default":"PUBLIC"},"tool_names":{"items":{"type":"string"},"type":"array","title":"Tool Names","description":"Distinct tool names invoked in this session"}},"type":"object","required":["id","correlation_id","user_id","user_email","agent_name","agent_type","created_at","tool_call_count","status","trifecta_flags"],"title":"SessionSummary"},"SetAdminTemplateConfigRequest":{"properties":{"config":{"additionalProperties":{"type":"string"},"type":"object","title":"Config","description":"Template values for the server"}},"type":"object","required":["config"],"title":"SetAdminTemplateConfigRequest","description":"Request body for setting admin template configuration."},"SetAuditLogRetentionRequest":{"properties":{"audit_log_retention_days":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":1.0},{"type":"null"}],"title":"Audit Log Retention Days","description":"Days to retain audit-log rows for this org (1-365). Null falls back to the 120-day (4-month) default; 365 is the maximum and there is no keep-forever option. Rows older than the window are purged twice daily."},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id","description":"Target org UUID (required for owner; must equal caller's own org_id - owners may only change their own organisation). Ignored for admin."}},"type":"object","title":"SetAuditLogRetentionRequest","description":"Request body for PATCH /api/v1/tenant/audit-log-retention."},"SetAutoQuarantineMcpRequest":{"properties":{"auto_quarantine_other_mcp_servers":{"type":"boolean","title":"Auto Quarantine Other Mcp Servers","description":"Whether to auto-quarantine non-SealGate MCP servers"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id","description":"Target org UUID (required for owner; must equal caller's own org_id - owners may only toggle their own organisation). Ignored for admin."},"email_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Domain","description":"Deprecated: use org_id. Retained for backward compatibility."}},"type":"object","required":["auto_quarantine_other_mcp_servers"],"title":"SetAutoQuarantineMcpRequest","description":"Request body for PATCH /api/v1/tenant/auto-quarantine-mcp."},"SetAutoQuarantineMcpResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation status","default":"ok"},"email_domain":{"type":"string","title":"Email Domain","description":"Domain that was updated"},"auto_quarantine_other_mcp_servers":{"type":"boolean","title":"Auto Quarantine Other Mcp Servers","description":"Updated quarantine flag value"}},"type":"object","required":["email_domain","auto_quarantine_other_mcp_servers"],"title":"SetAutoQuarantineMcpResponse","description":"Response for PATCH /api/v1/tenant/auto-quarantine-mcp."},"SetCapRequest":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"window":{"type":"string","enum":["day","week","month"],"title":"Window","default":"month"},"credits":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Credits"},"unlimited":{"type":"boolean","title":"Unlimited","default":false}},"type":"object","title":"SetCapRequest","description":"Set a spend ceiling in one window.\n\n``user_id`` omitted sets the organisation's default for that window.\n\nOn a member there are three states, and a null ``credits`` is ambiguous\nbetween two of them, so ``unlimited`` disambiguates:\n\n* ``credits`` set - that ceiling\n* ``credits`` null, ``unlimited`` true - no ceiling here, whatever the\n  organisation's default says\n* ``credits`` null, ``unlimited`` false - clear the override and inherit\n\nWindows are independent: setting a daily ceiling leaves the monthly one\nexactly where it was."},"SetDeviceScopeRequest":{"properties":{"scope":{"type":"string","title":"Scope","description":"One of: personal, shared."},"force":{"type":"boolean","title":"Force","description":"Demotion only: confirm deleting the non-owner enablement rows that sharing accumulated. Without it, demoting a device whose servers have role/user/global grants beyond the owner is rejected with 409 so the dashboard can show what would be lost.","default":false}},"type":"object","required":["scope"],"title":"SetDeviceScopeRequest"},"SetDeviceScopeResponse":{"properties":{"id":{"type":"integer","title":"Id"},"scope":{"type":"string","title":"Scope"},"previous_scope":{"type":"string","title":"Previous Scope"},"affected_servers":{"items":{"type":"string"},"type":"array","title":"Affected Servers","description":"Names of this device's stdio_tunnel servers whose enablement rows were rewritten (demotion only; promotion touches none)."}},"type":"object","required":["id","scope","previous_scope"],"title":"SetDeviceScopeResponse"},"SetDomainBackendUrlsRequest":{"properties":{"mcp_base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Base Url","description":"MCP server base URL"},"api_base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Base Url","description":"API server base URL"}},"type":"object","title":"SetDomainBackendUrlsRequest","description":"Request to set backend URLs for a domain."},"SetDomainSsoOnlyRequest":{"properties":{"sso_only":{"type":"boolean","title":"Sso Only","description":"When true, only SAML SSO login is allowed for this domain"}},"type":"object","required":["sso_only"],"title":"SetDomainSsoOnlyRequest","description":"Request to set SSO-only mode for a domain."},"SetDomainStoreCallDataRequest":{"properties":{"store_call_data":{"type":"boolean","title":"Store Call Data","description":"When true, persist full tool call parameters and results"}},"type":"object","required":["store_call_data"],"title":"SetDomainStoreCallDataRequest","description":"Request to toggle call data storage for a domain."},"SetEnablementRequest":{"properties":{"element_id":{"type":"integer","title":"Element Id","description":"MCP server element ID"},"enabled":{"type":"boolean","title":"Enabled","description":"Enable or disable the element"},"user_id":{"type":"string","title":"User Id","description":"Target user/scope ('*' for global, 'role:X' for role)","default":"*"},"scope":{"type":"string","title":"Scope","description":"Scope: user, role, or global","default":"global"},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Locked","description":"Set/clear the admin lock on a user-scoped disable override. Only applied when user_id is a concrete user UUID and enabled=false. None leaves the current value unchanged."}},"type":"object","required":["element_id","enabled"],"title":"SetEnablementRequest"},"SetInterfaceLockingRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Whether interface locking should be enabled"}},"type":"object","required":["enabled"],"title":"SetInterfaceLockingRequest","description":"Request body for setting interface locking status."},"SetInterfaceLockingResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation result","default":"ok"},"server_name":{"type":"string","title":"Server Name","description":"MCP server name"},"interface_locking_enabled":{"type":"boolean","title":"Interface Locking Enabled","description":"Updated interface locking status"}},"type":"object","required":["server_name","interface_locking_enabled"],"title":"SetInterfaceLockingResponse","description":"Response for PUT interface-locking."},"SetLethalTrifectaBlockingTenantRequest":{"properties":{"lethal_trifecta_blocking_enabled":{"type":"boolean","title":"Lethal Trifecta Blocking Enabled","description":"When true, a tool call that would complete the lethal trifecta is blocked (or held for approval) for this org's sessions. When false (the default), the trifecta is still tracked and surfaced in Sessions and SIEM, but the completing write is allowed through."},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id","description":"Target organisation UUID. Required for OWNER callers and must equal the caller's own org; ignored for ADMIN callers."}},"type":"object","required":["lethal_trifecta_blocking_enabled"],"title":"SetLethalTrifectaBlockingTenantRequest","description":"Request body for PATCH /api/v1/tenant/lethal-trifecta-blocking."},"SetLethalTrifectaBlockingTenantResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation status","default":"ok"},"email_domain":{"type":"string","title":"Email Domain","description":"Domain that was updated"},"lethal_trifecta_blocking_enabled":{"type":"boolean","title":"Lethal Trifecta Blocking Enabled","description":"Updated lethal-trifecta blocking flag value"}},"type":"object","required":["email_domain","lethal_trifecta_blocking_enabled"],"title":"SetLethalTrifectaBlockingTenantResponse","description":"Response for PATCH /api/v1/tenant/lethal-trifecta-blocking."},"SetOnboardingTrackRequest":{"properties":{"track":{"type":"string","enum":["agent","ciso","developer"],"title":"Track","description":"Onboarding track"}},"type":"object","required":["track"],"title":"SetOnboardingTrackRequest"},"SetOnboardingTrackResponse":{"properties":{"track":{"type":"string","enum":["agent","ciso","developer"],"title":"Track","description":"The stored onboarding track"}},"type":"object","required":["track"],"title":"SetOnboardingTrackResponse"},"SetOrgDisplayNameRequest":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Display name for the organisation (null to clear)"},"email_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Domain","description":"Target domain (owner only; defaults to caller's domain)"}},"type":"object","title":"SetOrgDisplayNameRequest","description":"Request to set the organisation display name."},"SetOrgTypeRequest":{"properties":{"org_type":{"type":"string","title":"Org Type","description":"Organisation type: 'enterprise' or 'self_serve'"},"org_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Name","description":"Optional display name for the organisation"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain","description":"Email domain to bind when promoting to 'enterprise'. If omitted, defaults to the sole member's email domain. Ignored for self_serve."}},"type":"object","required":["org_type"],"title":"SetOrgTypeRequest","description":"Request to change an organisation's type."},"SetRetentionRequest":{"properties":{"days":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":1.0},{"type":"null"}],"title":"Days"}},"type":"object","title":"SetRetentionRequest","description":"How long to keep per-call usage detail. ``None`` restores the default."},"SetServerEnablementRequest":{"properties":{"server_name":{"type":"string","title":"Server Name","description":"Server name to enable/disable"},"enabled":{"type":"boolean","title":"Enabled","description":"Enable or disable the server"},"user_id":{"type":"string","title":"User Id","description":"Target user/scope ('*' for global)","default":"*"},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Locked","description":"Set/clear the admin lock on a user-scoped disable override. Only applied when user_id is a concrete user UUID and enabled=false. None leaves the current value unchanged."}},"type":"object","required":["server_name","enabled"],"title":"SetServerEnablementRequest"},"SetSessionLogRetentionRequest":{"properties":{"session_log_retention_days":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":1.0},{"type":"null"}],"title":"Session Log Retention Days","description":"Retention days for low / no-risk sessions (1-365). Null = 120-day default."},"session_log_retention_days_medium":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":1.0},{"type":"null"}],"title":"Session Log Retention Days Medium","description":"Retention days for medium-risk sessions (1-365). Null = 120-day default."},"session_log_retention_days_high":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":1.0},{"type":"null"}],"title":"Session Log Retention Days High","description":"Retention days for high-risk sessions (1-365). Null = 120-day default."},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id","description":"Target org UUID (required for owner; must equal caller's own org_id - owners may only change their own organisation). Ignored for admin."}},"type":"object","title":"SetSessionLogRetentionRequest","description":"Request body for PATCH /api/v1/tenant/session-log-retention.\n\nThree independent per-risk-tier retention windows. A session is bucketed by\nits highest risk tier (low/medium/high). Each is measured from session\ncreation (created_at) - a hard GDPR age cap, not idle time. Null falls back\nto the 120-day (4-month) default for that tier; 365 is the maximum and there\nis no keep-forever option. Omitted fields are left unchanged; pass an explicit null to reset a\ntier to the default. Sessions past their tier's window are purged twice daily."},"SetStdioTunnelEnabledRequest":{"properties":{"stdio_tunnel_enabled":{"type":"boolean","title":"Stdio Tunnel Enabled","description":"When true, the org can register stdio_tunnel servers and stdiod daemons can connect for this org's users."}},"type":"object","required":["stdio_tunnel_enabled"],"title":"SetStdioTunnelEnabledRequest","description":"Request to toggle the stdio_tunnel feature for an org."},"SetStdioTunnelEnabledTenantRequest":{"properties":{"stdio_tunnel_enabled":{"type":"boolean","title":"Stdio Tunnel Enabled","description":"When true, the org can register stdio_tunnel servers and stdiod daemons can connect for this org's users."},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id","description":"Target organisation UUID. Required for OWNER callers and must equal the caller's own org; ignored for ADMIN callers."}},"type":"object","required":["stdio_tunnel_enabled"],"title":"SetStdioTunnelEnabledTenantRequest","description":"Request body for PATCH /api/v1/tenant/stdio-tunnel-enabled."},"SetStdioTunnelEnabledTenantResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation status","default":"ok"},"email_domain":{"type":"string","title":"Email Domain","description":"Domain that was updated"},"stdio_tunnel_enabled":{"type":"boolean","title":"Stdio Tunnel Enabled","description":"Updated stdio tunnel flag value"}},"type":"object","required":["email_domain","stdio_tunnel_enabled"],"title":"SetStdioTunnelEnabledTenantResponse","description":"Response for PATCH /api/v1/tenant/stdio-tunnel-enabled."},"SetStoreCallDataTenantRequest":{"properties":{"store_call_data":{"type":"boolean","title":"Store Call Data","description":"When true, full tool-call parameters and results are persisted for this org's sessions. When false (the privacy-first default), only metadata is stored."},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id","description":"Target organisation UUID. Required for OWNER callers and must equal the caller's own org; ignored for ADMIN callers."}},"type":"object","required":["store_call_data"],"title":"SetStoreCallDataTenantRequest","description":"Request body for PATCH /api/v1/tenant/store-call-data."},"SetStoreCallDataTenantResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation status","default":"ok"},"email_domain":{"type":"string","title":"Email Domain","description":"Domain that was updated"},"store_call_data":{"type":"boolean","title":"Store Call Data","description":"Updated store-call-data flag value"}},"type":"object","required":["email_domain","store_call_data"],"title":"SetStoreCallDataTenantResponse","description":"Response for PATCH /api/v1/tenant/store-call-data."},"SetTenantBackendUrlsRequest":{"properties":{"mcp_base_url":{"type":"string","title":"Mcp Base Url","description":"MCP server base URL"},"api_base_url":{"type":"string","title":"Api Base Url","description":"API server base URL"},"email_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Domain","description":"Target domain (required for owner, inferred for admin)"}},"type":"object","required":["mcp_base_url","api_base_url"],"title":"SetTenantBackendUrlsRequest","description":"Request body for PUT /api/v1/tenant/backend-urls."},"SetTenantBackendUrlsResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation status","default":"ok"},"email_domain":{"type":"string","title":"Email Domain","description":"Domain that was updated"},"mcp_base_url":{"type":"string","title":"Mcp Base Url","description":"MCP server base URL that was set"},"api_base_url":{"type":"string","title":"Api Base Url","description":"API server base URL that was set"}},"type":"object","required":["email_domain","mcp_base_url","api_base_url"],"title":"SetTenantBackendUrlsResponse","description":"Response for PUT /api/v1/tenant/backend-urls."},"SetUserTemplateConfigRequest":{"properties":{"config":{"additionalProperties":{"type":"string"},"type":"object","title":"Config","description":"Template values for the server"}},"type":"object","required":["config"],"title":"SetUserTemplateConfigRequest","description":"Request body for setting user template configuration."},"SiemConfigResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Whether SIEM streaming is enabled","default":false},"type":{"type":"string","title":"Type","description":"SIEM type: 'splunk' or 'custom'","default":"splunk"},"stream_mode":{"type":"string","title":"Stream Mode","description":"Stream mode: 'all' or 'security' (security events only)","default":"security"},"splunk":{"$ref":"#/components/schemas/SplunkConfig","description":"Splunk HEC configuration"},"custom":{"$ref":"#/components/schemas/CustomHttpConfig","description":"Custom HTTP endpoint configuration"}},"type":"object","title":"SiemConfigResponse","description":"Full SIEM configuration for a domain."},"SignupTemplateLocalInstallInfo":{"properties":{"installer_command":{"type":"string","title":"Installer Command"},"note":{"type":"string","title":"Note"}},"type":"object","required":["installer_command","note"],"title":"SignupTemplateLocalInstallInfo"},"SignupTemplatePreflightResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"available":{"type":"boolean","title":"Available"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["slug","available","reason"],"title":"SignupTemplatePreflightResponse","description":"Runtime availability of a template's local-install path (US-106).\n\nRendered state must come from THIS check at request time - the stdiod auth\nmechanism is being reworked, so static assumptions about the install path\ngo stale quickly."},"SignupTemplateProvisionResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"provisioned":{"type":"boolean","title":"Provisioned"},"newly_created":{"type":"boolean","title":"Newly Created"},"template":{"$ref":"#/components/schemas/SignupTemplateResponse"}},"type":"object","required":["slug","provisioned","newly_created","template"],"title":"SignupTemplateProvisionResponse"},"SignupTemplateQuotaInfo":{"properties":{"server":{"type":"string","title":"Server"},"free_calls":{"type":"integer","title":"Free Calls"},"byo_template_key":{"type":"string","title":"Byo Template Key"}},"type":"object","required":["server","free_calls","byo_template_key"],"title":"SignupTemplateQuotaInfo"},"SignupTemplateResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"version":{"type":"integer","title":"Version"},"flow":{"type":"string","title":"Flow"},"title":{"type":"string","title":"Title"},"subtitle":{"type":"string","title":"Subtitle"},"tools":{"items":{"$ref":"#/components/schemas/SignupTemplateToolInfo"},"type":"array","title":"Tools"},"rider":{"items":{"$ref":"#/components/schemas/SignupTemplateRiderPoint"},"type":"array","title":"Rider"},"suggested_first_prompt":{"type":"string","title":"Suggested First Prompt"},"quota":{"anyOf":[{"$ref":"#/components/schemas/SignupTemplateQuotaInfo"},{"type":"null"}]},"local_install":{"anyOf":[{"$ref":"#/components/schemas/SignupTemplateLocalInstallInfo"},{"type":"null"}]},"platform_risk_notice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform Risk Notice"}},"type":"object","required":["slug","version","flow","title","subtitle","tools","rider","suggested_first_prompt","quota","local_install","platform_risk_notice"],"title":"SignupTemplateResponse","description":"Display manifest for the template-aware connect flow (US-105)."},"SignupTemplateRiderPoint":{"properties":{"title":{"type":"string","title":"Title"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["title","detail"],"title":"SignupTemplateRiderPoint"},"SignupTemplateStatusResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"provisioned_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provisioned At"},"used_calls":{"type":"integer","title":"Used Calls"},"free_call_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Free Call Limit"},"metered_server":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metered Server"},"byo_template_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Byo Template Key"},"byo_connected":{"type":"boolean","title":"Byo Connected"},"exhausted":{"type":"boolean","title":"Exhausted"},"suggested_first_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested First Prompt"}},"type":"object","required":["slug","provisioned_at","used_calls","free_call_limit","metered_server","byo_template_key","byo_connected","exhausted","suggested_first_prompt"],"title":"SignupTemplateStatusResponse","description":"Per-user provision + quota state for the dashboard (US-104 BYO card)."},"SignupTemplateToolInfo":{"properties":{"server":{"type":"string","title":"Server"},"tool":{"type":"string","title":"Tool"},"description":{"type":"string","title":"Description"},"acl":{"type":"string","title":"Acl"}},"type":"object","required":["server","tool","description","acl"],"title":"SignupTemplateToolInfo"},"SlackChannelPref":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"channel_id":{"type":"string","maxLength":100,"title":"Channel Id","description":"Slack channel or DM ID; empty falls back to SLACK_DEFAULT_CHANNEL","default":""}},"type":"object","title":"SlackChannelPref"},"SlackInviteInfo":{"properties":{"channel_name":{"type":"string","title":"Channel Name"}},"type":"object","required":["channel_name"],"title":"SlackInviteInfo","description":"Shape consumed by the onboarding \"Join Slack\" step."},"SlackInviteRequestResult":{"properties":{"requested":{"type":"boolean","title":"Requested"},"channel_name":{"type":"string","title":"Channel Name"}},"type":"object","required":["requested","channel_name"],"title":"SlackInviteRequestResult","description":"Result of a one-click \"connect me with the team\" request."},"SlackLinkResult":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"Whether a DM channel was resolved and saved"},"detail":{"type":"string","title":"Detail","description":"What happened, in plain language","default":""},"channel_id":{"type":"string","title":"Channel Id","description":"The linked Slack DM channel ID, when successful","default":""}},"type":"object","required":["ok"],"title":"SlackLinkResult","description":"Outcome of linking the caller's own Slack DM as their approval destination."},"SplunkConfig":{"properties":{"hec_token":{"type":"string","title":"Hec Token","description":"Splunk HEC authentication token","default":""},"hec_url":{"type":"string","title":"Hec Url","description":"Splunk HEC endpoint URL","default":""},"index":{"type":"string","title":"Index","description":"Splunk index name","default":"main"},"source":{"type":"string","title":"Source","description":"Splunk source identifier","default":"edison-watch"},"sourcetype":{"type":"string","title":"Sourcetype","description":"Splunk sourcetype","default":"cef"},"channel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id","description":"Splunk channel ID for HEC"},"timeout":{"type":"number","title":"Timeout","description":"Connection timeout in seconds","default":10.0},"verify_ssl":{"type":"boolean","title":"Verify Ssl","description":"Verify SSL certificates","default":true}},"type":"object","title":"SplunkConfig","description":"Splunk HEC settings."},"StaleUsersRequest":{"properties":{"email_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Pattern","description":"Optional email pattern to match data to delete. If omitted, cleans up orphaned data."}},"type":"object","title":"StaleUsersRequest"},"StaleUsersResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation result","default":"success"},"total_deleted":{"type":"integer","title":"Total Deleted","description":"Total records deleted"}},"type":"object","required":["total_deleted"],"title":"StaleUsersResponse"},"StepUpReuseSettingsResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Whether a successful email-OTP verification may be reused","default":true},"timeout_seconds":{"type":"integer","maximum":3600.0,"minimum":300.0,"title":"Timeout Seconds","description":"How long a successful verification remains reusable","default":900}},"type":"object","title":"StepUpReuseSettingsResponse","description":"Current policy for reusing a successful privileged-action verification."},"TelegramChannelPref":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"chat_id":{"type":"string","maxLength":100,"title":"Chat Id","description":"Telegram chat ID","default":""}},"type":"object","title":"TelegramChannelPref"},"TelegramLinkResult":{"properties":{"code":{"type":"string","title":"Code","description":"Pairing code to send to the bot as /start <code>"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"t.me deep link that starts the bot with the code pre-filled"},"expires_in_s":{"type":"integer","title":"Expires In S","description":"Seconds until the code stops working"}},"type":"object","required":["code","expires_in_s"],"title":"TelegramLinkResult","description":"A short-lived Telegram pairing code and the deep link that uses it."},"TemplateFieldInput":{"properties":{"description":{"type":"string","title":"Description","description":"Human-readable description","default":""},"example":{"type":"string","title":"Example","description":"Example value","default":""},"required":{"type":"boolean","title":"Required","description":"Whether this field is required","default":false},"set_by_user":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Set By User","description":"Per-field override: whether the user provides this value"}},"type":"object","title":"TemplateFieldInput","description":"Input schema for a single template field definition."},"TemplateFieldSchema":{"properties":{"id":{"type":"integer","title":"Id","description":"Template field ID"},"field_type":{"type":"string","title":"Field Type","description":"Field type: arg or env"},"template_key":{"type":"string","title":"Template Key","description":"Template variable key"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Human-readable description"},"example":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Example","description":"Example value"},"required":{"type":"boolean","title":"Required","description":"Whether this field is required","default":false},"set_by_user":{"type":"boolean","title":"Set By User","description":"Whether the user provides this value","default":true},"has_admin_value":{"type":"boolean","title":"Has Admin Value","description":"Whether an admin/global value is set","default":false},"has_user_value":{"type":"boolean","title":"Has User Value","description":"Whether a user-scoped value is set","default":false}},"type":"object","required":["id","field_type","template_key"],"title":"TemplateFieldSchema"},"TemplateFieldsInput":{"properties":{"set_by_user":{"type":"boolean","title":"Set By User","description":"Whether users provide values (True) or admin (False)","default":true},"values":{"additionalProperties":{"type":"string"},"type":"object","title":"Values","description":"Pre-set values for template fields"},"args":{"additionalProperties":{"$ref":"#/components/schemas/TemplateFieldInput"},"type":"object","title":"Args","description":"Template fields in arguments"},"env":{"additionalProperties":{"$ref":"#/components/schemas/TemplateFieldInput"},"type":"object","title":"Env","description":"Template fields in environment variables"}},"type":"object","title":"TemplateFieldsInput","description":"Input schema for template_fields when creating a server from marketplace."},"TenantBackendUrlEntry":{"properties":{"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id","description":"Org UUID this entry belongs to. Callers should key off this rather than email_domain, which is a display label and is not unique - several orgs can share one domain. Optional so older clients keep deserialising."},"email_domain":{"type":"string","title":"Email Domain","description":"Email domain"},"mcp_base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Base Url","description":"MCP server base URL"},"api_base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Base Url","description":"API server base URL"},"auto_quarantine_other_mcp_servers":{"type":"boolean","title":"Auto Quarantine Other Mcp Servers","description":"Auto-quarantine non-SealGate MCP servers","default":false},"stdio_tunnel_enabled":{"type":"boolean","title":"Stdio Tunnel Enabled","description":"Whether stdio_tunnel daemons can connect for this org","default":false},"store_call_data":{"type":"boolean","title":"Store Call Data","description":"Whether full tool-call parameters and results are persisted for this org","default":false},"lethal_trifecta_blocking_enabled":{"type":"boolean","title":"Lethal Trifecta Blocking Enabled","description":"Whether lethal-trifecta writes are blocked/held (vs. monitored only) for this org","default":false},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the record was created"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"When the record was last updated"}},"type":"object","required":["email_domain"],"title":"TenantBackendUrlEntry","description":"Backend URL entry for a single domain."},"TenantBackendUrlsAdminResponse":{"properties":{"email_domain":{"type":"string","title":"Email Domain","description":"Email domain"},"mcp_base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Base Url","description":"MCP server base URL"},"api_base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Base Url","description":"API server base URL"},"auto_quarantine_other_mcp_servers":{"type":"boolean","title":"Auto Quarantine Other Mcp Servers","description":"Auto-quarantine non-SealGate MCP servers","default":false},"stdio_tunnel_enabled":{"type":"boolean","title":"Stdio Tunnel Enabled","description":"Whether stdio_tunnel daemons can connect for this org","default":false},"store_call_data":{"type":"boolean","title":"Store Call Data","description":"Whether full tool-call parameters and results are persisted for this org","default":false},"lethal_trifecta_blocking_enabled":{"type":"boolean","title":"Lethal Trifecta Blocking Enabled","description":"Whether lethal-trifecta writes are blocked/held (vs. monitored only) for this org","default":false},"exists":{"type":"boolean","title":"Exists","description":"Whether a backend URL record exists for this domain"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the record was created"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"When the record was last updated"}},"type":"object","required":["email_domain","exists"],"title":"TenantBackendUrlsAdminResponse","description":"Response for GET /api/v1/tenant/backend-urls (admin view - single domain)."},"TenantBackendUrlsOwnerResponse":{"properties":{"all_domains":{"type":"boolean","title":"All Domains","description":"True when returning all domains (owner)","default":true},"domains":{"items":{"$ref":"#/components/schemas/TenantBackendUrlEntry"},"type":"array","title":"Domains","description":"Backend URLs for each domain"}},"type":"object","required":["domains"],"title":"TenantBackendUrlsOwnerResponse","description":"Response for GET /api/v1/tenant/backend-urls (owner view - all domains)."},"TestChannelRequest":{"properties":{"channel":{"type":"string","enum":["web","desktop","slack","telegram"],"title":"Channel","description":"Channel to send a real test notification on"}},"type":"object","required":["channel"],"title":"TestChannelRequest"},"TestChannelResult":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"Whether the test message was accepted by the channel"},"detail":{"type":"string","title":"Detail","description":"What happened, in plain language","default":""}},"type":"object","required":["ok"],"title":"TestChannelResult"},"ToggleChannelPref":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","title":"ToggleChannelPref"},"ToolCallSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Unique tool call identifier"},"tool_name":{"type":"string","title":"Tool Name","description":"Name of the MCP tool invoked"},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters","description":"Parameters passed to the tool"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"When the tool call was made"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms","description":"Execution time in milliseconds"},"status":{"type":"string","title":"Status","description":"Outcome status (e.g. success, blocked, error)"},"result":{"anyOf":[{},{"type":"null"}],"title":"Result","description":"Tool call result payload"},"block_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Block Reason","description":"Which gate refused a blocked call: policy_block, policy_approval, trifecta, trifecta_prevent, acl_downgrade, disabled, approval_egress, lease or quota. Null when not blocked or not recorded."},"read_private_data":{"type":"boolean","title":"Read Private Data","description":"Tool reads private/sensitive data","default":false},"read_untrusted_public_data":{"type":"boolean","title":"Read Untrusted Public Data","description":"Tool reads untrusted external data","default":false},"write_operation":{"type":"boolean","title":"Write Operation","description":"Tool performs external communication/write","default":false},"acl":{"type":"string","title":"Acl","description":"Tool ACL level (PUBLIC, PRIVATE, SECRET)","default":"PUBLIC"}},"type":"object","required":["id","tool_name","parameters","timestamp","status"],"title":"ToolCallSchema"},"ToolConfigurationEntry":{"properties":{"write_operation":{"type":"boolean","title":"Write Operation","description":"Whether the tool performs write operations","default":true},"read_private_data":{"type":"boolean","title":"Read Private Data","description":"Whether the tool reads private data","default":true},"read_untrusted_public_data":{"type":"boolean","title":"Read Untrusted Public Data","description":"Whether the tool reads untrusted public data","default":true},"acl":{"type":"string","title":"Acl","description":"ACL level: SECRET, PRIVATE, or INTERNAL","default":"SECRET"}},"type":"object","title":"ToolConfigurationEntry","description":"Per-tool permission defaults from the marketplace."},"ToolSchemaEntry":{"properties":{"input_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Schema","description":"Input JSON schema"},"output_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Schema","description":"Output JSON schema"},"annotations":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Annotations","description":"MCP tool annotations / hints (readOnlyHint, destructiveHint, idempotentHint, openWorldHint, title). None when the tool sets no hints."}},"type":"object","title":"ToolSchemaEntry"},"ToolSchemasResponse":{"properties":{"tool_schemas":{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/ToolSchemaEntry"},"type":"object"},"type":"object","title":"Tool Schemas","description":"Tool schemas keyed by server name then tool name"}},"type":"object","title":"ToolSchemasResponse"},"TransferOwnershipRequest":{"properties":{"target_user_id":{"type":"string","title":"Target User Id","description":"User ID to grant ownership to"}},"type":"object","required":["target_user_id"],"title":"TransferOwnershipRequest","description":"Request to transfer ownership to another user."},"TransferOwnershipResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Action result status","default":"success"},"new_owner":{"type":"string","title":"New Owner","description":"User ID of the new owner"}},"type":"object","required":["new_owner"],"title":"TransferOwnershipResponse","description":"Response for ownership transfer."},"TrifectaEvent":{"properties":{"id":{"type":"integer","title":"Id","description":"Event ID"},"session_id":{"type":"string","title":"Session Id","description":"Associated session identifier"},"tool_name":{"type":"string","title":"Tool Name","description":"Name of the tool that triggered the event"},"user_id":{"type":"string","title":"User Id","description":"User who initiated the action"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email","description":"Email of the user who initiated the action"},"trifecta_flags":{"items":{"type":"string"},"type":"array","title":"Trifecta Flags","description":"Trifecta policy flags that were triggered"},"status":{"type":"string","title":"Status","description":"Event status: blocked, pending, or approved"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"When the event occurred"}},"type":"object","required":["id","session_id","tool_name","user_id","status","timestamp"],"title":"TrifectaEvent"},"TrifectaSummary":{"properties":{"total_events":{"type":"integer","title":"Total Events","description":"Total number of trifecta events in the time period"},"blocked":{"type":"integer","title":"Blocked","description":"Number of blocked events"},"pending":{"type":"integer","title":"Pending","description":"Number of events pending approval"},"approved":{"type":"integer","title":"Approved","description":"Number of approved events"},"time_period":{"type":"string","title":"Time Period","description":"Time period for the summary (e.g. '24h', '7d', '30d')"}},"type":"object","required":["total_events","blocked","pending","approved","time_period"],"title":"TrifectaSummary"},"UnmountServerResponse":{"properties":{"unmounted":{"type":"boolean","title":"Unmounted","description":"Whether the server was unmounted successfully"},"server":{"type":"string","title":"Server","description":"Server name"}},"type":"object","required":["unmounted","server"],"title":"UnmountServerResponse"},"UpdateAgentRequest":{"properties":{"archived":{"type":"boolean","title":"Archived","description":"True to archive, False to restore"}},"type":"object","required":["archived"],"title":"UpdateAgentRequest"},"UpdateApiKeyRoleRequest":{"properties":{"role":{"type":"string","title":"Role","description":"New role for the API key (admin, user, owner)"}},"type":"object","required":["role"],"title":"UpdateApiKeyRoleRequest"},"UpdateApiKeyRoleResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation result","default":"success"},"api_key":{"type":"string","title":"Api Key","description":"Masked API key"},"role":{"type":"string","title":"Role","description":"New role"}},"type":"object","required":["api_key","role"],"title":"UpdateApiKeyRoleResponse"},"UpdateApiKeyStatusRequest":{"properties":{"is_active":{"type":"boolean","title":"Is Active","description":"New active status for the API key"}},"type":"object","required":["is_active"],"title":"UpdateApiKeyStatusRequest"},"UpdateApiKeyStatusResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation result","default":"success"},"api_key":{"type":"string","title":"Api Key","description":"Masked API key"},"is_active":{"type":"boolean","title":"Is Active","description":"New active status"}},"type":"object","required":["api_key","is_active"],"title":"UpdateApiKeyStatusResponse"},"UpdateAppSettingsRequest":{"properties":{"settings":{"additionalProperties":true,"type":"object","title":"Settings","description":"Settings sections to update (server, logging, autoconfig)"}},"type":"object","required":["settings"],"title":"UpdateAppSettingsRequest","description":"Request body for updating app-level settings."},"UpdateAppSettingsResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation result","default":"ok"},"updated":{"additionalProperties":true,"type":"object","title":"Updated","description":"Updated settings"}},"type":"object","title":"UpdateAppSettingsResponse","description":"Response for PUT /config/settings."},"UpdateFieldRequiredRequest":{"properties":{"required":{"type":"boolean","title":"Required","description":"True = field is required; False = field is optional"}},"type":"object","required":["required"],"title":"UpdateFieldRequiredRequest","description":"Request to toggle whether a template field is required or optional."},"UpdateFieldRequiredResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation result","default":"ok"},"server_name":{"type":"string","title":"Server Name","description":"MCP server name"},"template_key":{"type":"string","title":"Template Key","description":"Template field key"},"required":{"type":"boolean","title":"Required","description":"Updated required flag"}},"type":"object","required":["server_name","template_key","required"],"title":"UpdateFieldRequiredResponse","description":"Response for field required update."},"UpdateFieldSetByUserRequest":{"properties":{"set_by_user":{"type":"boolean","title":"Set By User","description":"True = user provides value; False = admin provides value"}},"type":"object","required":["set_by_user"],"title":"UpdateFieldSetByUserRequest","description":"Request to toggle whether a single template field is set by user or admin."},"UpdateFieldSetByUserResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation result","default":"ok"},"server_name":{"type":"string","title":"Server Name","description":"MCP server name"},"template_key":{"type":"string","title":"Template Key","description":"Template field key"},"set_by_user":{"type":"boolean","title":"Set By User","description":"Updated set_by_user flag"}},"type":"object","required":["server_name","template_key","set_by_user"],"title":"UpdateFieldSetByUserResponse","description":"Response for per-field set-by-user update."},"UpdatePermissionsRequest":{"properties":{"permissions":{"additionalProperties":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},"type":"object","title":"Permissions","description":"Permissions grouped by server_name, then by permission_key"},"user_id":{"type":"string","title":"User Id","description":"User ID to update permissions for (defaults to global)","default":"*"}},"type":"object","required":["permissions"],"title":"UpdatePermissionsRequest","description":"Request body for updating permissions."},"UpdatePermissionsResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation result","default":"ok"},"updated":{"additionalProperties":true,"type":"object","title":"Updated","description":"Updated permission data"}},"type":"object","title":"UpdatePermissionsResponse","description":"Response for permission update operations."},"UpdatePolicyRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"New rule name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"New description"},"cel_expression":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cel Expression","description":"New CEL filter expression"},"phase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phase","description":"New evaluation phase. A post-phase rule cannot carry a require_approval action - the tool has already run by then"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"New status: enabled, disabled, or tentative"},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority","description":"New priority"},"principal_scope":{"anyOf":[{"$ref":"#/components/schemas/PrincipalScopeSchema"},{"type":"null"}],"description":"New principal scope"},"resource_scope":{"anyOf":[{"$ref":"#/components/schemas/ResourceScopeSchema"},{"type":"null"}],"description":"New resource scope"},"actions":{"anyOf":[{"items":{"$ref":"#/components/schemas/PolicyActionInput"},"type":"array"},{"type":"null"}],"title":"Actions","description":"New policy actions"}},"type":"object","title":"UpdatePolicyRequest"},"UpdateRoleRequest":{"properties":{"role":{"type":"string","title":"Role","description":"Role name to update"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"New description"}},"type":"object","required":["role"],"title":"UpdateRoleRequest"},"UpdateServerEnvRequest":{"properties":{"env":{"additionalProperties":{"type":"string"},"type":"object","title":"Env","description":"Env var values to push to the device"}},"type":"object","title":"UpdateServerEnvRequest","description":"Body for ``POST /servers/{name}/env`` (stdio_tunnel only).\n\nCarries env *values* to push to the device. The backend never persists\nthese - it forwards them to the daemon, which stores them on the device\nand (re)starts the server. The response is gated on the spawn succeeding."},"UpdateServerRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"New MCP prefix name (alphanumeric only: a-zA-Z0-9)"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"New human-readable display name"},"command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Command","description":"New server command"},"args":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Args","description":"New command-line arguments"},"env":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Env","description":"New environment variables"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"Remote server URL (direct mode)"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Custom HTTP headers for remote servers"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled","description":"Enable or disable the server"},"template_fields":{"anyOf":[{"$ref":"#/components/schemas/TemplateFieldsInput"},{"type":"null"}],"description":"Template field definitions to create/update"},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon Url","description":"Manual override icon URL"}},"type":"object","title":"UpdateServerRequest"},"UpdateSetByUserRequest":{"properties":{"set_by_user":{"type":"boolean","title":"Set By User","description":"True = users provide values; False = admin provides values"}},"type":"object","required":["set_by_user"],"title":"UpdateSetByUserRequest","description":"Request to toggle whether template fields are set by user or admin."},"UpdateSetByUserResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation result","default":"ok"},"server_name":{"type":"string","title":"Server Name","description":"MCP server name"},"set_by_user":{"type":"boolean","title":"Set By User","description":"Updated set_by_user flag"}},"type":"object","required":["server_name","set_by_user"],"title":"UpdateSetByUserResponse","description":"Response for set-by-user update."},"UpdateSiemConfigRequest":{"properties":{"siem":{"$ref":"#/components/schemas/SiemConfigResponse","description":"SIEM settings to apply"}},"type":"object","required":["siem"],"title":"UpdateSiemConfigRequest","description":"Request body for PUT /api/v1/config/siem."},"UpdateStepUpReuseSettingsRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"timeout_seconds":{"type":"integer","maximum":3600.0,"minimum":300.0,"title":"Timeout Seconds"}},"type":"object","required":["enabled","timeout_seconds"],"title":"UpdateStepUpReuseSettingsRequest","description":"Update the privileged-action verification reuse policy."},"UpdateUserSettingsRequest":{"properties":{"pii_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pii Enabled","description":"Toggle PII obfuscation"},"pii_detectors":{"anyOf":[{"additionalProperties":{"type":"boolean"},"type":"object"},{"type":"null"}],"title":"Pii Detectors","description":"PII detector toggles"},"has_clicked_desktop_download":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Clicked Desktop Download","description":"Track desktop download click"},"has_dismissed_onboarding":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Dismissed Onboarding","description":"Dismiss onboarding flow"},"dismissed_onboarding_steps":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Dismissed Onboarding Steps","description":"List of individually dismissed onboarding step IDs"}},"type":"object","title":"UpdateUserSettingsRequest"},"UserActionResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation result","default":"success"},"user_id":{"type":"string","title":"User Id","description":"Target user ID"}},"type":"object","required":["user_id"],"title":"UserActionResponse"},"UserCap":{"properties":{"user_id":{"type":"string","title":"User Id"},"caps":{"additionalProperties":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},"type":"object","title":"Caps"},"blocked":{"items":{"type":"string"},"type":"array","title":"Blocked","default":[]}},"type":"object","required":["user_id","caps"],"title":"UserCap","description":"One member's ceilings. A window absent from ``caps`` has none."},"UserDetail":{"properties":{"id":{"type":"string","title":"Id","description":"User identifier (UUID)"},"email":{"type":"string","title":"Email","description":"User email address"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles","description":"List of roles assigned to this user"},"status":{"type":"string","title":"Status","description":"Account status: invited, pending, active, or disabled"},"last_active":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Active","description":"Last activity timestamp"},"domain":{"type":"string","title":"Domain","description":"Email domain for this user"},"org_id":{"type":"string","title":"Org Id","description":"Organisation ID for this user","default":""},"session_count":{"type":"integer","title":"Session Count","description":"Total number of sessions for this user"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Account creation timestamp"}},"type":"object","required":["id","email","roles","status","domain","session_count","created_at"],"title":"UserDetail"},"UserDomainConfigResponse":{"properties":{"org_id":{"type":"string","title":"Org Id","description":"Organisation ID (email domain)"},"sso_only":{"type":"boolean","title":"Sso Only","description":"Whether SSO-only login is enforced"},"auto_quarantine_other_mcp_servers":{"type":"boolean","title":"Auto Quarantine Other Mcp Servers","description":"Whether non-approved MCP servers are auto-quarantined"},"store_call_data":{"type":"boolean","title":"Store Call Data","description":"Whether full call data is persisted"},"step_up_required_for_local_servers":{"type":"boolean","title":"Step Up Required For Local Servers","description":"True if the caller must complete an OTP step-up before adding a stdio_tunnel server. Test accounts whose email domain is in the backend's STEP_UP_BYPASS_EMAIL_DOMAINS list see False here so the dashboard skips the modal.","default":true},"step_up_required":{"type":"boolean","title":"Step Up Required","description":"True if the caller must complete an OTP step-up before sensitive admin actions (adding a local server, inviting an admin, escalating a user to admin). Same computation as step_up_required_for_local_servers, which is kept for backwards compatibility.","default":true},"step_up_reuse_enabled":{"type":"boolean","title":"Step Up Reuse Enabled","description":"Whether recent email-OTP verification may be reused","default":true},"step_up_reuse_timeout_seconds":{"type":"integer","title":"Step Up Reuse Timeout Seconds","description":"How long recent email-OTP verification remains reusable","default":900}},"type":"object","required":["org_id","sso_only","auto_quarantine_other_mcp_servers","store_call_data"],"title":"UserDomainConfigResponse"},"UserElementOverrideSchema":{"properties":{"element_id":{"type":"integer","title":"Element Id","description":"Element ID"},"element_name":{"type":"string","title":"Element Name","description":"Element name"},"server_name":{"type":"string","title":"Server Name","description":"Parent server name"},"enabled":{"type":"boolean","title":"Enabled","description":"Whether enabled for this user"}},"type":"object","required":["element_id","element_name","server_name","enabled"],"title":"UserElementOverrideSchema"},"UserElementToggleRequest":{"properties":{"element_id":{"type":"integer","title":"Element Id","description":"MCP server element ID to toggle"},"enabled":{"type":"boolean","title":"Enabled","description":"Enable or disable for yourself"}},"type":"object","required":["element_id","enabled"],"title":"UserElementToggleRequest"},"UserElementToggleResponse":{"properties":{"element_id":{"type":"integer","title":"Element Id","description":"Element ID"},"element_name":{"type":"string","title":"Element Name","description":"Element name"},"server_name":{"type":"string","title":"Server Name","description":"Parent server name"},"user_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"User Enabled","description":"User-level enablement state after toggle. null means the override was removed and the element now follows the admin setting."}},"type":"object","required":["element_id","element_name","server_name","user_enabled"],"title":"UserElementToggleResponse"},"UserMeterSpend":{"properties":{"user_id":{"type":"string","title":"User Id"},"meter":{"type":"string","title":"Meter"},"usage_type":{"type":"string","title":"Usage Type"},"unit":{"type":"string","title":"Unit"},"quantity":{"type":"integer","title":"Quantity"},"credits":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Credits"}},"type":"object","required":["user_id","meter","usage_type","unit","quantity","credits"],"title":"UserMeterSpend","description":"One line of this period's usage, attributed to whoever ran it.\n\nThe same numbers as ``MeterSpend`` with a user against them, so the page\ncan group either way without asking twice."},"UserProfileResponse":{"properties":{"user_id":{"type":"string","title":"User Id","description":"User identifier (UUID)"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"User email address"},"role":{"type":"string","title":"Role","description":"User role: user, admin, or owner"},"domain":{"type":"string","title":"Domain","description":"Email domain extracted from user email"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id","description":"Caller's organisation identifier (UUID in the modern path, email domain for pre-backfill legacy API keys). Sourced from request.state.domain. Clients cache this locally so they can scope offline operations (e.g. seen-store quarantine decisions) without a live backend roundtrip."},"org_type":{"type":"string","title":"Org Type","description":"Organisation type: self_serve or enterprise","default":"self_serve"},"account_status":{"type":"string","title":"Account Status","description":"Account lifecycle state: 'pending' or 'active'. Never 'disabled' - a revoked key is rejected before this endpoint runs (401).","default":"active"},"edition":{"type":"string","title":"Edition","description":"Deployment edition: 'full' or a restricted one such as 'beeper'.","default":"full"},"capabilities":{"$ref":"#/components/schemas/EditionCapabilitiesResponse","description":"What this deployment exposes. The dashboard gates nav and routes on these rather than on the edition name, mirroring the backend rule, so a new edition needs no frontend change. Role is not a substitute: under EDISON_MULTI_ORG every user is an admin of their own org, so the existing admin guards filter nothing."}},"type":"object","required":["user_id","role","domain"],"title":"UserProfileResponse"},"UserServerElementPermission":{"properties":{"element_id":{"type":"integer","title":"Element Id","description":"Element ID"},"element_name":{"type":"string","title":"Element Name","description":"Element permission_key as stored in DB"},"mcp_name":{"type":"string","title":"Mcp Name","description":"MCP-exposed name the tester sees at runtime. For tools/prompts this is '{server}_{permission_key}' (or just the key for builtin / already-prefixed keys); for resources it's the URI. Use this as the lookup key from the MCP client side."},"element_type":{"type":"string","title":"Element Type","description":"Element type: tool, resource, or prompt"},"enabled":{"type":"boolean","title":"Enabled","description":"Effective enablement for the caller"},"write_operation":{"type":"boolean","title":"Write Operation","description":"Resolved write-operation flag","default":false},"read_private_data":{"type":"boolean","title":"Read Private Data","description":"Resolved read-private-data flag","default":false},"read_untrusted_public_data":{"type":"boolean","title":"Read Untrusted Public Data","description":"Resolved read-untrusted-public-data flag","default":false},"acl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acl","description":"Resolved ACL level"}},"type":"object","required":["element_id","element_name","mcp_name","element_type","enabled"],"title":"UserServerElementPermission","description":"Caller's resolved permissions for a single element.\n\nFlags come from the winning scope after user > role > global resolution;\n`enabled` is the effective enablement for the same hierarchy."},"UserServerElementPermissionsResponse":{"properties":{"server_name":{"type":"string","title":"Server Name","description":"Server name"},"permissions":{"items":{"$ref":"#/components/schemas/UserServerElementPermission"},"type":"array","title":"Permissions","description":"Per-element resolved permissions for the caller."}},"type":"object","required":["server_name"],"title":"UserServerElementPermissionsResponse"},"UserServerToggleRequest":{"properties":{"server_name":{"type":"string","title":"Server Name","description":"Server name to toggle"},"enabled":{"type":"boolean","title":"Enabled","description":"Enable or disable for yourself"}},"type":"object","required":["server_name","enabled"],"title":"UserServerToggleRequest"},"UserServerToggleResponse":{"properties":{"server_name":{"type":"string","title":"Server Name","description":"Server name"},"user_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"User Enabled","description":"User-level enablement state after toggle. null means the override was removed and the server now follows the admin setting."}},"type":"object","required":["server_name","user_enabled"],"title":"UserServerToggleResponse"},"UserSessionStats":{"properties":{"user_id":{"type":"string","title":"User Id","description":"User identifier the sessions belong to"},"session_count":{"type":"integer","title":"Session Count","description":"Total sessions recorded for this user"},"tool_calls":{"type":"integer","title":"Tool Calls","description":"Total tool calls across those sessions"},"risk_distribution":{"additionalProperties":{"type":"integer"},"type":"object","title":"Risk Distribution","description":"Session counts keyed by risk level (Low / Medium / High)"},"top_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Top Agent","description":"Agent with the most sessions, if any"},"agent_breakdown":{"items":{"$ref":"#/components/schemas/AgentSessionCount"},"type":"array","title":"Agent Breakdown","description":"Per-agent session counts, most used first"}},"type":"object","required":["user_id","session_count","tool_calls","risk_distribution"],"title":"UserSessionStats","description":"One user's session activity, rolled up in SQL for the Users page."},"UserSessionStatsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UserSessionStats"},"type":"array","title":"Items","description":"One entry per user with at least one session in scope"}},"type":"object","required":["items"],"title":"UserSessionStatsResponse"},"UserSettingsResponse":{"properties":{"pii_enabled":{"type":"boolean","title":"Pii Enabled","description":"Whether PII obfuscation is enabled"},"pii_detectors":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Pii Detectors","description":"PII detector toggles (EMAIL, API_KEYS, etc.)"},"has_clicked_desktop_download":{"type":"boolean","title":"Has Clicked Desktop Download","description":"Whether user has clicked desktop download"},"has_desktop_sessions":{"type":"boolean","title":"Has Desktop Sessions","description":"Whether user has any MCP sessions"},"has_secret_key":{"type":"boolean","title":"Has Secret Key","description":"Whether user has registered an encryption key","default":false},"has_dismissed_onboarding":{"type":"boolean","title":"Has Dismissed Onboarding","description":"Whether user has dismissed the onboarding flow","default":false},"dismissed_onboarding_steps":{"items":{"type":"string"},"type":"array","title":"Dismissed Onboarding Steps","description":"List of individually dismissed onboarding step IDs"}},"type":"object","required":["pii_enabled","pii_detectors","has_clicked_desktop_download","has_desktop_sessions"],"title":"UserSettingsResponse"},"UserSpend":{"properties":{"user_id":{"type":"string","title":"User Id"},"credits":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Credits"}},"type":"object","required":["user_id","credits"],"title":"UserSpend","description":"What one member has drawn from the pool this period."},"UserSummary":{"properties":{"id":{"type":"string","title":"Id","description":"User identifier (UUID)"},"email":{"type":"string","title":"Email","description":"User email address"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles","description":"List of roles assigned to this user"},"status":{"type":"string","title":"Status","description":"Account status: invited, pending, active, or disabled"},"last_active":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Active","description":"Last activity timestamp"},"domain":{"type":"string","title":"Domain","description":"Email domain for this user"},"org_id":{"type":"string","title":"Org Id","description":"Organisation ID for this user","default":""}},"type":"object","required":["id","email","roles","status","domain"],"title":"UserSummary"},"UserTemplateConfigResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation result","default":"ok"},"server_name":{"type":"string","title":"Server Name","description":"MCP server name"},"config":{"additionalProperties":true,"type":"object","title":"Config","description":"Current configuration"}},"type":"object","required":["server_name"],"title":"UserTemplateConfigResponse","description":"Response for user template config operations."},"ValidateMcpRequestResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Validation status: healthy or unhealthy"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if unhealthy"},"tools":{"items":{"type":"string"},"type":"array","title":"Tools","description":"Discovered tool names"},"resources":{"items":{"type":"string"},"type":"array","title":"Resources","description":"Discovered resource names"},"prompts":{"items":{"type":"string"},"type":"array","title":"Prompts","description":"Discovered prompt names"},"suggested_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Url","description":"A sibling URL that responded to an MCP handshake when the requested URL did not (e.g. the origin root when a '/mcp' path 404s). Suggestion only."}},"type":"object","required":["status"],"title":"ValidateMcpRequestResponse"},"ValidateServerRequest":{"properties":{"tools_configurations":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/ToolConfigurationEntry"},"type":"object"},{"type":"null"}],"title":"Tools Configurations","description":"Marketplace-curated per-tool permission defaults"}},"type":"object","title":"ValidateServerRequest","description":"Optional body for the validate endpoint."},"ValidateServerResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Validation status: healthy, unhealthy, or oauth_required"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if unhealthy"},"oauth_server_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oauth Server Name","description":"Server name when status is oauth_required"},"suggested_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Url","description":"A sibling URL that responded to an MCP handshake when the configured URL did not (e.g. the origin root when a '/mcp' path 404s). Surfaced as a suggestion only; SealGate never switches the URL on its own."}},"type":"object","required":["status"],"title":"ValidateServerResponse"},"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"},"VerifyCredentialsRequest":{"properties":{"config":{"additionalProperties":{"type":"string"},"type":"object","title":"Config","description":"Credential key-value pairs to verify"}},"type":"object","required":["config"],"title":"VerifyCredentialsRequest","description":"Request body for saving credentials for verification."},"VerifyCredentialsResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation result","default":"ok"},"server_name":{"type":"string","title":"Server Name","description":"MCP server name"},"config":{"additionalProperties":true,"type":"object","title":"Config","description":"Credential data"}},"type":"object","required":["server_name"],"title":"VerifyCredentialsResponse","description":"Response for credential verification operations."},"VerifyOrgKeyRequest":{"properties":{"org_key":{"type":"string","title":"Org Key","description":"Raw organization key to verify"}},"type":"object","required":["org_key"],"title":"VerifyOrgKeyRequest"},"VerifyOrgKeyResponse":{"properties":{"valid":{"type":"boolean","title":"Valid","description":"Whether the key matches the stored hash"}},"type":"object","required":["valid"],"title":"VerifyOrgKeyResponse"},"VerifySecretKeyRequest":{"properties":{"key":{"type":"string","minLength":1,"title":"Key","description":"Composite secret key to verify"}},"type":"object","required":["key"],"title":"VerifySecretKeyRequest"},"VerifySecretKeyResponse":{"properties":{"valid":{"type":"boolean","title":"Valid","description":"Whether the user part matches"},"domain_valid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Domain Valid","description":"Whether the domain part matches (null if no domain part)"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"When the secret key expires"},"days_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Remaining","description":"Days until key expires (negative if expired)"},"expired":{"type":"boolean","title":"Expired","description":"Whether the secret key has expired","default":false}},"type":"object","required":["valid"],"title":"VerifySecretKeyResponse"},"WebAgentSessionDetail":{"properties":{"id":{"type":"string","title":"Id","description":"Session ID (the OTLP trace ID)"},"user_id":{"type":"string","title":"User Id","description":"User who reported the calls"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email","description":"Email of that user"},"agent":{"type":"string","title":"Agent","description":"Web agent the calls were made in, e.g. chatgpt, claude"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id","description":"The agent's conversation ID"},"conversation_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Url","description":"Link to the conversation on the agent's site, when known"},"first_call_at":{"type":"string","format":"date-time","title":"First Call At","description":"Time of the first call"},"last_call_at":{"type":"string","format":"date-time","title":"Last Call At","description":"Time of the latest call"},"tool_call_count":{"type":"integer","title":"Tool Call Count","description":"Number of calls in the session"},"error_count":{"type":"integer","title":"Error Count","description":"Calls whose span status is error"},"app_names":{"items":{"type":"string"},"type":"array","title":"App Names","description":"Apps used, first use first"},"tool_names":{"items":{"type":"string"},"type":"array","title":"Tool Names","description":"Tools used, first use first"},"tool_calls":{"items":{"$ref":"#/components/schemas/WebAgentToolCallSchema"},"type":"array","title":"Tool Calls","description":"Calls in the order they were made"}},"type":"object","required":["id","user_id","agent","first_call_at","last_call_at","tool_call_count","error_count"],"title":"WebAgentSessionDetail"},"WebAgentSessionSummary":{"properties":{"id":{"type":"string","title":"Id","description":"Session ID (the OTLP trace ID)"},"user_id":{"type":"string","title":"User Id","description":"User who reported the calls"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email","description":"Email of that user"},"agent":{"type":"string","title":"Agent","description":"Web agent the calls were made in, e.g. chatgpt, claude"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id","description":"The agent's conversation ID"},"conversation_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Url","description":"Link to the conversation on the agent's site, when known"},"first_call_at":{"type":"string","format":"date-time","title":"First Call At","description":"Time of the first call"},"last_call_at":{"type":"string","format":"date-time","title":"Last Call At","description":"Time of the latest call"},"tool_call_count":{"type":"integer","title":"Tool Call Count","description":"Number of calls in the session"},"error_count":{"type":"integer","title":"Error Count","description":"Calls whose span status is error"},"app_names":{"items":{"type":"string"},"type":"array","title":"App Names","description":"Apps used, first use first"},"tool_names":{"items":{"type":"string"},"type":"array","title":"Tool Names","description":"Tools used, first use first"}},"type":"object","required":["id","user_id","agent","first_call_at","last_call_at","tool_call_count","error_count"],"title":"WebAgentSessionSummary"},"WebAgentToolCallSchema":{"properties":{"id":{"type":"integer","title":"Id","description":"Row ID"},"span_id":{"type":"string","title":"Span Id","description":"OTLP span ID (hex)"},"tool_name":{"type":"string","title":"Tool Name","description":"Tool that was called"},"app_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Name","description":"App or connector that owns the tool"},"status":{"type":"string","title":"Status","description":"Span status: ok, error or unset"},"started_at":{"type":"string","format":"date-time","title":"Started At","description":"When the call was made"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When the call finished, if reported"},"attributes":{"additionalProperties":{"type":"string"},"type":"object","title":"Attributes","description":"Other span attributes the exporter sent"}},"type":"object","required":["id","span_id","tool_name","status","started_at"],"title":"WebAgentToolCallSchema"},"WithdrawMcpRequestResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation result","default":"success"},"message":{"type":"string","title":"Message","description":"Human-readable message","default":"Request withdrawn successfully"}},"type":"object","title":"WithdrawMcpRequestResponse"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"ClientBearer":{"type":"http","description":"Opaque ewc_ client installation credential","scheme":"bearer"},"MCPGatewayOAuth":{"type":"oauth2","description":"OAuth 2.1 authorization-code flow (PKCE required) against the SealGate MCP gateway's authorization server. Request only the scopes an agent needs; unrequested scopes are not granted.","flows":{"authorizationCode":{"authorizationUrl":"/oauth/authorize","tokenUrl":"/oauth/token","refreshUrl":"/oauth/token","scopes":{"mcp":"Connect to the MCP gateway and call the tools exposed by your enabled servers. Every call is still evaluated by the policy engine.","offline_access":"Issue a refresh token so the client can renew access without a new browser sign-in."}}}}}}}