{"openapi":"3.1.0","info":{"title":"IMAA","version":"0.4.0"},"paths":{"/api/v1/status":{"get":{"tags":["status"],"summary":"Get Status","description":"Public system status \u2014 no authentication required.","operationId":"get_status_api_v1_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}}}}},"/api/v1/auth/signup":{"post":{"tags":["auth"],"summary":"Signup","operationId":"signup_api_v1_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_api_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_api_v1_auth_logout_post","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}},{"name":"admin_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Logout Api V1 Auth Logout Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/me/theme":{"patch":{"tags":["auth"],"summary":"Update Theme","description":"Persist the user's UI theme preference (light / dark / system).","operationId":"update_theme_api_v1_auth_me_theme_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Update Theme Api V1 Auth Me Theme Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/verify-email":{"get":{"tags":["auth"],"summary":"Verify Email","description":"Verify email address from the link in the verification email.","operationId":"verify_email_api_v1_auth_verify_email_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Verify Email Api V1 Auth Verify Email Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/resend-verification":{"post":{"tags":["auth"],"summary":"Resend Verification","description":"Resend the verification email. Per-user rate-limited (3 per hour).","operationId":"resend_verification_api_v1_auth_resend_verification_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Resend Verification Api V1 Auth Resend Verification Post"}}}}}}},"/api/v1/auth/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_api_v1_auth_me_get","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","description":"Issue a password-reset token and email it to the user.\n\nAlways returns {\"ok\": true} \u2014 the caller cannot tell whether the email\naddress is registered (prevents enumeration).","operationId":"forgot_password_api_v1_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Forgot Password Api V1 Auth Forgot Password Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","description":"Consume a reset token and update the user's password.\n\nReturns 400 on invalid/expired token or weak password.\nReturns {\"ok\": true} on success.","operationId":"reset_password_api_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Reset Password Api V1 Auth Reset Password Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/signup-approvals/{token}":{"get":{"tags":["signup-approvals"],"summary":"Preview","description":"Read-only preview for the confirm page. MUST stay side-effect free \u2014\nthis is the URL email scanners prefetch.","operationId":"preview_api_v1_signup_approvals__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupApprovalPreview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/signup-approvals/{token}/approve":{"post":{"tags":["signup-approvals"],"summary":"Approve","description":"Approve via the emailed link. Pending-only \u2014 once processed (approved\nOR rejected) the link is dead (410), which is the single-use guarantee.\nAudit row carries admin_id=None / method=email_link (attributable to the\noperator notify-inbox holder).","operationId":"approve_api_v1_signup_approvals__token__approve_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs":{"get":{"tags":["orgs"],"summary":"List Orgs","description":"Every org the caller belongs to \u2014 used by the org switcher dropdown.","operationId":"list_orgs_api_v1_orgs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrgSummary"},"type":"array","title":"Response List Orgs Api V1 Orgs Get"}}}}}},"post":{"tags":["orgs"],"summary":"Create","description":"Create a new org. The creator becomes admin.","operationId":"create_api_v1_orgs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}":{"get":{"tags":["orgs"],"summary":"Get Org","description":"Full org details including business info. Any member can view.","operationId":"get_org_api_v1_orgs__org_id__get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["orgs"],"summary":"Update","description":"Update org name and/or business details (admin only).","operationId":"update_api_v1_orgs__org_id__patch","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/switch":{"post":{"tags":["orgs"],"summary":"Switch","description":"Switch the caller's active org. Must be a member.","operationId":"switch_api_v1_orgs__org_id__switch_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/members":{"get":{"tags":["orgs"],"summary":"Get Members","description":"List members of the active org. Any role can view.","operationId":"get_members_api_v1_orgs__org_id__members_get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MemberItem"},"title":"Response Get Members Api V1 Orgs  Org Id  Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/members/{user_id}":{"patch":{"tags":["orgs"],"summary":"Update Member Role","description":"Change a member's role (admin only).","operationId":"update_member_role_api_v1_orgs__org_id__members__user_id__patch","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberRoleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["orgs"],"summary":"Delete Member","description":"Remove a member (admin only). Guards against removing the last admin.","operationId":"delete_member_api_v1_orgs__org_id__members__user_id__delete","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/invites":{"post":{"tags":["orgs"],"summary":"Invite Member","description":"Create an invite + send email (admin only, Team tier or above).","operationId":"invite_member_api_v1_orgs__org_id__invites_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["orgs"],"summary":"List Invites","description":"List pending invites (admin only).","operationId":"list_invites_api_v1_orgs__org_id__invites_get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InviteItem"},"title":"Response List Invites Api V1 Orgs  Org Id  Invites Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/invites/{invite_id}":{"delete":{"tags":["orgs"],"summary":"Delete Invite","description":"Revoke a pending invite (admin only).","operationId":"delete_invite_api_v1_orgs__org_id__invites__invite_id__delete","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invite Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/settings":{"get":{"tags":["orgs"],"summary":"Get Org Settings","description":"Get org-level settings (polling interval).","operationId":"get_org_settings_api_v1_orgs__org_id__settings_get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["orgs"],"summary":"Update Org Settings","description":"Update org-level settings. Only org admins can change these.","operationId":"update_org_settings_api_v1_orgs__org_id__settings_patch","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invites/{token}":{"get":{"tags":["invites"],"summary":"Preview Invite","description":"Public preview \u2014 show the invitee what they're about to join.\n\nNo auth required so a logged-out user can read the invite and decide\nwhether to sign up. The actual accept flow requires auth.","operationId":"preview_invite_api_v1_invites__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitePreview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invites/{token}/accept":{"post":{"tags":["invites"],"summary":"Accept","description":"Accept the invite as the current user.","operationId":"accept_api_v1_invites__token__accept_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api-keys":{"get":{"tags":["api-keys"],"summary":"List Keys","operationId":"list_keys_api_v1_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiKeyResponse"},"type":"array","title":"Response List Keys Api V1 Api Keys Get"}}}}}},"post":{"tags":["api-keys"],"summary":"Create","description":"Mint a new API key for the active org. The full secret is shown ONCE.","operationId":"create_api_v1_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api-keys/{key_id}":{"delete":{"tags":["api-keys"],"summary":"Revoke","description":"Soft-delete: flip is_active off and stamp deactivated_at.\n\nRevoked rows stay visible in the list with a \"Revoked\" badge so users\nsee their history; a daily ARQ job hard-deletes rows older than 90 days.\nRevoked keys don't count toward the per-tier active-key limit.","operationId":"revoke_api_v1_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Revoke Api V1 Api Keys  Key Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api-keys/{key_id}/regenerate":{"post":{"tags":["api-keys"],"summary":"Regenerate","description":"Issue a new key with identical settings; revoke the old. Plaintext shown once.","operationId":"regenerate_api_v1_api_keys__key_id__regenerate_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api-keys/usage/summary":{"get":{"tags":["api-keys"],"summary":"Usage Summary","description":"Phase 9.8: Aggregated usage across ALL keys in the org (last 30 days).","operationId":"usage_summary_api_v1_api_keys_usage_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUsageSummary"}}}}}}},"/api/v1/api-keys/{key_id}/usage":{"get":{"tags":["api-keys"],"summary":"Usage","description":"Phase 9.8: Daily request/error counts for the last 30 days + live Redis today.","operationId":"usage_api_v1_api_keys__key_id__usage_get","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyUsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/checkout":{"post":{"tags":["billing"],"summary":"Start Checkout","description":"Start a Stripe Checkout session for the requested tier (admin only).","operationId":"start_checkout_api_v1_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"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/portal":{"post":{"tags":["billing"],"summary":"Open Portal","description":"Open the Stripe Customer Portal (admin only).","operationId":"open_portal_api_v1_billing_portal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalResponse"}}}}}}},"/api/v1/billing/invoices":{"get":{"tags":["billing"],"summary":"Invoices","description":"Recent invoices for the subscription page (any member).","operationId":"invoices_api_v1_billing_invoices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InvoiceItem"},"type":"array","title":"Response Invoices Api V1 Billing Invoices Get"}}}}}}},"/api/v1/billing/subscription":{"get":{"tags":["billing"],"summary":"Subscription","description":"Minimal subscription summary \u2014 current period end for renewal display.","operationId":"subscription_api_v1_billing_subscription_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionSummary"},{"type":"null"}],"title":"Response Subscription Api V1 Billing Subscription Get"}}}}}}},"/api/v1/billing/webhook":{"post":{"tags":["billing"],"summary":"Webhook","description":"Ingest a Stripe webhook event. No auth \u2014 Stripe's signature is the auth.\n\nReturns 200 on success. Signature failures return 400 so Stripe\nstops retrying. Handler errors bubble to 500 so Stripe DOES retry \u2014\nthis is by design for #375 (`UnknownPriceIdError`) and for the\nround-2 #372 N-2 lifecycle (handler failure marks the gate row\n`failed` and re-raises so Stripe's retry can reprocess instead of\nbeing silently short-circuited).\n\nRound-2 N-1: the round-1 ValueError catch was removed.\n`UnknownPriceIdError(ValueError)` was being swallowed as 400,\nbreaking #375's intended retry-until-ops-fix-it loop. Round-2 also\nremoved the stale-event check entirely (N-3), so the only\nValueError path here is signature verification, kept as 400.","operationId":"webhook_api_v1_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Webhook Api V1 Billing Webhook Post"}}}}}}},"/api/v1/webhooks/helius":{"post":{"tags":["webhooks"],"summary":"Helius Webhook","description":"Ingest a Helius enhanced-transaction webhook.\n\nNo cookie auth \u2014 Helius signs the payload with a shared secret that we\nverify against `settings.helius_webhook_secret` (if configured).\n\nReturns 200 on success. Helius retries on non-2xx responses, so we log\nmalformed payloads but try not to 500 on bad data.","operationId":"helius_webhook_api_v1_webhooks_helius_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Helius Webhook Api V1 Webhooks Helius Post"}}}}}}},"/api/v1/webhooks/twilio/opt-out":{"post":{"tags":["webhooks"],"summary":"Twilio Opt Out","description":"Handle Twilio STOP (opt-out) webhooks.\n\nTwilio POSTs a form-encoded body containing From (subscriber number)\nand Body (message content, typically \"STOP\") when a subscriber replies\nto one of our outbound SMS messages.\n\nNo cookie auth -- authenticated solely by Twilio HMAC-SHA1 signature on\nX-Twilio-Signature. Acknowledges with 200 so Twilio does not retry.","operationId":"twilio_opt_out_api_v1_webhooks_twilio_opt_out_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Twilio Opt Out Api V1 Webhooks Twilio Opt Out Post"}}}}}}},"/api/v1/chains":{"get":{"tags":["chains"],"summary":"List Chains","description":"Public list of supported, enabled chains. Used by the contract onboarding flow.","operationId":"list_chains_api_v1_chains_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ChainResponse"},"type":"array","title":"Response List Chains Api V1 Chains Get"}}}}}}},"/api/v1/contracts/inspect":{"post":{"tags":["contracts"],"summary":"Inspect","operationId":"inspect_api_v1_contracts_inspect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InspectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InspectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contracts":{"get":{"tags":["contracts"],"summary":"List All","operationId":"list_all_api_v1_contracts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ContractResponse"},"type":"array","title":"Response List All Api V1 Contracts Get"}}}}}},"post":{"tags":["contracts"],"summary":"Create","operationId":"create_api_v1_contracts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contracts/{contract_id}":{"get":{"tags":["contracts"],"summary":"Get One","operationId":"get_one_api_v1_contracts__contract_id__get","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["contracts"],"summary":"Update","operationId":"update_api_v1_contracts__contract_id__patch","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["contracts"],"summary":"Delete","operationId":"delete_api_v1_contracts__contract_id__delete","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Api V1 Contracts  Contract Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contracts/{contract_id}/live-metrics":{"get":{"tags":["contracts"],"summary":"Live Metrics","description":"Live metric values, threshold proximity, and sparklines for each monitor target.","operationId":"live_metrics_api_v1_contracts__contract_id__live_metrics_get","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contracts/{contract_id}/analysis":{"get":{"tags":["contracts"],"summary":"Analyze","operationId":"analyze_api_v1_contracts__contract_id__analysis_get","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractAnalysis"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contracts/{contract_id}/access":{"get":{"tags":["contracts"],"summary":"List Contract Access","operationId":"list_contract_access_api_v1_contracts__contract_id__access_get","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContractAccessItem"},"title":"Response List Contract Access Api V1 Contracts  Contract Id  Access Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["contracts"],"summary":"Grant Contract Access","operationId":"grant_contract_access_api_v1_contracts__contract_id__access_post","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractAccessGrant"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractAccessItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contracts/{contract_id}/access/{user_id}":{"delete":{"tags":["contracts"],"summary":"Revoke Contract Access","operationId":"revoke_contract_access_api_v1_contracts__contract_id__access__user_id__delete","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Revoke Contract Access Api V1 Contracts  Contract Id  Access  User Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contracts/{contract_id}/bridge-config":{"get":{"tags":["contracts"],"summary":"Get LayerZero DVN bridge configuration and risk assessment","description":"Return DVN config + risk level for every OApp route.\n\nReturns ``routes=[]`` when the contract is not a LZ OApp, or when the\n\"bridge_dvn_detection\" feature flag is off for this org.","operationId":"get_bridge_config_api_v1_contracts__contract_id__bridge_config_get","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BridgeConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contracts/{contract_id}/proxy-state":{"get":{"tags":["contracts"],"summary":"Read EIP-1967 proxy implementation, admin, and beacon addresses","description":"Read the live EIP-1967 storage slots for the contract.\n\nReturns the current implementation, admin, and beacon addresses.\nUser-authenticated \u2014 no admin role required.","operationId":"get_proxy_state_api_v1_contracts__contract_id__proxy_state_get","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contracts/{contract_id}/labels":{"get":{"tags":["contracts"],"summary":"List Labels","operationId":"list_labels_api_v1_contracts__contract_id__labels_get","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContractLabelResponse"},"title":"Response List Labels Api V1 Contracts  Contract Id  Labels Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["contracts"],"summary":"Create Label","operationId":"create_label_api_v1_contracts__contract_id__labels_post","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractLabelCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractLabelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["contracts"],"summary":"Bulk Set Labels","description":"Replace all labels on a contract with the provided list.","operationId":"bulk_set_labels_api_v1_contracts__contract_id__labels_put","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractLabelBulkSet"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContractLabelResponse"},"title":"Response Bulk Set Labels Api V1 Contracts  Contract Id  Labels Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contracts/{contract_id}/labels/{label_id}":{"delete":{"tags":["contracts"],"summary":"Delete Label","operationId":"delete_label_api_v1_contracts__contract_id__labels__label_id__delete","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}},{"name":"label_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Label Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Label Api V1 Contracts  Contract Id  Labels  Label Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contracts/bulk-import":{"post":{"tags":["contracts","contracts"],"summary":"Bulk Import Contracts","description":"Bulk-import contracts from a CSV paste or a JSON array.\n\nPartial imports are allowed: failures and duplicates don't block\nsuccessful rows. The tier contract limit is checked per-item so the\nbatch stops cleanly when the org's quota is exhausted.","operationId":"bulk_import_contracts_api_v1_contracts_bulk_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkImportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkImportResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contracts/import-from-defender":{"post":{"tags":["contracts"],"summary":"Import From Defender","description":"Import contracts from an OpenZeppelin Defender JSON export.\n\nEach sentinel in the export becomes an IMAA Contract + tx_rate\nMonitorTarget + one AlertRule per notification channel.\n\nPass dry_run=true to preview the import without writing to the database.","operationId":"import_from_defender_api_v1_contracts_import_from_defender_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefenderImportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefenderImportResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contracts/{contract_id}/targets":{"get":{"tags":["targets"],"summary":"List Targets","operationId":"list_targets_api_v1_contracts__contract_id__targets_get","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MonitorTargetResponse"},"title":"Response List Targets Api V1 Contracts  Contract Id  Targets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["targets"],"summary":"Create Target","description":"Create a new monitor target on a contract.\n\nAccepts any ``target_type`` string (the model validates at the DB layer).\nThe contract must belong to the caller\u2019s organisation.\nIf the contract is still in PENDING status it will be transitioned to\nMONITORING now that it has at least one target.\n\n#218 round-1: singleton target types are routed through the shared\n``find_or_create_target`` helper so a duplicate POST is idempotent\n(returns the existing row with ``is_enabled=True``) instead of crashing\nwith an IntegrityError \u2192 HTTP 500 against the new partial unique index.\nMulti-instance types (``event_frequency`` per ABI event, Solana IX/event,\n``anomaly_detection``) keep the direct-insert path \u2014 they're legitimately\nmulti-row per contract and the partial index does not constrain them.","operationId":"create_target_api_v1_contracts__contract_id__targets_post","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorTargetCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorTargetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/targets/{target_id}":{"patch":{"tags":["targets"],"summary":"Update Target","operationId":"update_target_api_v1_targets__target_id__patch","parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorTargetUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorTargetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contracts/{contract_id}/alert-templates":{"get":{"tags":["alert-templates","alert-templates"],"summary":"List Alert Templates","description":"Preview the alert rule templates for a contract category.\n\nNo DB writes \u2014 purely returns the pre-built configs so the frontend\ncan show users what will be created before they confirm.","operationId":"list_alert_templates_api_v1_contracts__contract_id__alert_templates_get","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}},{"name":"category","in":"query","required":true,"schema":{"enum":["lending","dex","bridge","oracle","governance"],"type":"string","title":"Category"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertTemplateItem"},"title":"Response List Alert Templates Api V1 Contracts  Contract Id  Alert Templates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contracts/{contract_id}/alert-templates/apply":{"post":{"tags":["alert-templates","alert-templates"],"summary":"Apply Alert Templates","description":"Apply all template alert rules for a category to a contract.\n\nFor each template:\n1. Find or create the matching MonitorTarget (by target_type).\n2. Create a new AlertRule linked to that target and the supplied channel.\n\nReturns the list of created AlertRule IDs.","operationId":"apply_alert_templates_api_v1_contracts__contract_id__alert_templates_apply_post","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyTemplatesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyTemplatesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/channels":{"get":{"tags":["channels"],"summary":"List All","operationId":"list_all_api_v1_channels_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ChannelResponseSafe"},"type":"array","title":"Response List All Api V1 Channels Get"}}}}}},"post":{"tags":["channels"],"summary":"Create","operationId":"create_api_v1_channels_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelResponseSafe"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/channels/{channel_id}":{"patch":{"tags":["channels"],"summary":"Update","operationId":"update_api_v1_channels__channel_id__patch","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Channel Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelResponseSafe"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["channels"],"summary":"Delete","operationId":"delete_api_v1_channels__channel_id__delete","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Api V1 Channels  Channel Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/channels/{channel_id}/test":{"post":{"tags":["channels"],"summary":"Test Channel","description":"Send a synthetic test notification through the channel.\n\nUseful for verifying connectivity after creating or editing a channel.\nReturns 200 with ``{\"sent\": true}`` on success, 400 with an error detail\nif the dispatch fails (bad URL, auth error, etc.).","operationId":"test_channel_api_v1_channels__channel_id__test_post","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Test Channel Api V1 Channels  Channel Id  Test Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/alerts":{"post":{"tags":["alerts"],"summary":"Create","operationId":"create_api_v1_alerts_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["alerts"],"summary":"List All","operationId":"list_all_api_v1_alerts_get","parameters":[{"name":"contract_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contract Id"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertRuleResponse"},"title":"Response List All Api V1 Alerts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/alerts/history":{"get":{"tags":["alerts"],"summary":"All History","operationId":"all_history_api_v1_alerts_history_get","parameters":[{"name":"contract_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contract Id"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"}},{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":200,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertEventResponse"},"title":"Response All History Api V1 Alerts History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/alerts/events/{event_id}":{"get":{"tags":["alerts"],"summary":"Get Event","operationId":"get_event_api_v1_alerts_events__event_id__get","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertEventResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/alerts/{rule_id}":{"get":{"tags":["alerts"],"summary":"Get","operationId":"get_api_v1_alerts__rule_id__get","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["alerts"],"summary":"Update","operationId":"update_api_v1_alerts__rule_id__patch","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["alerts"],"summary":"Delete","operationId":"delete_api_v1_alerts__rule_id__delete","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Api V1 Alerts  Rule Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/alerts/{rule_id}/history":{"get":{"tags":["alerts"],"summary":"History","operationId":"history_api_v1_alerts__rule_id__history_get","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}},{"name":"contract_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contract Id"}},{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":200,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertEventResponse"},"title":"Response History Api V1 Alerts  Rule Id  History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard/stats":{"get":{"tags":["dashboard"],"summary":"Stats","operationId":"stats_api_v1_dashboard_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardResponse"}}}}}}},"/api/v1/dashboard/stream":{"get":{"tags":["dashboard"],"summary":"Stream","description":"SSE endpoint for real-time dashboard updates with periodic heartbeat.\n\nStreams are org-scoped \u2014 all members of the active org see the same\nevents (shared-dashboard semantic).","operationId":"stream_api_v1_dashboard_stream_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/analytics/activity":{"get":{"tags":["analytics"],"summary":"Activity","description":"Contract activity timeline \u2014 event history across contracts.","operationId":"activity_api_v1_analytics_activity_get","parameters":[{"name":"contract_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contract Id"}},{"name":"chain_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chain Id"}},{"name":"target_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Type"}},{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"}},{"name":"bucket","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bucket"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/analytics/oracle-feeds":{"get":{"tags":["analytics"],"summary":"Oracle Feeds","description":"List all monitored oracle feeds for the active org.","operationId":"oracle_feeds_api_v1_analytics_oracle_feeds_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OracleFeedItem"},"type":"array","title":"Response Oracle Feeds Api V1 Analytics Oracle Feeds Get"}}}}}}},"/api/v1/analytics/oracle-feeds/{contract_id}/prices":{"get":{"tags":["analytics"],"summary":"Oracle Prices","description":"Price history + anomaly markers + stats for a specific oracle feed.","operationId":"oracle_prices_api_v1_analytics_oracle_feeds__contract_id__prices_get","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OraclePriceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/analytics/anomalies":{"get":{"tags":["analytics"],"summary":"Anomalies","description":"Anomaly detection history \u2014 searchable log with summary + trend chart.","operationId":"anomalies_api_v1_analytics_anomalies_get","parameters":[{"name":"contract_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contract Id"}},{"name":"chain_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chain Id"}},{"name":"anomaly_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anomaly Type"}},{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/wallet-discoveries/_chains":{"get":{"tags":["wallet-discoveries"],"summary":"List Evm Chains","description":"Enabled EVM chains for the discovery modal's chain selector.\n\nPasses the request session through to chain_registry \u2014 without it,\nthe registry spins up a fresh `async_session_factory()` that bypasses\nany test override AND adds a needless connection on the hot path.","operationId":"list_evm_chains_api_v1_wallet_discoveries__chains_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List Evm Chains Api V1 Wallet Discoveries  Chains Get"}}}}}}},"/api/v1/wallet-discoveries":{"get":{"tags":["wallet-discoveries"],"summary":"List All","operationId":"list_all_api_v1_wallet_discoveries_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WalletDiscoveryResponse"},"type":"array","title":"Response List All Api V1 Wallet Discoveries Get"}}}}}},"post":{"tags":["wallet-discoveries"],"summary":"Create","description":"Start a new discovery job, or return cached results if all chains are warm.","operationId":"create_api_v1_wallet_discoveries_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletDiscoveryCreate"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletDiscoveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/wallet-discoveries/{discovery_id}":{"get":{"tags":["wallet-discoveries"],"summary":"Get One","operationId":"get_one_api_v1_wallet_discoveries__discovery_id__get","parameters":[{"name":"discovery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Discovery Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletDiscoveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/wallet-discoveries/{discovery_id}/import":{"post":{"tags":["wallet-discoveries"],"summary":"Import Contracts","description":"Bulk-create Contracts from selected discovery results.\n\nDedupes per (org, chain, address). Each item is imported atomically \u2014\none failure doesn't roll back the batch. When `enable_suggested_targets`\nis set on an item, we attach category-appropriate monitor targets so\nthe contract ships in MONITORING status rather than PENDING. v1 does\nNOT create AlertRule rows \u2014 that's deferred to Phase 4.9.1.","operationId":"import_contracts_api_v1_wallet_discoveries__discovery_id__import_post","parameters":[{"name":"discovery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Discovery Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletDiscoveryImport"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletDiscoveryImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/announcements":{"get":{"tags":["announcements"],"summary":"List Active Announcements","operationId":"list_active_announcements_api_v1_announcements_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PublicAnnouncement"},"type":"array","title":"Response List Active Announcements Api V1 Announcements Get"}}}}}}},"/api/v1/agents/{agent_id}/telemetry":{"post":{"tags":["agents"],"summary":"Push Telemetry","description":"Accept push telemetry from a monitored agent.\n\nIf the agent has a webhook_secret configured, the request must include\nan X-Agent-Signature header containing the HMAC-SHA256 hex digest of\nthe JSON-serialised request body, computed with the shared secret.\n\nAgents without a webhook_secret can push freely (useful for testing or\nagents that don't support HMAC signing).\n\nReturns 204 on success. Returns 401 if HMAC verification fails.\nReturns 404 if the agent does not exist or is inactive.","operationId":"push_telemetry_api_v1_agents__agent_id__telemetry_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"x-agent-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Agent-Signature"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushTelemetryPayload"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["agents"],"summary":"List Agent Telemetry","description":"List recent telemetry readings for an agent (org-scoped).","operationId":"list_agent_telemetry_api_v1_agents__agent_id__telemetry_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentTelemetryReadingItem"},"title":"Response List Agent Telemetry Api V1 Agents  Agent Id  Telemetry Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agents/polymarket-import":{"post":{"tags":["agents"],"summary":"Polymarket Import","description":"Discover the resolver agent for a Polymarket market URL and create\na MonitoredAgent for it.\n\nFeature-gated on \"ai_agent_monitoring\" at the router level (403 when the\nflag is off \u2014 see require_ai_agent_monitoring). Returns 422 if the URL is\nnot a valid polymarket.com URL or if no resolver is found.","operationId":"polymarket_import_api_v1_agents_polymarket_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolymarketImportRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitoredAgentItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agents":{"get":{"tags":["agents"],"summary":"List Agents","description":"List all active agents for the org.","operationId":"list_agents_api_v1_agents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MonitoredAgentItem"},"type":"array","title":"Response List Agents Api V1 Agents Get"}}}}}}},"/api/v1/agents/{agent_id}":{"get":{"tags":["agents"],"summary":"Get Agent","description":"Get a single agent by ID (must belong to the current org).","operationId":"get_agent_api_v1_agents__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitoredAgentItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agents/{agent_id}/baselines":{"get":{"tags":["agents"],"summary":"List Agent Baselines","description":"Per-dimension baseline metrics for an agent (org-scoped). #529.\n\nOne item per observed dimension (bounded by the 5 baseline target\ntypes, so no pagination). std_dev is derived from the stored Welford\naccumulator; `warmed_up` mirrors the MIN_WARMUP_SAMPLES gate the\nanomaly scorer uses before it will emit z-scores.","operationId":"list_agent_baselines_api_v1_agents__agent_id__baselines_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentBaselineItem"},"title":"Response List Agent Baselines Api V1 Agents  Agent Id  Baselines Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/account/export":{"get":{"tags":["account"],"summary":"Export Account Data","description":"Stream a ZIP archive containing the user's org data as CSV files.\n\nIncludes: contracts, alert_rules, alert_events (90 days), channels (no\nsecrets), and admin_audit_log entries (90 days).\n\nPasswords and raw API key values are never included.","operationId":"export_account_data_api_v1_account_export_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/account":{"delete":{"tags":["account"],"summary":"Delete Account","description":"Safely delete the requesting user's account.\n\nDeletion rules:\n1. Caller must pass ``?confirm=true``.\n2. If the user is the sole admin of any org that still has other members,\n   return 400 \u2014 they must transfer ownership or remove members first.\n3. For each org the user admins alone with no other members, delete the org\n   (cascade removes contracts, rules, events, channels).\n4. For all other memberships (non-sole-admin), remove only the user's\n   membership record \u2014 the org is left intact for remaining members.\n5. Delete the user record itself.\n\nThis is irreversible.","operationId":"delete_account_api_v1_account_delete","parameters":[{"name":"confirm","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Confirm"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Account Api V1 Account Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audit-log/export":{"get":{"tags":["audit-log"],"summary":"Export Audit Log","description":"Export the org-scoped audit log as CSV or JSON (max 10,000 rows).\n\nOrg scoping: only returns entries where the actor (admin_id) is a member\nof the current user's org. Entries created by system processes\n(admin_id=NULL) are excluded \u2014 they have no org affiliation.","operationId":"export_audit_log_api_v1_audit_log_export_get","parameters":[{"name":"format","in":"query","required":false,"schema":{"enum":["csv","json"],"type":"string","default":"csv","title":"Format"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To Date"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"actor_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audit-log/compliance-report":{"get":{"tags":["audit-log"],"summary":"Export Compliance Report","description":"Phase 14.5 \u2014 Generate a compliance report (CSV or print-ready HTML).\n\nOrg scoping: same as /export \u2014 only entries where the actor (admin_id)\nis a member of the current user's org.\nReturns CSV for data pipelines; HTML for browser print-to-PDF workflow.","operationId":"export_compliance_report_api_v1_audit_log_compliance_report_get","parameters":[{"name":"format","in":"query","required":false,"schema":{"enum":["csv","html"],"type":"string","default":"html","title":"Format"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To Date"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/incidents/trace":{"post":{"tags":["incidents"],"summary":"Trace Incident Endpoint","description":"Reconstruct an incident timeline from an entry-point transaction hash.\n\nFetches the transaction, its receipt, and related same-block events from\ncontracts that emitted logs in the entry transaction. Returns a sequenced\ncausal chain useful for post-incident forensics.","operationId":"trace_incident_endpoint_api_v1_incidents_trace_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentTraceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentTimelineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contracts/{contract_id}/simulate":{"post":{"tags":["contracts"],"summary":"Simulate a transaction against a monitored contract","description":"Dry-run a transaction against *contract_id*.\n\n- Requires an authenticated org user.\n- Free-tier orgs: returns upgrade_required=True (no simulation run).\n- Needs \"transaction_simulation\" feature flag enabled for the org.","operationId":"simulate_contract_transaction_api_v1_contracts__contract_id__simulate_post","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/dvn-risk":{"get":{"tags":["public"],"summary":"Public DVN risk registry","description":"Returns aggregated DVN risk for well-known LZ OApps. No auth. Refreshed nightly.","operationId":"list_dvn_risk_public_dvn_risk_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DVNRiskResponse"}}}}}}},"/api/v1/health":{"get":{"summary":"Health Check","operationId":"health_check_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Check Api V1 Health Get"}}}}}}},"/api/v1/version":{"get":{"summary":"Version Info","description":"Public build-identity probe (diagnostic, like /health \u2014 no auth).\n\nLets ops verify which commit/version a running deploy is serving and\nspot frontend/backend build mismatches. git_sha/build_date come from\ndeploy-injected env vars; locally they fall back to \"dev\"/\"unknown\".","operationId":"version_info_api_v1_version_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Version Info Api V1 Version Get"}}}}}}}},"components":{"schemas":{"AIContractSummary":{"properties":{"summary":{"type":"string","title":"Summary","default":""},"contract_type":{"type":"string","title":"Contract Type","default":"other"},"monitoring_advice":{"type":"string","title":"Monitoring Advice","default":""},"suggested_rules":{"items":{"$ref":"#/components/schemas/SuggestedAlertRule"},"type":"array","title":"Suggested Rules"}},"type":"object","title":"AIContractSummary"},"ActivityChartData":{"properties":{"buckets":{"items":{"$ref":"#/components/schemas/TimeBucket"},"type":"array","title":"Buckets"}},"type":"object","required":["buckets"],"title":"ActivityChartData"},"ActivityEventItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"triggered_at":{"type":"string","format":"date-time","title":"Triggered At"},"contract_id":{"type":"string","format":"uuid","title":"Contract Id"},"contract_label":{"type":"string","title":"Contract Label"},"contract_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Address"},"chain_name":{"type":"string","title":"Chain Name"},"chain_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chain Id"},"target_type":{"type":"string","title":"Target Type"},"target_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Name"},"alert_rule_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alert Rule Name"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"severity":{"type":"string","title":"Severity"},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Threshold"},"delivered_status":{"type":"string","title":"Delivered Status"},"from_block":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"From Block"},"to_block":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"To Block"},"triggering_tx_hashes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Triggering Tx Hashes"},"tx_list_kind":{"type":"string","title":"Tx List Kind","default":"triggering"},"tx_total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tx Total Count"}},"type":"object","required":["id","triggered_at","contract_id","contract_label","chain_name","target_type","value","severity","delivered_status"],"title":"ActivityEventItem"},"ActivityEventsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ActivityEventItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"ActivityEventsPage"},"ActivityResponse":{"properties":{"chart":{"$ref":"#/components/schemas/ActivityChartData"},"events":{"$ref":"#/components/schemas/ActivityEventsPage"}},"type":"object","required":["chart","events"],"title":"ActivityResponse"},"AgentBaselineItem":{"properties":{"target_type":{"type":"string","title":"Target Type"},"sample_count":{"type":"integer","title":"Sample Count"},"mean":{"type":"number","title":"Mean"},"std_dev":{"type":"number","title":"Std Dev"},"warmed_up":{"type":"boolean","title":"Warmed Up"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["target_type","sample_count","mean","std_dev","warmed_up","updated_at"],"title":"AgentBaselineItem","description":"#529 \u2014 per-dimension baseline metrics for the agent detail page.\n\nstd_dev is DERIVED from the stored Welford accumulator (running_m2 +\nsample_count) at read time \u2014 there is no stored std column, and there\nis no stored z-score (z is computed per-reading against the pre-update\ndistribution and discarded). `warmed_up` lets the UI distinguish\n\"collecting samples\" from \"baseline ready\" without fabricating a z."},"AgentTelemetryReadingItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"recorded_at":{"type":"string","format":"date-time","title":"Recorded At"},"ingestion_mode":{"type":"string","title":"Ingestion Mode"},"latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency Ms"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"cost_estimate_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Estimate Usd"},"signature_valid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Signature Valid"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"request_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Hash"},"response_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Hash"}},"type":"object","required":["id","agent_id","recorded_at","ingestion_mode","latency_ms","model_id","cost_estimate_usd","signature_valid","error","request_hash","response_hash"],"title":"AgentTelemetryReadingItem"},"AlertEventResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"alert_rule_id":{"type":"string","format":"uuid","title":"Alert Rule Id"},"contract_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contract Id"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"triggered_at":{"type":"string","format":"date-time","title":"Triggered At"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"context_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context Json"},"delivered_status":{"type":"string","title":"Delivered Status"},"delivery_attempts":{"type":"integer","title":"Delivery Attempts"},"rule_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Name"},"contract_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Label"},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Threshold"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"contract_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Address"},"chain_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chain Id"}},"type":"object","required":["id","alert_rule_id","triggered_at","value","context_json","delivered_status","delivery_attempts"],"title":"AlertEventResponse"},"AlertHistoryRow":{"properties":{"time":{"type":"string","format":"date-time","title":"Time"},"contract_label":{"type":"string","title":"Contract Label"},"rule_name":{"type":"string","title":"Rule Name"},"severity":{"type":"string","title":"Severity"}},"type":"object","required":["time","contract_label","rule_name","severity"],"title":"AlertHistoryRow"},"AlertRuleCreate":{"properties":{"contract_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contract Id"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"severity":{"type":"string","enum":["info","warning","critical"],"title":"Severity","default":"warning"},"target_type":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Target Type"},"monitor_target_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Monitor Target Id"},"threshold":{"type":"number","title":"Threshold"},"window_seconds":{"type":"integer","maximum":2678400.0,"minimum":1.0,"title":"Window Seconds","default":300},"channel_id":{"type":"string","format":"uuid","title":"Channel Id"},"condition_json":{"additionalProperties":true,"type":"object","title":"Condition Json"},"channel_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":20,"title":"Channel Ids"}},"additionalProperties":false,"type":"object","required":["name","threshold","channel_id"],"title":"AlertRuleCreate"},"AlertRuleResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"contract_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contract Id"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"monitor_target_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Monitor Target Id"},"target_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Type"},"name":{"type":"string","title":"Name"},"severity":{"type":"string","title":"Severity"},"condition_json":{"additionalProperties":true,"type":"object","title":"Condition Json"},"threshold":{"type":"number","title":"Threshold"},"window_seconds":{"type":"integer","title":"Window Seconds"},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Channel Id"},"is_enabled":{"type":"boolean","title":"Is Enabled"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"channel_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Channel Ids"}},"type":"object","required":["id","monitor_target_id","name","severity","condition_json","threshold","window_seconds","channel_id","is_enabled","created_at"],"title":"AlertRuleResponse"},"AlertRuleUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"severity":{"anyOf":[{"type":"string","enum":["info","warning","critical"]},{"type":"null"}],"title":"Severity"},"is_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Enabled"},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Threshold"},"window_seconds":{"anyOf":[{"type":"integer","maximum":2678400.0,"minimum":1.0},{"type":"null"}],"title":"Window Seconds"},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Channel Id"},"condition_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition Json"},"channel_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":20},{"type":"null"}],"title":"Channel Ids"}},"additionalProperties":false,"type":"object","title":"AlertRuleUpdate"},"AlertTemplateItem":{"properties":{"name":{"type":"string","title":"Name"},"target_type":{"type":"string","title":"Target Type"},"threshold":{"type":"number","title":"Threshold"},"severity":{"type":"string","title":"Severity"},"window_seconds":{"type":"integer","title":"Window Seconds"},"condition_json":{"additionalProperties":true,"type":"object","title":"Condition Json"}},"type":"object","required":["name","target_type","threshold","severity","window_seconds","condition_json"],"title":"AlertTemplateItem"},"AnomalyChartData":{"properties":{"buckets":{"items":{"$ref":"#/components/schemas/TimeBucket"},"type":"array","title":"Buckets"}},"type":"object","required":["buckets"],"title":"AnomalyChartData"},"AnomalyEventsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AnomalyItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"AnomalyEventsPage"},"AnomalyItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"triggered_at":{"type":"string","format":"date-time","title":"Triggered At"},"contract_id":{"type":"string","format":"uuid","title":"Contract Id"},"contract_label":{"type":"string","title":"Contract Label"},"chain_name":{"type":"string","title":"Chain Name"},"anomaly_type":{"type":"string","title":"Anomaly Type"},"severity":{"type":"string","title":"Severity"},"baseline_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Baseline Value"},"actual_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Actual Value"},"deviation_factor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Deviation Factor"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"},"alert_delivered":{"type":"boolean","title":"Alert Delivered","default":false}},"type":"object","required":["id","triggered_at","contract_id","contract_label","chain_name","anomaly_type","severity"],"title":"AnomalyItem"},"AnomalyResponse":{"properties":{"summary":{"$ref":"#/components/schemas/AnomalySummary"},"chart":{"$ref":"#/components/schemas/AnomalyChartData"},"anomalies":{"$ref":"#/components/schemas/AnomalyEventsPage"}},"type":"object","required":["summary","chart","anomalies"],"title":"AnomalyResponse"},"AnomalySummary":{"properties":{"total_30d":{"type":"integer","title":"Total 30D","default":0},"by_severity":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Severity"},"most_affected":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Most Affected"},"trend":{"type":"string","title":"Trend","default":"stable"}},"type":"object","title":"AnomalySummary"},"ApiKeyCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"scope":{"type":"string","enum":["read_only","read_write"],"title":"Scope","default":"read_write"},"contract_scope":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Contract Scope"},"chain_scope":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Chain Scope"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["name"],"title":"ApiKeyCreate"},"ApiKeyCreatedResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"is_active":{"type":"boolean","title":"Is Active"},"scope":{"type":"string","title":"Scope"},"contract_scope":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Contract Scope"},"chain_scope":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Chain Scope"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"requests_7d":{"type":"integer","title":"Requests 7D","default":0},"key":{"type":"string","title":"Key"}},"type":"object","required":["id","name","key_prefix","is_active","scope","last_used_at","created_at","key"],"title":"ApiKeyCreatedResponse","description":"Returned only at creation/regeneration \u2014 includes the full key once."},"ApiKeyResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"is_active":{"type":"boolean","title":"Is Active"},"scope":{"type":"string","title":"Scope"},"contract_scope":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Contract Scope"},"chain_scope":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Chain Scope"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"requests_7d":{"type":"integer","title":"Requests 7D","default":0}},"type":"object","required":["id","name","key_prefix","is_active","scope","last_used_at","created_at"],"title":"ApiKeyResponse","description":"Lists existing keys without exposing the secret material."},"ApiKeyUsageItem":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"request_count":{"type":"integer","title":"Request Count"},"error_count":{"type":"integer","title":"Error Count"}},"type":"object","required":["date","request_count","error_count"],"title":"ApiKeyUsageItem"},"ApiKeyUsageResponse":{"properties":{"api_key_id":{"type":"string","format":"uuid","title":"Api Key Id"},"total_requests_30d":{"type":"integer","title":"Total Requests 30D"},"total_errors_30d":{"type":"integer","title":"Total Errors 30D"},"daily_breakdown":{"items":{"$ref":"#/components/schemas/DailyUsage"},"type":"array","title":"Daily Breakdown"},"requests_today":{"type":"integer","title":"Requests Today"},"errors_today":{"type":"integer","title":"Errors Today"},"usage":{"items":{"$ref":"#/components/schemas/ApiKeyUsageItem"},"type":"array","title":"Usage"},"total_30d":{"type":"integer","title":"Total 30D"},"errors_30d":{"type":"integer","title":"Errors 30D"}},"type":"object","required":["api_key_id","total_requests_30d","total_errors_30d","daily_breakdown","requests_today","errors_today","usage","total_30d","errors_30d"],"title":"ApiKeyUsageResponse"},"ApplyTemplatesRequest":{"properties":{"category":{"type":"string","enum":["lending","dex","bridge","oracle","governance"],"title":"Category"},"channel_id":{"type":"string","format":"uuid","title":"Channel Id"}},"type":"object","required":["category","channel_id"],"title":"ApplyTemplatesRequest"},"ApplyTemplatesResponse":{"properties":{"created_rule_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Created Rule Ids"}},"type":"object","required":["created_rule_ids"],"title":"ApplyTemplatesResponse"},"AttentionItem":{"properties":{"label":{"type":"string","title":"Label"},"reason":{"type":"string","title":"Reason"},"severity":{"type":"string","title":"Severity"},"contract_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contract Id"},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Channel Id"}},"type":"object","required":["label","reason","severity"],"title":"AttentionItem"},"BridgeConfigResponse":{"properties":{"contract_id":{"type":"string","title":"Contract Id"},"is_lz_oapp":{"type":"boolean","title":"Is Lz Oapp"},"routes":{"items":{"$ref":"#/components/schemas/DVNRouteResponse"},"type":"array","title":"Routes"},"is_ccip_integrated":{"type":"boolean","title":"Is Ccip Integrated","default":false},"ccip_lanes":{"items":{"$ref":"#/components/schemas/CCIPLaneResponse"},"type":"array","title":"Ccip Lanes","default":[]},"overall_risk":{"type":"string","title":"Overall Risk"},"upgrade_required":{"type":"boolean","title":"Upgrade Required","default":false}},"type":"object","required":["contract_id","is_lz_oapp","routes","overall_risk"],"title":"BridgeConfigResponse"},"BulkImportRequest":{"properties":{"json_contracts":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":100},{"type":"null"}],"title":"Json Contracts"},"csv_text":{"anyOf":[{"type":"string","maxLength":1000000},{"type":"null"}],"title":"Csv Text"},"apply_template_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apply Template Category"},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Channel Id"}},"type":"object","title":"BulkImportRequest","description":"Accept a list of contracts to import.\n\nSupports two formats:\n- json_contracts: list of {address, chain_id, label?} dicts\n- csv_text: raw CSV string with columns: address,chain_id,label (header optional)\n\nAt least one must be provided."},"BulkImportResult":{"properties":{"imported":{"type":"integer","title":"Imported"},"skipped":{"type":"integer","title":"Skipped"},"failed":{"type":"integer","title":"Failed"},"errors":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Errors"},"contract_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Contract Ids"}},"type":"object","required":["imported","skipped","failed","errors","contract_ids"],"title":"BulkImportResult"},"CCIPLaneResponse":{"properties":{"protocol":{"type":"string","const":"ccip","title":"Protocol","default":"ccip"},"src_chain_id":{"type":"integer","title":"Src Chain Id"},"dst_chain_selector":{"type":"string","title":"Dst Chain Selector"},"dst_chain_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dst Chain Name"},"on_ramp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"On Ramp"},"rmn_proxy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rmn Proxy"},"risk_level":{"type":"string","title":"Risk Level"},"risk_summary":{"type":"string","title":"Risk Summary"}},"type":"object","required":["src_chain_id","dst_chain_selector","risk_level","risk_summary"],"title":"CCIPLaneResponse","description":"A Chainlink CCIP destination lane (Phase 5.5.13).\n\nThe CCIP sibling of DVNRouteResponse \u2014 kept as its own shape because CCIP\nuses an RMN/ARM risk-management contract, not a DVN set, so the DVN fields\ndon't apply. Both carry ``protocol`` so the Bridge Config tab groups them."},"ChainResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"chain_type":{"type":"string","title":"Chain Type","default":"evm"},"block_time_seconds":{"type":"integer","title":"Block Time Seconds"},"is_enabled":{"type":"boolean","title":"Is Enabled"}},"type":"object","required":["id","name","block_time_seconds","is_enabled"],"title":"ChainResponse"},"ChannelCreate":{"properties":{"type":{"type":"string","enum":["discord","email","opsgenie","pagerduty","slack_webhook","sms","telegram","webhook"],"title":"Type"},"config_json":{"additionalProperties":true,"type":"object","title":"Config Json"}},"additionalProperties":false,"type":"object","required":["type","config_json"],"title":"ChannelCreate"},"ChannelHealthItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"status":{"type":"string","title":"Status"},"recent_failures":{"type":"integer","title":"Recent Failures"}},"type":"object","required":["id","name","type","status","recent_failures"],"title":"ChannelHealthItem"},"ChannelResponseSafe":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"type":"string","title":"Type"},"config_json":{"additionalProperties":true,"type":"object","title":"Config Json"},"is_enabled":{"type":"boolean","title":"Is Enabled"}},"type":"object","required":["id","type","config_json","is_enabled"],"title":"ChannelResponseSafe","description":"Channel response with sensitive config values masked.\n\nUse this for all API endpoints that return channel data to users.\nThe full config is only needed by the notification worker (DB direct)."},"ChannelUpdate":{"properties":{"is_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Enabled"},"config_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Json"}},"additionalProperties":false,"type":"object","title":"ChannelUpdate"},"CheckoutRequest":{"properties":{"tier":{"type":"string","title":"Tier"},"annual":{"type":"boolean","title":"Annual","default":false}},"type":"object","required":["tier"],"title":"CheckoutRequest"},"CheckoutResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"CheckoutResponse"},"ComponentStatus":{"properties":{"name":{"type":"string","title":"Name"},"status":{"type":"string","enum":["operational","degraded","down"],"title":"Status"},"latency_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latency Ms"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["name","status"],"title":"ComponentStatus"},"ContractAccessGrant":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"role":{"type":"string","enum":["admin","editor","viewer","auditor"],"title":"Role","default":"viewer"}},"additionalProperties":false,"type":"object","required":["user_id"],"title":"ContractAccessGrant"},"ContractAccessItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"role":{"type":"string","title":"Role"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","user_id","email","role","created_at"],"title":"ContractAccessItem"},"ContractAnalysis":{"properties":{"has_source":{"type":"boolean","title":"Has Source"},"inheritance_diagram":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inheritance Diagram"},"call_graph_diagram":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Graph Diagram"},"architecture_diagram":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Architecture Diagram"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["has_source"],"title":"ContractAnalysis"},"ContractCreate":{"properties":{"chain":{"type":"string","maxLength":50,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]*$","title":"Chain","default":"ethereum"},"address":{"type":"string","maxLength":64,"minLength":20,"title":"Address"},"label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Label"},"selected_targets":{"items":{"$ref":"#/components/schemas/SelectedTarget"},"type":"array","title":"Selected Targets"},"abi_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abi Json"}},"additionalProperties":false,"type":"object","required":["address"],"title":"ContractCreate"},"ContractLabelBulkSet":{"properties":{"names":{"items":{"type":"string"},"type":"array","title":"Names"}},"type":"object","required":["names"],"title":"ContractLabelBulkSet"},"ContractLabelCreate":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"ContractLabelCreate"},"ContractLabelResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"contract_id":{"type":"string","format":"uuid","title":"Contract Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","contract_id","org_id","name"],"title":"ContractLabelResponse"},"ContractResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"chain_id":{"type":"integer","title":"Chain Id"},"address":{"type":"string","title":"Address"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"status":{"type":"string","title":"Status"},"abi_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abi Json"},"metadata_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata Json"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"monitor_targets":{"items":{"$ref":"#/components/schemas/MonitorTargetSummary"},"type":"array","title":"Monitor Targets"},"is_lz_oapp":{"type":"boolean","title":"Is Lz Oapp","default":false},"lz_bridge_eids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Lz Bridge Eids"},"is_ccip_integrated":{"type":"boolean","title":"Is Ccip Integrated","default":false},"ccip_dest_chain_selectors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ccip Dest Chain Selectors"},"is_quantum_vulnerable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Quantum Vulnerable"},"quantum_vulnerability_reasons":{"items":{"type":"string"},"type":"array","title":"Quantum Vulnerability Reasons"}},"type":"object","required":["id","chain_id","address","label","status","created_at","updated_at"],"title":"ContractResponse"},"ContractRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"address":{"type":"string","title":"Address"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"chain_name":{"type":"string","title":"Chain Name"},"status":{"type":"string","title":"Status"},"active_alerts":{"type":"integer","title":"Active Alerts"},"triggered_events_24h":{"type":"integer","title":"Triggered Events 24H"},"last_activity":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity"},"last_checked":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked"}},"type":"object","required":["id","address","label","chain_name","status","active_alerts","triggered_events_24h","last_activity","last_checked"],"title":"ContractRow"},"ContractUpdate":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Label"},"status":{"anyOf":[{"type":"string","enum":["pending","monitoring","paused","error"]},{"type":"null"}],"title":"Status"}},"additionalProperties":false,"type":"object","title":"ContractUpdate"},"DVNDetail":{"properties":{"address":{"type":"string","title":"Address"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"operator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator"},"is_canonical":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Canonical"},"risk_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Notes"},"rpc_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rpc Provider"},"asn":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Asn"},"hosting_region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hosting Region"}},"type":"object","required":["address"],"title":"DVNDetail"},"DVNRiskResponse":{"properties":{"protocols":{"items":{"$ref":"#/components/schemas/DVNScanRow"},"type":"array","title":"Protocols"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["protocols","total"],"title":"DVNRiskResponse"},"DVNRouteResponse":{"properties":{"protocol":{"type":"string","const":"layerzero","title":"Protocol","default":"layerzero"},"src_chain_id":{"type":"integer","title":"Src Chain Id"},"dst_eid":{"type":"integer","title":"Dst Eid"},"dst_chain_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dst Chain Name"},"required_dvns":{"items":{"$ref":"#/components/schemas/DVNDetail"},"type":"array","title":"Required Dvns"},"optional_dvns":{"items":{"$ref":"#/components/schemas/DVNDetail"},"type":"array","title":"Optional Dvns"},"optional_threshold":{"type":"integer","title":"Optional Threshold"},"confirmations":{"type":"integer","title":"Confirmations"},"risk_level":{"type":"string","title":"Risk Level"},"risk_summary":{"type":"string","title":"Risk Summary"},"is_default_config":{"type":"boolean","title":"Is Default Config"},"infra_risk":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Infra Risk"}},"type":"object","required":["src_chain_id","dst_eid","required_dvns","optional_dvns","optional_threshold","confirmations","risk_level","risk_summary","is_default_config"],"title":"DVNRouteResponse"},"DVNScanRow":{"properties":{"protocol_name":{"type":"string","title":"Protocol Name"},"contract_address":{"type":"string","title":"Contract Address"},"chain_id":{"type":"integer","title":"Chain Id"},"worst_risk_level":{"type":"string","title":"Worst Risk Level"},"critical_route_count":{"type":"integer","title":"Critical Route Count"},"high_route_count":{"type":"integer","title":"High Route Count"},"total_route_count":{"type":"integer","title":"Total Route Count"},"last_scanned_at":{"type":"string","format":"date-time","title":"Last Scanned At"}},"type":"object","required":["protocol_name","contract_address","chain_id","worst_risk_level","critical_route_count","high_route_count","total_route_count","last_scanned_at"],"title":"DVNScanRow"},"DailyUsage":{"properties":{"date":{"type":"string","title":"Date"},"requests":{"type":"integer","title":"Requests"},"errors":{"type":"integer","title":"Errors"}},"type":"object","required":["date","requests","errors"],"title":"DailyUsage","description":"Single day's usage for an API key."},"DashboardResponse":{"properties":{"kpi":{"$ref":"#/components/schemas/KpiStats"},"usage":{"anyOf":[{"$ref":"#/components/schemas/UsageInfo"},{"type":"null"}]},"contracts":{"items":{"$ref":"#/components/schemas/ContractRow"},"type":"array","title":"Contracts"},"recent_alerts":{"items":{"$ref":"#/components/schemas/RecentAlertItem"},"type":"array","title":"Recent Alerts"},"attention_items":{"items":{"$ref":"#/components/schemas/AttentionItem"},"type":"array","title":"Attention Items"},"channel_health":{"items":{"$ref":"#/components/schemas/ChannelHealthItem"},"type":"array","title":"Channel Health"},"timeline":{"items":{"$ref":"#/components/schemas/TimelineBucket"},"type":"array","title":"Timeline"},"alert_history":{"items":{"$ref":"#/components/schemas/AlertHistoryRow"},"type":"array","title":"Alert History"}},"type":"object","required":["kpi","contracts","recent_alerts","attention_items","channel_health","timeline","alert_history"],"title":"DashboardResponse"},"DefenderImportRequest":{"properties":{"export_json":{"additionalProperties":true,"type":"object","title":"Export Json"},"dry_run":{"type":"boolean","title":"Dry Run","default":false}},"type":"object","required":["export_json"],"title":"DefenderImportRequest"},"DefenderImportResult":{"properties":{"imported_contracts":{"type":"integer","title":"Imported Contracts"},"skipped_contracts":{"type":"integer","title":"Skipped Contracts"},"created_channels":{"type":"integer","title":"Created Channels"},"created_rules":{"type":"integer","title":"Created Rules"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"dry_run":{"type":"boolean","title":"Dry Run"},"preview":{"anyOf":[{"items":{"$ref":"#/components/schemas/DefenderSentinelPreview"},"type":"array"},{"type":"null"}],"title":"Preview"}},"type":"object","required":["imported_contracts","skipped_contracts","created_channels","created_rules","warnings","dry_run"],"title":"DefenderImportResult"},"DefenderSentinelPreview":{"properties":{"name":{"type":"string","title":"Name"},"address":{"type":"string","title":"Address"},"chain_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chain Id"},"channels":{"items":{"type":"string"},"type":"array","title":"Channels"},"status":{"type":"string","title":"Status"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["name","address","chain_id","channels","status"],"title":"DefenderSentinelPreview"},"DiscoveredContract":{"properties":{"address":{"type":"string","title":"Address"},"chain_id":{"type":"integer","title":"Chain Id"},"category":{"type":"string","enum":["deployed","interacted","approved","token","referencing"],"title":"Category"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"is_verified":{"type":"boolean","title":"Is Verified","default":false},"token_symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Symbol"},"token_type":{"anyOf":[{"type":"string","enum":["erc20","erc721","erc1155"]},{"type":"null"}],"title":"Token Type"},"interaction_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interaction Count"},"already_monitored":{"type":"boolean","title":"Already Monitored","default":false},"suggested_targets":{"items":{"type":"string"},"type":"array","title":"Suggested Targets"}},"type":"object","required":["address","chain_id","category"],"title":"DiscoveredContract"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImportContractItem":{"properties":{"address":{"type":"string","title":"Address"},"chain_id":{"type":"integer","title":"Chain Id"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"enable_suggested_targets":{"type":"boolean","title":"Enable Suggested Targets","default":true}},"type":"object","required":["address","chain_id"],"title":"ImportContractItem"},"ImportErrorItem":{"properties":{"address":{"type":"string","title":"Address"},"chain_id":{"type":"integer","title":"Chain Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["address","chain_id","message"],"title":"ImportErrorItem"},"ImportedContractInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"address":{"type":"string","title":"Address"},"chain_id":{"type":"integer","title":"Chain Id"}},"type":"object","required":["id","address","chain_id"],"title":"ImportedContractInfo"},"IncidentTimelineResponse":{"properties":{"entry_tx_hash":{"type":"string","title":"Entry Tx Hash"},"chain_id":{"type":"integer","title":"Chain Id"},"events":{"items":{"$ref":"#/components/schemas/TimelineEventResponse"},"type":"array","title":"Events"},"total_events":{"type":"integer","title":"Total Events"},"analysis_note":{"type":"string","title":"Analysis Note"}},"type":"object","required":["entry_tx_hash","chain_id","events","total_events","analysis_note"],"title":"IncidentTimelineResponse"},"IncidentTraceRequest":{"properties":{"tx_hash":{"type":"string","title":"Tx Hash"},"chain_id":{"type":"integer","title":"Chain Id"}},"type":"object","required":["tx_hash","chain_id"],"title":"IncidentTraceRequest"},"InspectRequest":{"properties":{"chain":{"type":"string","maxLength":50,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]*$","title":"Chain","default":"ethereum"},"address":{"type":"string","maxLength":64,"minLength":20,"title":"Address"}},"additionalProperties":false,"type":"object","required":["address"],"title":"InspectRequest"},"InspectResponse":{"properties":{"address":{"type":"string","title":"Address"},"chain":{"type":"string","title":"Chain"},"is_contract":{"type":"boolean","title":"Is Contract"},"abi_available":{"type":"boolean","title":"Abi Available"},"abi_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abi Json"},"monitorable_items":{"items":{"$ref":"#/components/schemas/MonitorableItem"},"type":"array","title":"Monitorable Items"},"ai_summary":{"anyOf":[{"$ref":"#/components/schemas/AIContractSummary"},{"type":"null"}]},"quantum_analysis":{"anyOf":[{"$ref":"#/components/schemas/QuantumAnalysisResult"},{"type":"null"}]}},"type":"object","required":["address","chain","is_contract","abi_available"],"title":"InspectResponse"},"InviteCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"type":"string","enum":["admin","editor","viewer","auditor"],"title":"Role"}},"additionalProperties":false,"type":"object","required":["email","role"],"title":"InviteCreate"},"InviteItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","role","expires_at","created_at"],"title":"InviteItem"},"InvitePreview":{"properties":{"org_name":{"type":"string","title":"Org Name"},"role":{"type":"string","title":"Role"},"inviter_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inviter Email"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["org_name","role","expires_at"],"title":"InvitePreview"},"InvoiceItem":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"created":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created"},"amount_due":{"type":"integer","title":"Amount Due","default":0},"currency":{"type":"string","title":"Currency","default":"usd"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"pdf_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdf Url"},"hosted_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hosted Url"},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number"}},"type":"object","title":"InvoiceItem"},"KpiStats":{"properties":{"contracts_monitored":{"type":"integer","title":"Contracts Monitored"},"healthy_contracts":{"type":"integer","title":"Healthy Contracts"},"contracts_in_alert":{"type":"integer","title":"Contracts In Alert"},"critical_alerts_24h":{"type":"integer","title":"Critical Alerts 24H"},"alerts_24h":{"type":"integer","title":"Alerts 24H"},"delivery_success_rate":{"type":"number","title":"Delivery Success Rate"},"bridge_risk_contracts":{"type":"integer","title":"Bridge Risk Contracts","default":0}},"type":"object","required":["contracts_monitored","healthy_contracts","contracts_in_alert","critical_alerts_24h","alerts_24h","delivery_success_rate"],"title":"KpiStats"},"LiveMetricItem":{"properties":{"monitor_target_id":{"type":"string","format":"uuid","title":"Monitor Target Id"},"target_type":{"type":"string","title":"Target Type"},"target_label":{"type":"string","title":"Target Label"},"is_enabled":{"type":"boolean","title":"Is Enabled"},"current_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Value"},"recorded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Recorded At"},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Threshold"},"threshold_condition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Threshold Condition"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"proximity_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Proximity Pct"},"status":{"type":"string","title":"Status","default":"green"},"sparkline":{"items":{"$ref":"#/components/schemas/SparklinePoint"},"type":"array","title":"Sparkline","default":[]},"stale":{"type":"boolean","title":"Stale","default":false},"staleness_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Staleness Seconds"}},"type":"object","required":["monitor_target_id","target_type","target_label","is_enabled"],"title":"LiveMetricItem"},"LiveMetricsResponse":{"properties":{"contract_id":{"type":"string","format":"uuid","title":"Contract Id"},"last_poll_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Poll At"},"stale":{"type":"boolean","title":"Stale","default":false},"staleness_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Staleness Seconds"},"targets":{"items":{"$ref":"#/components/schemas/LiveMetricItem"},"type":"array","title":"Targets"}},"type":"object","required":["contract_id","targets"],"title":"LiveMetricsResponse"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"MemberItem":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"is_self":{"type":"boolean","title":"Is Self","default":false}},"type":"object","required":["user_id","email","role"],"title":"MemberItem"},"MemberRoleUpdate":{"properties":{"role":{"type":"string","enum":["admin","editor","viewer","auditor"],"title":"Role"}},"additionalProperties":false,"type":"object","required":["role"],"title":"MemberRoleUpdate"},"MonitorTargetCreate":{"properties":{"target_type":{"$ref":"#/components/schemas/TargetType"},"config_json":{"additionalProperties":true,"type":"object","title":"Config Json","default":{}},"is_enabled":{"type":"boolean","title":"Is Enabled","default":true}},"type":"object","required":["target_type"],"title":"MonitorTargetCreate","description":"Request body for POST /contracts/{contract_id}/targets."},"MonitorTargetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"contract_id":{"type":"string","format":"uuid","title":"Contract Id"},"target_type":{"type":"string","title":"Target Type"},"config_json":{"type":"string","title":"Config Json"},"is_enabled":{"type":"boolean","title":"Is Enabled"}},"type":"object","required":["id","contract_id","target_type","config_json","is_enabled"],"title":"MonitorTargetResponse"},"MonitorTargetSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"target_type":{"type":"string","title":"Target Type"},"config_json":{"type":"string","title":"Config Json"},"is_enabled":{"type":"boolean","title":"Is Enabled"}},"type":"object","required":["id","target_type","config_json","is_enabled"],"title":"MonitorTargetSummary"},"MonitorTargetUpdate":{"properties":{"is_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Enabled"},"config_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Config Json"}},"type":"object","title":"MonitorTargetUpdate"},"MonitorableItem":{"properties":{"target_type":{"type":"string","title":"Target Type"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"config_json":{"additionalProperties":true,"type":"object","title":"Config Json"}},"type":"object","required":["target_type","name","description"],"title":"MonitorableItem"},"MonitoredAgentItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"name":{"type":"string","title":"Name"},"agent_type":{"type":"string","title":"Agent Type"},"endpoint_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint Url"},"probe_interval_seconds":{"type":"integer","title":"Probe Interval Seconds"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","org_id","name","agent_type","endpoint_url","probe_interval_seconds","is_active","created_at","updated_at"],"title":"MonitoredAgentItem"},"OracleAnomalyItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"triggered_at":{"type":"string","format":"date-time","title":"Triggered At"},"type":{"type":"string","title":"Type"},"severity":{"type":"string","title":"Severity"},"expected_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Expected Value"},"actual_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Actual Value"},"deviation_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Deviation Pct"}},"type":"object","required":["id","triggered_at","type","severity"],"title":"OracleAnomalyItem"},"OracleFeedInfo":{"properties":{"contract_id":{"type":"string","format":"uuid","title":"Contract Id"},"label":{"type":"string","title":"Label"},"chain":{"type":"string","title":"Chain"},"source":{"type":"string","title":"Source"},"current_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Price"},"last_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Updated"}},"type":"object","required":["contract_id","label","chain","source"],"title":"OracleFeedInfo"},"OracleFeedItem":{"properties":{"contract_id":{"type":"string","format":"uuid","title":"Contract Id"},"label":{"type":"string","title":"Label"},"chain_name":{"type":"string","title":"Chain Name"},"source":{"type":"string","title":"Source","default":"chainlink"}},"type":"object","required":["contract_id","label","chain_name"],"title":"OracleFeedItem"},"OracleFeedStats":{"properties":{"change_24h_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change 24H Pct"},"staleness_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Staleness Seconds"},"anomalies_7d":{"type":"integer","title":"Anomalies 7D","default":0},"avg_deviation_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Deviation Pct"}},"type":"object","title":"OracleFeedStats"},"OraclePricePoint":{"properties":{"recorded_at":{"type":"string","format":"date-time","title":"Recorded At"},"price":{"type":"number","title":"Price"},"deviation_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Deviation Pct"}},"type":"object","required":["recorded_at","price"],"title":"OraclePricePoint"},"OraclePriceResponse":{"properties":{"feed":{"$ref":"#/components/schemas/OracleFeedInfo"},"prices":{"items":{"$ref":"#/components/schemas/OraclePricePoint"},"type":"array","title":"Prices"},"anomalies":{"items":{"$ref":"#/components/schemas/OracleAnomalyItem"},"type":"array","title":"Anomalies"},"stats":{"$ref":"#/components/schemas/OracleFeedStats"}},"type":"object","required":["feed","prices","anomalies","stats"],"title":"OraclePriceResponse"},"OrgCreate":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"}},"additionalProperties":false,"type":"object","required":["name"],"title":"OrgCreate"},"OrgResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"tier":{"type":"string","title":"Tier"},"subscription_status":{"type":"string","title":"Subscription Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"business_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Name"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"billing_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Email"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},"type":"object","required":["id","name","slug","tier","subscription_status","created_at"],"title":"OrgResponse"},"OrgSettingsResponse":{"properties":{"polling_interval_seconds":{"type":"integer","title":"Polling Interval Seconds"},"polling_interval_floor":{"type":"integer","title":"Polling Interval Floor"},"polling_interval_stored":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Polling Interval Stored"}},"type":"object","required":["polling_interval_seconds","polling_interval_floor"],"title":"OrgSettingsResponse"},"OrgSettingsUpdate":{"properties":{"polling_interval_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Polling Interval Seconds"}},"type":"object","title":"OrgSettingsUpdate"},"OrgSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"role":{"type":"string","title":"Role"},"tier":{"type":"string","title":"Tier"},"subscription_status":{"type":"string","title":"Subscription Status","default":"active"},"grace_period_ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Grace Period Ends At"}},"type":"object","required":["id","name","slug","role","tier"],"title":"OrgSummary","description":"The shape used by the org switcher \u2014 lean by design, but includes\nenough billing state for the past-due banner."},"OrgUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Name"},"business_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Business Name"},"tax_id":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Tax Id"},"billing_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Billing Email"},"address_line1":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line2"},"city":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"State"},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Postal Code"},"country":{"anyOf":[{"type":"string","pattern":"^[A-Za-z]{2}$"},{"type":"null"}],"title":"Country"}},"additionalProperties":false,"type":"object","title":"OrgUpdate"},"OrgUsageSummary":{"properties":{"total_requests_30d":{"type":"integer","title":"Total Requests 30D"},"total_errors_30d":{"type":"integer","title":"Total Errors 30D"},"most_active_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Most Active Key Id"},"most_active_key_requests":{"type":"integer","title":"Most Active Key Requests"}},"type":"object","required":["total_requests_30d","total_errors_30d","most_active_key_id","most_active_key_requests"],"title":"OrgUsageSummary","description":"Aggregated usage across all keys in an org (last 30 days)."},"PolymarketImportRequest":{"properties":{"market_url":{"type":"string","title":"Market Url"}},"type":"object","required":["market_url"],"title":"PolymarketImportRequest"},"PortalResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"PortalResponse"},"ProxyStateResponse":{"properties":{"contract_id":{"type":"string","title":"Contract Id"},"address":{"type":"string","title":"Address"},"chain_id":{"type":"integer","title":"Chain Id"},"implementation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Implementation"},"admin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin"},"beacon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Beacon"},"read_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Read Error"}},"type":"object","required":["contract_id","address","chain_id","implementation","admin","beacon","read_error"],"title":"ProxyStateResponse"},"PublicAnnouncement":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"banner_type":{"type":"string","enum":["info","warning","maintenance","critical"],"title":"Banner Type"},"is_dismissible":{"type":"boolean","title":"Is Dismissible"},"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At"}},"type":"object","required":["id","title","body","banner_type","is_dismissible","starts_at"],"title":"PublicAnnouncement"},"PushTelemetryPayload":{"properties":{"request_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Hash"},"response_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Hash"},"request_payload":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Payload"},"response_payload":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Payload"},"latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency Ms"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"cost_estimate_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Estimate Usd"},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature"},"signature_valid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Signature Valid"}},"type":"object","title":"PushTelemetryPayload","description":"Push telemetry payload submitted by an agent via webhook."},"QuantumAnalysisResult":{"properties":{"is_vulnerable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Vulnerable"},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons"}},"type":"object","title":"QuantumAnalysisResult","description":"Embedded quantum vulnerability result for inspect and contract responses."},"RecentAlertItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"severity":{"type":"string","title":"Severity"},"contract_label":{"type":"string","title":"Contract Label"},"contract_id":{"type":"string","format":"uuid","title":"Contract Id"},"rule_name":{"type":"string","title":"Rule Name"},"triggered_at":{"type":"string","format":"date-time","title":"Triggered At"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"delivered_status":{"type":"string","title":"Delivered Status"},"channel_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Type"}},"type":"object","required":["id","severity","contract_label","contract_id","rule_name","triggered_at","value","delivered_status","channel_type"],"title":"RecentAlertItem"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","maxLength":256,"minLength":32,"title":"Token"},"new_password":{"type":"string","maxLength":128,"minLength":8,"title":"New Password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordRequest"},"SelectedTarget":{"properties":{"target_type":{"type":"string","title":"Target Type"},"config_json":{"additionalProperties":true,"type":"object","title":"Config Json"}},"type":"object","required":["target_type"],"title":"SelectedTarget"},"SignupApprovalPreview":{"properties":{"applicant_email":{"type":"string","title":"Applicant Email"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"status":{"type":"string","title":"Status"}},"type":"object","required":["applicant_email","created_at","status"],"title":"SignupApprovalPreview"},"SignupRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"}},"type":"object","required":["email","password"],"title":"SignupRequest"},"SimulateRequest":{"properties":{"from_address":{"type":"string","title":"From Address","description":"Sender address (0x...)"},"data":{"type":"string","title":"Data","description":"Hex-encoded calldata (0x...)"},"value":{"type":"string","title":"Value","description":"ETH value in hex (0x...)","default":"0x0"},"gas_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gas Limit","description":"Optional gas limit override"}},"type":"object","required":["from_address","data"],"title":"SimulateRequest"},"SimulateResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"revert_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revert Reason"},"gas_used":{"type":"integer","title":"Gas Used"},"state_changes":{"items":{"$ref":"#/components/schemas/StateChangeSchema"},"type":"array","title":"State Changes"},"logs":{"items":{"$ref":"#/components/schemas/SimulatedLogSchema"},"type":"array","title":"Logs"},"alert_rule_matches":{"items":{"type":"string"},"type":"array","title":"Alert Rule Matches"},"simulation_provider":{"type":"string","title":"Simulation Provider"},"upgrade_required":{"type":"boolean","title":"Upgrade Required","default":false}},"type":"object","required":["success","revert_reason","gas_used","state_changes","logs","alert_rule_matches","simulation_provider"],"title":"SimulateResponse"},"SimulatedLogSchema":{"properties":{"address":{"type":"string","title":"Address"},"topics":{"items":{"type":"string"},"type":"array","title":"Topics"},"data":{"type":"string","title":"Data"},"decoded_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decoded Name"}},"type":"object","required":["address","topics","data","decoded_name"],"title":"SimulatedLogSchema"},"SparklinePoint":{"properties":{"t":{"type":"string","format":"date-time","title":"T"},"v":{"type":"number","title":"V"}},"type":"object","required":["t","v"],"title":"SparklinePoint"},"StateChangeSchema":{"properties":{"address":{"type":"string","title":"Address"},"storage_slot":{"type":"string","title":"Storage Slot"},"value_before":{"type":"string","title":"Value Before"},"value_after":{"type":"string","title":"Value After"}},"type":"object","required":["address","storage_slot","value_before","value_after"],"title":"StateChangeSchema"},"StatusResponse":{"properties":{"overall":{"type":"string","enum":["operational","degraded","down"],"title":"Overall"},"components":{"items":{"$ref":"#/components/schemas/ComponentStatus"},"type":"array","title":"Components"},"checked_at":{"type":"string","title":"Checked At"}},"type":"object","required":["overall","components","checked_at"],"title":"StatusResponse"},"SubscriptionSummary":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"current_period_end":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current Period End"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End","default":false}},"type":"object","title":"SubscriptionSummary"},"SuggestedAlertRule":{"properties":{"name":{"type":"string","title":"Name"},"target_type":{"type":"string","title":"Target Type"},"event_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Name"},"severity":{"type":"string","title":"Severity","default":"warning"},"threshold":{"type":"number","title":"Threshold","default":1.0},"window_seconds":{"type":"integer","title":"Window Seconds","default":300},"reason":{"type":"string","title":"Reason","default":""}},"type":"object","required":["name","target_type"],"title":"SuggestedAlertRule"},"TargetType":{"type":"string","enum":["event_frequency","tx_rate","revert_rate","function_call_rate","latency_proxy","oracle_price_deviation","oracle_staleness","anomaly_detection","agent_response_drift","agent_latency_spike","agent_signature_invalid","agent_endpoint_down","agent_model_swap_suspected","value_transfer","proxy_implementation_change","proxy_admin_change","bridge_dvn_change"],"title":"TargetType"},"ThemeUpdate":{"properties":{"theme":{"type":"string","enum":["light","dark","system"],"title":"Theme"}},"type":"object","required":["theme"],"title":"ThemeUpdate"},"TimeBucket":{"properties":{"timestamp":{"type":"string","title":"Timestamp"},"total":{"type":"integer","title":"Total","default":0},"info":{"type":"integer","title":"Info","default":0},"warning":{"type":"integer","title":"Warning","default":0},"critical":{"type":"integer","title":"Critical","default":0}},"type":"object","required":["timestamp"],"title":"TimeBucket"},"TimelineBucket":{"properties":{"timestamp":{"type":"string","title":"Timestamp"},"count":{"type":"integer","title":"Count"},"critical":{"type":"integer","title":"Critical"},"warning":{"type":"integer","title":"Warning"},"info":{"type":"integer","title":"Info"}},"type":"object","required":["timestamp","count","critical","warning","info"],"title":"TimelineBucket"},"TimelineEventResponse":{"properties":{"sequence":{"type":"integer","title":"Sequence"},"tx_hash":{"type":"string","title":"Tx Hash"},"block_number":{"type":"integer","title":"Block Number"},"from_addr":{"type":"string","title":"From Addr"},"to_addr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Addr"},"value_wei":{"type":"integer","title":"Value Wei"},"input_data":{"type":"string","title":"Input Data"},"label":{"type":"string","title":"Label"},"relation":{"type":"string","title":"Relation"}},"type":"object","required":["sequence","tx_hash","block_number","from_addr","to_addr","value_wei","input_data","label","relation"],"title":"TimelineEventResponse"},"UsageInfo":{"properties":{"tier":{"type":"string","title":"Tier"},"contracts_used":{"type":"integer","title":"Contracts Used"},"contracts_limit":{"type":"integer","title":"Contracts Limit"},"alerts_used":{"type":"integer","title":"Alerts Used"},"alerts_limit":{"type":"integer","title":"Alerts Limit"}},"type":"object","required":["tier","contracts_used","contracts_limit","alerts_used","alerts_limit"],"title":"UsageInfo"},"UserResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"active_org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Active Org Id"},"is_admin":{"type":"boolean","title":"Is Admin","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"theme":{"type":"string","title":"Theme","default":"system"},"impersonated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Impersonated By"},"email_verified":{"type":"boolean","title":"Email Verified","default":false},"hide_subscription_management":{"type":"boolean","title":"Hide Subscription Management","default":false},"account_status":{"type":"string","title":"Account Status","default":"active"},"features":{"anyOf":[{"additionalProperties":{"type":"boolean"},"type":"object"},{"type":"null"}],"title":"Features"}},"type":"object","required":["id","email","created_at"],"title":"UserResponse","description":"The user's identity. Tier/subscription state now live on the active\nOrganization \u2014 fetch them via /orgs or /billing/subscription."},"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"},"WalletDiscoveryCreate":{"properties":{"wallet_address":{"type":"string","title":"Wallet Address","description":"EVM wallet address \u2014 0x-prefixed, 20 bytes"},"chain_ids":{"items":{"type":"integer"},"type":"array","minItems":1,"title":"Chain Ids","description":"Chains to scan"}},"type":"object","required":["wallet_address","chain_ids"],"title":"WalletDiscoveryCreate"},"WalletDiscoveryImport":{"properties":{"addresses":{"items":{"$ref":"#/components/schemas/ImportContractItem"},"type":"array","maxItems":100,"minItems":1,"title":"Addresses"}},"type":"object","required":["addresses"],"title":"WalletDiscoveryImport"},"WalletDiscoveryImportResponse":{"properties":{"imported":{"type":"integer","title":"Imported"},"skipped":{"type":"integer","title":"Skipped"},"failed":{"type":"integer","title":"Failed"},"contracts":{"items":{"$ref":"#/components/schemas/ImportedContractInfo"},"type":"array","title":"Contracts"},"errors":{"items":{"$ref":"#/components/schemas/ImportErrorItem"},"type":"array","title":"Errors"}},"type":"object","required":["imported","skipped","failed"],"title":"WalletDiscoveryImportResponse"},"WalletDiscoveryResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"wallet_address":{"type":"string","title":"Wallet Address"},"chain_ids":{"items":{"type":"integer"},"type":"array","title":"Chain Ids"},"status":{"type":"string","title":"Status"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"results":{"items":{"$ref":"#/components/schemas/DiscoveredContract"},"type":"array","title":"Results"},"summary":{"anyOf":[{"$ref":"#/components/schemas/WalletDiscoverySummary"},{"type":"null"}]},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","wallet_address","chain_ids","status","created_at"],"title":"WalletDiscoveryResponse"},"WalletDiscoverySummary":{"properties":{"total_discovered":{"type":"integer","title":"Total Discovered","default":0},"deployed":{"type":"integer","title":"Deployed","default":0},"interacted":{"type":"integer","title":"Interacted","default":0},"approved":{"type":"integer","title":"Approved","default":0},"token":{"type":"integer","title":"Token","default":0},"referencing":{"type":"integer","title":"Referencing","default":0},"already_monitored":{"type":"integer","title":"Already Monitored","default":0},"incomplete":{"type":"boolean","title":"Incomplete","default":false},"incomplete_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Incomplete Reason"}},"type":"object","title":"WalletDiscoverySummary"}}}}