{"openapi":"3.1.0","info":{"title":"RoboSystems API","description":"The REST and GraphQL API for [RoboSystems](https://robosystems.ai) — an open-source, AI-native platform for accounting, financial reporting and investment management. It powers [RoboLedger](https://roboledger.ai) and [RoboInvestor](https://roboinvestor.ai).\n\n## Two surfaces\n\n**Platform** — `/v1/…` — graphs, queries, schema, documents, search, memory, connections, billing and access. Reads are REST `GET`s; every write is a named operation at `/operations/{name}` returning an `OperationEnvelope`, accepting an `Idempotency-Key`, and streaming progress at `/v1/operations/{id}/stream`.\n→ [API reference](https://robosystems.ai/docs/api)\n\n**Extensions** — `/extensions/…` — RoboLedger and RoboInvestor, scoped by `graph_id` in the URL. Reads are GraphQL at `POST /extensions/{graph_id}/graphql` and change nothing; writes are named operations at `/extensions/{domain}/{graph_id}/operations/{name}`; analytical views read the materialized graph.\n→ [Extensions reference](https://robosystems.ai/docs/extensions) · [every GraphQL query](https://robosystems.ai/docs/extensions/graphql)\n\n## Authenticating\n\n`X-API-Key: rfs…` on REST, GraphQL and per-graph MCP. Browser sessions use JWTs from `POST /v1/auth/login`. The graph-agnostic MCP endpoint `/v1/mcp` takes OAuth 2.1 bearer tokens only.\n\n## Connecting an AI client\n\nEvery graph is an MCP server at `POST /v1/graphs/{graph_id}/mcp`, and `POST /v1/mcp` serves OAuth clients that pick their graph at consent.\n→ [MCP guide](https://robosystems.ai/docs/technical/ai-operators-and-mcp)\n\n## Clients\n\n[`robosystems-client`](https://pypi.org/project/robosystems-client/) for Python, [`@robosystems/client`](https://www.npmjs.com/package/@robosystems/client) for TypeScript.\n→ [Guides](https://robosystems.ai/docs/guides) · [Technical docs](https://robosystems.ai/docs/technical)\n","version":"1.16.14"},"paths":{"/v1/auth/register":{"post":{"tags":["Auth"],"summary":"Register New User","description":"Creates the user and a personal organization. CAPTCHA required in production. Sends verification email when email verification is enabled.","operationId":"registerUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Email already registered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Registration temporarily disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/login":{"post":{"tags":["Auth"],"summary":"User Login","description":"Returns a JWT token on success. IP-based progressive delays apply after repeated failures.","operationId":"loginUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/logout":{"post":{"tags":["Auth"],"summary":"User Logout","operationId":"logoutUser","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Logoutuser"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/me":{"get":{"tags":["Auth"],"summary":"Get Current User","operationId":"getCurrentAuthUser","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Getcurrentauthuser"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/refresh":{"post":{"tags":["Auth"],"summary":"Refresh Session","description":"Revokes the current token and issues a new one. Accepts recently-expired tokens within the grace period.","operationId":"refreshAuthSession","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/email/resend":{"post":{"tags":["Auth"],"summary":"Resend Email Verification","description":"Resend verification email to the authenticated user. Rate limited to 3 per hour.","operationId":"resendVerificationEmail","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Resendverificationemail"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Email service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/email/verify":{"post":{"tags":["Auth"],"summary":"Verify Email","description":"Verify email address with token from email link. Returns JWT for auto-login.","operationId":"verifyEmail","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailVerificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/invitations/{token}":{"get":{"tags":["Auth"],"summary":"Preview Invitation","description":"Look up a pending org invitation by its token so the registration page can show what is being joined. Returns 404 for unknown, expired, revoked, or accepted tokens.","operationId":"getInvitationPreview","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationPreviewResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/password/policy":{"get":{"tags":["Auth"],"summary":"Get Password Policy","operationId":"getPasswordPolicy","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordPolicyResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/password/check":{"post":{"tags":["Auth"],"summary":"Check Password Strength","operationId":"checkPasswordStrength","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordCheckResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/password/forgot":{"post":{"tags":["Auth"],"summary":"Forgot Password","description":"Request password reset email. Always returns success to prevent email enumeration.","operationId":"forgotPassword","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 Forgotpassword"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/password/reset/validate":{"get":{"tags":["Auth"],"summary":"Validate Reset Token","description":"Check if a password reset token is valid without consuming it. Returns masked email on success.","operationId":"validateResetToken","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","description":"Password reset token","title":"Token"},"description":"Password reset token"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordValidateResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/password/reset":{"post":{"tags":["Auth"],"summary":"Reset Password","description":"Reset password with token from email. Invalidates all existing sessions. Returns JWT for auto-login.","operationId":"resetPassword","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/sso-token":{"post":{"tags":["Auth: SSO"],"summary":"Generate SSO Token","description":"Step 1 of 3 in the cross-app SSO flow. Issues a single-use token (5 minute TTL) for handoff to a target application.","operationId":"generateSSOToken","parameters":[{"name":"auth-token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SSOTokenResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/sso-exchange":{"post":{"tags":["Auth: SSO"],"summary":"SSO Token Exchange","description":"Step 2 of 3. Exchanges the SSO token for a short-lived session ID. Avoids passing tokens in redirect URLs.","operationId":"ssoTokenExchange","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SSOExchangeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SSOExchangeResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/sso-complete":{"post":{"tags":["Auth: SSO"],"summary":"Complete SSO Authentication","description":"Step 3 of 3. Exchanges the session ID for a full JWT token. Called by the target app after redirect.","operationId":"completeSSOAuth","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SSOCompleteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/passkeys/register/options":{"post":{"tags":["Auth: Passkeys"],"summary":"Passkey Registration Options","description":"Begin a passkey enrollment ceremony. The settings lane requires a fresh re-auth proof (password or assertion); the forced lane presents its enrollment token.","operationId":"getPasskeyRegistrationOptions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyRegisterOptionsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CeremonyOptionsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/passkeys/register/verify":{"post":{"tags":["Auth: Passkeys"],"summary":"Passkey Registration Verify","description":"Finish enrollment. The first passkey returns recovery codes (once); the forced-enrollment lane also completes the login.","operationId":"verifyPasskeyRegistration","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyRegisterVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyRegisterVerifyResponse"}}}},"400":{"description":"Registration failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/passkeys":{"get":{"tags":["Auth: Passkeys"],"summary":"List Passkeys","description":"The authenticated user's enrolled passkeys.","operationId":"listUserPasskeys","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/auth/passkeys/reauth/options":{"post":{"tags":["Auth: Passkeys"],"summary":"Re-authentication Options","description":"Fresh-assertion options for destructive passkey lifecycle actions.","operationId":"getPasskeyReauthOptions","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CeremonyOptionsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/passkeys/{passkey_id}":{"delete":{"tags":["Auth: Passkeys"],"summary":"Remove Passkey","description":"Remove one passkey after re-authentication (password or fresh assertion). The last passkey of an MFA-required role cannot be removed while enforcement is active.","operationId":"deleteUserPasskey","parameters":[{"name":"passkey_id","in":"path","required":true,"schema":{"type":"string","title":"Passkey Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyDeleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Re-authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Last passkey of an MFA-required role","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/passkeys/login/options":{"post":{"tags":["Auth: Passkeys"],"summary":"Passwordless Login Options","description":"Usernameless assertion options for passwordless (passkey) login.","operationId":"getPasskeyLoginOptions","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CeremonyOptionsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/passkeys/login/verify":{"post":{"tags":["Auth: Passkeys"],"summary":"Passwordless Login Verify","description":"Complete a passwordless login. A user-verified passkey assertion is two factors in one gesture.","operationId":"verifyPasskeyLogin","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyLoginVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Verification failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/mfa/options":{"post":{"tags":["Auth: MFA"],"summary":"MFA Assertion Options","description":"Exchange an mfa_required login token for passkey assertion options.","operationId":"getMfaOptions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaOptionsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CeremonyOptionsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid or expired MFA token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/mfa/verify":{"post":{"tags":["Auth: MFA"],"summary":"MFA Verify","description":"Complete the second factor with a passkey assertion or a recovery code.","operationId":"verifyMfa","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Verification failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/mfa/status":{"get":{"tags":["Auth: MFA"],"summary":"MFA Status","description":"The authenticated user's MFA posture for account settings.","operationId":"getMfaStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaStatusResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/auth/mfa/recovery-codes/regenerate":{"post":{"tags":["Auth: MFA"],"summary":"Regenerate Recovery Codes","description":"Replace the recovery-code set after re-authentication; codes are shown once.","operationId":"regenerateMfaRecoveryCodes","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecoveryCodesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecoveryCodesResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Re-authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/captcha/config":{"get":{"tags":["Auth"],"summary":"Get CAPTCHA Configuration","description":"Returns site key and whether CAPTCHA is required. Site key is null when CAPTCHA is disabled.","operationId":"getCaptchaConfig","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/providers":{"get":{"tags":["Auth"],"summary":"Get Auth Providers","description":"Returns which authentication methods this deployment offers. The login surface renders its posture from this instead of hardcoding methods.","operationId":"getAuthProviders","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthProvidersResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/status":{"get":{"tags":["Status"],"summary":"Health Check","description":"Unprotected — used by load balancers and monitoring. No authentication required.","operationId":"getServiceStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}},"/v1/user":{"get":{"tags":["User"],"summary":"Get Current User","operationId":"getCurrentUser","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"APIKeyHeader":[]},{"BearerAuth":[]}]},"put":{"tags":["User"],"summary":"Update User Profile","operationId":"updateUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Email already in use","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]},{"BearerAuth":[]}]}},"/v1/user/password":{"put":{"tags":["User"],"summary":"Update Password","description":"Requires current password verification. Not available for SSO-only accounts.","operationId":"updateUserPassword","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]},{"BearerAuth":[]}]}},"/v1/user/selected-graph":{"put":{"tags":["User"],"summary":"Set Selected Graph","description":"Remembers the graph as the caller's current one: `GET /v1/graphs` then reports it as `selectedGraphId`, and the apps open on it. One graph per user, replacing the previous selection. Only a graph the caller belongs to can be selected; shared repositories cannot be.","operationId":"setSelectedGraph","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSelectedGraphRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]},{"BearerAuth":[]}]}},"/v1/user/api-keys":{"get":{"tags":["User"],"summary":"List API Keys","description":"Lists active keys only. Revoked keys are omitted — revocation is permanent, so a revoked key never returns to this list.","operationId":"listUserAPIKeys","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeysResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"APIKeyHeader":[]},{"BearerAuth":[]}]},"post":{"tags":["User"],"summary":"Create API Key","description":"The raw key value is only returned once at creation time and cannot be retrieved again.","operationId":"createUserAPIKey","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAPIKeyRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAPIKeyResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]},{"BearerAuth":[]}]}},"/v1/user/api-keys/{api_key_id}":{"put":{"tags":["User"],"summary":"Update API Key","operationId":"updateUserAPIKey","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"string","title":"Api Key Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAPIKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyInfo"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["User"],"summary":"Revoke API Key","description":"Deactivates the key immediately. Requests using the revoked key will fail with 401.","operationId":"revokeUserAPIKey","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"string","title":"Api Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/user/oauth/grants":{"get":{"tags":["User"],"summary":"List Connected Apps","description":"Every MCP client the user has authorized through OAuth, with the one graph each connection reaches. Active grants only: a revoked grant cannot be reinstated, so it leaves the list.","operationId":"listUserOAuthGrants","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthGrantsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"APIKeyHeader":[]},{"BearerAuth":[]}]}},"/v1/user/oauth/grants/{grant_id}":{"delete":{"tags":["User"],"summary":"Revoke Connected App","description":"Revokes the grant and every access and refresh token minted from it. The client's next request fails with 401 and it must ask the user to authorize again. Revoking an already revoked grant succeeds and changes nothing.","operationId":"revokeUserOAuthGrant","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orgs":{"get":{"tags":["Org"],"summary":"List User's Organizations","operationId":"listUserOrgs","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"APIKeyHeader":[]},{"BearerAuth":[]}]}},"/v1/orgs/{org_id}":{"get":{"tags":["Org"],"summary":"Get Organization","operationId":"getOrg","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDetailResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Org"],"summary":"Update Organization","description":"Requires admin or owner role. Only owners can change the org type.","operationId":"updateOrg","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDetailResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orgs/{org_id}/graphs":{"get":{"tags":["Org"],"summary":"List Organization Graphs","operationId":"listOrgGraphs","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Listorggraphs"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orgs/{org_id}/members":{"get":{"tags":["Org Members"],"summary":"List Organization Members","operationId":"listOrgMembers","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgMemberListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orgs/{org_id}/members/{user_id}":{"put":{"tags":["Org Members"],"summary":"Update Member Role","description":"Requires admin or owner role. Owner promotion/demotion requires a dedicated ownership transfer workflow.","operationId":"updateOrgMemberRole","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemberRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgMemberResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Org Members"],"summary":"Remove Member","description":"Requires admin or owner role. Members may remove themselves.","operationId":"removeOrgMember","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orgs/{org_id}/invitations":{"post":{"tags":["Org Members"],"summary":"Invite Member","description":"Invite a new user to the organization by email. Disabled by default (ORG_MEMBER_INVITATIONS_ENABLED=false); returns 501 when disabled. Requires admin or owner role. Only emails without an existing account can be invited.","operationId":"createOrgInvitation","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvitationRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgInvitationResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Email already registered or invited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Feature not enabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Org Members"],"summary":"List Pending Invitations","description":"Requires admin or owner role.","operationId":"listOrgInvitations","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgInvitationListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orgs/{org_id}/invitations/{invitation_id}":{"delete":{"tags":["Org Members"],"summary":"Revoke Invitation","description":"Requires admin or owner role. Only pending invitations can be revoked.","operationId":"revokeOrgInvitation","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","title":"Invitation Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orgs/{org_id}/invitations/{invitation_id}/resend":{"post":{"tags":["Org Members"],"summary":"Resend Invitation","description":"Requires admin or owner role. Rotates the invitation token, extends its expiry, and re-sends the email.","operationId":"resendOrgInvitation","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","title":"Invitation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgInvitationResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Feature not enabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orgs/{org_id}/limits":{"get":{"tags":["Org Usage"],"summary":"Get Organization Limits","operationId":"getOrgLimits","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgLimitsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orgs/{org_id}/usage":{"get":{"tags":["Org Usage"],"summary":"Get Organization Usage","description":"Aggregated across all graphs in the org. Use the `days` query param to control the lookback window (default 30).","operationId":"getOrgUsage","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUsageResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/connections/options":{"get":{"tags":["Connections"],"summary":"List Connection Options","description":"Returns available providers and their requirements. Only enabled providers are included (gated by feature flags). QuickBooks and Mercury require OAuth 2.0; Plaid authorizes through Plaid Link (auth_type `link`); external connections require no auth.","operationId":"getConnectionOptions","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionOptionsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/connections":{"get":{"tags":["Connections"],"summary":"List Connections","operationId":"listConnections","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by entity ID","title":"Entity Id"},"description":"Filter by entity ID"},{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"enum":["quickbooks","external","mercury","plaid"],"type":"string"},{"type":"null"}],"description":"Filter by provider type","title":"Provider"},"description":"Filter by provider type"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConnectionResponse"},"title":"Response Listconnections"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Connections"],"summary":"Create Connection","description":"QuickBooks and Mercury: returns a pending connection — complete the OAuth flow to activate (Mercury may instead connect at once with a personal API token where the deployment allows it). External: registers a source namespace for an integration that writes through the public API. One connection allowed per provider per graph, except 'external' which allows one per source_name and 'plaid' which allows one per bank login (a connection still waiting on Link is returned instead of a second). Plaid: returns a pending connection — `POST /oauth/init` returns a `link_token` for Plaid Link. A bank feed (Mercury, Plaid) names the entity its accounts book to (`entity_id`, the group parent when omitted) and is refused (409) when that entity has no chart of accounts or is the one QuickBooks keeps; QuickBooks is refused (409) when the group parent's books are already native.","operationId":"createConnection","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConnectionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Connection already exists for this provider"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/connections/oauth/init":{"post":{"tags":["Connections"],"summary":"Initialize OAuth Flow","operationId":"initOAuth","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthInitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthInitResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/connections/oauth/callback/{provider}":{"post":{"tags":["Connections"],"summary":"OAuth Callback","description":"Completes the OAuth authorization flow after provider redirect. Exchanges the authorization code for tokens, stores them, and triggers an initial sync. This is a redirect target — not typically called directly. Plaid: pass Link's public_token as `code`; a bank already connected to the graph is refused (409 DUPLICATE_BANK_CONNECTION).","operationId":"oauthCallback","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","description":"OAuth provider name","title":"Provider"},"description":"OAuth provider name"},{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthCallbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthCallbackResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/connections/{connection_id}":{"get":{"tags":["Connections"],"summary":"Get Connection","operationId":"getConnection","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","description":"Unique connection identifier","title":"Connection Id"},"description":"Unique connection identifier"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Connections"],"summary":"Delete Connection","description":"Removes the connection and revokes credentials. Imported data is preserved in the graph. Requires admin role. `disposition=sever` (QuickBooks only) is the cutover to native books: the chart QuickBooks created becomes the tenant's own and QuickBooks can never resume over it; the default `disconnect` keeps the connection reconnectable.","operationId":"deleteConnection","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","description":"Connection identifier","title":"Connection Id"},"description":"Connection identifier"},{"name":"disposition","in":"query","required":false,"schema":{"enum":["disconnect","sever"],"type":"string","description":"`disconnect` (default): soft-delete; a later re-OAuth to the same realm revives the connection. `sever`: the native-accounting cutover — QuickBooks only; the chart it created is stamped native-owned, write_policy drops to native, and the connection is never revived.","default":"disconnect","title":"Disposition"},"description":"`disconnect` (default): soft-delete; a later re-OAuth to the same realm revives the connection. `sever`: the native-accounting cutover — QuickBooks only; the chart it created is stamped native-owned, write_policy drops to native, and the connection is never revived."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/connections/{connection_id}/sync":{"post":{"tags":["Connections"],"summary":"Sync Connection","description":"QuickBooks: fetches transactions, balances, and chart of accounts. Mercury: pulls the bank feed (a 60-day window by default, or from `since_date` / the full backfill on `full_rebuild`) and captures it into the inbox. Plaid: continues from the Item's stored cursor (added, modified and removed transactions), or replays its history on `full_rebuild` / `since_date`. For all three the envelope is `pending` with the run's `task_id`, and completion is reflected in the connection's `last_sync` timestamp and `last_sync_result`. External connections are push-based and have nothing to pull; the envelope is `completed` with a null `task_id` and a message saying so — there is nothing to poll. Returns an `OperationEnvelope`; supports `Idempotency-Key`.","operationId":"syncConnection","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","description":"Connection identifier","title":"Connection Id"},"description":"Connection identifier"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncConnectionRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Sync request timed out"}}}},"/v1/graphs/{graph_id}/connections/{connection_id}/write-policy":{"put":{"tags":["Connections"],"summary":"Set Connection Write Policy","description":"Choose how a live connection and RoboSystems share the books. 'qb_authoritative', the default, makes QuickBooks the book of record: RoboSystems-originated entries (manual JEs, schedule drafts) publish to QuickBooks when executed or at close. 'shadow' keeps QuickBooks the book of record and writes nothing to it: the close posts nothing locally either, its drafts become shadowed expectations compared with what QuickBooks holds, and its gates are recorded as findings. 'native' is not a choice here: it is what disconnecting or severing leaves, books kept in RoboSystems with no connection to write to. This is the explicit operator opt-in for writing to your books of record.","operationId":"setConnectionWritePolicy","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","description":"Unique connection identifier","title":"Connection Id"},"description":"Unique connection identifier"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetWritePolicyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/operator":{"get":{"tags":["Operator"],"summary":"List Available Operators","description":"Filter by capability using the `capability` query param (e.g., `financial_analysis`, `rag_search`).","operationId":"listOperators","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"capability","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by capability (e.g., 'financial_analysis', 'rag_search')","title":"Capability"},"description":"Filter by capability (e.g., 'financial_analysis', 'rag_search')"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Operator"],"summary":"Auto-select Operator for Query","description":"Routes to the best operator for your query. Operators: `analyst` (answers natural-language questions over the graph — curated financial reads, documents, memory, and read-only Cypher; supports `quick`, `standard`, `extended`; `cypher` is accepted as its former name) and `mapping` (autonomous Chart of Accounts → rs-gaap mapping; roboledger graphs only, `extended` only). `GET /v1/graphs/{graph_id}/operator` lists what is registered. Credits are consumed by actual token usage, not a fixed price per mode. The run executes on the background worker: the default answer is 202 with the operation's `_links` (stream, status, cancel); `?mode=sync` waits up to 50s and answers 200 with the result.","operationId":"autoSelectOperator","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"mode","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseMode"},{"type":"null"}],"description":"`sync` waits up to 50s for the answer and returns 200 with it (202 with the operation links if the worker is still busy). Anything else — `async`, `stream`, `auto` or unset — queues the run and returns 202; follow `_links.stream` for progress and the result.","title":"Mode"},"description":"`sync` waits up to 50s for the answer and returns 200 with it (202 with the operation links if the worker is still busy). Anything else — `async`, `stream`, `auto` or unset — queues the run and returns 202; follow `_links.stream` for progress and the result."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"202":{"description":"Run queued on the worker — follow `_links.stream`"},"402":{"description":"Insufficient credits"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/operator/{operator_type}":{"get":{"tags":["Operator"],"summary":"Get Operator Metadata","operationId":"getOperatorMetadata","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"operator_type","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_]{2,32}$","description":"Operator type identifier (e.g., 'analyst', 'mapping')","title":"Operator Type"},"description":"Operator type identifier (e.g., 'analyst', 'mapping')"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorMetadataResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Operator"],"summary":"Execute Specific Operator","description":"Available: `analyst` (natural-language questions over the graph — curated financial reads, documents, memory, and read-only Cypher; RAG retrieval is one of its capabilities, not a separate operator; `cypher` is accepted as its former name) and `mapping` (Chart of Accounts → rs-gaap mapping, roboledger graphs only). `GET /v1/graphs/{graph_id}/operator` lists what is registered. The run executes on the background worker: the default answer is 202 with the operation's `_links` (stream, status, cancel); `?mode=sync` waits up to 50s and answers 200 with the result.","operationId":"executeSpecificOperator","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"operator_type","in":"path","required":true,"schema":{"type":"string","title":"Operator Type"}},{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"mode","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseMode"},{"type":"null"}],"description":"`sync` waits up to 50s for the answer and returns 200 with it (202 with the operation links if the worker is still busy). Anything else — `async`, `stream`, `auto` or unset — queues the run and returns 202; follow `_links.stream` for progress and the result.","title":"Mode"},"description":"`sync` waits up to 50s for the answer and returns 200 with it (202 with the operation links if the worker is still busy). Anything else — `async`, `stream`, `auto` or unset — queues the run and returns 202; follow `_links.stream` for progress and the result."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"202":{"description":"Run queued on the worker — follow `_links.stream`"},"402":{"description":"Insufficient credits"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/backups":{"get":{"tags":["Backup"],"summary":"List graph database backups","operationId":"listBackups","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of backups to return","default":50,"title":"Limit"},"description":"Maximum number of backups to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of backups to skip","default":0,"title":"Offset"},"description":"Number of backups to skip"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/backups/{backup_id}/download":{"get":{"tags":["Backup"],"summary":"Get temporary download URL for backup","description":"Generate a temporary download URL for a backup. The filename carries the extension listed as `download_extension` on the backup: `.lbug.zip` is a ZIP holding the LadybugDB database file `{graph_id}.lbug`; `.lbug.zst` (shared repository snapshots) is a single zstd-compressed database file; decompress it with `zstd -d`.","operationId":"getBackupDownloadUrl","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"backup_id","in":"path","required":true,"schema":{"type":"string","description":"Backup identifier","title":"Backup Id"},"description":"Backup identifier"},{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"expires_in","in":"query","required":false,"schema":{"type":"integer","maximum":86400,"minimum":300,"description":"URL expiration time in seconds","default":3600,"title":"Expires In"},"description":"URL expiration time in seconds"}],"responses":{"200":{"description":"Download URL generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupDownloadUrlResponse"}}}},"403":{"description":"Access denied — admin role on the graph, or an eligible repository subscription, is required"},"404":{"description":"Backup not found"},"500":{"description":"Failed to generate download URL"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/backups/stats":{"get":{"tags":["Backup"],"summary":"Get backup statistics","operationId":"getBackupStats","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupStatsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/metrics":{"get":{"tags":["Usage"],"summary":"Get Graph Metrics","operationId":"getGraphMetrics","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphMetricsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/usage":{"get":{"tags":["Usage"],"summary":"Get Graph Usage","description":"Time ranges: 24h, 7d, 30d, current_month, last_month. Toggle storage, credits, performance, and events sections via query params.","operationId":"getGraphUsage","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"time_range","in":"query","required":false,"schema":{"type":"string","pattern":"^(24h|7d|30d|current_month|last_month)$","description":"Time range: 24h, 7d, 30d, current_month, last_month","default":"30d","title":"Time Range"},"description":"Time range: 24h, 7d, 30d, current_month, last_month"},{"name":"include_storage","in":"query","required":false,"schema":{"type":"boolean","description":"Include storage usage summary","default":true,"title":"Include Storage"},"description":"Include storage usage summary"},{"name":"include_credits","in":"query","required":false,"schema":{"type":"boolean","description":"Include credit consumption summary","default":true,"title":"Include Credits"},"description":"Include credit consumption summary"},{"name":"include_performance","in":"query","required":false,"schema":{"type":"boolean","description":"Include performance insights (may be slower)","default":false,"title":"Include Performance"},"description":"Include performance insights (may be slower)"},{"name":"include_events","in":"query","required":false,"schema":{"type":"boolean","description":"Include recent usage events","default":false,"title":"Include Events"},"description":"Include recent usage events"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphUsageResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/query/cypher":{"post":{"tags":["Query"],"summary":"Execute Cypher Statement","description":"Cypher over the graph (LadybugDB). Main graphs are **read-only** — use the staging pipeline to ingest data. Subgraphs support full writes. Always use parameterized queries (`parameters: {\"key\": \"val\"}`) to prevent injection. Response modes: `auto` (default), `sync`, `async`, `stream`. Under load, queries are queued and emit an `operation_id` for SSE monitoring at `/v1/operations/{id}/stream`.","operationId":"executeCypher","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"mode","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseMode"},{"type":"null"}],"description":"Response mode override","title":"Mode"},"description":"Response mode override"},{"name":"chunk_size","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":10000,"minimum":10},{"type":"null"}],"description":"Rows per chunk for streaming","title":"Chunk Size"},"description":"Rows per chunk for streaming"},{"name":"test_mode","in":"query","required":false,"schema":{"type":"boolean","description":"Enable test mode for better debugging","default":false,"title":"Test Mode"},"description":"Enable test mode for better debugging"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CypherStatementRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"202":{"description":"Query queued — monitor via SSE at /v1/operations/{operation_id}/stream"},"408":{"description":"Query timeout"},"503":{"description":"Service unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/query/sql":{"post":{"tags":["Query"],"summary":"Execute SQL Statement","description":"SQL over the graph's columnar tables (DuckDB) — a relational lens on the same graph-centric data, often ahead of the materialized graph. Use `?` placeholders with the `parameters` array to prevent injection. Read-only (SELECT only), 30s timeout, 10,000 row limit. Not available on shared repositories.","operationId":"executeSql","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SqlStatementRequest","description":"SQL statement request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SqlStatementResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"408":{"description":"Query timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/schema":{"get":{"tags":["Schema"],"summary":"Get Runtime Graph Schema","description":"Runtime schema from actual graph data — node labels, relationship types, and up to 10 sample properties per node type. For the original schema definition or structured export formats, use `/schema/export`.","operationId":"getGraphSchema","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaInfoResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Schema operation timed out"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/schema/export":{"get":{"tags":["Schema"],"summary":"Export Declared Graph Schema","description":"Returns the original schema definition from graph creation, not the runtime state. Set `include_data_stats=true` to add live node/relationship counts. Use `/schema` to inspect what's actually in the database.","operationId":"exportGraphSchema","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(json|yaml|cypher)$","description":"Export format: json, yaml, or cypher","default":"json","title":"Format"},"description":"Export format: json, yaml, or cypher","examples":{"json":{"summary":"JSON Format","description":"Structured JSON format for programmatic access","value":"json"},"yaml":{"summary":"YAML Format","description":"Human-readable YAML format for documentation","value":"yaml"},"cypher":{"summary":"Cypher DDL","description":"Cypher CREATE statements for database migration","value":"cypher"}}},{"name":"include_data_stats","in":"query","required":false,"schema":{"type":"boolean","description":"Include statistics about actual data in the graph (node counts, relationship counts)","default":false,"title":"Include Data Stats"},"description":"Include statistics about actual data in the graph (node counts, relationship counts)","examples":{"without_stats":{"summary":"Schema Only","description":"Export schema definition without data statistics","value":false},"with_stats":{"summary":"Schema + Statistics","description":"Export schema with node and relationship counts","value":true}}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaExportResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/credits":{"get":{"tags":["Credits"],"summary":"Get Credit Summary","operationId":"getCreditSummary","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","description":"Graph database identifier","title":"Graph Id"},"description":"Graph database identifier"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditSummaryResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/credits/transactions":{"get":{"tags":["Credits"],"summary":"List Credit Transactions","operationId":"listCreditTransactions","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","description":"Graph database identifier","title":"Graph Id"},"description":"Graph database identifier"},{"name":"transaction_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by transaction type (allocation, consumption, bonus, refund)","examples":["consumption"],"title":"Transaction Type"},"description":"Filter by transaction type (allocation, consumption, bonus, refund)"},{"name":"operation_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by operation type (e.g., entity_lookup, cypher_query)","title":"Operation Type"},"description":"Filter by operation type (e.g., entity_lookup, cypher_query)"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start date for filtering (ISO format: YYYY-MM-DD)","title":"Start Date"},"description":"Start date for filtering (ISO format: YYYY-MM-DD)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End date for filtering (ISO format: YYYY-MM-DD)","title":"End Date"},"description":"End date for filtering (ISO format: YYYY-MM-DD)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Maximum number of transactions to return","default":100,"title":"Limit"},"description":"Maximum number of transactions to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of transactions to skip","default":0,"title":"Offset"},"description":"Number of transactions to skip"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedTransactionsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/health":{"get":{"tags":["Graph Health"],"summary":"Database Health Check","operationId":"getDatabaseHealth","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseHealthResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/info":{"get":{"tags":["Graph Info"],"summary":"Database Information","operationId":"getDatabaseInfo","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseInfoResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/limits":{"get":{"tags":["Graph Limits"],"summary":"Get Graph Operational Limits","description":"Limits vary by subscription tier (ladybug-standard, ladybug-large, ladybug-xlarge). Includes storage, query, backup, rate, credit, document, and instance usage limits.","operationId":"getGraphLimits","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphLimitsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/members":{"get":{"tags":["Graph Members"],"summary":"List Graph Members","description":"All users with access to the graph: explicit grants plus org owners/admins who hold implicit admin. Requires graph admin.","operationId":"listGraphMembers","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","description":"Graph identifier","title":"Graph Id"},"description":"Graph identifier"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphMemberListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Graph Members"],"summary":"Add Graph Member","description":"Grant a member of the graph's organization access at a chosen role. Requires graph admin.","operationId":"addGraphMember","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","description":"Graph identifier","title":"Graph Id"},"description":"Graph identifier"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddGraphMemberRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphMemberResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/members/{user_id}":{"put":{"tags":["Graph Members"],"summary":"Update Graph Member Role","description":"Change an explicit member's graph role. Requires graph admin. Implicit org owner/admin access is managed through org roles.","operationId":"updateGraphMemberRole","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","description":"Graph identifier","title":"Graph Id"},"description":"Graph identifier"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGraphMemberRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphMemberResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Graph Members"],"summary":"Remove Graph Member","description":"Revoke an explicit member's access to the graph. Requires graph admin.","operationId":"removeGraphMember","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","description":"Graph identifier","title":"Graph Id"},"description":"Graph identifier"}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/audit/mutations":{"get":{"tags":["Graph Audit"],"summary":"List Graph Mutations","description":"Every call that changed this graph, newest first: REST operations, external MCP clients, and in-app AI operator runs. Each entry names the operation, the outcome, who made it and with which credential, and the objects it touched. Arguments are not stored, only their SHA-256 fingerprint. Requires graph admin.","operationId":"listGraphMutations","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","description":"Graph identifier","title":"Graph Id"},"description":"Graph identifier"},{"name":"surface","in":"query","required":false,"schema":{"anyOf":[{"enum":["api","mcp","operator"],"type":"string"},{"type":"null"}],"description":"Only calls from this surface","title":"Surface"},"description":"Only calls from this surface"},{"name":"operation_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only this operation or MCP tool","title":"Operation Name"},"description":"Only this operation or MCP tool"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only calls made as this user","title":"User Id"},"description":"Only calls made as this user"},{"name":"operation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only calls from this REST operation or operator run","title":"Operation Id"},"description":"Only calls from this REST operation or operator run"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only calls at or after this time","title":"Since"},"description":"Only calls at or after this time"},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only calls before this time","title":"Until"},"description":"Only calls before this time"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page","title":"Cursor"},"description":"The `next_cursor` of the previous page"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Entries per page","default":50,"title":"Limit"},"description":"Entries per page"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationAuditListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/subgraphs":{"get":{"tags":["Subgraphs"],"summary":"List Subgraphs","operationId":"listSubgraphs","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSubgraphsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/subgraphs/{subgraph_name}":{"get":{"tags":["Subgraphs"],"summary":"Get Subgraph Details","description":"Pass the subgraph name (e.g., `dev`) not the full subgraph ID (e.g., `kg0123_dev`).","operationId":"getSubgraphInfo","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"subgraph_name","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9]{1,20}$","description":"Subgraph name (e.g., 'dev', 'staging')","title":"Subgraph Name"},"description":"Subgraph name (e.g., 'dev', 'staging')"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubgraphResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/subscriptions":{"get":{"tags":["Subscriptions"],"summary":"Get Graph Subscription","description":"Detects resource type automatically: user graphs (kg*) return the graph's subscription; shared repositories return the user's personal subscription to that repo.","operationId":"getGraphSubscription","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","description":"Graph ID or repository name","title":"Graph Id"},"description":"Graph ID or repository name"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphSubscriptionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Subscriptions"],"summary":"Create Repository Subscription","description":"For shared repositories only (sec, industry, etc.). User graph subscriptions are created automatically during provisioning. Subscribes the caller by default; org owners and admins may subscribe another member of their organization by passing `user_id`. Billing is charged to the organization either way — repository access is per-user, so the subscriber determines who receives access.","operationId":"createRepositorySubscription","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","description":"Repository name (e.g., 'sec', 'industry')","title":"Graph Id"},"description":"Repository name (e.g., 'sec', 'industry')"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRepositorySubscriptionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphSubscriptionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Payment required — add a payment method first"},"409":{"description":"Already subscribed to this repository"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Subscriptions"],"summary":"Change Subscription Plan","description":"For repositories: synchronous tier change. For user graphs: use `POST /v1/graphs/{graph_id}/operations/change-tier` instead — this endpoint rejects graph tier changes. Requires org owner role.","operationId":"changeSubscriptionPlan","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","description":"Graph ID or repository name","title":"Graph Id"},"description":"Graph ID or repository name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeSubscriptionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphSubscriptionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/subscriptions/cancel":{"post":{"tags":["Subscriptions"],"summary":"Cancel Repository Subscription","description":"Cancel a shared repository subscription. Two modes via the `immediate` flag: omit it (default `false`) to cancel at period end (access stays until the period closes); pass `true` with `confirm=<repo_id>` to stop access right away. Members cancel their own subscription; org owners and admins can cancel any member's by passing `user_id`. For user graphs, use `POST /v1/graphs/{graph_id}/operations/delete-graph` — this endpoint rejects user graphs.","operationId":"cancelRepositorySubscription","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","description":"Repository name (e.g., 'sec', 'industry')","title":"Graph Id"},"description":"Repository name (e.g., 'sec', 'industry')"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelSubscriptionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphSubscriptionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/tables":{"get":{"tags":["Tables"],"summary":"List Staging Tables","description":"Returns file count, storage size, row count, and S3 location per table. Tables with `file_count=0` are skipped during ingestion.","operationId":"listTables","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableListResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/search":{"post":{"tags":["Search"],"summary":"Search Graph Documents","description":"Shared repositories require a subscription; subscription plan determines search rate limits.","operationId":"searchDocuments","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Text search not available"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/search/{document_id}":{"get":{"tags":["Search"],"summary":"Get Document Section","operationId":"getDocumentSection","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSection"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Text search not available"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/documents":{"get":{"tags":["Documents"],"summary":"List Documents","operationId":"listDocuments","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"source_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/documents/{document_id}":{"get":{"tags":["Documents"],"summary":"Get Document","operationId":"getDocument","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDetailResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/documents/{document_id}/file":{"get":{"tags":["Documents"],"summary":"Download Document File","description":"A short-lived link to a document's stored file, such as the statement PDF behind a recorded balance.","operationId":"getDocumentFile","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentFileDownloadResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/memory":{"get":{"tags":["Memory"],"summary":"List Memories","operationId":"listMemories","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"memory_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by memory type","title":"Memory Type"},"description":"Filter by memory type"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source","title":"Source"},"description":"Filter by source"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/memory/{memory_id}":{"get":{"tags":["Memory"],"summary":"Get Memory","operationId":"getMemory","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryRecord"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/memory/recall":{"post":{"tags":["Memory"],"summary":"Recall Semantic Memory","description":"Ranked semantic recall over the graph's per-graph memory store. Returns scored hits in the same shape as document search.","operationId":"recallMemory","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryRecallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Semantic memory not available"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/operations/create-subgraph":{"post":{"tags":["Graph Operations"],"summary":"Create Subgraph","description":"Set `fork_parent=true` to clone parent graph data into the new subgraph (async, returns a pending `OperationEnvelope`). Without `fork_parent`, creates an empty subgraph synchronously.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"createSubgraph","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubgraphRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/graphs/{graph_id}/operations/delete-subgraph":{"post":{"tags":["Graph Operations"],"summary":"Delete Subgraph","description":"Set `backup_first=true` to create a safety backup before deletion. Requires admin role on the parent graph.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"deleteSubgraph","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSubgraphOp"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/graphs/{graph_id}/operations/delete-graph":{"post":{"tags":["Graph Operations"],"summary":"Delete Graph","description":"Permanently destroys a user graph and cancels its subscription. Two modes via the `at_period_end` body flag: omit it (or pass `false`) to tear down immediately (~10 min); pass `true` to keep the graph usable through the current billing period and tear it down at the period boundary via the existing suspend → deprovision pipeline. Requires `confirm` to equal the URL `graph_id`. Caller must be both org owner (billing authority) and admin on the graph (operational authority). Not allowed on shared repositories.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"deleteGraph","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteGraphOp"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/graphs/{graph_id}/operations/create-backup":{"post":{"tags":["Graph Operations"],"summary":"Create Backup","description":"Not allowed on shared repositories. Only `full_dump` format supported. Retention capped at tier maximum. Monitor progress via SSE at `/v1/operations/{operation_id}/stream`.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"createBackup","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupCreateRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/graphs/{graph_id}/operations/change-tier":{"post":{"tags":["Graph Operations"],"summary":"Change Tier","description":"Async EBS migration (3-5 min). Valid tiers: `ladybug-standard`, `ladybug-large`, `ladybug-xlarge`.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"changeTier","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeTierOp"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/graphs/{graph_id}/operations/update-graph-metadata":{"post":{"tags":["Graph Operations"],"summary":"Update Graph Metadata","description":"Edit the graph's platform-level label: display name, description, and tags. Partial — only supplied (non-null) fields change; pass `\"\"` to clear the description and `[]` to clear the tags. Requires admin on the graph. This is not the entity name that appears on financial statements — change that through the roboledger `update-entity` operation.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"updateGraphMetadata","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGraphMetadataOp"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_GraphMetadataResult_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/graphs/{graph_id}/operations/materialize":{"post":{"tags":["Graph Operations"],"summary":"Materialize Graph","description":"Rebuilds LadybugDB from staging tables (file uploads) or extensions OLTP data. Set `dry_run=true` to preview without changes.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"materialize","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterializeOp"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/graphs/{graph_id}/operations/remember":{"post":{"tags":["Content Operations"],"summary":"Store a Semantic Memory","description":"Store a semantic memory in the graph's per-graph memory store. The text is embedded locally; recall it later via `POST /memory/recall`.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"remember","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RememberOp"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/graphs/{graph_id}/operations/forget":{"post":{"tags":["Content Operations"],"summary":"Delete a Semantic Memory","description":"Delete a semantic memory by its server-generated id.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"forget","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgetOp"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/graphs/{graph_id}/operations/update-memory":{"post":{"tags":["Content Operations"],"summary":"Update a Semantic Memory","description":"Partially update a stored memory by its server-generated id. Only supplied fields change; the memory is re-embedded when `text` changes.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"updateMemory","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemoryOp"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/graphs/{graph_id}/operations/index-document":{"post":{"tags":["Content Operations"],"summary":"Index a Document","description":"Create a document (omit `document_id`) or update one (provide it). Stored in PostgreSQL, synced to OpenSearch for search.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"indexDocument","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexDocumentOp"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/graphs/{graph_id}/operations/delete-document":{"post":{"tags":["Content Operations"],"summary":"Delete a Document","description":"Delete a document from PostgreSQL and OpenSearch by id.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"deleteDocument","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDocumentOp"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/graphs/{graph_id}/operations/create-document-upload":{"post":{"tags":["Content Operations"],"summary":"Presign a Document File Upload","description":"Start uploading a document file: a PDF (a bank statement kept as evidence for a recorded balance, an invoice) or a PNG or JPEG photo (a receipt). Returns an upload id and a presigned URL: PUT the file there with the same Content-Type (and Content-Length, if declared), then call `complete-document-upload`, which creates the document. Nothing is recorded until then, and an upload never completed expires. A stored file is not indexed for search, does not count toward the plan's document limit, and never changes once stored.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"createDocumentUpload","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentUploadOp"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/graphs/{graph_id}/operations/complete-document-upload":{"post":{"tags":["Content Operations"],"summary":"Complete a Document File Upload","description":"Store an uploaded file as a document. The uploaded bytes are checked against the file's type and size cap and hashed (SHA-256); a file that fails the check is discarded. Completing the same upload again returns the document it created. Returns the document.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"completeDocumentUpload","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteDocumentUploadOp"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/graphs/{graph_id}/operations/create-file-upload":{"post":{"tags":["Content Operations"],"summary":"Presign a File Upload","description":"Presign an S3 URL for direct upload and register the file. After uploading to the returned URL, call `POST /operations/ingest-file` to stage it into DuckDB. The staging table is auto-created if missing. Not allowed on entity graphs or shared repositories.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"createFileUpload","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/graphs/{graph_id}/operations/ingest-file":{"post":{"tags":["Content Operations"],"summary":"Stage an Uploaded File","description":"Mark an uploaded file ready and stage it into DuckDB. Small files stage directly (sync); large files stage via a background job (returns a pending envelope with an `operation_id` to monitor). Set `ingest_to_graph` to auto-materialize into the graph after staging; that write takes the graph's materialize lock, so it returns 409 while another materialization of the graph is running.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"ingestFile","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestFileOp"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/graphs/{graph_id}/operations/delete-file":{"post":{"tags":["Content Operations"],"summary":"Delete a File","description":"Delete a file from S3 and PostgreSQL. `cascade=true` also removes its rows from DuckDB staging tables and marks the graph stale.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"deleteFile","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteFileOp"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/graphs/{graph_id}/files":{"get":{"tags":["Files"],"summary":"List Files in Graph","description":"Filter by `table_name` or upload `status`. Files are graph-scoped resources with S3 → DuckDB → Graph lifecycle tracking.","operationId":"listFiles","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"table_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by table name (optional)","title":"Table Name"},"description":"Filter by table name (optional)"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by upload status (optional)","title":"Status"},"description":"Filter by upload status (optional)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTableFilesResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/{graph_id}/files/{file_id}":{"get":{"tags":["Files"],"summary":"Get File Information","description":"Returns per-layer status (`layers.s3`, `layers.duckdb`, `layers.graph`) for pipeline debugging.","operationId":"getFile","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","description":"File ID","title":"File Id"},"description":"File ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFileInfoResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs":{"get":{"tags":["Graphs"],"summary":"List User Graphs and Repositories","operationId":"getGraphs","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGraphsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Graphs"],"summary":"Create New Graph Database","description":"Creates a graph asynchronously. Returns an `OperationEnvelope` with `operation_id` for SSE progress at `/v1/operations/{operation_id}/stream`. Entity graphs require `initial_entity`. Supports `Idempotency-Key` header.","operationId":"createGraph","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGraphRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Payment required — add a payment method or check org graph limit"}}}},"/v1/graphs/extensions":{"get":{"tags":["Graphs"],"summary":"Get Available Schema Extensions","operationId":"getAvailableExtensions","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailableExtensionsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"APIKeyHeader":[]},{"BearerAuth":[]}]}},"/v1/graphs/tiers":{"get":{"tags":["Graphs"],"summary":"Get Available Graph Tiers","operationId":"getAvailableGraphTiers","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"include_disabled","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Disabled"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailableGraphTiersResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graphs/capacity":{"get":{"tags":["Graphs"],"summary":"Get Graph Tier Capacity","description":"Status per tier: `ready` (slot available) or `at_capacity` (contact support).","operationId":"getGraphCapacity","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphCapacityResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"APIKeyHeader":[]},{"BearerAuth":[]}]}},"/v1/graphs/schema/validate":{"post":{"tags":["Graphs"],"summary":"Validate Schema","description":"Validates a custom schema definition before deployment — checks structure, types, constraints, and relationship references. Returns errors and warnings without applying changes. Supports JSON, YAML, and dict formats.","operationId":"validateSchema","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaValidationRequest","description":"Schema definition to validate"},"examples":{"valid_schema":{"summary":"Valid Schema with Relationships","description":"A complete valid schema with nodes and relationships","value":{"schema_definition":{"name":"financial_analysis","version":"1.0.0","description":"Schema for SEC financial data","nodes":[{"name":"Company","properties":[{"name":"cik","type":"STRING","is_primary_key":true},{"name":"name","type":"STRING","nullable":false},{"name":"ticker","type":"STRING"}]},{"name":"Filing","properties":[{"name":"accession_number","type":"STRING","is_primary_key":true},{"name":"form_type","type":"STRING"}]}],"relationships":[{"name":"FILED","from_node":"Company","to_node":"Filing"}]},"format":"json"}},"schema_with_warnings":{"summary":"Schema with Warnings","description":"Valid schema but with isolated nodes","value":{"schema_definition":{"name":"warehouse_schema","version":"1.0.0","nodes":[{"name":"Product","properties":[{"name":"sku","type":"STRING","is_primary_key":true}]},{"name":"Location","properties":[{"name":"id","type":"STRING","is_primary_key":true}]}],"relationships":[]},"format":"json"}},"invalid_schema":{"summary":"Invalid Schema","description":"Schema with validation errors (invalid type, missing node)","value":{"schema_definition":{"name":"invalid_example","version":"1.0.0","nodes":[{"name":"Company","properties":[{"name":"name","type":"INVALID_TYPE"}]}],"relationships":[{"name":"RELATES_TO","from_node":"Company","to_node":"NonExistentNode"}]},"format":"json"}},"yaml_format":{"summary":"YAML Format Schema","description":"Schema validation using YAML format","value":{"schema_definition":"name: inventory_schema\nversion: '1.0.0'\nnodes:\n  - name: Product\n    properties:\n      - name: sku\n        type: STRING\n        is_primary_key: true\n      - name: name\n        type: STRING\nrelationships:\n  - name: IN_CATEGORY\n    from_node: Product\n    to_node: Category","format":"yaml"}},"compatibility_check":{"summary":"Compatibility Check","description":"Validate schema and check compatibility with existing extensions","value":{"schema_definition":{"name":"custom_extension","version":"1.0.0","nodes":[{"name":"Transaction","properties":[{"name":"id","type":"STRING","is_primary_key":true},{"name":"amount","type":"DOUBLE"}]}]},"format":"json","check_compatibility":["roboledger"]}}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaValidationResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Schema fails validation rules"},"504":{"description":"Validation timed out"}},"security":[{"APIKeyHeader":[]},{"BearerAuth":[]}]}},"/v1/offering":{"get":{"tags":["Service Offerings"],"summary":"Get Service Offerings","description":"Returns all subscription tiers, shared repository plans, and AI credit costs. No authentication required.","operationId":"getServiceOfferings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceOfferingsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/operations/{operation_id}/stream":{"get":{"tags":["Operations"],"summary":"Stream Operation Events","description":"Server-Sent Events stream for real-time operation progress. Use `from_sequence` to replay missed events on reconnect. Max 5 concurrent SSE connections per user. Consumes no credits.","operationId":"streamOperationEvents","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"operation_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(op_[0-9A-Z]{26}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$","description":"Operation identifier from initial submission","title":"Operation Id"},"description":"Operation identifier from initial submission"},{"name":"from_sequence","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Replay stored events from this sequence number, then stream live ones. A running operation replays nothing at 0 (live events only); a settled one replays its history from here (0 = all) and closes.","default":0,"title":"From Sequence"},"description":"Replay stored events from this sequence number, then stream live ones. A running operation replays nothing at 0 (live events only); a settled one replays its history from here (0 = all) and closes."},{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JWT token for SSE authentication","title":"Token"},"description":"JWT token for SSE authentication"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"SSE stream — Content-Type: text/event-stream","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/operations/{operation_id}/status":{"get":{"tags":["Operations"],"summary":"Get Operation Status","description":"Point-in-time status check. Use `/stream` for real-time updates. Consumes no credits.","operationId":"getOperationStatus","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"operation_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(op_[0-9A-Z]{26}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$","description":"Operation identifier","title":"Operation Id"},"description":"Operation identifier"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Getoperationstatus"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/operations/{operation_id}":{"delete":{"tags":["Operations"],"summary":"Cancel Operation","description":"Cancels a pending or running operation. Emits a cancellation event to any active SSE connections. Cannot cancel completed or failed operations, or a running operation that cannot be stopped (graph creation, tier changes, materialization, period close), which returns 409.","operationId":"cancelOperation","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"operation_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(op_[0-9A-Z]{26}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$","description":"Operation identifier","title":"Operation Id"},"description":"Operation identifier"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Canceloperation"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Operation already completed or failed — cannot cancel"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/operations/{operation_id}/resume":{"post":{"tags":["Operations"],"summary":"Resume Operation","description":"Answers an operation that paused at a checkpoint (status `awaiting_input`) and puts it back on the worker queue with the answer. The operation keeps its id, so the stream, status and cancel links stay valid; reconnect to `/stream` to follow the resumed run. Consumes no credits.","operationId":"resumeOperation","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"operation_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(op_[0-9A-Z]{26}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$","description":"Operation identifier","title":"Operation Id"},"description":"Operation identifier"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResumeRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Resumeoperation"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Operation is not waiting for input"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/customer/{org_id}":{"get":{"tags":["Billing"],"summary":"Get Organization Customer Info","description":"Payment method details are only visible to org owners.","operationId":"getOrgBillingCustomer","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCustomer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/customer/{org_id}/portal":{"post":{"tags":["Billing"],"summary":"Create Customer Portal Session","description":"Returns a Stripe Customer Portal URL for managing payment methods and billing history. Requires org owner role.","operationId":"createPortalSession","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalSessionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/subscriptions/{org_id}":{"get":{"tags":["Billing"],"summary":"List Organization Subscriptions","operationId":"listOrgSubscriptions","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GraphSubscriptionResponse"},"title":"Response Listorgsubscriptions"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/subscriptions/{org_id}/subscription/{subscription_id}":{"get":{"tags":["Billing"],"summary":"Get Organization Subscription Details","operationId":"getOrgSubscription","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphSubscriptionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/subscriptions/{org_id}/subscription/{subscription_id}/cancel":{"post":{"tags":["Billing"],"summary":"Cancel Organization Subscription","description":"Cancels a subscription. Default behavior cancels at period end (subscription stays active through the current cycle). Pass `immediate=true` with `confirm=<resource_id>` to terminate now and trigger fast-path deprovisioning of the underlying resource. Requires org owner role.","operationId":"cancelOrgSubscription","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelSubscriptionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphSubscriptionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/invoices/{org_id}":{"get":{"tags":["Billing"],"summary":"List Organization Invoices","description":"Requires admin or owner role.","operationId":"listOrgInvoices","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of invoices to return","default":10,"title":"Limit"},"description":"Number of invoices to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicesResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/invoices/{org_id}/upcoming":{"get":{"tags":["Billing"],"summary":"Get Organization Upcoming Invoice","description":"Requires admin or owner role. Returns null if no billing activity yet.","operationId":"getOrgUpcomingInvoice","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UpcomingInvoice"},{"type":"null"}],"title":"Response Getorgupcominginvoice"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/checkout":{"post":{"tags":["Billing"],"summary":"Create Payment Checkout Session","description":"Initiates a Stripe checkout session for payment collection. Creates a pending subscription; the webhook activates it and provisions the resource after payment completes. Returns billing_disabled=true with no URL when billing is off. Requires org owner role.","operationId":"createCheckoutSession","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Payment required"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]},{"BearerAuth":[]}]}},"/v1/billing/checkout/{session_id}/status":{"get":{"tags":["Billing"],"summary":"Get Checkout Session Status","description":"Poll after returning from Stripe Checkout. Status progresses: pending_payment → provisioning → active. When active, resource_id is populated. `operation_id` is always null for webhook-driven provisioning and cannot be used to follow progress — poll this endpoint instead.","operationId":"getCheckoutStatus","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutStatusResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/extensions/{graph_id}/graphql":{"get":{"tags":["GraphQL"],"summary":"GraphQL explorer (development only)","operationId":"handle_http_get_extensions__graph_id__graphql_get","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}}],"responses":{"200":{"description":"The GraphiQL integrated development environment.","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found if GraphiQL or query via GET are not enabled."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized — credentials presented but invalid"},"403":{"description":"Forbidden — caller cannot access this graph"},"429":{"description":"Rate limit exceeded"}},"description":"Serves the in-browser GraphiQL explorer on deployments that enable it, which is development only — it is not mounted on the hosted API. Run queries with `POST` to the same URL.\n\nQueries are scoped by the URL: `graph_id` is a path parameter and never a query argument, so a document cannot name a graph that disagrees with the path it was sent to. Reads hit the operational (OLTP) extensions database, so they reflect the books as they stand now; the analytical projection is Cypher at `POST /v1/graphs/{graph_id}/query/cypher`.\n\nThe schema is composed per deployment: ledger fields require RoboLedger and investor fields require RoboInvestor, and a disabled domain is absent from introspection rather than failing at runtime. Every field carries a description, so introspection is the authoritative, deployment-specific reference.\n\n**Auth**: pass `X-API-Key` (or a JWT `Authorization: Bearer` header). Unauthenticated introspection queries are deliberately allowed for SDK codegen; data queries require credentials and raise `UNAUTHENTICATED`.\n\n**Error codes**: `LEDGER_NOT_INITIALIZED`, `INVESTOR_NOT_INITIALIZED`, and `UNAUTHENTICATED` surface in the GraphQL `errors[].extensions.code` field. GraphQL reports errors with HTTP 200 and a populated `errors[]`, so check that array rather than the status code."},"post":{"tags":["GraphQL"],"summary":"Run a GraphQL query","operationId":"handle_http_post_extensions__graph_id__graphql_post","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized — credentials presented but invalid"},"403":{"description":"Forbidden — caller cannot access this graph"},"429":{"description":"Rate limit exceeded"}},"description":"The typed read surface for a graph's extensions data — RoboLedger and RoboInvestor records as they stand right now. Writes are not here: they are the named operations at `POST /extensions/{domain}/{graph_id}/operations/{name}`.\n\nSend a standard GraphQL POST body: a `query` document, with optional `variables` and `operationName`.\n\nQueries are scoped by the URL: `graph_id` is a path parameter and never a query argument, so a document cannot name a graph that disagrees with the path it was sent to. Reads hit the operational (OLTP) extensions database, so they reflect the books as they stand now; the analytical projection is Cypher at `POST /v1/graphs/{graph_id}/query/cypher`.\n\nThe schema is composed per deployment: ledger fields require RoboLedger and investor fields require RoboInvestor, and a disabled domain is absent from introspection rather than failing at runtime. Every field carries a description, so introspection is the authoritative, deployment-specific reference.\n\n**Auth**: pass `X-API-Key` (or a JWT `Authorization: Bearer` header). Unauthenticated introspection queries are deliberately allowed for SDK codegen; data queries require credentials and raise `UNAUTHENTICATED`.\n\n**Error codes**: `LEDGER_NOT_INITIALIZED`, `INVESTOR_NOT_INITIALIZED`, and `UNAUTHENTICATED` surface in the GraphQL `errors[].extensions.code` field. GraphQL reports errors with HTTP 200 and a populated `errors[]`, so check that array rather than the status code.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"The GraphQL document to execute."},"variables":{"type":"object","additionalProperties":true,"description":"Values for the document's variables."},"operationName":{"type":"string","description":"Which operation to run, when the document declares more than one."}}},"examples":{"fiscal_calendar":{"summary":"What is blocking the close","value":{"query":"{ fiscalCalendar { closedThrough closeTarget closeableNow blockers } }"}},"paginated_with_variables":{"summary":"A filtered, paginated list","value":{"query":"query Agents($type: String, $limit: Int) { agents(agentType: $type, limit: $limit) { id name } }","variables":{"type":"customer","limit":10}}},"introspect":{"summary":"Discover this deployment's fields","value":{"query":"{ __schema { queryType { fields { name description } } } }"}}}}}}}},"/extensions/roboledger/{graph_id}/operations/initialize":{"post":{"tags":["RoboLedger: Setup"],"summary":"Initialize Ledger","description":"One-time setup: creates the fiscal calendar and seeds periods. Returns 409 if already initialized.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"initializeLedger","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitializeLedgerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_InitializeLedgerResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/change-calendar-start":{"post":{"tags":["RoboLedger: Setup"],"summary":"Change Calendar Start","description":"Move where an entity's fiscal calendar starts, allowed only before its first close. Earlier adds open months back to `first_open_period`, for history that predates the start; later removes empty leading months. Refused once any month has closed (409), and when moving later would drop months that hold entries or unposted source lines (409).\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"changeCalendarStart","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeCalendarStartRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_ChangeCalendarStartResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/initialize-chart-of-accounts":{"post":{"tags":["RoboLedger: Setup"],"summary":"Initialize Chart of Accounts","description":"Create the graph's chart of accounts from a shipped template — the fresh-company path to native books. Use when the graph has NO chart (a QuickBooks-synced tenant never needs this: its chart arrives with the sync and stays after a sever) and before connecting a bank feed, which needs a chart to resolve against. Templates: `saas` (subscription software), `services` (professional services), `product` (inventory and COGS) — the `chartTemplates` GraphQL field lists them with names and account counts. Creates the chart, its `coa_mapping` structure and the template's CoA → rs-gaap mapping associations in one transaction, with the equity rows mapped by the entity's legal form (`entity_type`, defaulting to the entity's). Each entity of the group keeps its own chart: `entity_id` names a subsidiary, omitted means the group parent. One-time per entity: 409 once that entity has a chart — a chart is never replaced. Customize afterwards with update-taxonomy-block; accounts that carry activity are never deleted.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"initializeChartOfAccounts","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitializeChartOfAccountsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_InitializeChartOfAccountsResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/create-entity":{"post":{"tags":["RoboLedger: Setup"],"summary":"Create Entity","description":"Add an entity to the graph's reporting group: a subsidiary under `parent_entity_id` (default the group parent) that keeps its own books, chart of accounts and close, on the group's fiscal cadence. A graph created without an entity gets this one as its group parent. Creates the entity row only — give it a chart next (initialize-chart-of-accounts with `entity_id`) and a calendar (initialize with `entity_id`); from then on every ledger operation takes `entity_id` to act in its books, and omitting it means the group parent. The Reporting Style follows `entity_type` unless `reporting_style_id` names one. `ticker` prefixes the entity's account names and must be unique in the graph (409). There is no cap on entities: a graph is one reporting group, and everyone with access to it sees every entity.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"createEntity","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEntityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_LedgerEntityResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/update-entity":{"post":{"tags":["RoboLedger: Setup"],"summary":"Update Entity","description":"Update an entity of the graph's reporting group. Only provided (non-null) fields are updated. Omit `entity_id` to target the group parent; name a subsidiary's id to edit it. `ownership_pct` is refused on the group parent (422), and `ticker` must stay unique in the graph (409).\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"updateEntity","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEntityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_LedgerEntityResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/change-reporting-style":{"post":{"tags":["RoboLedger: Setup"],"summary":"Change Reporting Style","description":"Switch the reporting entity's Reporting Style — how its statements are laid out (equity-form, close-target concept, per-statement Networks). Validates that the target Style has a complete composition in the tenant schema, then flips `entities.reporting_style_id`. Omit `entity_id` to target the graph's primary entity. Filed Reports are unaffected (their FactSet rows pin their structures at create-time); new reports use the new Style. Idempotent on the same id.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"changeReportingStyle","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeReportingStyleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_ChangeReportingStyleResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/link-bank-account":{"post":{"tags":["RoboLedger: Setup"],"summary":"Link Bank Account","description":"Point a bank feed's account at a chart account. Name `element_id` for an existing active account, or `entity_id` alone to create one in that entity's chart. The chart the account is in decides whose books the feed's lines go into, so this is also how a feed account is bound to a subsidiary. Lines still in the inbox move with it (across an entity change their suggestion is resolved again on the new chart, and a classification that named the old entity's account is dropped); posted entries stay where they were posted. An account another connection already feeds is refused, as is an entity whose books QuickBooks keeps (the group parent, while QuickBooks is connected). An account the feed created and then left stays on its chart as an ordinary account. A sync already in flight when the link moves can still land a line or two on the old account; running this again moves them. Read the group's accounts with the `bankAccounts` GraphQL field.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"linkBankAccount","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkBankAccountRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_LinkBankAccountResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/create-taxonomy-block":{"post":{"tags":["RoboLedger: Taxonomy & Mapping"],"summary":"Create Taxonomy Block","description":"Create a taxonomy block atomically: one envelope carrying the taxonomy row plus its structures, elements, associations, and rules. Dispatches by `taxonomy_type` — `chart_of_accounts` (declarative tenant CoA), `reporting_extension`, and `custom_ontology` are supported; `reporting_standard` is library-origin (501). `reporting_extension` / `custom_ontology` authoring may be disabled per environment (TAXONOMY_AUTHORING_ENABLED) — disabled surfaces 403. NOT the path for a functional close schedule: a structure with block_type='schedule' here is a bare ontology row with none of the schedule machinery (per-period facts, schedule_entry_due obligations, closing-entry generator). To create a working schedule use create-information-block(block_type='schedule').\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"createTaxonomyBlock","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTaxonomyBlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_TaxonomyBlockEnvelope_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/update-taxonomy-block":{"post":{"tags":["RoboLedger: Taxonomy & Mapping"],"summary":"Update Taxonomy Block","description":"Incrementally mutate a taxonomy block via typed delta lists (elements/structures/associations/rules to add, update, remove). Dispatches by the target taxonomy's stored `taxonomy_type`. For a chart of accounts: add, rename and reclassify accounts freely; an account with facts or line items is never removed — retire it with `elements_to_update[].is_active=false` (history stays, new postings are refused, pickers hide it; `true` reactivates). Removal and whole-chart delete work only with no activity. Library-origin block types (`reporting_standard`) surface 501. `reporting_extension` / `custom_ontology` authoring may be disabled per environment (TAXONOMY_AUTHORING_ENABLED) — disabled surfaces 403. Closed months are immutable against curation: a mapping arc added or removed for an account with landed history in a closed month, or a `balance_type` / `period_type` / `trait` change on such an account, is refused (422, `protected_facts`) naming the months to reopen first.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"updateTaxonomyBlock","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTaxonomyBlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_TaxonomyBlockEnvelope_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/delete-taxonomy-block":{"post":{"tags":["RoboLedger: Taxonomy & Mapping"],"summary":"Delete Taxonomy Block","description":"Delete a taxonomy block and return a thin confirmation. `cascade_facts=True` also deletes Fact rows that reference the taxonomy's elements; default False fails the delete if such facts exist. Library-origin block types surface 501.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"deleteTaxonomyBlock","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteTaxonomyBlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_DeleteTaxonomyBlockResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/link-entity-taxonomy":{"post":{"tags":["RoboLedger: Taxonomy & Mapping"],"summary":"Link Entity to Taxonomy","description":"Link the graph's entity to a taxonomy. Idempotent — returns existing linkage if it already exists. CoA blocks auto-link at create time; use this only to switch the primary CoA or link a reporting extension / custom ontology explicitly.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"linkEntityTaxonomy","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkEntityTaxonomyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_EntityTaxonomyResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/create-mapping-association":{"post":{"tags":["RoboLedger: Taxonomy & Mapping"],"summary":"Create Mapping Association","description":"Link a chart-of-accounts element to a US GAAP reporting concept. One mapping edge per call — use `auto-map-elements` for bulk AI-assisted mapping. Duplicate (from, to, type) tuples return 409. The target must be a leaf concept: a subtotal the statement sums from its children is refused (422). Map before you close: an account with landed history in a closed month cannot be re-mapped (422) — the closed month's stamped statements were computed through the old arcs. Reopen latest-first down to the earliest month named, map, then close forward.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"createMappingAssociation","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMappingAssociationOperation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_AssociationResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/delete-mapping-association":{"post":{"tags":["RoboLedger: Taxonomy & Mapping"],"summary":"Delete Mapping Association","description":"Remove a single CoA → reporting-concept mapping edge by id. The mapping structure itself remains; only the association row is dropped. Use this to correct a wrong mapping — delete the bad edge, then `create-mapping-association` the right one. Find the association id via the `library_element_arcs` GraphQL field. Library-seeded rows cannot be deleted (403). An edge for an account with landed history in a closed month cannot be removed (422) until those months are reopened, latest-first.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"deleteMappingAssociation","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteMappingAssociationOperation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_DeleteResult_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/auto-map-elements":{"post":{"tags":["RoboLedger: Taxonomy & Mapping"],"summary":"Auto-Map Elements via AI","description":"Dispatches to the background worker — returns a `pending` envelope immediately. Monitor via SSE at `/v1/operations/{operation_id}/stream`. Confidence thresholds: ≥0.90 auto-approved, 0.70–0.89 flagged for review, <0.70 skipped.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"autoMapElements","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoMapElementsOperation"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/create-information-block":{"post":{"tags":["RoboLedger: Information Blocks"],"summary":"Create Information Block","description":"Generic Information Block construction entry. `block_type` selects the registered block type; `payload` is validated against that type's creation schema at dispatch. Schedule dispatches to the existing Schedule machinery; statement block types raise 501 (use create-report instead). Authoring schedules for a close? Call `get-close-playbook` (mode='initiate') first — one schedule is a single debit/credit element pair, so multi-line entries become multiple schedules, and element ids must be real (discover via get-graph-schema / get-unmapped-elements / suggest-mapping).\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"createInformationBlock","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInformationBlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_InformationBlockEnvelope_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/update-information-block":{"post":{"tags":["RoboLedger: Information Blocks"],"summary":"Update Information Block","description":"Generic Information Block update entry. Dispatches by `block_type` to the registered mutation handler. Block types whose Structures are library-seeded and immutable (statement family) surface 501.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"updateInformationBlock","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInformationBlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_InformationBlockEnvelope_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/delete-information-block":{"post":{"tags":["RoboLedger: Information Blocks"],"summary":"Delete Information Block","description":"Generic Information Block deletion entry. Returns a thin confirmation (deleted / structure_id / block_type / name). Block types whose Structures are library-seeded cannot be deleted per tenant and surface 501.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"deleteInformationBlock","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteInformationBlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_DeleteInformationBlockResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/evaluate-rules":{"post":{"tags":["RoboLedger: Information Blocks"],"summary":"Evaluate Rules for an Information Block","description":"Runs every rule targeting the given structure (plus element- and association-scoped rules for the structure's atoms), binds $Variable references to in-scope facts via qname lookup, writes one VerificationResult row per rule, and returns the results plus a status-keyed summary. Decoding mode, 6 patterns (EqualTo, RollUp, RollForward, SumEquals, Exists, CoExists).\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"evaluateRules","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluateRulesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_EvaluateRulesResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/compute-metrics":{"post":{"tags":["RoboLedger: Information Blocks"],"summary":"Compute Metrics for a Metric Block","description":"Resolves the Derive rules scoped to a metric block (block_type='metric'), binds each rule's operands to the entity's most recent persisted report facts at period_end, evaluates, and upserts the period's standing factset_type='metric' FactSet — one per (structure, entity, period_end), so successive runs accumulate the time series and re-running a period replaces its values. Metrics with missing operands or undefined ratios are skipped with a reason, never errored.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"computeMetrics","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComputeMetricsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_ComputeMetricsResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/assert-metrics":{"post":{"tags":["RoboLedger: Information Blocks"],"summary":"Assert Metrics for a Metric Block","description":"Writes externally-observed metric values (usage counts, marketing numbers, hand-carried figures) into the period's standing factset_type='metric' FactSet with AssertedProvenance — the observation sibling of compute-metrics. One standing FactSet per (structure, entity, period_end); re-asserting a period replaces its facts. Structures carrying Derive rules are compute-owned and rejected: asserted and derived metric series keep disjoint structures. Observations must resolve to concepts on the structure's presentation catalog. Deterministic and non-AI — no credits consumed.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"assertMetrics","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssertMetricsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_AssertMetricsResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/compute-forecast":{"post":{"tags":["RoboLedger: Information Blocks"],"summary":"Compute Forecast for a Forecast Block","description":"Walks a forecast block's driver cascade month-by-month forward from its base period: lever-driven rs-driver Derive rules in dependency order, carry-forward for unmodeled income-statement lines, calc-DAG subtotals — upserting one scenario income-statement FactSet (plus a working-capital balance-sheet set) per forward month, all keyed by the block's scenario_id (NULL = actuals; scenario reads pass it as a filter). Re-running replaces each month's values. Rules with missing lever months or unbound operands are skipped with a reason (their targets fall back to carry-forward), never errored. Deterministic and non-AI — no credits consumed.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"computeForecast","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComputeForecastRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_ComputeForecastResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/bind-text-block":{"post":{"tags":["RoboLedger: Information Blocks"],"summary":"Bind Text Block","description":"Bind a platform Document (markdown) — or one of its sections — to a disclosure element as a Nonnumeric text-block fact. The document stays the editable source of truth; the fact snapshots its text into a standing 'disclosure' FactSet with document provenance (document_id + section + content_hash). Re-binding the same element and period replaces the fact and refreshes the hash. Reports generated afterward snapshot the standing set, so filed reports are immutable against later document edits.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"bindTextBlock","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BindTextBlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_BindTextBlockResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/create-agent":{"post":{"tags":["RoboLedger: Ledger & Events"],"summary":"Create Agent","description":"Create a counterparty record (customer, vendor, employee, etc.). The (source, external_id) pair is a dedup key — a second insert with the same pair returns 409. Use update-agent to patch fields.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"createAgent","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_LedgerAgentResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/update-agent":{"post":{"tags":["RoboLedger: Ledger & Events"],"summary":"Update Agent","description":"Patch counterparty fields. Only supplied fields are updated. Set is_active=false to deactivate (agents are never deleted — they are reference data referenced by events and transactions). `classification_element_id` sets the account this counterparty's bank lines are suggested (an empty string clears it), and `classification_mode='always_ask'` stops suggesting one for a counterparty whose lines go to different accounts; its still-open lines are re-suggested at once. A default is also learned as lines are committed, so set one by hand only to correct it.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"updateAgent","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_LedgerAgentResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/learn-classification-defaults":{"post":{"tags":["RoboLedger: Ledger & Events"],"summary":"Learn Classification Defaults","description":"Seed each counterparty's default account from the bank lines already committed to the books: the account most of its lines went to becomes its default, with the lines that agreed counted as confirmations. A counterparty that already has a default keeps it. Its still-open lines are then suggested from the default. Run it once on books that were classified before defaults were learned; after that, every commit teaches the default by itself. `dry_run` reports what would be learned without writing it.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"learnClassificationDefaults","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LearnClassificationDefaultsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_LearnClassificationDefaultsResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/create-event-block":{"post":{"tags":["RoboLedger: Ledger & Events"],"summary":"Create Event Block","description":"Persist a real-world business event. apply_handlers=False (default): capture-only, status='captured'. apply_handlers=True: resolves an event_handler, fires the template, creates GL entries atomically, status='classified'. Use preview-event-block to dry-run before committing. For journal_entry_recorded, whether the entry writes back to a connected source system follows `source` (schedule/manual publish; system does not) unless metadata.publish_to_source says otherwise — set it false for an alignment entry mirroring a change already made upstream, which would otherwise be applied twice.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"createEventBlock","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEventBlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_EventBlockEnvelope_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/update-event-block":{"post":{"tags":["RoboLedger: Ledger & Events"],"summary":"Update Event Block","description":"Apply a status transition (captured → classified | committed | voided) and/or field corrections (description, effective_at, metadata_patch) to an existing event block. Only supplied fields are updated. captured → classified records an account choice without posting — for a bank-feed line, patch metadata.classified_element_id (or accept_suggestion: true) in the same call. When the transition is captured/classified → committed, the registered Python handler fires against the captured metadata to produce the GL rows, unless it already wrote them when the event was created; a bank-feed line with no account chosen and no matching rule is refused. Errors from the handler (validation, element resolution, closed period, unbalanced lines) surface as 422 here so the inbox UI can display the failure reason without retry. A bank line's flow is a second classification beside its account, overriding the account's default flow on the cash flow and equity statements: patch `classified_flow_qname` (or `flow_qname` on each `classified_allocations` part) with an rs-gaap flow concept such as `rs-gaap:ProceedsFromIssuanceOfLongTermDebt`. On a line that has already posted, this re-tags its lines in place, in a closed month too, since no balance moves; an empty string clears it.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"updateEventBlock","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEventBlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_EventBlockEnvelope_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/execute-event-block":{"post":{"tags":["RoboLedger: Ledger & Events"],"summary":"Execute Event Block","description":"For events on a connection with write_policy='qb_authoritative' or 'hybrid', publish the event's draft GL entries to the source-of-truth system (QuickBooks), each as its own JournalEntry. Records the QuickBooks ids per entry on event.metadata.qb_entry_ids and promotes the published entries to 'posted'; the event goes 'fulfilled' once no draft remains, or 'pending' on rejection (what landed is kept). Native-policy events fast-path through with no QB write — RoboSystems is the system of record.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"executeEventBlock","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteEventBlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_ExecuteEventBlockResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/create-event-handler":{"post":{"tags":["RoboLedger: Ledger & Events"],"summary":"Create Event Handler","description":"Define a rule that fires GL transactions when a matching event block is created with apply_handlers=True. Match criteria (event_type, event_category, match_source, match_agent_type, etc.) act as AND-joined filters — null fields match anything. The highest-priority matching handler wins. AI-suggested handlers (suggested_by='ai') require approval before they are eligible for matching.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"createEventHandler","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEventHandlerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_EventHandlerResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/update-event-handler":{"post":{"tags":["RoboLedger: Ledger & Events"],"summary":"Update Event Handler","description":"Patch an event handler's match criteria, template, priority, or active state. Pass approve=true to approve an AI-suggested handler; approve=false to revoke approval. Only supplied fields are updated.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"updateEventHandler","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEventHandlerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_EventHandlerResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/preview-event-block":{"post":{"tags":["RoboLedger: Ledger & Events"],"summary":"Preview Event Block","description":"Dry-run: resolve the matching handler and evaluate the transaction template without writing any rows. Returns the matched handler + planned debit/credit lines + any validation errors. Use this before create-event-block(apply_handlers=True) to confirm the GL plan.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"previewEventBlock","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEventBlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_PreviewEventBlockResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/preview-reconciling-item":{"post":{"tags":["RoboLedger: Ledger & Events"],"summary":"Preview Reconciling Item","description":"Read what changed on a reconciling item — an event whose source-system payload changed after it was posted (list them with list-event-blocks is_reconciling_item=true). Returns the posted entries against the accepted payload, the per-account net difference, which disposition applies by default, and anything blocking the others. Writes nothing. Run this before resolve-reconciling-item and agree the treatment with the user — restate moves prior months' figures, catch_up does not.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"previewReconcilingItem","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewReconcilingItemRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_ReconcilingItemPlan_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/resolve-reconciling-item":{"post":{"tags":["RoboLedger: Ledger & Events"],"summary":"Resolve Reconciling Item","description":"Dispose of one reconciling item and clear its flag. Three treatments: 'restate' regenerates the event's entries from the accepted payload in place (prior months' figures change — right when nothing external binds them); 'catch_up' leaves history alone and posts the difference as an alignment entry in an open period, local-only so it cannot travel back to the source system and apply the change twice; 'acknowledge' records that the difference was handled elsewhere and clears the flag without touching the ledger (a note is required, and reference_event_id should name the entry that handled it). An alignment entry authored by hand can name the items it settles in metadata.resolves_reconciling_items instead, and each is acknowledged against it as it is recorded — an item left flagged would be caught up a second time. Omit disposition to take the default from preview-reconciling-item. Clearing the flag means the item stays cleared: the event's payload is set to the accepted one, so the next sync no longer sees a difference.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"resolveReconcilingItem","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveReconcilingItemRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_ResolveReconcilingItemResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/preview-reconciliations":{"post":{"tags":["RoboLedger: Ledger & Events"],"summary":"Preview Reconciliations","description":"Compare the ledger at a period end with something outside it, without recording anything. `method` picks the check. `source_ledger` (the default) reads QuickBooks' own trial balance for the period end and sets it beside the ledger's, account by account: balance-sheet accounts cumulatively, income and expense accounts from the start of the fiscal year. A difference there means the ledger's copy of the books has drifted from the source (a transaction deleted or back-dated there after it was synced, or activity not yet synced), so run it before trusting any other figure on a synced ledger; it needs a connected QuickBooks ledger. `schedule_register` compares each asset account a schedule carries a balance on (a prepaid, accumulated depreciation, a fixed-asset cost account) with what its schedules say it holds, and lists the schedules behind each figure. A difference there is a balance with no schedule behind it, or a scheduled amount the ledger does not hold. Each row carries both balances, the difference, and whether the account ties.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"previewReconciliations","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewReconciliationsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_ReconciliationPreviewResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/refresh-reconciliations":{"post":{"tags":["RoboLedger: Ledger & Events"],"summary":"Refresh Reconciliations","description":"Run every reconciliation that applies at a period end and record each result on its block. A ledger synced from QuickBooks is compared with QuickBooks' own trial balance, on one block for the whole ledger. Each asset account a schedule carries a balance on is compared with what its schedules say it holds, on a block of its own. Each account with a statement covering the period (record-statement-balance; the latest within its statement cycle) is compared with that balance. A block reconciles for the period when its difference is within its materiality. Running it again replaces the period's comparison, so the answer is always as of the last run. A block is created the first time its check applies, and from then on the period's close waits on it until set-reconciliation-policy releases it. The one exception is an account block whose first comparison does not tie: it is created without holding the close, so a difference found on first contact is reported and becomes a close requirement only when you turn it on. Returns every reconciliation's standing for the period. Use preview-reconciliations to see a comparison without recording it.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"refreshReconciliations","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshReconciliationsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_ReconciliationListResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/record-statement-balance":{"post":{"tags":["RoboLedger: Ledger & Events"],"summary":"Record Statement Balance","description":"Record the ending balance of a statement (a bank, card or loan statement) for one balance-sheet account, and reconcile the account to it. Give the balance as the statement shows it, as a positive number in the account's normal direction, with the statement's ending date. The ledger's balance at that date is set beside it, counting the drafts the close will post, and the result is recorded on the account's statement reconciliation for the period the statement ends in. On an account a bank feed keeps, ledger lines that did not come from the feed and are dated on or before the statement are listed as outstanding and adjust the statement balance, since the bank had not cleared them; a statement ending before the period's last day is carried to it by the feed's own lines (`roll_forward`). Attach the statement as evidence by passing the `document_id` of its stored file (create-document-upload, then complete-document-upload); recording it again with another document lapses a sign-off. Writes no books. The first statement recorded for an account creates its reconciliation, which does not hold the close: turn `required_for_close` on with set-reconciliation-policy to make every period's close wait for a statement on that account. Recording the same account and date again replaces the earlier balance; when more than one statement ends in a period, the one with the latest date stands. Recording a balance that differs from one already signed off lapses that sign-off. A difference left after the outstanding lines is activity one side has and the other does not yet, or an error on either. Returns the reconciliation's standing for the period.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"recordStatementBalance","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordStatementBalanceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_ReconciliationSummary_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/set-reconciliation-policy":{"post":{"tags":["RoboLedger: Ledger & Events"],"summary":"Set Reconciliation Policy","description":"Change how much the close cares about one reconciliation: whether the period's close waits on it (`required_for_close`); its `materiality`, the difference up to which it still counts as reconciled; whether the close also waits for a sign-off (`review_required`); and whether the reviewer must be someone other than the person who ran the comparison (`separate_reviewer`, which can only be turned on while the graph has at least two members who can write; if it later has one, turn it off or add a member). For a statement reconciliation, `statement_cycle` says how often the statement is issued (monthly, quarterly or annual): a period is covered by the latest statement ending within the cycle that ends with it, so a quarterly statement still covers the months between statements. Omitted fields keep their value. The next refresh-reconciliations uses the new materiality; comparisons already recorded are not re-judged.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"setReconciliationPolicy","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetReconciliationPolicyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_ReconciliationPolicyResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/sign-off-reconciliation":{"post":{"tags":["RoboLedger: Ledger & Events"],"summary":"Sign Off Reconciliation","description":"Record your review of a reconciliation for a period. Only a period that reconciles can be signed off, and only by a member of the graph: access that comes from an organization role is not enough. The sign-off records who ran the comparison and who reviewed it, and says so when they are the same person; a reconciliation with `separate_reviewer` set refuses that case instead. The sign-off stands for the balances as they were compared: if any of them changes afterwards, the period goes back to reconciled or unreconciled and needs signing off again, unless the balances return to the ones already signed. Signing off a period already reviewed changes nothing. Returns the reconciliation's standing for the period.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"signOffReconciliation","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignOffReconciliationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_ReconciliationSummary_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/update-journal-entry":{"post":{"tags":["RoboLedger: Ledger & Events"],"summary":"Update Journal Entry","description":"Update a draft journal entry. Posted entries are immutable and must be corrected via `create-event-block(event_type='journal_entry_reversed')`. If line_items is provided, existing line items are replaced atomically, the new set must balance, and a line on a retired (`is_active=false`) account is refused.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"updateJournalEntry","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateJournalEntryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_JournalEntryResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/delete-journal-entry":{"post":{"tags":["RoboLedger: Ledger & Events"],"summary":"Delete Journal Entry","description":"Hard-delete a draft journal entry. Posted entries are immutable and must be reversed instead.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"deleteJournalEntry","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteJournalEntryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_DeleteResult_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/set-close-target":{"post":{"tags":["RoboLedger: Fiscal Close"],"summary":"Set Close Target","description":"Set the user-controlled goal period for closing (`close_target`). Format: YYYY-MM. Distinct from `closed_through` (what's actually locked) — setting a target doesn't close anything; call `close-period` for that. The catch-up sequence between `closed_through` and this target appears on the response's `fiscal_calendar.catch_up_sequence`.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"setCloseTarget","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCloseTargetOperation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_FiscalCalendarResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/close-period":{"post":{"tags":["RoboLedger: Fiscal Close"],"summary":"Close Fiscal Period","description":"Lock a single fiscal period. Posts draft entries, runs the balance-sheet equation check, advances `closed_through` by one, auto-advances `close_target` if this close caught up to it, and stamps the period's canonical statement FactSets from the posted ledger (`statements_stamped` / `stamped_statement_sets` in the response; soft-skipped with `statement_stamp_note` when reporting isn't set up). Period must be exactly `closed_through + 1` — sequence violations return 422 with structured `blockers`. Common blockers: `sync_stale` (override with `allow_stale_sync=true` after manual verification), `period_incomplete` (draft entries unbalanced), `sequence_violation` (out-of-order). Under a QuickBooks connection whose write_policy is `shadow`, the close observes instead: nothing is written to QuickBooks or posted, the drafts become `shadowed` expectations (`entries_shadowed`), and the gates that would have blocked are returned as `gate_findings` rather than enforced.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"closePeriod","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClosePeriodOperation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_ClosePeriodResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/reopen-period":{"post":{"tags":["RoboLedger: Fiscal Close"],"summary":"Reopen Fiscal Period","description":"Reopen a closed period for adjustment. Only the latest closed period (`closed_through`) can be reopened; it decrements by one and the period's entries become writable again. To reach an earlier month, reopen latest-first down to it, then re-close forward — an out-of-order reopen is refused (422) with the ordered list, because every later closed month carries statements stamped from the earlier month's numbers. Retracts the month's canonical statement FactSets (a reopened month is no longer a closed assertion; re-closing restamps them). The required `reason` is captured in the audit log. Use sparingly — reopen invalidates downstream artifacts that trusted the closed state (reports, shared filings).\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"reopenPeriod","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReopenPeriodOperation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_FiscalCalendarResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/backfill-plan-history":{"post":{"tags":["RoboLedger: Fiscal Close"],"summary":"Backfill Plan History","description":"Compile monthly statement history behind the close boundary — the plan's historical columns. Seeds any missing FiscalPeriod rows (baseline-closed) back to the clamped `start_period`, then restamps each month lacking canonical statement FactSets by running the real reopen → reclose cycle (balance validation, statement rules, and audit events per month). Chunked: at most `max_periods` months per call, oldest first — loop until `remaining_periods` comes back empty. Idempotent: already-stamped months are never touched. Months holding draft entries are skipped, never posted. `start_period` is clamped to the earliest month with ledger data, so deep-history tenants only backfill what actually exists.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"backfillPlanHistory","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackfillPlanHistoryOperation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_BackfillPlanHistoryResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/promote-obligations":{"post":{"tags":["RoboLedger: Fiscal Close"],"summary":"Promote Due Schedule Obligations","description":"Promote matured pending schedule obligations (schedule_entry_due events whose period boundary has passed) to 'classified', and — when dispatch_handlers=true (default) — draft their closing entries in the same transaction. Also reaches stranded obligations: events already 'classified' (by an earlier flip-only sweep) whose closing entry was never drafted are dispatched in the same pass, and reported via stranded_count. This is the on-demand form of the background obligation-promotion sweep; run it before close-period when a schedule was just created or when you can't wait for the Dagster sensor. Idempotent: re-running skips already-classified obligations and reconciles to existing drafts.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"promoteObligations","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoteObligationsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_PromoteObligationsResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/rebuild-schedule":{"post":{"tags":["RoboLedger: Fiscal Close"],"summary":"Rebuild Schedule In Place","description":"Re-run the schedule generator in place on an existing schedule. Atomic alternative to delete-then-recreate (which orphans pending obligations): preserves the structure id + element associations + taxonomy, voids the old pending obligation chain, deletes the old facts and SumEquals rules, and regenerates fresh forward facts + a fresh obligation chain from the schedule's stored definition (entry_template / schedule_metadata / monthly_amount / period bounds). The historical-vs-in-scope split is re-derived from the CURRENT fiscal calendar closed_through. Use this to pick up a fixed generator (e.g. the roll-forward direction fix) without orphaning obligations.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"rebuildSchedule","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RebuildScheduleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_ScheduleCreatedResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/terminate-schedule":{"post":{"tags":["RoboLedger: Fiscal Close"],"summary":"Terminate Schedule Early","description":"End a schedule early at a month-end cutoff without booking any entry. In one transaction: deletes forward facts past the cutoff (refusing when posted entries exist past it; stale drafts past it are deleted), voids the remaining obligation chain past the cutoff (pending and classified rows), and rewrites the SumEquals rule to prove the truncated curve. History at or before the cutoff is untouched, so open months the schedule still covers close normally. Use this when the termination's GL effect is already booked (an asset transferred via a manual entry, a prepaid refunded in the source system) or none is wanted; when the derecognition entry still needs to be booked, use create-event-block(event_type='asset_disposed') instead — the disposal handler posts it atomically with the same obligation void. Run BEFORE promote-obligations at close so terminated periods are never drafted.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"terminateSchedule","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminateScheduleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_TerminateScheduleResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/create-report":{"post":{"tags":["RoboLedger: Reports"],"summary":"Create Report","description":"Generates report facts from the ledger and marks the report as published.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"createReport","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_ReportResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/regenerate-report":{"post":{"tags":["RoboLedger: Reports"],"summary":"Regenerate Report","description":"Re-runs fact generation for an existing Report against the latest ledger state. Pass `period_start`/`period_end`/`periods` only if you want to change the reporting window.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"regenerateReport","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegenerateReportOperation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_ReportResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/delete-report":{"post":{"tags":["RoboLedger: Reports"],"summary":"Delete Report","description":"Deletes the report definition and all generated facts. Normally restricted to the report's creator. A report shared in from another graph carries the sender's user id in `created_by`, so those may be deleted by any admin of the receiving graph — the recipient's exit from an unsolicited share. Deleting a shared copy does not affect the sender's record that they sent it.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"deleteReport","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteReportOperation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_DeleteResult_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/file-report":{"post":{"tags":["RoboLedger: Reports"],"summary":"File Report","description":"Transitions the Report's filing_status to 'filed' — locks the package. Allowed from 'draft' or 'under_review'. Stamps filed_at + filed_by.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"fileReport","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_ReportResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/transition-filing-status":{"post":{"tags":["RoboLedger: Reports"],"summary":"Transition Filing Status","description":"Move a Report along the non-file legs of the filing lifecycle (draft ↔ under_review, filed ↔ archived). Archiving takes a filed report off the current list without deleting it; unarchiving returns it to 'filed'. Use 'file-report' to file a draft so audit fields land cleanly.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"transitionFilingStatus","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransitionFilingStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_ReportResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/share-report":{"post":{"tags":["RoboLedger: Report Distribution"],"summary":"Share Report","description":"Pushes a published report to every member of the target publish list. Each share is an independent copy: the report row + all its facts are cloned into the recipient's tenant schema with `source_graph_id` / `source_report_id` provenance fields populated. Per-target outcomes (success or error) surface in the response — share does not fail-fast across targets. Recipients that have blocked this graph come back as an error for that target; withdraw a delivered copy with `revoke-report-share`.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"shareReport","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareReportOperation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_ShareReportResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/revoke-report-share":{"post":{"tags":["RoboLedger: Report Distribution"],"summary":"Revoke Report Share","description":"Withdraws a report previously shared to one recipient graph: deletes the copy from that recipient's schema and stamps the share record revoked. Scoped to a single recipient — withdrawing a distribution to a whole publish list is one call per member. A recipient who already deleted the copy is not an error; the share is still marked revoked and `copy_deleted` returns false. The linked entity in the recipient's graph is left in place, so an investor's declared holding survives.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"revokeReportShare","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeReportShareOperation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_RevokeReportShareResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/create-publish-list":{"post":{"tags":["RoboLedger: Report Distribution"],"summary":"Create Publish List","description":"Create a publish list (a saved set of recipient graphs). Members are managed separately via add/remove-member operations.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"createPublishList","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePublishListRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_PublishListResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/update-publish-list":{"post":{"tags":["RoboLedger: Report Distribution"],"summary":"Update Publish List","description":"Updates the publish list's `name` and/or `description`. Membership is managed via add/remove-member operations.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"updatePublishList","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePublishListOperation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_PublishListResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/delete-publish-list":{"post":{"tags":["RoboLedger: Report Distribution"],"summary":"Delete Publish List","description":"Delete a publish list and its membership rows. Reports previously shared via this list are not affected — each share is an independent copy in the recipient's graph.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"deletePublishList","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePublishListOperation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_DeleteResult_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/add-publish-list-members":{"post":{"tags":["RoboLedger: Report Distribution"],"summary":"Add Members to Publish List","description":"Add one or more recipient graphs to a publish list. Targets must exist and have the same extension enabled (e.g. roboledger). Self-graph rejected (422); already-member rejected (409).\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"addPublishListMembers","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddPublishListMembersOperation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_list_PublishListMemberResponse__"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/remove-publish-list-member":{"post":{"tags":["RoboLedger: Report Distribution"],"summary":"Remove Member from Publish List","description":"Remove a single recipient from a publish list.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"removePublishListMember","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemovePublishListMemberOperation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_DeleteResult_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/block-source-graph":{"post":{"tags":["RoboLedger: Report Distribution"],"summary":"Block Source Graph","description":"Bars a graph from sharing reports into this one. Subsequent `share-report` calls naming this graph fail for this target with an explicit error — blocked senders are told, not silently dropped. Idempotent: re-blocking preserves the original `blocked_at`. Set `purge` to also delete every report already shared in from that source, along with its fact sets and facts; reports this graph authored are never touched.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"blockSourceGraph","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockSourceGraphOperation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_BlockSourceGraphResult_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/unblock-source-graph":{"post":{"tags":["RoboLedger: Report Distribution"],"summary":"Unblock Source Graph","description":"Lifts a block, allowing that graph to share reports into this one again. Reports removed by an earlier purge are not restored — unblocking reopens the channel, it does not undo. Requires the graph admin role: a block is a standing decision about who may write into this graph, so a member cannot reverse it over an admin's head. Returns 404 when the source was not blocked.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"unblockSourceGraph","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnblockSourceGraphOperation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_BlockedSourceGraphResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/build-fact-grid":{"post":{"tags":["RoboLedger: Analytical Views"],"summary":"Build Fact Grid","description":"Queries LadybugDB `Fact` nodes by element qnames, with filters for periods and entities. Returns deduplicated facts plus the aspects they span — arranging them into a table is the consumer's job, since collapsing cells safely requires the full aspect signature. Works on both roboledger tenant graphs (post-materialization) and the SEC shared repository. Canonical concepts and the form and fiscal-period filters exist on shared repositories only: a ledger's graph carries none of them, and a query by them there is refused rather than answered with nothing.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"buildFactGrid","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateViewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_ViewResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/financial-statement-analysis":{"post":{"tags":["RoboLedger: Analytical Views"],"summary":"Financial Statement Analysis","description":"Query a rendered financial statement from the graph-backed XBRL hypercube (Structure → FactSet → Fact). Works on the SEC shared repository today and on any RoboLedger tenant graph whose ledger has been materialized to LadybugDB. For shared-repo graphs, provide `ticker` to auto-resolve the latest filing; for tenant graphs, provide `report_id` explicitly.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"financialStatementAnalysis","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinancialStatementAnalysisRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_FinancialStatementAnalysisResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/disclosures":{"post":{"tags":["RoboLedger: Analytical Views"],"summary":"Disclosures","description":"The map of a report's sections: one row per disclosure family — a note with its policies, tables and details, a statement with its parenthetical, the cover page — with block counts by level, fact and text-block counts, in filing order; with `topic`, one family's blocks with the ids `information-block` takes. Reads the report whole — the published filing on the SEC shared repository, the ledger's own report on a tenant graph — into xbrlkit's model and runs xbrlkit's own `disclosures`, so both answer as `xbrlkit serve` does. Cheap: call it before `information-block`. Shared-repo graphs take `ticker` (auto-resolving the latest filing) or `report_id`; tenant graphs take `report_id`. A filing processed before its artifacts existed answers 404 until the repository is reprocessed.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"disclosures","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisclosuresRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_DisclosuresResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/information-block":{"post":{"tags":["RoboLedger: Analytical Views"],"summary":"Information Block","description":"One section of a report read whole — the expensive call: rows in presentation order with the consolidated value per period column, the same rows broken out by the section's own axes, the axes with the members that carry facts, every total's calculation children with a footing check, and the section's text blocks. Member breakdowns and period columns are kept most-reported / most-recent first up to a response budget; a row is never left blank by a cut, and `members_omitted` / `periods_omitted` say what was. A block longer than `max_rows` is `truncated`; pass its `next_offset` as `offset` for the next page. Take `block` from `disclosures`. Same resolution as `disclosures`: `ticker` or `report_id` on shared-repo graphs, `report_id` on tenant graphs. On a tenant graph this reads the section as the ledger's report holds it; `get-information-block` returns one authored block's envelope with its rules and verification.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"informationBlock","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InformationBlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_InformationBlockResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/describe-filing":{"post":{"tags":["RoboLedger: Analytical Views"],"summary":"Describe Filing","description":"How one filing is laid out: entity, periods, statements and disclosures by role, axes, and its text — the Items of a 10-K or 10-Q and its largest text blocks, each with the character offset `read-text` pages from. On the SEC shared repository the filing is read from its public folder — its own document, from any processed year — and a `ticker` picks it: the latest annual report, narrowed by `fiscal_year` / `period_type`, or one `accession`, or with `form: 8-K` the latest earnings release and its exhibits (`fiscal_year` is then the calendar year it was filed, and a CIK may stand in for the ticker). SEC only: a ledger files no document, and its sections read through `disclosures` and `information-block`.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"describeFiling","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DescribeFilingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_DescribeFilingResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/search-text":{"post":{"tags":["RoboLedger: Analytical Views"],"summary":"Search Text","description":"Every place one filing's whole text says something, in document order, with the surrounding text and the section each match falls in; on no match, how often each word of the query occurs alone. The query is words matched in order across any spacing (`|` between alternative phrases, a trailing `*` for a stem), not a regular expression. On the SEC shared repository the text is the filing's own document — cover page, footnotes and exhibits included — so this finds what no indexed section carries. Same filing selection as `describe-filing`.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"searchText","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchTextRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_SearchTextResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/read-text":{"post":{"tags":["RoboLedger: Analytical Views"],"summary":"Read Text","description":"One window of a filing's whole text from a character offset — a `search-text` hit's, or a section's from `describe-filing` — with `next_offset` while more follows. Same filing selection as `describe-filing`.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"readText","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadTextRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_ReadTextResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboledger/{graph_id}/operations/live-financial-statement":{"post":{"tags":["RoboLedger: Analytical Views"],"summary":"Live Financial Statement","description":"Generate an ad-hoc financial statement directly from the tenant's OLTP ledger data using the active CoA→GAAP mapping. This is the authoritative source for RoboLedger entity graphs — no graph materialization required. One entity's books: `entity_id` names a subsidiary, omitted means the group parent; `consolidated` on the parent combines every entity of the group at the rs-gaap concepts, with no eliminations. Rejected on shared-repository graphs; those should use `financial-statement-analysis` instead.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"liveFinancialStatement","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveFinancialStatementRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_LiveFinancialStatementResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboinvestor/{graph_id}/operations/create-portfolio-block":{"post":{"tags":["RoboInvestor"],"summary":"Create Portfolio Block","description":"Create a portfolio with optional initial positions in a single atomic envelope. Each position references an existing security; this operation never mints securities (use `create-security`). Whole envelope validates before any write.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"createPortfolioBlock","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePortfolioBlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_PortfolioBlockEnvelope_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboinvestor/{graph_id}/operations/update-portfolio-block":{"post":{"tags":["RoboInvestor"],"summary":"Update Portfolio Block","description":"Patch portfolio fields and apply position deltas (`add` / `update` / `dispose`) atomically. Partial failures roll back.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"updatePortfolioBlock","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePortfolioBlockOperation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_PortfolioBlockEnvelope_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboinvestor/{graph_id}/operations/delete-portfolio-block":{"post":{"tags":["RoboInvestor"],"summary":"Delete Portfolio Block","description":"Cascade-delete the portfolio plus all of its positions. When active positions exist, the request must include `confirm_active_positions: true` — safety belt to prevent accidental cascade. Disposed-only portfolios delete without the flag.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"deletePortfolioBlock","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePortfolioBlockOperation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_DeletePortfolioBlockResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboinvestor/{graph_id}/operations/create-security":{"post":{"tags":["RoboInvestor"],"summary":"Create Security","description":"Register a security (common stock, preferred stock, warrant, convertible note, etc.) owned by this graph's entity. Optionally cross-links to an issuing entity in another graph via `source_graph_id` for mutual-handshake attribution.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"createSecurity","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSecurityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_SecurityResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboinvestor/{graph_id}/operations/update-security":{"post":{"tags":["RoboInvestor"],"summary":"Update Security","description":"Update mutable fields on a security (name, type, subtype, terms, share counts, entity linkage). Unset fields are ignored.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"updateSecurity","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSecurityOperation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_SecurityResponse_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/extensions/roboinvestor/{graph_id}/operations/delete-security":{"post":{"tags":["RoboInvestor"],"summary":"Delete Security","description":"Soft-delete the security (`is_active=false`). Historical positions referencing it remain valid.\n\n**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.","operationId":"deleteSecurity","security":[{"APIKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"string","pattern":"^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$","title":"Graph Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSecurityOperation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationEnvelope_DeleteResult_"}}},"headers":{"X-Rate-Limit-Remaining":{"description":"Requests remaining in the current rate-limit window","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"Unix epoch seconds at which the current window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict — key reused with different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"APIKeyInfo":{"properties":{"id":{"type":"string","title":"Id","description":"API key ID"},"name":{"type":"string","title":"Name","description":"API key name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"API key description"},"prefix":{"type":"string","title":"Prefix","description":"API key prefix for identification"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether the key is active"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At","description":"Last used timestamp"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At","description":"Expiration timestamp"},"created_at":{"type":"string","title":"Created At","description":"Creation timestamp"},"graph_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Graph Id","description":"Graph scope; null means account-wide"}},"type":"object","required":["id","name","prefix","is_active","created_at"],"title":"APIKeyInfo","description":"API key information response model."},"APIKeysResponse":{"properties":{"api_keys":{"items":{"$ref":"#/components/schemas/APIKeyInfo"},"type":"array","title":"Api Keys","description":"List of user's API keys"}},"type":"object","required":["api_keys"],"title":"APIKeysResponse","description":"Response model for listing API keys."},"AccountInfo":{"properties":{"provider":{"type":"string","title":"Provider","description":"Authentication provider ID (e.g., 'github', 'google')"},"provider_type":{"type":"string","title":"Provider Type","description":"Type of provider"},"provider_account_id":{"type":"string","title":"Provider Account Id","description":"Account ID at the provider"}},"type":"object","required":["provider","provider_type","provider_account_id"],"title":"AccountInfo","description":"Provider account information.","example":{"provider":"github","provider_account_id":"12345","provider_type":"oauth"}},"AddGraphMemberRequest":{"properties":{"user_id":{"type":"string","title":"User Id","description":"User to grant access to (must belong to the graph's organization)"},"role":{"$ref":"#/components/schemas/GraphRole","description":"Graph role: viewer (read-only), member (read/write), admin (full control)","default":"member"}},"type":"object","required":["user_id"],"title":"AddGraphMemberRequest","description":"Request to grant an org member access to a graph."},"AddPublishListMembersOperation":{"properties":{"target_graph_ids":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Target Graph Ids","description":"Graph IDs to add. Each must exist and have the same extension (roboledger / roboinvestor) enabled. Self-graph rejected."},"list_id":{"type":"string","title":"List Id","description":"The publish list to add members to."}},"type":"object","required":["target_graph_ids","list_id"],"title":"AddPublishListMembersOperation","description":"Add recipient graphs to a publish list.","examples":[{"list_id":"pl_01HVF8T0M2YTAY3BBNRH0V0","target_graph_ids":["kg_abc12345","kg_def67890"]}]},"AgentClassification":{"properties":{"element_id":{"type":"string","title":"Element Id","description":"The default chart account."},"account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Name","description":"The account's name."},"mode":{"type":"string","title":"Mode","description":"`suggest`: offered on each new line. `always_ask`: never offered."},"confirmations":{"type":"integer","title":"Confirmations","description":"Committed lines that went to this account."},"overrides":{"type":"integer","title":"Overrides","description":"Committed lines that went elsewhere while it was the default."},"set_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Set By","description":"Who set or last moved it."},"set_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Set At","description":"When it was set or last moved."},"learned_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Learned From","description":"The committed line it was learned from, when it was."}},"type":"object","required":["element_id","mode","confirmations","overrides"],"title":"AgentClassification","description":"A counterparty's default account, learned from committed lines or set by\nhand."},"AnalyticalStatementFactRow":{"properties":{"canonical_concept":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonical Concept"},"qname":{"type":"string","title":"Qname"},"name":{"type":"string","title":"Name"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"The fact's unit, e.g. `USD` or `USD/shares`. A line a filer reports in two units (its own currency and a US-dollar translation) comes back once per unit."},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"},"period_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Type"},"duration_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duration Type"}},"type":"object","required":["qname","name"],"title":"AnalyticalStatementFactRow","description":"A single fact row from the graph-backed statement analysis."},"ArtifactResponse":{"properties":{"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic","description":"Structure.description — the block's human-readable topic."},"renderer_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renderer Note","description":"e.g. 'in thousands', 'except per share'."},"template":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Template","description":"Reusable layout (ordering, subtotals, styling) when attached. First-class templates are not yet implemented; this field is always null on currently-shipped block types."},"mechanics":{"oneOf":[{"$ref":"#/components/schemas/ScheduleMechanics"},{"$ref":"#/components/schemas/StatementMechanics"},{"$ref":"#/components/schemas/MetricMechanics"},{"$ref":"#/components/schemas/RollforwardMechanics"},{"$ref":"#/components/schemas/ForecastMechanics"},{"$ref":"#/components/schemas/ReconciliationMechanics"}],"title":"Mechanics","discriminator":{"propertyName":"kind","mapping":{"closing_entry_generator":"#/components/schemas/ScheduleMechanics","forecast":"#/components/schemas/ForecastMechanics","metric":"#/components/schemas/MetricMechanics","reconciliation":"#/components/schemas/ReconciliationMechanics","rollforward":"#/components/schemas/RollforwardMechanics","statement_renderer":"#/components/schemas/StatementMechanics"}}}},"type":"object","required":["mechanics"],"title":"ArtifactResponse","description":"The block's producible-artifact envelope — topic, template, mechanics."},"AssertMetricsRequest":{"properties":{"structure_id":{"type":"string","title":"Structure Id","description":"Metric block structure (block_type='metric') to assert into."},"period_end":{"type":"string","format":"date","title":"Period End","description":"Period end the observations are for — instant concepts (a follower count at month end) land as of this date; duration concepts (monthly downloads) end on it."},"period_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period Start","description":"Window start for duration concepts and the standing FactSet's period_start. Instant concepts ignore it."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity the asserted values belong to, by id. Omit for the group parent."},"source_system":{"type":"string","minLength":1,"title":"Source System","description":"Identifier of the asserting system (e.g. 'content-machine') — recorded as the AssertedProvenance source_system."},"basis_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Basis Note","description":"Free-text basis / source reference for the observations."},"observations":{"items":{"$ref":"#/components/schemas/MetricObservation"},"type":"array","minItems":1,"title":"Observations","description":"Observed values, one per metric concept — duplicates rejected."}},"type":"object","required":["structure_id","period_end","source_system","observations"],"title":"AssertMetricsRequest","description":"Request body for the `assert-metrics` operation.\n\nThe observation sibling of `compute-metrics`: writes externally-\nobserved values (usage counts, marketing numbers, hand-carried\nfigures) into the period's standing `factset_type='metric'` FactSet\nwith `AssertedProvenance`. Re-asserting a period replaces its facts\n— one standing FactSet per (structure, entity, period_end), the\naccumulating time series.\n\nStructures carrying `Derive` rules are compute-owned\n(`compute-metrics`) and rejected — asserted and derived metric\nseries keep disjoint structures. Asserted series are actuals; there\nis no scenario axis.","examples":[{"observations":[{"qname":"rsx:GithubStars","value":1240},{"qname":"rsx:NpmDownloads","value":3811}],"period_end":"2026-07-31","period_start":"2026-07-01","source_system":"content-machine","structure_id":"str_growth_metrics"}]},"AssertMetricsResponse":{"properties":{"structure_id":{"type":"string","title":"Structure Id"},"entity_id":{"type":"string","title":"Entity Id"},"period_end":{"type":"string","format":"date","title":"Period End"},"fact_set_id":{"type":"string","title":"Fact Set Id","description":"Standing metric FactSet the observations were written to."},"asserted":{"items":{"$ref":"#/components/schemas/AssertedMetricLite"},"type":"array","title":"Asserted"},"replaced":{"type":"boolean","title":"Replaced","description":"True when a prior standing set existed for the period and its facts were replaced.","default":false}},"type":"object","required":["structure_id","entity_id","period_end","fact_set_id"],"title":"AssertMetricsResponse","description":"Response for the `assert-metrics` operation."},"AssertedMetricLite":{"properties":{"element_id":{"type":"string","title":"Element Id","description":"Metric element the fact was written for."},"element_qname":{"type":"string","title":"Element Qname","description":"Metric element qname."},"name":{"type":"string","title":"Name","description":"Metric display name."},"value":{"type":"number","title":"Value","description":"Asserted value."},"unit":{"type":"string","title":"Unit","description":"Fact unit — 'USD' for monetary, 'days' for days, else 'pure'."},"period_type":{"type":"string","title":"Period Type","description":"'instant' or 'duration'."},"item_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Type","description":"Format family from the metric element (monetary | ratio | percent | multiple | days). None means untyped; fall back to unit."}},"type":"object","required":["element_id","element_qname","name","value","unit","period_type"],"title":"AssertedMetricLite","description":"One metric written by an `assert-metrics` run."},"AssociationResponse":{"properties":{"id":{"type":"string","title":"Id"},"structure_id":{"type":"string","title":"Structure Id"},"from_element_id":{"type":"string","title":"From Element Id"},"from_element_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Element Name"},"from_element_qname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Element Qname"},"to_element_id":{"type":"string","title":"To Element Id"},"to_element_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Element Name"},"to_element_qname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Element Qname"},"association_type":{"type":"string","title":"Association Type"},"order_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Order Value"},"weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"suggested_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested By"},"approved_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved By"}},"type":"object","required":["id","structure_id","from_element_id","to_element_id","association_type"],"title":"AssociationResponse","description":"One edge between two elements within a structure (parent/child\npresentation, calculation rollup, mapping, equivalence).\n\n`association_type` discriminates the edge semantics. Mapping edges\nare the user-facing path (CoA → reporting concept); presentation /\ncalculation edges express structure layout and roll-ups.\n`confidence` is set on AI-suggested mappings (≥0.90 auto-approved,\n0.70-0.89 flagged for review)."},"AttributionFilter":{"properties":{"target_qname":{"type":"string","title":"Target Qname","description":"QName of the flow concept this filter produces facts for — e.g. `rs-gaap:ProceedsFromIssuanceOfCommonStock`. Resolved to `target_element_id` at create time."},"target_element_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Element Id","description":"Resolved element id for `target_qname`. Null at create time; populated by the handler before persistence. Round-tripped in the envelope."},"predicate":{"$ref":"#/components/schemas/LineItemMetadataPredicate","description":"Predicate that determines which LineItems match this filter."}},"type":"object","required":["target_qname","predicate"],"title":"AttributionFilter","description":"One flow-concept attribution rule on a rollforward IB.\n\nPairs a target concept (the flow leaf the matched amount counts\ntoward) with a predicate (which LineItems match). The rollforward's\n`attribution_filters: list[AttributionFilter]` declares every flow\nthe BS source decomposes into; the renderer evaluates them all per\nperiod.\n\n`target_element_id` is resolved at create time from `target_qname`\nvia the rs-gaap library + tenant taxonomy lookup. Authors only need\nto provide the qname; the element_id is filled in by the create\nhandler and the resolved value is what the envelope round-trips."},"AuthProvidersResponse":{"properties":{"password_auth":{"type":"boolean","title":"Password Auth","description":"Whether password authentication is available"},"oidc":{"$ref":"#/components/schemas/OIDCProviderInfo","description":"OIDC SSO availability"},"registration":{"type":"boolean","title":"Registration","description":"Whether self-service registration is open"},"passkeys":{"type":"boolean","title":"Passkeys","description":"Whether passkey authentication is available"}},"type":"object","required":["password_auth","oidc","registration","passkeys"],"title":"AuthProvidersResponse","description":"Auth posture response model.\n\nDescribes which authentication methods this deployment offers so the\nlogin surface can render the correct posture from runtime configuration."},"AuthResponse":{"properties":{"user":{"additionalProperties":true,"type":"object","title":"User","description":"User information"},"org":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Org","description":"Organization information (personal org created automatically on registration)"},"message":{"type":"string","title":"Message","description":"Success message"},"status":{"type":"string","enum":["authenticated","mfa_required","mfa_enrollment_required"],"title":"Status","description":"Login flow state: authenticated (token present), or a passkey MFA step is required before a session is issued (mfa_token present)","default":"authenticated"},"mfa_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfa Token","description":"Short-lived token authorizing the MFA second step or forced enrollment; present only when status is not 'authenticated'"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token","description":"JWT authentication token (optional for cookie-based auth)"},"expires_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In","description":"Token expiry time in seconds from now"},"refresh_threshold":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Refresh Threshold","description":"Recommended refresh threshold in seconds before expiry"}},"type":"object","required":["user","message"],"title":"AuthResponse","description":"Authentication response model."},"AutoMapElementsOperation":{"properties":{"mapping_id":{"type":"string","title":"Mapping Id","description":"The mapping structure to populate."}},"type":"object","required":["mapping_id"],"title":"AutoMapElementsOperation","description":"Run the MappingOperator over a mapping structure (async).\n\nThe MappingOperator walks every unmapped CoA element and proposes\nassociations to reporting concepts. Confidence thresholds: ≥0.90\nauto-approved (association created), 0.70-0.89 flagged for review\n(created with `confidence` set; surface it in your UI), <0.70 skipped.\nReturns a `pending` envelope immediately; subscribe to the SSE stream\nfor progress.","examples":[{"mapping_id":"map_01HVF8T0M2YTAY3BBNRH0V0"}]},"AvailableExtension":{"properties":{"name":{"type":"string","title":"Name"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"description":{"type":"string","title":"Description"},"enabled":{"type":"boolean","title":"Enabled","default":false}},"type":"object","required":["name","description"],"title":"AvailableExtension"},"AvailableExtensionsResponse":{"properties":{"extensions":{"items":{"$ref":"#/components/schemas/AvailableExtension"},"type":"array","title":"Extensions"}},"type":"object","required":["extensions"],"title":"AvailableExtensionsResponse"},"AvailableGraphTiersResponse":{"properties":{"tiers":{"items":{"$ref":"#/components/schemas/GraphTierInfo"},"type":"array","title":"Tiers","description":"List of available tiers"}},"type":"object","required":["tiers"],"title":"AvailableGraphTiersResponse","description":"Response containing available graph tiers."},"BackfillPeriodOutcome":{"properties":{"period":{"type":"string","title":"Period","description":"The month, in YYYY-MM"},"status":{"type":"string","title":"Status","description":"stamped: reopen → reclose completed. skipped_drafts: the month holds draft entries the backfill refuses to post — review via list-period-drafts, then close-period or re-run. failed: the reclose raised; processing halted (see detail)."},"statements_stamped":{"type":"boolean","title":"Statements Stamped","description":"Whether the reclose stamped canonical statement FactSets. False with a statement_stamp_note soft-skip when reporting isn't set up.","default":false},"statement_stamp_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statement Stamp Note","description":"Soft-skip reason when statements_stamped is false"},"statement_rule_summary":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Statement Rule Summary","description":"Statement-rule verification tally for the month's stamped sets (pass/fail/error/skipped); None when no rules ran."},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail","description":"Human-readable detail for skipped/failed months"}},"type":"object","required":["period","status"],"title":"BackfillPeriodOutcome","description":"Per-month result of a plan-history backfill pass."},"BackfillPlanHistoryOperation":{"properties":{"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity whose books this acts on, by id. Omit for the group parent — the single-entity default."},"start_period":{"anyOf":[{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},{"type":"null"}],"title":"Start Period","description":"YYYY-MM period to backfill from. Clamped to the earliest month with ledger data; defaults to that month when omitted. Must be on or before `closed_through`."},"max_periods":{"type":"integer","maximum":24.0,"minimum":1.0,"title":"Max Periods","description":"Maximum months to restamp in this call. Each month runs a full reopen → reclose cycle; keep chunks modest and loop on `remaining_periods`.","default":12},"allow_stale_sync":{"type":"boolean","title":"Allow Stale Sync","description":"Override the sync-currency gate on each reclose. Historical months predate the last sync in the normal case, so this is rarely needed.","default":false},"allow_stranded_obligations":{"type":"boolean","title":"Allow Stranded Obligations","description":"Override the stranded-obligation gate on each reclose. Only needed when a matured classified obligation without a drafted entry exists inside the backfill window and you have decided not to draft or void it first.","default":false},"allow_reconciling_items":{"type":"boolean","title":"Allow Reconciling Items","description":"Override the reconciling-item gate on each reclose. Only needed when an event inside the backfill window is still flagged as changed upstream and you have decided not to resolve it first.","default":false},"allow_unposted_source_events":{"type":"boolean","title":"Allow Unposted Source Events","description":"Override the unposted-source-event gate on each reclose. Only needed when a source event inside the backfill window was never committed and you have decided not to commit or void it first.","default":false},"allow_unreconciled_accounts":{"type":"boolean","title":"Allow Unreconciled Accounts","description":"Override the reconciliation gate on each reclose. Needed when a month inside the backfill window has a reconciliation the close waits on that was never compared for it, which is every month closed before the reconciliation existed.","default":false},"restamp":{"type":"boolean","title":"Restamp","description":"Also re-derive months that ALREADY have canonical statement sets (default: skip them). Use after an engine improvement changes what a stamp produces — each month reruns the full reopen → reclose cycle and replaces its sets. A restamp run is not self-resuming (every month in range stays a candidate); advance `start_period` between chunks.","default":false},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Free-form note attached to each close audit event"}},"type":"object","title":"BackfillPlanHistoryOperation","description":"Compile monthly statement history behind the close boundary.","examples":[{},{"max_periods":12,"start_period":"2019-07"},{"max_periods":12,"restamp":true,"start_period":"2024-08"}]},"BackfillPlanHistoryResponse":{"properties":{"fiscal_calendar":{"$ref":"#/components/schemas/FiscalCalendarResponse"},"earliest_available_period":{"type":"string","title":"Earliest Available Period","description":"First month with ledger data — the hard floor for backfill"},"effective_start_period":{"type":"string","title":"Effective Start Period","description":"The start actually used after clamping to earliest_available_period"},"closed_through":{"type":"string","title":"Closed Through","description":"The close boundary the backfill runs up to (inclusive)"},"period_rows_created":{"type":"integer","title":"Period Rows Created","description":"FiscalPeriod rows seeded (baseline-closed) for months the calendar didn't cover yet","default":0},"processed":{"items":{"$ref":"#/components/schemas/BackfillPeriodOutcome"},"type":"array","title":"Processed","description":"Months this call attempted, oldest first"},"remaining_periods":{"items":{"type":"string"},"type":"array","title":"Remaining Periods","description":"Months still lacking canonical statement sets that this call did not attempt (beyond max_periods, or after a failure halt). Loop until empty."}},"type":"object","required":["fiscal_calendar","earliest_available_period","effective_start_period","closed_through"],"title":"BackfillPlanHistoryResponse","description":"Response from one chunked plan-history backfill call."},"BackupCreateRequest":{"properties":{"backup_format":{"type":"string","pattern":"^full_dump$","title":"Backup Format","description":"Backup format - only 'full_dump' is supported (complete .lbug database file)","default":"full_dump"},"backup_type":{"type":"string","pattern":"^full$","title":"Backup Type","description":"Backup type - only 'full' is supported","default":"full"},"retention_days":{"type":"integer","maximum":90.0,"minimum":1.0,"title":"Retention Days","description":"Retention period in days, further capped to the graph tier's maximum (7/30/90). 90 is the hard ceiling: the storage lifecycle expires backup objects then regardless of the requested value.","default":30},"compression":{"type":"boolean","title":"Compression","description":"Enable compression (always enabled for optimal storage)","default":true},"schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule","description":"Optional cron schedule for automated backups"}},"type":"object","title":"BackupCreateRequest","description":"Request model for creating a backup."},"BackupDownloadUrlResponse":{"properties":{"download_url":{"type":"string","title":"Download Url","description":"Pre-signed S3 URL for downloading the backup file","examples":["https://s3.amazonaws.com/robosystems-backups/kg1a2b3c4d5/backup.lbug.tar.gz?X-Amz-Credential=..."]},"expires_in":{"type":"integer","maximum":86400.0,"minimum":300.0,"title":"Expires In","description":"URL expiration time in seconds from now","examples":[3600]},"expires_at":{"type":"number","title":"Expires At","description":"Unix timestamp when the URL expires","examples":[1705315200.0]},"backup_id":{"type":"string","title":"Backup Id","description":"Backup identifier","examples":["bk1a2b3c4d5"]},"graph_id":{"type":"string","title":"Graph Id","description":"Graph database identifier","examples":["kg1a2b3c4d5"]}},"type":"object","required":["download_url","expires_in","expires_at","backup_id","graph_id"],"title":"BackupDownloadUrlResponse","description":"Response model for backup download URL generation.","examples":[{"backup_id":"bk1a2b3c4d5","download_url":"https://s3.amazonaws.com/robosystems-user-prod/graph-backups/databases/kg1a2b3c4d5/full/backup-20240115_100000.lbug.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=...","expires_at":1705315200.0,"expires_in":3600,"graph_id":"kg1a2b3c4d5"},{"backup_id":"bk9f8e7d6c5","download_url":"https://s3.amazonaws.com/robosystems-user-prod/graph-backups/databases/kg9f8e7d6c5/full/backup-20240114_183000.lbug.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=...","expires_at":1705401600.0,"expires_in":86400,"graph_id":"kg9f8e7d6c5"},{"backup_id":"bksec123456","download_url":"https://account.r2.cloudflarestorage.com/robosystems-downloads/downloads/sec/sec.lbug.zst?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=...","expires_at":1705314900.0,"expires_in":300,"graph_id":"sec"}]},"BackupLimits":{"properties":{"max_backup_size_gb":{"type":"number","title":"Max Backup Size Gb","description":"Maximum backup size in GB"},"backup_retention_days":{"type":"integer","title":"Backup Retention Days","description":"Backup retention period in days"},"max_backups_per_day":{"type":"integer","title":"Max Backups Per Day","description":"Maximum backups per day"}},"type":"object","required":["max_backup_size_gb","backup_retention_days","max_backups_per_day"],"title":"BackupLimits","description":"Backup operation limits."},"BackupListResponse":{"properties":{"backups":{"items":{"$ref":"#/components/schemas/BackupResponse"},"type":"array","title":"Backups"},"total_count":{"type":"integer","title":"Total Count"},"graph_id":{"type":"string","title":"Graph Id"},"is_shared_repository":{"type":"boolean","title":"Is Shared Repository","description":"Whether this is a shared repository (limits apply)","default":false},"download_quota":{"anyOf":[{"$ref":"#/components/schemas/DownloadQuota"},{"type":"null"}],"description":"Download quota for shared repositories"}},"type":"object","required":["backups","total_count","graph_id"],"title":"BackupListResponse","description":"Response model for backup list."},"BackupResponse":{"properties":{"backup_id":{"type":"string","title":"Backup Id"},"graph_id":{"type":"string","title":"Graph Id"},"backup_format":{"type":"string","title":"Backup Format"},"backup_type":{"type":"string","title":"Backup Type"},"initiated_by":{"type":"string","title":"Initiated By","description":"Who started this backup. 'user' is one you requested and it counts against the tier's daily backup limit; 'scheduled' is taken nightly on your behalf and does not; 'final' is the copy taken when a graph is deprovisioned, so you can still retrieve your data afterwards.","default":"user"},"memory_included":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Memory Included","description":"Whether the archive carries this graph's semantic memory store. Null for backups taken before memory was included, which make no claim either way — distinct from false, which means the graph had none."},"status":{"type":"string","title":"Status"},"original_size_bytes":{"type":"integer","title":"Original Size Bytes"},"compressed_size_bytes":{"type":"integer","title":"Compressed Size Bytes"},"compression_ratio":{"type":"number","title":"Compression Ratio"},"node_count":{"type":"integer","title":"Node Count"},"relationship_count":{"type":"integer","title":"Relationship Count"},"backup_duration_seconds":{"type":"number","title":"Backup Duration Seconds"},"compression_enabled":{"type":"boolean","title":"Compression Enabled"},"download_extension":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Extension","description":"Extension the download will carry, and therefore how to unpack it: '.lbug.zip' is a ZIP holding the LadybugDB database file, '.lbug.zst' is zstd-compressed (`zstd -d`). Null only when the backup has no stored object yet."},"created_at":{"type":"string","title":"Created At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["backup_id","graph_id","backup_format","backup_type","status","original_size_bytes","compressed_size_bytes","compression_ratio","node_count","relationship_count","backup_duration_seconds","compression_enabled","created_at","completed_at","expires_at"],"title":"BackupResponse","description":"Response model for backup information."},"BackupStatsResponse":{"properties":{"graph_id":{"type":"string","title":"Graph Id"},"total_backups":{"type":"integer","title":"Total Backups"},"successful_backups":{"type":"integer","title":"Successful Backups"},"failed_backups":{"type":"integer","title":"Failed Backups"},"success_rate":{"type":"number","title":"Success Rate"},"total_original_size_bytes":{"type":"integer","title":"Total Original Size Bytes"},"total_compressed_size_bytes":{"type":"integer","title":"Total Compressed Size Bytes"},"storage_saved_bytes":{"type":"integer","title":"Storage Saved Bytes"},"average_compression_ratio":{"type":"number","title":"Average Compression Ratio"},"latest_backup_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Backup Date"},"backup_formats":{"additionalProperties":{"type":"integer"},"type":"object","title":"Backup Formats"}},"type":"object","required":["graph_id","total_backups","successful_backups","failed_backups","success_rate","total_original_size_bytes","total_compressed_size_bytes","storage_saved_bytes","average_compression_ratio","latest_backup_date","backup_formats"],"title":"BackupStatsResponse","description":"Response model for backup statistics."},"BillingCustomer":{"properties":{"org_id":{"type":"string","title":"Org Id","description":"Organization ID"},"has_payment_method":{"type":"boolean","title":"Has Payment Method","description":"Whether organization has a payment method on file"},"invoice_billing_enabled":{"type":"boolean","title":"Invoice Billing Enabled","description":"Whether invoice billing is enabled (enterprise customers)"},"payment_methods":{"items":{"$ref":"#/components/schemas/PaymentMethod"},"type":"array","title":"Payment Methods","description":"List of payment methods on file"},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Customer Id","description":"Stripe customer ID if applicable"},"created_at":{"type":"string","title":"Created At","description":"Customer creation timestamp (ISO format)"}},"type":"object","required":["org_id","has_payment_method","invoice_billing_enabled","payment_methods","created_at"],"title":"BillingCustomer","description":"Billing customer information for an organization."},"BindTextBlockRequest":{"properties":{"document_id":{"type":"string","title":"Document Id","description":"Platform Document to bind (see list-documents)."},"section_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Id","description":"Slugified heading id of one section to bind (the section ids search-documents returns); omit to bind the whole document."},"structure_id":{"type":"string","title":"Structure Id","description":"Disclosure Structure the text block belongs to — must be block_type='regulatory_disclosure' with a text-block concept_arrangement (text_block / levelN_textblock)."},"element_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Element Id","description":"Disclosure element to tag the text to (id form)."},"element_qname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Element Qname","description":"Disclosure element qname (e.g. 'acme:SignificantAccountingPoliciesTextBlock') — exactly one of element_id / element_qname."},"period_start":{"type":"string","format":"date","title":"Period Start","description":"Reporting period start the narrative covers (duration fact)."},"period_end":{"type":"string","format":"date","title":"Period End","description":"Reporting period end."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity the fact belongs to, by id; omit for the group parent."}},"type":"object","required":["document_id","structure_id","period_start","period_end"],"title":"BindTextBlockRequest"},"BindTextBlockResponse":{"properties":{"fact_id":{"type":"string","title":"Fact Id","description":"The Nonnumeric Fact created."},"fact_set_id":{"type":"string","title":"Fact Set Id","description":"Standing 'disclosure' FactSet holding the fact."},"structure_id":{"type":"string","title":"Structure Id"},"element_id":{"type":"string","title":"Element Id"},"document_id":{"type":"string","title":"Document Id"},"section_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Id"},"content_hash":{"type":"string","title":"Content Hash","description":"Full sha256 hex of the bound text (drift signal)."},"characters":{"type":"integer","title":"Characters","description":"Length of the bound text."},"period_start":{"type":"string","format":"date","title":"Period Start"},"period_end":{"type":"string","format":"date","title":"Period End"},"replaced":{"type":"boolean","title":"Replaced","description":"True when a re-bind replaced this element's existing fact in the standing FactSet (content and provenance refreshed)."}},"type":"object","required":["fact_id","fact_set_id","structure_id","element_id","document_id","content_hash","characters","period_start","period_end","replaced"],"title":"BindTextBlockResponse"},"BlockSourceGraphOperation":{"properties":{"source_graph_id":{"type":"string","maxLength":64,"title":"Source Graph Id","description":"Graph ID to block. Read it off the `source_graph_id` provenance field of a report that was shared to you."},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason","description":"Free-form note for your own records. Never disclosed to the sender."},"purge":{"type":"boolean","title":"Purge","description":"Also delete every report already shared in from this source, with their fact sets and facts. Reports you authored are never touched.","default":false}},"type":"object","required":["source_graph_id"],"title":"BlockSourceGraphOperation","description":"Bar a graph from sharing reports into this one.","examples":[{"source_graph_id":"kg1a2b3c4d5e6f7a8b9c"},{"purge":true,"reason":"No longer a shareholder.","source_graph_id":"kg1a2b3c4d5e6f7a8b9c"}]},"BlockSourceGraphResult":{"properties":{"block":{"$ref":"#/components/schemas/BlockedSourceGraphResponse","description":"The block record."},"already_blocked":{"type":"boolean","title":"Already Blocked","description":"True when the source was already blocked and this call was a no-op apart from any purge.","default":false},"purged_report_count":{"type":"integer","title":"Purged Report Count","description":"Number of previously-shared reports deleted from this graph. Zero unless `purge` was set.","default":0},"purged_report_ids":{"items":{"type":"string"},"type":"array","title":"Purged Report Ids","description":"Ids of the previously-shared reports deleted from this graph. Empty unless `purge` was set."}},"type":"object","required":["block"],"title":"BlockSourceGraphResult","description":"Outcome of a block, including anything the purge removed."},"BlockedSourceGraphResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Block row identifier (ULID)."},"source_graph_id":{"type":"string","title":"Source Graph Id","description":"The blocked sender's graph ID."},"source_graph_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Graph Name","description":"Display name of the blocked graph (if known)."},"blocked_by":{"type":"string","title":"Blocked By","description":"User ID that created the block."},"blocked_at":{"type":"string","format":"date-time","title":"Blocked At","description":"When the block was created."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Recipient's own note, if given."}},"type":"object","required":["id","source_graph_id","blocked_by","blocked_at"],"title":"BlockedSourceGraphResponse","description":"One blocked source graph."},"CancelSubscriptionRequest":{"properties":{"immediate":{"type":"boolean","title":"Immediate","description":"If true, cancel immediately and trigger fast-path deprovisioning of the underlying resource (within ~10 minutes). If false (default), cancel at the end of the current billing period.","default":false},"confirm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirm","description":"Required when immediate=True. Must equal the subscription's resource_id (e.g. graph_id) to confirm intent."},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"Organization member whose subscription to cancel. Defaults to the caller; canceling another member's requires org owner or admin."}},"type":"object","title":"CancelSubscriptionRequest","description":"Request to cancel a subscription.\n\nDefault behavior cancels at period end (soft cancel). Pass `immediate=True`\nto terminate the subscription right away — this requires `confirm` to equal\nthe subscription's `resource_id` (e.g. the graph_id) as a guard against\naccidental destructive calls."},"CeremonyOptionsResponse":{"properties":{"options":{"additionalProperties":true,"type":"object","title":"Options","description":"PublicKeyCredential options (browser JSON, opaque)"}},"type":"object","required":["options"],"title":"CeremonyOptionsResponse","description":"WebAuthn options for the browser, verbatim from the RP library."},"ChangeCalendarStartRequest":{"properties":{"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity whose books this acts on, by id. Omit for the group parent — the single-entity default."},"first_open_period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","title":"First Open Period","description":"YYYY-MM: the new first month of the calendar, open."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Free-form note attached to the audit event"}},"type":"object","required":["first_open_period"],"title":"ChangeCalendarStartRequest","description":"Move where an entity's calendar starts, before its first close.\n\nEarlier adds open months back to `first_open_period`, for history that\npredates the start (a bank feed's backfill, a cutover moved earlier).\nLater removes empty leading months. Refused once any month has closed,\nand when moving later would drop months that hold entries or unposted\nsource lines."},"ChangeCalendarStartResponse":{"properties":{"fiscal_calendar":{"$ref":"#/components/schemas/FiscalCalendarResponse"},"periods_created":{"type":"integer","title":"Periods Created","description":"Open FiscalPeriod rows added by moving the start earlier","default":0},"periods_removed":{"type":"integer","title":"Periods Removed","description":"Empty FiscalPeriod rows removed by moving the start later","default":0}},"type":"object","required":["fiscal_calendar"],"title":"ChangeCalendarStartResponse"},"ChangeReportingStyleRequest":{"properties":{"reporting_style_id":{"type":"string","minLength":1,"title":"Reporting Style Id","description":"Structure id of the target Reporting Style. Must exist in the tenant schema with a complete Network composition."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity whose style to change, by id. Omit for the group parent."}},"type":"object","required":["reporting_style_id"],"title":"ChangeReportingStyleRequest","description":"Switch a reporting entity's Reporting Style.\n\nThe Reporting Style governs how the entity's statements are laid out\n(equity-form, close-target concept, per-statement Networks). It's\nvalidated against the tenant schema — the target must be a renderable\nStyle with a complete composition — before the switch is applied.","examples":[{"reporting_style_id":"10d05f23-8ea8-5348-b8c9-f1e65bbda4a3"}]},"ChangeReportingStyleResponse":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"Entity whose Style was targeted."},"previous_reporting_style_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Reporting Style Id","description":"Style id before the change (null for legacy/unset)."},"reporting_style_id":{"type":"string","title":"Reporting Style Id","description":"Active Style id after the call."},"reporting_style_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reporting Style Code","description":"4-segment Style code (e.g. BSC-CORP-IS02-CF1), when stamped."},"changed":{"type":"boolean","title":"Changed","description":"False when the target equals the current Style (no-op)."}},"type":"object","required":["entity_id","reporting_style_id","changed"],"title":"ChangeReportingStyleResponse","description":"Result of a change-reporting-style operation."},"ChangeTierOp":{"properties":{"new_tier":{"type":"string","enum":["ladybug-standard","ladybug-large","ladybug-xlarge"],"title":"New Tier","description":"Target infrastructure tier"}},"type":"object","required":["new_tier"],"title":"ChangeTierOp","description":"Body for the change-tier operation (supports upgrades and downgrades)."},"ChartLite":{"properties":{"panels":{"items":{"$ref":"#/components/schemas/ChartPanelLite"},"type":"array","title":"Panels"}},"type":"object","title":"ChartLite","description":"Server-shaped chart projection — panel/series CONFIG, never values.\n\nThe second real server-computed View arm (after `rendering`). Values\ncome from `rendering.rows` joined by `element_id`; the x-axis is\n`rendering.periods`. Renderers (report-components) turn one panel\ninto one chart."},"ChartPanelLite":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Panel heading — e.g. 'Monetary', 'Ratios'."},"item_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Type","description":"Format family shared by the panel's series (monetary | ratio | percent | multiple | days); None for the untyped fallback panel."},"kind":{"type":"string","title":"Kind","description":"Per-panel mark — 'line' or 'bar'.","default":"line"},"series":{"items":{"$ref":"#/components/schemas/ChartSeriesLite"},"type":"array","title":"Series"}},"type":"object","title":"ChartPanelLite","description":"One chart panel — series sharing a y-axis format family.\n\nMixed-unit catalogs are unplottable on one axis, so the server groups\nrows into panels by `item_type` family (NULL falls back to\n`is_monetary`). The x-axis is always `rendering.periods`."},"ChartSeriesLite":{"properties":{"key":{"type":"string","title":"Key","description":"Stable series id — element_id today."},"element_id":{"type":"string","title":"Element Id"},"label":{"type":"string","title":"Label","description":"Display name for legends."}},"type":"object","required":["key","element_id","label"],"title":"ChartSeriesLite","description":"One plottable series in a chart panel.\n\nCarries structure and identity only — the values live in the sibling\n`rendering.rows` (join on `element_id`), so the chart arm never\nduplicates the value matrix. `key` is the stable series identity for\nclient state (colors, toggles); today it equals `element_id`, and\nfuture axes (the forecast scenario) arrive as new fields on this\nmodel, never a new arm shape."},"CheckoutResponse":{"properties":{"checkout_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkout Url","description":"URL to redirect user to for payment"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Checkout session ID for status polling"},"subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Id","description":"Internal subscription ID"},"requires_checkout":{"type":"boolean","title":"Requires Checkout","description":"Whether checkout is required","default":true},"billing_disabled":{"type":"boolean","title":"Billing Disabled","description":"Whether billing is disabled on this instance","default":false}},"type":"object","title":"CheckoutResponse","description":"Response from checkout session creation."},"CheckoutStatusResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Checkout status: 'pending_payment', 'provisioning', 'active', 'failed', 'canceled'"},"subscription_id":{"type":"string","title":"Subscription Id","description":"Internal subscription ID"},"resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Id","description":"Resource ID (graph_id for both graphs and repositories) once provisioned. For repositories, this is the repository slug (e.g., 'sec')"},"operation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operation Id","description":"Always null. Webhook-driven provisioning passes no operation id (`_trigger_resource_provisioning` calls `run_graph_provisioning` with `operation_id=None`), so there is no SSE stream to follow — poll the status endpoint instead. Retained rather than removed because it is on a published response shape; wiring it is a feature, not a fix."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if checkout failed"}},"type":"object","required":["status","subscription_id"],"title":"CheckoutStatusResponse","description":"Status of a checkout session."},"ClassificationLite":{"properties":{"id":{"type":"string","title":"Id","description":"Classification vocabulary row id."},"category":{"type":"string","title":"Category","description":"One of the 3 association-level categories in the `public.classifications` CHECK constraint: 'concept_arrangement', 'member_arrangement', or 'named_disclosure'."},"identifier":{"type":"string","title":"Identifier","description":"Vocabulary identifier within the category — e.g. 'RollUp', 'whole_part', 'AssetsRollUp'."},"is_primary":{"type":"boolean","title":"Is Primary","description":"Whether this is the canonical classification for the (association|element, category) pair. Non-primary rows capture alternates / AI suggestions alongside the chosen primary.","default":true},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence","description":"AI/adapter-supplied confidence (0.0-1.0). Null for deterministic library-seeded rows."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Provenance — 'arcrole_analysis', 'disclosure_mechanics', 'fac-traits', adapter name, etc."}},"type":"object","required":["id","category","identifier"],"title":"ClassificationLite","description":"Classification projection — one row per `association_classifications`\njunction entry.\n\nAssociation-side only: concept_arrangement, member_arrangement,\nnamed_disclosure. Element-side FASB metamodel traits (asset, current,\noperating, …) live in `TraitLite` via `element_traits`.\n\nCarries enough for the envelope caller to render / filter by category +\nidentifier without a follow-up lookup. The full `public.classifications`\nvocabulary catalog (name / description / metadata) is available via the\nlibrary GraphQL surface when callers need the details."},"ClosePeriodOperation":{"properties":{"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity whose books this acts on, by id. Omit for the group parent — the single-entity default."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Free-form note attached to the close event"},"allow_stale_sync":{"type":"boolean","title":"Allow Stale Sync","description":"Override the sync-currency gate. Only use when you have manually verified that the source data for the period is complete.","default":false},"allow_stranded_obligations":{"type":"boolean","title":"Allow Stranded Obligations","description":"Override the stranded-obligation gate — close even though matured classified obligations have no drafted closing entry, knowingly omitting those adjusting entries from the period. Prefer running promote-obligations with dispatch_handlers=true (which drafts them) or voiding the obligations instead. The override is recorded in the close audit note.","default":false},"allow_reconciling_items":{"type":"boolean","title":"Allow Reconciling Items","description":"Override the reconciling-item gate — close even though posted events in the period are still flagged as changed in the source system, leaving those differences undecided. The next sync will still report them, and the statements stamped by this close may disagree with the source. Prefer resolve-reconciling-item on each first. The override is recorded in the close audit note.","default":false},"allow_unposted_source_events":{"type":"boolean","title":"Allow Unposted Source Events","description":"Override the unposted-source-event gate — close even though source events dated in the period (bank-feed lines, QuickBooks transactions whose automatic posting failed) were never committed. Once the period closes they cannot post into it, so the stamped statements leave them out. Prefer classifying and committing, or voiding, each first. The override is recorded in the close audit note.","default":false},"allow_unreconciled_accounts":{"type":"boolean","title":"Allow Unreconciled Accounts","description":"Override the reconciliation gate — close even though a reconciliation the close waits on is not reconciled for the period, or was never compared for it. The books are then closed without that check. Prefer refresh-reconciliations and clearing what it reports first. The override is recorded in the close audit note.","default":false},"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","title":"Period","description":"Period to close, in YYYY-MM. Must be exactly `closed_through + 1` — close runs sequentially."}},"type":"object","required":["period"],"title":"ClosePeriodOperation","description":"Close a single fiscal period. Carries the YYYY-MM `period` in the\nrequest body alongside the close-time options inherited from\n:class:`ClosePeriodRequest`.","examples":[{"period":"2026-03"},{"allow_stale_sync":true,"note":"QB sync down; data manually verified.","period":"2026-03"}]},"ClosePeriodResponse":{"properties":{"fiscal_calendar":{"$ref":"#/components/schemas/FiscalCalendarResponse"},"period":{"type":"string","title":"Period"},"entries_posted":{"type":"integer","title":"Entries Posted","description":"Total draft entries the close transitioned to posted, across both post paths (QB pre-publish + local bulk transition). See entries_published_to_qb / entries_posted_locally for the split.","default":0},"entries_published_to_qb":{"type":"integer","title":"Entries Published To Qb","description":"Drafts published to QuickBooks by the close's pre-publish step (each is promoted to posted at publish time).","default":0},"entries_posted_locally":{"type":"integer","title":"Entries Posted Locally","description":"Drafts posted by the local bulk transition (entries that don't publish to QuickBooks, e.g. native-only graphs or local-only sources).","default":0},"target_auto_advanced":{"type":"boolean","title":"Target Auto Advanced","description":"Whether close_target was auto-advanced because it was reached","default":false},"rule_summary":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Rule Summary","description":"Aggregated rule-eval outcome across every schedule Structure with facts in the closed period — keys: pass/fail/error/skipped. None when no schedules had facts in the period (auto-run on close)."},"evaluated_structure_ids":{"items":{"type":"string"},"type":"array","title":"Evaluated Structure Ids","description":"ids of schedule Structures whose rules were evaluated during the close. Pairs with rule_summary."},"statements_stamped":{"type":"boolean","title":"Statements Stamped","description":"Whether the close stamped the period's canonical statement FactSets (the close-time pivot). False when the tenant hasn't set up reporting yet — see statement_stamp_note.","default":false},"shadow":{"type":"boolean","title":"Shadow","description":"True when the close ran in shadow (the QuickBooks connection's write_policy is 'shadow'): nothing was written to QuickBooks, nothing posted, the in-window drafts were shadowed, and the gates that would have blocked the close are in gate_findings.","default":false},"entries_shadowed":{"type":"integer","title":"Entries Shadowed","description":"Drafts a shadow close took as expectations (status 'shadowed') instead of posting. Always 0 outside shadow.","default":0},"gate_findings":{"items":{"type":"string"},"type":"array","title":"Gate Findings","description":"Blocker codes a shadow close recorded instead of enforcing: sync_stale, pending_obligations, stranded_obligations, reconciling_items, unposted_source_events, unreconciled_accounts. Empty outside shadow."},"gate_finding_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Gate Finding Counts","description":"Each finding's size: days stale for sync_stale, a count for the rest."},"statement_stamp_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statement Stamp Note","description":"Soft-skip reason when statements_stamped is false: no_coa_mapping | no_entity | no_statement_structures | no_taxonomy."},"stamped_statement_sets":{"additionalProperties":{"type":"string"},"type":"object","title":"Stamped Statement Sets","description":"structure_id -> fact_set_id for every canonical statement FactSet minted by this close (report_id NULL; replaced on reclose)."},"statement_rule_summary":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Statement Rule Summary","description":"Aggregated statement-rule verification outcome across the stamped structures — keys: pass/fail/error/skipped. None when no statement rules exist. Distinct from rule_summary (the schedule-rule pass)."}},"type":"object","required":["fiscal_calendar","period"],"title":"ClosePeriodResponse","description":"Response from a single-period close operation."},"CompleteDocumentUploadOp":{"properties":{"upload_id":{"type":"string","pattern":"^upl_[0-9A-Za-z]{26}$","title":"Upload Id","description":"The upload create-document-upload returned."},"title":{"type":"string","maxLength":500,"minLength":1,"title":"Title","description":"Document title"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Optional labels"},"folder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder","description":"Optional folder"}},"type":"object","required":["upload_id","title"],"title":"CompleteDocumentUploadOp","description":"Body for complete-document-upload: store the uploaded file as a document."},"ComputeForecastRequest":{"properties":{"structure_id":{"type":"string","title":"Structure Id","description":"Forecast block structure (block_type='forecast') to compute."},"months":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Months","description":"Forward months to compute — defaults to the block's full horizon_months; must not exceed it (lever assertions don't extend past the horizon)."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity to compute for. Defaults to the lever FactSet's entity (the entity the scenario was authored against)."}},"type":"object","required":["structure_id"],"title":"ComputeForecastRequest","description":"Request body for the `compute-forecast` operation.\n\nWalks the scenario's driver cascade month-by-month forward from the\nforecast block's `base_period`: lever-driven Derive rules in\ndependency order, carry-forward for unmodeled IS lines, calc-DAG\nsubtotals — upserting one scenario IS FactSet (+ a working-capital BS\nset) per forward month, all keyed by the forecast block's\n`scenario_id`. Re-running replaces each month's values (the\ncompute-metrics drift semantics). Deterministic and non-AI — no\ncredits consumed.","examples":[{"structure_id":"struct_fy26_budget"},{"months":6,"structure_id":"struct_fy26_budget"}]},"ComputeForecastResponse":{"properties":{"structure_id":{"type":"string","title":"Structure Id"},"scenario_id":{"type":"string","title":"Scenario Id","description":"The scenario key every emitted FactSet carries — the forecast block's own structure id."},"entity_id":{"type":"string","title":"Entity Id"},"base_period":{"type":"string","title":"Base Period","description":"Origin month of the block's authored horizon window — where its levers are keyed from. Equal to `anchor_period` unless the walk re-anchored at the seam."},"anchor_period":{"type":"string","title":"Anchor Period","description":"Month the walk actually seeded its opening balances from. With `base_anchor='seam'` this advances to the newest closed month as periods close, so the first forward month rolls off real balances instead of a stale base; with `'fixed'` it always equals `base_period`."},"months":{"type":"integer","title":"Months","description":"Forward months requested."},"months_computed":{"items":{"$ref":"#/components/schemas/ForecastMonthLite"},"type":"array","title":"Months Computed"},"halted_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Halted At","description":"Month (`YYYY-MM`) where the walk stopped because verification failed, or null if it ran the full horizon. Each month's opening balances are the previous month's closing balances, so computing past a failure yields months derived from a known-wrong one rather than merely unverified months. When set, `months_computed` ends at this month and is shorter than `months`; the failing month's facts are kept so the failure can be inspected."},"skipped":{"items":{"$ref":"#/components/schemas/SkippedForecastLite"},"type":"array","title":"Skipped"},"diagnostics":{"items":{"type":"string"},"type":"array","title":"Diagnostics","description":"Articulation notes — a missing cash/earnings anchor, schedule contributions with no base-set landing spot, an absent cash-flow structure. Informational; the walk still computed."}},"type":"object","required":["structure_id","scenario_id","entity_id","base_period","anchor_period","months"],"title":"ComputeForecastResponse","description":"Response for the `compute-forecast` operation."},"ComputeMetricsRequest":{"properties":{"structure_id":{"type":"string","title":"Structure Id","description":"Metric block structure (block_type='metric') to compute."},"period_end":{"type":"string","format":"date","title":"Period End","description":"Period end to compute at. Operands bind to report facts whose period_end matches exactly (instant balances as of this date; durations ending on it)."},"period_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period Start","description":"Optional lower bound for duration-operand binding and the standing FactSet's period_start."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity whose metrics to compute, by id. Omit for the group parent."},"scenario_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scenario Id","description":"Compute on a scenario slice: operands bind that scenario's facts (actuals as the fallback across the seam) and the standing metric set is stamped with the scenario. None (the default) computes actuals only. Pass a forecast block's structure id after compute-forecast to extend the metric series into its forward months."}},"type":"object","required":["structure_id","period_end"],"title":"ComputeMetricsRequest","description":"Request body for the `compute-metrics` operation.\n\nResolves the `Derive` rules scoped to the metric block, binds each\nrule's operands to the entity's most recent persisted report facts at\n`period_end`, evaluates, and upserts the period's standing\n`factset_type='metric'` FactSet (re-running a period replaces its\nfacts). One standing FactSet per (structure, entity, period_end) — the\naccumulating time series.","examples":[{"period_end":"2026-03-31","structure_id":"str_key_financial_metrics"},{"period_end":"2026-03-31","period_start":"2025-04-01","structure_id":"str_key_financial_metrics"}]},"ComputeMetricsResponse":{"properties":{"structure_id":{"type":"string","title":"Structure Id"},"entity_id":{"type":"string","title":"Entity Id"},"period_end":{"type":"string","format":"date","title":"Period End"},"fact_set_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fact Set Id","description":"Standing metric FactSet for the period — None when every metric was skipped and no prior set existed."},"computed":{"items":{"$ref":"#/components/schemas/ComputedMetricLite"},"type":"array","title":"Computed"},"skipped":{"items":{"$ref":"#/components/schemas/SkippedMetricLite"},"type":"array","title":"Skipped"}},"type":"object","required":["structure_id","entity_id","period_end"],"title":"ComputeMetricsResponse","description":"Response for the `compute-metrics` operation."},"ComputedMetricLite":{"properties":{"rule_id":{"type":"string","title":"Rule Id","description":"Derive rule that produced the value."},"element_id":{"type":"string","title":"Element Id","description":"Metric element the fact was written for."},"element_qname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Element Qname","description":"Metric element qname (e.g. rs-metric:CurrentRatio)."},"name":{"type":"string","title":"Name","description":"Metric display name."},"value":{"type":"number","title":"Value","description":"Computed value."},"unit":{"type":"string","title":"Unit","description":"Fact unit — 'USD' for monetary, 'days' for days, else 'pure'."},"period_type":{"type":"string","title":"Period Type","description":"'instant' or 'duration'."},"item_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Type","description":"Format family from the metric element (monetary | ratio | percent | multiple | days). None means untyped; fall back to unit."}},"type":"object","required":["rule_id","element_id","name","value","unit","period_type"],"title":"ComputedMetricLite","description":"One metric computed by a `compute-metrics` run."},"ConnectionLite":{"properties":{"id":{"type":"string","title":"Id"},"from_element_id":{"type":"string","title":"From Element Id"},"to_element_id":{"type":"string","title":"To Element Id"},"association_type":{"type":"string","title":"Association Type","description":"presentation | calculation | mapping | equivalence | general-special | essence-alias"},"arcrole":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arcrole"},"order_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Order Value"},"weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight"},"classifications":{"items":{"$ref":"#/components/schemas/ClassificationLite"},"type":"array","title":"Classifications","description":"Association-level classifications — concept_arrangement, member_arrangement, named_disclosure rows from the junction. Empty for library-seeded associations that haven't been classified yet."}},"type":"object","required":["id","from_element_id","to_element_id","association_type"],"title":"ConnectionLite","description":"Connection (= Association) projection.\n\n\"Connection\" is the ontology term used on the wire; the storage table is\n`associations` (`models/extensions/association.py`)."},"ConnectionOptionsResponse":{"properties":{"providers":{"items":{"$ref":"#/components/schemas/ConnectionProviderInfo"},"type":"array","title":"Providers","description":"Available connection providers"},"total_providers":{"type":"integer","title":"Total Providers","description":"Total number of providers"}},"type":"object","required":["providers","total_providers"],"title":"ConnectionOptionsResponse","description":"Response with all available connection options."},"ConnectionProviderInfo":{"properties":{"provider":{"type":"string","enum":["quickbooks","external","mercury","plaid"],"title":"Provider","description":"Provider identifier"},"display_name":{"type":"string","title":"Display Name","description":"Human-readable provider name"},"description":{"type":"string","title":"Description","description":"Provider description"},"auth_type":{"type":"string","enum":["none","oauth","link","api_key"],"title":"Auth Type","description":"Authentication type"},"auth_flow":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Flow","description":"Description of authentication flow"},"required_config":{"items":{"type":"string"},"type":"array","title":"Required Config","description":"Required configuration fields"},"optional_config":{"items":{"type":"string"},"type":"array","title":"Optional Config","description":"Optional configuration fields"},"features":{"items":{"type":"string"},"type":"array","title":"Features","description":"Supported features"},"sync_frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Frequency","description":"Typical sync frequency"},"data_types":{"items":{"type":"string"},"type":"array","title":"Data Types","description":"Types of data available"},"setup_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Setup Instructions","description":"Setup instructions"},"documentation_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documentation Url","description":"Link to documentation"}},"type":"object","required":["provider","display_name","description","auth_type","required_config","features","data_types"],"title":"ConnectionProviderInfo","description":"Information about a connection provider."},"ConnectionResponse":{"properties":{"connection_id":{"type":"string","title":"Connection Id","description":"Unique connection identifier"},"provider":{"type":"string","title":"Provider","description":"Connection provider type"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity identifier"},"status":{"type":"string","title":"Status","description":"Connection status"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string"}],"title":"Created At","description":"Creation timestamp"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string"},{"type":"null"}],"title":"Updated At","description":"Last update timestamp"},"last_sync":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string"},{"type":"null"}],"title":"Last Sync","description":"Last sync timestamp"},"write_policy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Write Policy","description":"Source-of-truth write policy: 'native' (RoboSystems is authoritative; no outbound write-back) or 'qb_authoritative' (QuickBooks is authoritative; RoboSystems-originated entries publish to QB). Set via the write-policy endpoint."},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name","description":"External-provider registered source slug — the value the integration stamps on the events it emits. Null for platform providers."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Provider-specific metadata"}},"type":"object","required":["connection_id","provider","status","created_at","metadata"],"title":"ConnectionResponse","description":"Connection response model."},"ContentLimits":{"properties":{"max_rows_per_copy":{"type":"integer","title":"Max Rows Per Copy","description":"Maximum rows per copy/materialization operation"},"max_single_table_rows":{"type":"integer","title":"Max Single Table Rows","description":"Maximum rows per staging table"},"chunk_size_rows":{"type":"integer","title":"Chunk Size Rows","description":"Rows per materialization chunk"}},"type":"object","required":["max_rows_per_copy","max_single_table_rows","chunk_size_rows"],"title":"ContentLimits","description":"Per-operation materialization limits."},"CopyOperationLimits":{"properties":{"max_file_size_gb":{"type":"number","title":"Max File Size Gb","description":"Maximum file size in GB"},"timeout_seconds":{"type":"integer","title":"Timeout Seconds","description":"Operation timeout in seconds"},"concurrent_operations":{"type":"integer","title":"Concurrent Operations","description":"Maximum concurrent operations"},"max_files_per_operation":{"type":"integer","title":"Max Files Per Operation","description":"Maximum files per operation"},"daily_copy_operations":{"type":"integer","title":"Daily Copy Operations","description":"Daily operation limit"},"supported_formats":{"items":{"type":"string"},"type":"array","title":"Supported Formats","description":"Supported file formats"}},"type":"object","required":["max_file_size_gb","timeout_seconds","concurrent_operations","max_files_per_operation","daily_copy_operations","supported_formats"],"title":"CopyOperationLimits","description":"Copy/ingestion operation limits."},"CreateAPIKeyRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Name for the API key"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Optional description"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At","description":"Optional expiration date in ISO format (e.g. 2024-12-31T23:59:59Z)"},"graph_id":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Graph Id","description":"Optional graph scope. A scoped key works only for this graph (and its subgraphs) and is the only kind of key accepted in an MCP connector URL. Omit for an account-wide key."}},"type":"object","required":["name"],"title":"CreateAPIKeyRequest","description":"Request model for creating a new API key."},"CreateAPIKeyResponse":{"properties":{"api_key":{"$ref":"#/components/schemas/APIKeyInfo","description":"API key information"},"key":{"type":"string","title":"Key","description":"The actual API key (only shown once)"}},"type":"object","required":["api_key","key"],"title":"CreateAPIKeyResponse","description":"Response model for creating a new API key."},"CreateAgentRequest":{"properties":{"agent_type":{"type":"string","title":"Agent Type","description":"Relationship category: 'customer' | 'vendor' | 'employee' | 'owner' | 'supplier' | 'government' | 'lender' | 'self' | 'other'."},"name":{"type":"string","title":"Name","description":"Display name shown in lists and on transactions."},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name","description":"Full registered legal name (when different from `name`)."},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id","description":"Tax ID (EIN / SSN / VAT). Used for 1099 / withholding reporting."},"registration_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration Number","description":"Registry-issued company number (e.g. state corp file number)."},"duns":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duns","description":"Dun & Bradstreet DUNS number."},"lei":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lei","description":"Legal Entity Identifier (ISO 17442)."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address","description":"Free-form address object (e.g. {\"line1\": \"...\", \"city\": \"...\", \"state\": \"...\", \"postal_code\": \"...\"})."},"source":{"type":"string","title":"Source","description":"Provenance: 'native' (created in-app), 'quickbooks' / 'xero' / 'plaid' (synced from integration). Drives reconciliation behavior.","default":"native"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"Source system primary key — used to match on subsequent syncs."},"is_active":{"type":"boolean","title":"Is Active","description":"Inactive agents stay in history but can't be picked for new txns.","default":true},"is_1099_recipient":{"type":"boolean","title":"Is 1099 Recipient","description":"Marks a vendor as 1099-eligible. Drives year-end 1099 reporting.","default":false},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["agent_type","name"],"title":"CreateAgentRequest","description":"Create a new economic counterparty.\n\n`agent_type` is the relationship category (customer, vendor,\nemployee, etc.) — the same legal entity may have multiple Agent rows\nif they play multiple roles (e.g. a vendor who also became a\ncustomer). `source` distinguishes integration-imported rows from\nnative-created ones; `external_id` carries the source-system's\nprimary key for sync.","examples":[{"agent_type":"vendor","is_1099_recipient":true,"name":"Acme Office Supplies","tax_id":"12-3456789"},{"address":{"city":"Seattle","line1":"100 Main St","postal_code":"98101","state":"WA"},"agent_type":"customer","email":"ap@bigco.example.com","legal_name":"Big Co Incorporated","name":"Big Co Inc"},{"agent_type":"employee","name":"Jane Q. Public","source":"native"}]},"CreateCheckoutRequest":{"properties":{"plan_name":{"type":"string","title":"Plan Name","description":"Billing plan name (e.g., 'ladybug-standard')"},"resource_type":{"type":"string","title":"Resource Type","description":"Resource type ('graph' or 'repository')"},"resource_config":{"additionalProperties":true,"type":"object","title":"Resource Config","description":"Configuration for the resource to be provisioned. For repositories: {'repository_name': 'graph_id'} where graph_id is the repository slug (e.g., 'sec')"}},"type":"object","required":["plan_name","resource_type","resource_config"],"title":"CreateCheckoutRequest","description":"Request to create a checkout session for payment collection."},"CreateConnectionRequest":{"properties":{"provider":{"type":"string","enum":["quickbooks","external","mercury","plaid"],"title":"Provider","description":"Connection provider type"},"entity_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Entity Id","description":"Entity identifier. Required for QuickBooks."},"quickbooks_config":{"anyOf":[{"$ref":"#/components/schemas/QuickBooksConnectionConfig"},{"type":"null"}]},"external_config":{"anyOf":[{"$ref":"#/components/schemas/ExternalConnectionConfig"},{"type":"null"}]},"mercury_config":{"anyOf":[{"$ref":"#/components/schemas/MercuryConnectionConfig"},{"type":"null"}]},"plaid_config":{"anyOf":[{"$ref":"#/components/schemas/PlaidConnectionConfig"},{"type":"null"}]}},"type":"object","required":["provider"],"title":"CreateConnectionRequest","description":"Request to create a new connection."},"CreateDocumentUploadOp":{"properties":{"file_name":{"type":"string","maxLength":255,"minLength":1,"title":"File Name","description":"The file's name, ending in its type's extension (`.pdf`, `.png`, `.jpg` or `.jpeg`)."},"content_type":{"type":"string","enum":["application/pdf","image/png","image/jpeg"],"title":"Content Type","description":"The file's media type.","default":"application/pdf"},"file_size_bytes":{"anyOf":[{"type":"integer","maximum":26214400.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"File Size Bytes","description":"The file's exact size in bytes, at most 25 MB. When given it is signed into the upload URL, so an upload of any other size fails. Completing the upload checks the size either way."}},"type":"object","required":["file_name"],"title":"CreateDocumentUploadOp","description":"Body for create-document-upload: where to upload a document's file."},"CreateEntityRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Display name."},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name","description":"Registered legal name. Defaults to `name`."},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type","description":"Legal form: `corporation`, `llc`, `partnership`, `sole_proprietorship`, `non_profit`. Picks the default Reporting Style (partnership and llc have equity-form Styles of their own; anything else is corporate) and the equity rows of a chart template."},"reporting_style_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reporting Style Id","description":"Structure id of the Reporting Style to present under, validated in the graph like change-reporting-style. Omit to derive it from `entity_type`."},"parent_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Entity Id","description":"The entity this one is held under. Omit for the group parent; name a subsidiary to nest a sub-group under it."},"ownership_pct":{"anyOf":[{"type":"number","maximum":100.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Ownership Pct","description":"The parent's share of this entity, as a percent (100 = wholly owned). Omit when not recorded. Refused on a graph's first entity, which becomes the group parent."},"ticker":{"anyOf":[{"type":"string","maxLength":10,"minLength":1},{"type":"null"}],"title":"Ticker","description":"Short symbol, unique in the graph; it prefixes the entity's account names (`coa-<ticker>:1000`). Derived from the name's initials when omitted."},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri","description":"Canonical URL / external identifier."},"cik":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cik"},"sic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sic"},"sic_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sic Description"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"state_of_incorporation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Of Incorporation"},"fiscal_year_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fiscal Year End","description":"Fiscal year-end as MM-DD. Defaults to the parent's: a graph has one fiscal cadence, and every entity's calendar follows it."},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"lei":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lei"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1"},"address_city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address City"},"address_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address State"},"address_postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Postal Code"},"address_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Country"}},"type":"object","required":["name"],"title":"CreateEntityRequest","description":"Add an entity to the graph's reporting group.\n\nThe new entity is a subsidiary of `parent_entity_id`, default the group\nparent, and keeps its own books: give it a chart next\n(`initialize-chart-of-accounts` with `entity_id`) and a calendar\n(`initialize`), then name it with `entity_id` on any ledger operation.\nA graph created without an entity gets this one as its group parent.\nThere is no cap on entities in a graph; capacity is the tier's.","examples":[{"entity_type":"llc","name":"Maple Court LLC","ownership_pct":100},{"entity_type":"llc","legal_name":"Harbor Property Management, LLC","name":"Harbor Property Management LLC","ownership_pct":60,"parent_entity_id":"ent_01J9ZK3M4N5P6Q7R8S9T0V1W2X","state_of_incorporation":"DE","tax_id":"12-3456789","ticker":"HPM"}]},"CreateEventBlockRequest":{"properties":{"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity whose books the event lands in, by id; every GL row its handler writes follows it. Omit for the group parent."},"event_type":{"type":"string","title":"Event Type","description":"Open vocabulary: 'invoice_issued' | 'contract_signed' | 'bank_transaction' | ..."},"event_category":{"type":"string","enum":["sales","purchase","financing","payroll","treasury","adjustment","recognition","other","control","approval","reconciliation","inquiry"],"title":"Event Category","description":"REA classification. Economic categories (sales, purchase, financing, payroll, treasury, adjustment, recognition, other) require event_class='economic'. Support categories (control, approval, reconciliation, inquiry) require event_class='support'. The DB CHECK rejects mismatched pairings."},"event_class":{"type":"string","enum":["economic","support"],"title":"Event Class","description":"REA event class. 'economic' events change resources and drive GL postings; 'support' events are audit-trail / value-chain primitives (typically captured with apply_handlers=False).","default":"economic"},"event_action":{"anyOf":[{"type":"string","enum":["produce","raise","consume","lower","use","cite","work","deliverService","pickup","dropoff","accept","transferCustody","transferAllRights","transfer","move","modify","combine","separate","copy"]},{"type":"null"}],"title":"Event Action","description":"Canonical action verb refining `event_category`. Disambiguates concepts ERPs collapse: `transferAllRights` (ownership transfer, no physical movement) vs `transferCustody` (physical only, no rights transfer) — load-bearing for consignment, drop-shipping, marketplace settlement, escrow. Optional; null is valid for legacy events and during adapter rollout."},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"ID of the counterparty agent (customer, vendor, employee, lender) involved in the event. `null` for internal-only events."},"resource_type":{"anyOf":[{"type":"string","enum":["goods","services","money","right","obligation","information","labor"]},{"type":"null"}],"title":"Resource Type","description":"REA resource kind being exchanged. One of: `goods`, `services`, `money`, `right`, `obligation`, `information`, `labor`."},"resource_element_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Element Id","description":"ID of the specific element being exchanged, when known (e.g. the cash account for a treasury movement, the inventory item for a sale)."},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At","description":"When the event happened in the real world"},"effective_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective At","description":"Accounting recognition date, if different from occurred_at"},"source":{"type":"string","title":"Source","description":"'manual' | 'system' | 'schedule', a connected provider name (e.g. 'quickbooks'), or a source_name registered via an 'external' connection. Validated against the graph's registered connections."},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"Source-system dedup key. (source, external_id) is enforced unique when external_id is provided, so retries from external adapters are idempotent at the DB level."},"external_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Url","description":"Deep link back to source-system record"},"amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount","description":"Economic value of the event in **cents** of `currency`, signed. Sign convention follows the perspective of the entity that owns the graph: inflows positive, outflows negative. `null` for non-economic events (e.g. `event_class='support'`)."},"currency":{"type":"string","title":"Currency","description":"ISO 4217 currency code for `amount`.","default":"USD"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text human-readable summary of the event."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Free-form payload, opaque to the event surface. When `apply_handlers=True`, the matched handler's metadata schema validates this dict — required keys depend on the handler registered for `event_type`. Use `preview-event-block` to discover the expected shape without writing."},"dimension_ids":{"items":{"type":"string"},"type":"array","title":"Dimension Ids","description":"IDs of dimension members tagging this event (e.g. department, fund, project). Propagate to the GL entries produced by the handler."},"obligated_by_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Obligated By Event Id","description":"Forward-materialization link: the event that scheduled or obligated this one (e.g. depreciation entries point at the asset_acquired event)."},"discharges_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discharges Event Id","description":"Settlement link: the obligation this event discharges (e.g. cash_received pointing at the originating sale_invoiced)."},"document_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Id","description":"The stored document this event rests on, as evidence: the invoice PDF, the vendor bill, the receipt photo (upload it with create-document-upload and complete-document-upload). Must be a document on this graph. While the event is live, the document cannot be deleted."},"apply_handlers":{"type":"boolean","title":"Apply Handlers","description":"When True, resolves the event_type to a handler (Python registry first, then DSL) and fires it atomically with event creation.","default":false}},"type":"object","required":["event_type","event_category","occurred_at","source"],"title":"CreateEventBlockRequest","description":"Write surface for a single business event.","examples":[{"agent_id":"ent_customer_acme","amount":250000,"currency":"USD","description":"April consulting retainer — Acme Corp","dimension_ids":["dim_dept_consulting"],"event_category":"sales","event_class":"economic","event_type":"invoice_issued","external_id":"qb_inv_4521","external_url":"https://app.qbo.intuit.com/app/invoice?txnId=4521","metadata":{"invoice_number":"INV-2026-0421","terms":"net_30"},"occurred_at":"2026-05-01T14:30:00Z","resource_type":"services","source":"quickbooks"},{"amount":-125000,"apply_handlers":true,"currency":"USD","description":"ACH out — Office rent May 2026","event_category":"treasury","event_class":"economic","event_type":"bank_transaction","external_id":"plaid_txn_abc123","metadata":{"category":["Rent"],"merchant_name":"Westlake Properties LLC"},"occurred_at":"2026-05-03T00:00:00Z","source":"plaid"},{"description":"Monthly bank reconciliation completed","event_category":"control","event_class":"support","event_type":"control_executed","metadata":{"control_id":"ctl_bank_recon_monthly","reconciled_balance":4287500},"occurred_at":"2026-05-06T16:00:00Z","source":"manual"}]},"CreateEventHandlerRequest":{"properties":{"name":{"type":"string","title":"Name","description":"Human-readable handler name (unique per graph)."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-form description shown in admin UIs."},"event_type":{"type":"string","title":"Event Type","description":"Event type to match. Matches the `event_type` field on incoming events from `create-event-block`."},"event_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Category","description":"Optional category filter (e.g. 'expense', 'revenue')."},"match_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Source","description":"Match the event's `source` field (e.g. 'quickbooks', 'plaid'). Useful when the same event_type comes from multiple integrations."},"match_agent_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Agent Type","description":"Match agent-emitted events by agent_type."},"match_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Resource Type","description":"Match resource-bound events by resource_type."},"match_metadata_expression":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Match Metadata Expression","description":"JSONPath-style equality map against event.metadata, e.g. {\"category\": \"payroll\"} or {\"metadata.category\": \"payroll\"}"},"transaction_template":{"$ref":"#/components/schemas/TransactionTemplate","description":"The DSL spec for the GL rows this handler produces. See `TransactionTemplate` for the shape."},"priority":{"type":"integer","title":"Priority","description":"Tiebreaker when multiple equally-specific handlers match. Higher = wins.","default":0},"is_active":{"type":"boolean","title":"Is Active","description":"Inactive handlers are ignored at match time.","default":true},"origin":{"type":"string","enum":["hub","tenant"],"title":"Origin","description":"Provenance of the handler. `tenant` = author by graph owner; `hub` = platform-shipped template (immutable for tenants).","default":"tenant"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Free-form metadata stored alongside the handler."}},"type":"object","required":["name","event_type","transaction_template"],"title":"CreateEventHandlerRequest","description":"Register a new event-type → transaction-template rule.\n\nWhen `create-event-block` runs with `apply_handlers=True`, the\nregistry resolves the *highest-priority active* handler whose match\ncriteria all match the event, then evaluates the\n`transaction_template` to produce GL rows. Match precedence: among\nactive handlers for the same `event_type`, the one with the most\nspecific match (more match fields satisfied) wins; ties broken by\n`priority` desc, then `created_at` asc.\n\nAll match fields except `event_type` are optional — leaving them\nunset matches anything. Use `match_metadata_expression` for\nfine-grained discrimination (e.g. only payroll categories).","examples":[{"event_type":"vendor_bill_received","match_source":"quickbooks","name":"QB Vendor Bill — Default Expense Posting","priority":0,"transaction_template":{"transactions":[{"entry_template":{"credit":{"amount":"{{ event.amount }}","element_id":"elem_coa_accounts_payable"},"debit":{"amount":"{{ event.amount }}","element_id":"elem_coa_office_supplies"}}}]}},{"event_category":"expense","event_type":"payroll_run_completed","match_metadata_expression":{"category":"payroll"},"name":"Payroll Run — Wages + Tax Liability","priority":10,"transaction_template":{"transactions":[{"entry_template":{"credit":{"amount":"{{ event.amount }}","element_id":"elem_coa_wages_payable"},"debit":{"amount":"{{ event.amount }}","element_id":"elem_coa_wages_expense"}}},{"entry_template":{"credit":{"amount":"{{ event.metadata.tax_cents }}","element_id":"elem_coa_payroll_tax_liability"},"debit":{"amount":"{{ event.metadata.tax_cents }}","element_id":"elem_coa_payroll_tax_expense"}}}]}}]},"CreateForecastRequest":{"properties":{"name":{"type":"string","title":"Name","description":"Human-readable scenario name."},"scenario_kind":{"type":"string","enum":["budget","forecast","projection"],"title":"Scenario Kind","description":"What kind of scenario this is — metadata for display/filtering, not machinery. All kinds compute identically.","default":"forecast"},"horizon_months":{"type":"integer","maximum":36.0,"minimum":1.0,"title":"Horizon Months","description":"Forward months to project past the base period.","default":12},"base_period":{"anyOf":[{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},{"type":"null"}],"title":"Base Period","description":"Seed month (`YYYY-MM`) the walk projects forward from. Defaults to the fiscal calendar's closed-through period, else the newest actual report month. Resolved and stored at create time, and it never moves afterwards — every lever is keyed to a month inside `base_period + 1 … + horizon_months`, so moving it would mean restating all of them. `base_anchor` decides whether the walk still *seeds* here once months close under it."},"base_anchor":{"type":"string","enum":["seam","fixed"],"title":"Base Anchor","description":"Where the walk takes its opening balances as periods close. `seam` (default) re-anchors on the newest closed month inside the horizon, so the scenario survives a close untouched and its first forward month rolls off real balances. `fixed` pins the walk to `base_period` — the deliberate counterfactual, whose balances are meant to diverge from actuals.","default":"seam"},"levers":{"items":{"$ref":"#/components/schemas/LeverAssertionRequest"},"type":"array","minItems":1,"title":"Levers","description":"Lever assertions — at least one."},"line_assertions":{"items":{"$ref":"#/components/schemas/LineAssertionRequest"},"type":"array","title":"Line Assertions","description":"Direct statement-line assertions (manual overrides). Each names a calc-DAG leaf and wins over driver rules and carry-forward for the months it asserts."},"line_growth":{"items":{"$ref":"#/components/schemas/LineGrowthRequest"},"type":"array","title":"Line Growth","description":"Per-line growth trajectories. Each names an income-statement leaf and grows it month-over-month at the asserted rate — the generic form of the revenue growth lever, for lines the catalog doesn't drive (opex trajectories, cost-cut ramps)."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity the scenario belongs to, by id: its history and its computed months are that entity's books. Omit for the group parent."}},"type":"object","required":["name","levers"],"title":"CreateForecastRequest","description":"Create a forecast block — the authored scenario container.\n\n`base_period` defaults to the fiscal calendar's\n`closed_through_period` (else the newest actual report month) —\nthe walk projects forward from the last closed actuals. The resolved\nvalue is stored in the mechanics so recompute is deterministic.","examples":[{"horizon_months":12,"levers":[{"qname":"rs-driver:RevenueGrowthRate","value":0.03},{"qname":"rs-driver:CostOfRevenueRate","value":0.62,"values_by_period":{"2026-06":0.44,"2026-07":0.47,"2026-08":0.5}},{"qname":"rs-driver:DaysSalesOutstanding","value":45},{"qname":"rs-driver:DaysPayableOutstanding","value":30}],"name":"FY26 Operating Budget","scenario_kind":"budget"}]},"CreateGraphRequest":{"properties":{"metadata":{"$ref":"#/components/schemas/GraphMetadata","description":"Graph metadata including name, description, and schema extensions"},"instance_tier":{"type":"string","pattern":"^(ladybug-standard|ladybug-large|ladybug-xlarge)$","title":"Instance Tier","description":"Instance tier: ladybug-standard, ladybug-large, ladybug-xlarge","default":"ladybug-standard"},"custom_schema":{"anyOf":[{"$ref":"#/components/schemas/CustomSchemaDefinition"},{"type":"null"}],"description":"Custom schema definition to apply. If provided, creates a generic custom graph. If omitted, creates an entity graph using schema_extensions."},"initial_entity":{"anyOf":[{"$ref":"#/components/schemas/InitialEntityData"},{"type":"null"}],"description":"Initial entity for the graph. Required for entity graphs (when custom_schema is omitted). Omit only when providing custom_schema for a generic graph."},"create_entity":{"type":"boolean","title":"Create Entity","description":"Whether to create the entity node and upload initial data. Only applies when initial_entity is provided. Set to False to create graph without populating entity data (useful for file-based ingestion workflows).","default":true},"tags":{"items":{"type":"string"},"type":"array","maxItems":10,"title":"Tags","description":"Optional tags for organization"}},"type":"object","required":["metadata"],"title":"CreateGraphRequest","description":"Request model for creating a new graph.\n\nUse this to create either:\n- **Entity graphs**: Standard graphs with entity schema. Requires `initial_entity`.\n- **Custom graphs**: Generic graphs with a fully custom schema. Requires `custom_schema`; `initial_entity` is not used.","examples":[{"create_entity":true,"initial_entity":{"cik":"0001234567","ein":"12-3456789","name":"Acme Consulting LLC","state_of_incorporation":"Delaware","uri":"https://acmeconsulting.com"},"instance_tier":"ladybug-standard","metadata":{"description":"Professional consulting services with full accounting integration","graph_name":"Acme Consulting LLC","schema_extensions":["roboledger"]},"tags":["consulting","professional-services","production"]},{"custom_schema":{"description":"People, companies, and projects schema","extends":"base","metadata":{"domain":"custom_graph_demo"},"name":"custom_graph_demo","nodes":[{"name":"Person","properties":[{"name":"identifier","type":"STRING","is_primary_key":true},{"name":"name","type":"STRING","nullable":false},{"name":"title","type":"STRING"}]},{"name":"Company","properties":[{"name":"identifier","type":"STRING","is_primary_key":true},{"name":"name","type":"STRING","nullable":false},{"name":"industry","type":"STRING"}]}],"relationships":[{"from_node":"Person","name":"PERSON_WORKS_FOR_COMPANY","properties":[{"name":"role","type":"STRING"}],"to_node":"Company"}],"version":"1.0.0"},"instance_tier":"ladybug-standard","metadata":{"description":"Custom graph demo with people, companies, and projects","graph_name":"custom_graph_demo_1234","schema_extensions":[]},"tags":["custom","demo","generic"]},{"custom_schema":{"description":"Inventory tracking with products and warehouses","metadata":{"industry":"retail"},"name":"inventory_management","nodes":[{"name":"Product","properties":[{"name":"sku","type":"STRING","is_primary_key":true},{"name":"name","type":"STRING","nullable":false},{"name":"price","type":"DOUBLE"},{"name":"quantity","type":"INT64"}]},{"name":"Warehouse","properties":[{"name":"identifier","type":"STRING","is_primary_key":true},{"name":"location","type":"STRING","nullable":false}]}],"relationships":[{"from_node":"Product","name":"STORED_IN","properties":[{"name":"quantity","type":"INT64"}],"to_node":"Warehouse"}],"version":"1.0.0"},"instance_tier":"ladybug-standard","metadata":{"description":"Inventory management system","graph_name":"warehouse_inventory","schema_extensions":[]},"tags":["inventory","retail"]},{"custom_schema":{"name":"customer_analytics","nodes":[],"relationships":[],"version":"1.0.0"},"instance_tier":"ladybug-standard","metadata":{"description":"Graph database for customer relationship and behavior analysis","graph_name":"Customer Analytics Graph","schema_extensions":[]},"tags":["analytics","customers","marketing"]}]},"CreateInformationBlockRequest":{"oneOf":[{"$ref":"#/components/schemas/_CreateScheduleArm"},{"$ref":"#/components/schemas/_CreateRollforwardArm"},{"$ref":"#/components/schemas/_CreateForecastArm"},{"$ref":"#/components/schemas/_CreateLegacyArm"}],"title":"CreateInformationBlockRequest","description":"Create an Information Block. The body is a discriminated union on\n`block_type`: pick the arm matching the block type you want to\ncreate. The schedule arm carries a fully typed payload; statement\nand metric arms accept an untyped payload but currently return HTTP\n501 (statements are constructed via `create-report`; metric\nconstruction is pending).","discriminator":{"propertyName":"block_type","mapping":{"balance_sheet":"#/components/schemas/_CreateLegacyArm","cash_flow_statement":"#/components/schemas/_CreateLegacyArm","comprehensive_income":"#/components/schemas/_CreateLegacyArm","equity_statement":"#/components/schemas/_CreateLegacyArm","forecast":"#/components/schemas/_CreateForecastArm","income_statement":"#/components/schemas/_CreateLegacyArm","metric":"#/components/schemas/_CreateLegacyArm","reconciliation":"#/components/schemas/_CreateLegacyArm","regulatory_disclosure":"#/components/schemas/_CreateLegacyArm","rollforward":"#/components/schemas/_CreateRollforwardArm","schedule":"#/components/schemas/_CreateScheduleArm"}}},"CreateInvitationRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"$ref":"#/components/schemas/OrgRole","default":"member"}},"type":"object","required":["email"],"title":"CreateInvitationRequest","description":"Request to invite a new user to an organization by email."},"CreateMappingAssociationOperation":{"properties":{"from_element_id":{"type":"string","title":"From Element Id","description":"Source element (typically a CoA element)."},"to_element_id":{"type":"string","title":"To Element Id","description":"Target element (typically a US GAAP reporting concept)."},"association_type":{"type":"string","enum":["presentation","calculation","mapping","equivalence"],"title":"Association Type","description":"Edge semantics. `mapping` rolls up CoA elements into reporting concepts; `presentation` orders concepts in a structure; `calculation` carries debit/credit weights; `equivalence` is a synonym link.","default":"mapping"},"order_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Order Value","description":"Display order within the structure (lower = earlier)."},"weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight","description":"Calculation weight (typically +1.0 or -1.0). Used by calculation linkbases to express signed roll-ups."},"confidence":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Confidence","description":"Confidence score (0–1). For AI-suggested mappings: ≥0.90 auto-approved, 0.70–0.89 flagged for review, <0.70 skipped."},"suggested_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested By","description":"Source of the suggestion (e.g., 'mapping_agent', 'user'). Captured for audit; not used by the runtime."},"mapping_id":{"type":"string","title":"Mapping Id","description":"Target mapping structure ID."}},"type":"object","required":["from_element_id","to_element_id","mapping_id"],"title":"CreateMappingAssociationOperation","description":"Create one CoA → reporting-concept mapping edge.\n\nThis is the iterative, AI-assisted craft path. Each call adds a single\nassociation to the target mapping structure. Use `auto-map-elements`\nto create many at once via the MappingOperator. Reject duplicates: if\nthe (from, to, type) tuple already exists, the call returns 409.","examples":[{"association_type":"mapping","confidence":0.95,"from_element_id":"elem_coa_revenue_product","mapping_id":"map_01HVF8T0M2YTAY3BBNRH0V0","suggested_by":"user","to_element_id":"elem_usgaap_Revenues","weight":1.0},{"association_type":"mapping","confidence":0.92,"from_element_id":"elem_coa_returns_allowances","mapping_id":"map_01HVF8T0M2YTAY3BBNRH0V0","suggested_by":"mapping_agent","to_element_id":"elem_usgaap_Revenues","weight":-1.0}]},"CreatePortfolioBlockRequest":{"properties":{"portfolio":{"$ref":"#/components/schemas/PortfolioBlockPortfolioFields","description":"Core portfolio fields — name, currency, owning entity, etc."},"positions":{"items":{"$ref":"#/components/schemas/PortfolioBlockPositionAdd"},"type":"array","title":"Positions","description":"Initial positions to mint inside the new portfolio. Each references an existing security; pass `[]` to create an empty portfolio."}},"type":"object","required":["portfolio"],"title":"CreatePortfolioBlockRequest","description":"CQRS body for `POST /operations/create-portfolio-block`.\n\nWhole envelope validated before any DB write; the portfolio + initial\npositions land in one transaction. Each `position` references an\nexisting `security_id` — the operation does not mint securities.","examples":[{"portfolio":{"base_currency":"USD","description":"Mid-cap public equities","entity_id":"ent_acme_holdings","inception_date":"2026-01-01","name":"Q1 2026 Growth","strategy":"growth"},"positions":[{"acquisition_date":"2026-01-15","cost_basis":1850000,"currency":"USD","current_value":2010000,"quantity":100,"quantity_type":"shares","security_id":"sec_aapl","valuation_date":"2026-04-30","valuation_source":"broker_statement"},{"acquisition_date":"2026-02-08","cost_basis":2125000,"currency":"USD","current_value":2240000,"quantity":50,"quantity_type":"shares","security_id":"sec_msft","valuation_date":"2026-04-30","valuation_source":"broker_statement"}]},{"portfolio":{"base_currency":"USD","name":"Watchlist"},"positions":[]}]},"CreatePublishListRequest":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name","description":"Human-readable list name (must be unique per graph)."},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Free-form description shown to list owners."}},"type":"object","required":["name"],"title":"CreatePublishListRequest","description":"Create a new publish list. Members are added separately via\n`add-publish-list-members`.","examples":[{"description":"Quarterly distribution list.","name":"Investors"},{"name":"Auditors"}]},"CreateReportRequest":{"properties":{"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity the report is for, by id. Omit for the entity whose chart `mapping_id` maps from (the group parent on a one-entity graph). Named alongside a mapping of another entity's chart, it is refused."},"name":{"type":"string","title":"Name","description":"Human-readable report name shown in lists and headers."},"taxonomy_id":{"type":"string","title":"Taxonomy Id","description":"Taxonomy that defines the structures (BS / IS / CF / Equity / Schedules) this report can render. Accepts either an exact tenant-specific taxonomy UUID or a standard name (e.g. 'rs-gaap'). Standard names resolve to the latest reporting_standard taxonomy with that name. Defaults to 'rs-gaap', the canonical reporting vocabulary.","default":"rs-gaap"},"mapping_id":{"type":"string","title":"Mapping Id","description":"Mapping structure that rolls up the tenant's chart of accounts to the taxonomy's reporting concepts. Created via `create-mapping-association` / `auto-map-elements`."},"period_start":{"type":"string","format":"date","title":"Period Start","description":"Current-period start (inclusive). Ignored when `periods` is supplied."},"period_end":{"type":"string","format":"date","title":"Period End","description":"Current-period end (inclusive). Must be >= `period_start`. Ignored when `periods` is supplied."},"period_type":{"type":"string","title":"Period Type","description":"Period cadence: `monthly`, `quarterly`, or `annual`.","default":"quarterly"},"comparative":{"type":"boolean","title":"Comparative","description":"When true, automatically generates a prior-period column (same length as the current period). Ignored when `periods` is supplied.","default":true},"periods":{"anyOf":[{"items":{"$ref":"#/components/schemas/PeriodSpec"},"type":"array"},{"type":"null"}],"title":"Periods","description":"Explicit period columns. When set, overrides `period_start`/`period_end`/`comparative`. Use for multi-period layouts (YTD-by-quarter, multi-year, custom rolling windows)."}},"type":"object","required":["name","mapping_id","period_start","period_end"],"title":"CreateReportRequest","description":"Generate report facts from the ledger and publish a Report definition.\n\nThe report is materialized synchronously: we resolve the taxonomy +\nCoA mapping, roll up GL facts into reportable concepts, attach them\nto a fresh `Report` row, evaluate any reporting-rule structures\n(cell-level checks), and stamp `generation_status='published'`.\nSubsequent `regenerate-report` calls re-run the same pipeline against\nthe latest ledger state without creating a new Report row.\n\n`period_start`/`period_end`/`comparative` is the simple path\n(auto-derives current + prior period). For multi-column reports\n(YTD-by-quarter, multi-year) supply `periods` explicitly — when\nset, `period_start`/`period_end`/`comparative` are ignored as\ninputs to period generation.","examples":[{"comparative":true,"mapping_id":"map_01HVF8T0M2YTAY3BBNRH0V0","name":"Q3 2026 Financials","period_end":"2026-09-30","period_start":"2026-07-01","period_type":"quarterly","taxonomy_id":"tax_usgaap_reporting"},{"comparative":true,"mapping_id":"map_01HVF8T0M2YTAY3BBNRH0V0","name":"FY2025 Annual Report","period_end":"2025-12-31","period_start":"2025-01-01","period_type":"annual","taxonomy_id":"tax_usgaap_reporting"},{"comparative":false,"mapping_id":"map_01HVF8T0M2YTAY3BBNRH0V0","name":"FY2026 YTD by Quarter","period_end":"2026-09-30","period_start":"2026-01-01","period_type":"quarterly","periods":[{"end":"2026-03-31","label":"Q1 2026","start":"2026-01-01"},{"end":"2026-06-30","label":"Q2 2026","start":"2026-04-01"},{"end":"2026-09-30","label":"Q3 2026","start":"2026-07-01"}],"taxonomy_id":"tax_usgaap_reporting"}]},"CreateRepositorySubscriptionRequest":{"properties":{"plan_name":{"type":"string","title":"Plan Name","description":"Plan name for the repository subscription","examples":["sec-starter"]},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"Subscribe this user instead of yourself. Org owners and admins only, and the target must belong to the same organization. Omit to subscribe yourself. Repository access is per-user while billing is org-level, so the subscriber is what determines who gets access.","examples":["user_01ABC123"]}},"type":"object","required":["plan_name"],"title":"CreateRepositorySubscriptionRequest","description":"Request to create a repository subscription."},"CreateRollforwardRequest":{"properties":{"name":{"type":"string","title":"Name","description":"Human-readable block name."},"bs_source_qname":{"type":"string","title":"Bs Source Qname","description":"QName of the balance-sheet element whose period delta this block decomposes. Resolved to `bs_source_element_id` at create time."},"default_change_tag_qname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Change Tag Qname","description":"QName of the fallback flow concept (Tier 1 default change tag). Residual amount — Δ BS minus the sum of filter-matched amounts — is attributed to this concept. When omitted, residual surfaces unattributed; the validation_mode setting governs whether that's a hard error."},"attribution_filters":{"items":{"$ref":"#/components/schemas/AttributionFilter"},"type":"array","title":"Attribution Filters","description":"Filter predicates routing LineItems to flow concepts."},"validation_mode":{"type":"string","enum":["strict","residual_as_default","warn_only"],"title":"Validation Mode","description":"How the renderer arbitrates when Σ filter matches != Δ BS. `strict` raises; `residual_as_default` emits the residual as a default-tag fact (the common case); `warn_only` logs and lets the imbalance pass.","default":"residual_as_default"},"taxonomy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Id","description":"Owning taxonomy id (auto-resolved from `bs_source_qname` when omitted)."}},"type":"object","required":["name","bs_source_qname"],"title":"CreateRollforwardRequest","description":"Create a rollforward Information Block.\n\nMirrors :class:`CreateScheduleRequest` in shape. The block decomposes\nthe period change in `bs_source_qname` across the declared\nattribution filters. Residual (Δ BS - Σ filter matches) falls back to\nthe default change tag — or, if no default is declared, surfaces as\nan unattributed fact tagged with a synthetic residual concept.","examples":[{"attribution_filters":[{"predicate":{"field":"transaction_description_code","kind":"line_item_metadata_field","values":["mini:ProceedsFromInvestmentsByOwner"]},"target_qname":"mini:ProceedsFromInvestmentsByOwner"}],"bs_source_qname":"mini:CashAndCashEquivalents","default_change_tag_qname":"rs-gaap:CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect","name":"Cash and Cash Equivalents Rollforward"}]},"CreateScheduleRequest":{"properties":{"name":{"type":"string","title":"Name","description":"Schedule name"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity whose books the schedule belongs to, by id. Omit for the group parent. Its facts, obligations and closing entries land in that entity's books, against that entity's own accounts."},"taxonomy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Id","description":"Taxonomy ID (auto-creates if omitted)"},"element_ids":{"items":{"type":"string"},"type":"array","title":"Element Ids","description":"CoA element ids the schedule touches (the `id` from get-unmapped-elements, not taxonomy qnames) — typically the same debit + credit ids used in entry_template."},"period_start":{"type":"string","format":"date","title":"Period Start","description":"First period start"},"period_end":{"type":"string","format":"date","title":"Period End","description":"Last period end"},"monthly_amount":{"type":"integer","title":"Monthly Amount","description":"Monthly amount in cents"},"entry_template":{"$ref":"#/components/schemas/EntryTemplateRequest"},"schedule_metadata":{"anyOf":[{"$ref":"#/components/schemas/ScheduleMetadataRequest"},{"type":"null"}]},"closed_through":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Closed Through","description":"Watermark for onboarding. Facts with period_end ≤ this date are flagged 'historical' and their schedule_entry_due obligations are emitted 'voided', so the close workflow starts drafting at the first open period. Set this to the last day of the fiscal calendar's closed_through month (calendar '2026-05' → '2026-05-31') whether those months were actually closed in RoboLedger or just baseline-watermarked at initialization. Omitting it (when prior periods exist) leaves pre-watermark periods as 'pending' obligations that block the first close."},"source_transaction_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Transaction Id","description":"Free-form reference to the originating GL transaction (e.g. an import ID, ledger entry ID, or external system key). Stored in artifact_mechanics for audit; no FK constraint."}},"type":"object","required":["name","element_ids","period_start","period_end","monthly_amount","entry_template"],"title":"CreateScheduleRequest"},"CreateSecurityRequest":{"properties":{"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"ID of the issuing entity. Optional only if `source_graph_id` is set (pre-association before the entity is finalized)."},"source_graph_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Graph Id","description":"Optional pre-association to a tenant company graph. Lets you mint securities for an entity that hasn't been promoted to a real `entity_id` yet."},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"Display name for the security (e.g. `Common Stock Class A`, `Series A Preferred`). 1-200 characters."},"security_type":{"type":"string","title":"Security Type","description":"Instrument family. Open vocabulary — common values: `common_stock`, `preferred_stock`, `warrant`, `convertible_note`, `safe`, `option`, `llc_unit`, `lp_interest`, `restricted_stock_unit`."},"security_subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Security Subtype","description":"Free-text refinement of `security_type` (e.g. `class_a`, `series_a`, `series_seed`). No vocabulary enforcement."},"terms":{"additionalProperties":true,"type":"object","title":"Terms","description":"Instrument-specific terms blob (JSONB). Shape depends on `security_type` — common keys include `liquidation_preference`, `strike_price_cents`, `discount_pct`, `valuation_cap_cents`, `maturity_date`, `vesting`. Used by future waterfall-distribution modeling; treat as authoritative storage for instrument mechanics."},"authorized_shares":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Authorized Shares","description":"Total shares the issuer is authorized to issue for this class. `null` for instruments where shares aren't a meaningful unit (e.g. convertible notes pre-conversion)."},"outstanding_shares":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Outstanding Shares","description":"Shares currently issued and outstanding. Should be ≤ `authorized_shares` when both are set."}},"type":"object","required":["name","security_type"],"title":"CreateSecurityRequest","description":"CQRS body for `POST /operations/create-security`.\n\nMints a new security as Master Data — referenced by positions, never\ncreated inline by portfolio operations. The `terms` blob carries\ninstrument-specific shape (liquidation preference, strike price,\nvesting) used by future waterfall-distribution modeling.","examples":[{"authorized_shares":10000000,"entity_id":"ent_acme_holdings","name":"Common Stock Class A","outstanding_shares":6500000,"security_subtype":"class_a","security_type":"common_stock"},{"entity_id":"ent_seed_co","name":"Series A Convertible Note","security_subtype":"series_a","security_type":"convertible_note","terms":{"discount_pct":20,"interest_rate_bps":800,"maturity_date":"2028-06-30","principal_cents":5000000,"valuation_cap_cents":1000000000}},{"name":"Founder Warrant — 2026","security_type":"warrant","source_graph_id":"kg_acme_pre_seed","terms":{"expiration_date":"2031-05-01","shares_underlying":100000,"strike_price_cents":25,"vesting":"cliff_1y_then_monthly_36"}}]},"CreateSubgraphRequest":{"properties":{"name":{"type":"string","maxLength":20,"minLength":1,"title":"Name","description":"Alphanumeric name for the subgraph (e.g., dev, staging, prod1)","examples":["dev","staging","prod","test1"]},"display_name":{"type":"string","maxLength":100,"minLength":1,"title":"Display Name","description":"Human-readable display name for the subgraph","examples":["Development Environment","Staging Environment","Production"]},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Optional description of the subgraph's purpose","examples":["Development environment for testing new features"]},"schema_extensions":{"items":{"type":"string"},"type":"array","title":"Schema Extensions","description":"Schema extensions to include (inherits from parent by default)","examples":[["roboledger","roboinvestor"]]},"subgraph_type":{"$ref":"#/components/schemas/SubgraphType","description":"Type of subgraph: 'static' (parent's base + extensions), 'knowledge' (knowledge-only schema), or 'empty' (bare database, no schema).","default":"static"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata for the subgraph","examples":[{"environment":"development","team":"engineering"}]},"fork_parent":{"type":"boolean","title":"Fork Parent","description":"If true, copy all data from parent graph to create a 'fork'","default":false}},"type":"object","required":["name","display_name"],"title":"CreateSubgraphRequest","description":"Request model for creating a subgraph."},"CreateTaxonomyBlockRequest":{"properties":{"name":{"type":"string","title":"Name","description":"Taxonomy display name."},"taxonomy_type":{"type":"string","enum":["reporting_standard","reporting_extension","custom_ontology","chart_of_accounts","schedule"],"title":"Taxonomy Type","description":"Block-type discriminator. `chart_of_accounts` and `custom_ontology` construct from scratch; `reporting_extension` extends an existing library `reporting_standard`."},"parent_taxonomy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Taxonomy Id","description":"Required when `taxonomy_type == 'reporting_extension'` — the id of the library `reporting_standard` being extended."},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"standard":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Standard"},"namespace_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Namespace Uri"},"elements":{"items":{"$ref":"#/components/schemas/TaxonomyBlockElementRequest"},"type":"array","maxItems":5000,"title":"Elements"},"structures":{"items":{"$ref":"#/components/schemas/TaxonomyBlockStructureRequest"},"type":"array","maxItems":100,"title":"Structures"},"associations":{"items":{"$ref":"#/components/schemas/TaxonomyBlockAssociationRequest"},"type":"array","maxItems":20000,"title":"Associations"},"rules":{"items":{"$ref":"#/components/schemas/TaxonomyBlockRuleRequest"},"type":"array","maxItems":500,"title":"Rules"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["name","taxonomy_type"],"title":"CreateTaxonomyBlockRequest","description":"Request body for the `create-taxonomy-block` operation.\n\nOne envelope per taxonomy instance. `taxonomy_type` discriminates\nwhich block-type handler the command dispatcher routes to.\n`parent_taxonomy_id` is required for `reporting_extension` (which\nextends a library taxonomy) and ignored otherwise.\n\nThe library path (seeding `reporting_standard` rows) does NOT flow\nthrough this envelope; library content is not tenant-writable here.","examples":[{"elements":[{"balance_type":"debit","code":"1000","name":"Cash","qname":"acme:Cash","trait":"asset"},{"balance_type":"credit","code":"2000","name":"Accounts Payable","qname":"acme:AccountsPayable","trait":"liability"}],"name":"Acme CoA","structures":[{"block_type":"chart_of_accounts","name":"main"}],"taxonomy_type":"chart_of_accounts"},{"elements":[{"balance_type":"credit","name":"Non-GAAP Adjusted Revenue","parent_ref":"us-gaap:Revenues","qname":"acme:NonGAAPAdjustedRevenue","trait":"revenue"}],"name":"Acme us-gaap Extension","parent_taxonomy_id":"tax_usgaap_reporting","structures":[{"block_type":"income_statement","name":"income_statement"}],"taxonomy_type":"reporting_extension"}]},"CreateViewRequest":{"properties":{"elements":{"items":{"type":"string"},"type":"array","title":"Elements","description":"Element qnames (e.g., 'us-gaap:Assets'). Can combine with canonical_concepts."},"canonical_concepts":{"items":{"type":"string"},"type":"array","title":"Canonical Concepts","description":"Canonical concept names (e.g., 'revenue', 'net_income'). Matches all mapped qnames. Shared repositories only."},"periods":{"items":{"type":"string"},"type":"array","title":"Periods","description":"Period end dates (YYYY-MM-DD format)"},"entity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity","description":"Filter by entity ticker, CIK, or name"},"entities":{"items":{"type":"string"},"type":"array","title":"Entities","description":"Filter by multiple entity tickers (e.g., ['NVDA', 'AAPL'])"},"form":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form","description":"Filter by SEC filing form type (e.g., '10-K', '10-Q'). Shared repositories only."},"fiscal_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fiscal Year","description":"Filter by fiscal year (e.g., 2024). Shared repositories only."},"fiscal_period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fiscal Period","description":"Filter by fiscal period (e.g., 'FY', 'Q1', 'Q2', 'Q3'). Shared repositories only."},"period_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Type","description":"Filter by period type: 'annual', 'quarterly', or 'instant'"},"include_summary":{"type":"boolean","title":"Include Summary","description":"Include summary statistics per element. An element reported in more than one unit has none.","default":false},"limit":{"type":"integer","maximum":5000.0,"minimum":1.0,"title":"Limit","description":"Maximum facts to return. Applied after deduplication and sorting, so truncation keeps the most recent periods. Check `metadata.truncated` to see whether more facts matched.","default":250},"view_config":{"$ref":"#/components/schemas/ViewConfig","description":"Aspect scoping configuration"}},"type":"object","title":"CreateViewRequest","examples":[{"elements":["us-gaap:Assets"],"entities":["NVDA"],"form":"10-K","period_type":"annual"},{"canonical_concepts":["revenue"],"entities":["NVDA","AMD"],"fiscal_period":"FY","form":"10-K","view_config":{"columns":[{"selected_members":["2022-12-31","2023-12-31","2024-12-31"],"type":"period"}]}},{"elements":["us-gaap:Assets","us-gaap:Liabilities","us-gaap:StockholdersEquity"],"include_summary":true,"period_type":"instant","periods":["2026-03-31"]}]},"CreditLimits":{"properties":{"monthly_ai_credits":{"type":"integer","title":"Monthly Ai Credits","description":"Monthly AI credits allocation"},"current_balance":{"type":"integer","title":"Current Balance","description":"Current credit balance"}},"type":"object","required":["monthly_ai_credits","current_balance"],"title":"CreditLimits","description":"AI credit limits (optional)."},"CreditSummary":{"properties":{"graph_tier":{"type":"string","title":"Graph Tier","description":"Subscription tier"},"total_credits_consumed":{"type":"number","title":"Total Credits Consumed","description":"Total credits consumed"},"total_base_cost":{"type":"number","title":"Total Base Cost","description":"Total base cost before multipliers"},"operation_breakdown":{"additionalProperties":true,"type":"object","title":"Operation Breakdown","description":"Credit usage by operation type"},"cached_operations":{"type":"integer","title":"Cached Operations","description":"Number of cached operations"},"billable_operations":{"type":"integer","title":"Billable Operations","description":"Number of billable operations"},"transaction_count":{"type":"integer","title":"Transaction Count","description":"Total transaction count"}},"type":"object","required":["graph_tier","total_credits_consumed","total_base_cost","operation_breakdown","cached_operations","billable_operations","transaction_count"],"title":"CreditSummary","description":"Credit consumption summary."},"CreditSummaryResponse":{"properties":{"graph_id":{"type":"string","title":"Graph Id"},"graph_tier":{"type":"string","title":"Graph Tier"},"current_balance":{"type":"number","title":"Current Balance"},"monthly_allocation":{"type":"number","title":"Monthly Allocation"},"consumed_this_month":{"type":"number","title":"Consumed This Month"},"transaction_count":{"type":"integer","title":"Transaction Count"},"usage_percentage":{"type":"number","title":"Usage Percentage"},"last_allocation_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Allocation Date"}},"type":"object","required":["graph_id","graph_tier","current_balance","monthly_allocation","consumed_this_month","transaction_count","usage_percentage"],"title":"CreditSummaryResponse","description":"Credit summary response model."},"CustomSchemaDefinition":{"properties":{"name":{"type":"string","title":"Name","description":"Schema name"},"version":{"type":"string","title":"Version","description":"Schema version","default":"1.0.0"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Schema description"},"extends":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extends","description":"Base schema to extend (e.g., 'base' for common utilities)"},"nodes":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Nodes","description":"List of node definitions with properties"},"relationships":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Relationships","description":"List of relationship definitions"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Additional schema metadata"}},"type":"object","required":["name"],"title":"CustomSchemaDefinition","description":"Custom node and relationship types for a generic graph.\n\nFor graphs that don't fit the entity-based schema — inventory, org charts,\nproject management. `extends` names a base schema to build on, or is\nomitted for a bare database.","examples":[{"description":"People, companies, and projects schema for the custom graph demo","extends":"base","metadata":{"domain":"custom_graph_demo"},"name":"custom_graph_demo","nodes":[{"name":"Company","properties":[{"name":"identifier","type":"STRING","is_primary_key":true},{"name":"name","type":"STRING","nullable":false},{"name":"industry","type":"STRING"},{"name":"location","type":"STRING"},{"name":"founded_year","type":"INT64"}]},{"name":"Project","properties":[{"name":"identifier","type":"STRING","is_primary_key":true},{"name":"name","type":"STRING","nullable":false},{"name":"status","type":"STRING"},{"name":"budget","type":"DOUBLE"},{"name":"start_date","type":"STRING"},{"name":"end_date","type":"STRING"}]},{"name":"Person","properties":[{"name":"identifier","type":"STRING","is_primary_key":true},{"name":"name","type":"STRING","nullable":false},{"name":"age","type":"INT64"},{"name":"title","type":"STRING"},{"name":"interests","type":"STRING"}]}],"relationships":[{"from_node":"Person","name":"PERSON_WORKS_FOR_COMPANY","properties":[{"name":"role","type":"STRING"},{"name":"started_on","type":"STRING"}],"to_node":"Company"},{"from_node":"Person","name":"PERSON_WORKS_ON_PROJECT","properties":[{"name":"hours_per_week","type":"INT64"},{"name":"contribution","type":"STRING"}],"to_node":"Project"},{"from_node":"Company","name":"COMPANY_SPONSORS_PROJECT","properties":[{"name":"sponsorship_level","type":"STRING"},{"name":"budget_committed","type":"DOUBLE"}],"to_node":"Project"}],"version":"1.0.0"},{"description":"Inventory tracking system with products, warehouses, and suppliers","metadata":{"created_by":"inventory_team","industry":"retail"},"name":"inventory_management","nodes":[{"name":"Product","properties":[{"name":"sku","type":"STRING","is_primary_key":true},{"name":"name","type":"STRING","nullable":false},{"name":"price","type":"DOUBLE"},{"name":"quantity","type":"INT64"},{"name":"category","type":"STRING"}]},{"name":"Warehouse","properties":[{"name":"identifier","type":"STRING","is_primary_key":true},{"name":"location","type":"STRING","nullable":false},{"name":"capacity","type":"INT64"}]},{"name":"Supplier","properties":[{"name":"id","type":"STRING","is_primary_key":true},{"name":"name","type":"STRING","nullable":false},{"name":"contact","type":"STRING"}]}],"relationships":[{"from_node":"Product","name":"STORED_IN","properties":[{"name":"since","type":"DATE"},{"name":"quantity","type":"INT64"}],"to_node":"Warehouse"},{"from_node":"Product","name":"SUPPLIED_BY","properties":[{"name":"cost","type":"DOUBLE"}],"to_node":"Supplier"}],"version":"1.0.0"},{"description":"Basic graph with just two node types","metadata":{},"name":"simple_graph","nodes":[{"name":"Item","properties":[{"name":"id","type":"STRING","is_primary_key":true},{"name":"name","type":"STRING","nullable":false}]},{"name":"Category","properties":[{"name":"id","type":"STRING","is_primary_key":true},{"name":"name","type":"STRING","nullable":false}]}],"relationships":[{"from_node":"Item","name":"BELONGS_TO","properties":[],"to_node":"Category"}],"version":"1.0.0"}]},"CypherStatementRequest":{"properties":{"query":{"type":"string","maxLength":50000,"minLength":1,"title":"Query","description":"The Cypher query to execute. Use parameters ($param_name) for all dynamic values to prevent injection attacks.","examples":["MATCH (n:Entity {type: $entity_type}) RETURN n LIMIT $limit","MATCH (e:Entity)-[r:TRANSACTION]->(t:Entity) WHERE r.amount >= $min_amount AND e.name = $entity_name RETURN e, r, t LIMIT $limit","MATCH (n:Entity) WHERE n.identifier = $identifier RETURN n","MATCH (n) RETURN n LIMIT 10"]},"parameters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Parameters","description":"Query parameters for safe value substitution. ALWAYS use parameters instead of string interpolation.","examples":[{"entity_type":"Company","limit":100},{"entity_name":"Acme Corp","limit":50,"min_amount":1000},{"identifier":"ENT123456"},null]},"timeout":{"anyOf":[{"type":"integer","maximum":300.0,"minimum":1.0},{"type":"null"}],"title":"Timeout","description":"Query timeout in seconds (1-300)","default":60,"examples":[30,60,120,300]}},"additionalProperties":false,"type":"object","required":["query"],"title":"CypherStatementRequest","description":"Request model for Cypher query execution.","examples":[{"parameters":{"entity_type":"Company","limit":100},"query":"MATCH (n:Entity {type: $entity_type}) RETURN n LIMIT $limit","timeout":60},{"parameters":{"entity_name":"Acme Corp","limit":50,"min_amount":1000},"query":"MATCH (e:Entity)-[r:TRANSACTION]->(t:Entity) WHERE r.amount >= $min_amount AND e.name = $entity_name RETURN e, r, t LIMIT $limit","timeout":120},{"parameters":{"identifier":"ENT123456"},"query":"MATCH (n:Entity) WHERE n.identifier = $identifier RETURN n","timeout":30},{"parameters":{"form":"10-K","limit":20},"query":"MATCH (c:Company)-[:FILED]->(f:Filing) WHERE f.form_type = $form RETURN c.ticker, c.name, COUNT(f) as filing_count ORDER BY filing_count DESC LIMIT $limit","timeout":60},{"query":"MATCH (n) RETURN n LIMIT 10","timeout":30}]},"DatabaseHealthResponse":{"properties":{"graph_id":{"type":"string","title":"Graph Id","description":"Graph database identifier","examples":["kg1a2b3c4d5"]},"status":{"type":"string","title":"Status","description":"Overall health status","examples":["healthy"]},"connection_status":{"type":"string","title":"Connection Status","description":"Database connection status","examples":["connected"]},"uptime_seconds":{"type":"number","title":"Uptime Seconds","description":"Database uptime in seconds","examples":[3600.5]},"last_query_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Query Time","description":"Timestamp of last query execution","examples":["2024-01-15T10:30:00Z"]},"query_count_24h":{"type":"integer","title":"Query Count 24H","description":"Number of queries executed in last 24 hours","examples":[150]},"avg_query_time_ms":{"type":"number","title":"Avg Query Time Ms","description":"Average query execution time in milliseconds","examples":[45.2]},"error_rate_24h":{"type":"number","title":"Error Rate 24H","description":"Error rate in last 24 hours (percentage)","examples":[0.5]},"memory_usage_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Memory Usage Mb","description":"Instance memory in use, MB. Only populated for dedicated single-tenant instances; null on shared repositories and packed tiers.","examples":[512.3]},"memory_usage_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Memory Usage Percent","description":"Instance memory in use, percent. Expect high values during materialization — the engine deliberately boosts to near the whole instance while rebuilding. Read `resource_status` rather than this number alone. Dedicated instances only.","examples":[41.8]},"cpu_usage_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpu Usage Percent","description":"Instance CPU in use, percent. Dedicated single-tenant instances only.","examples":[12.4]},"resource_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Status","description":"Interpreted instance load: 'idle' (headroom), 'busy' (working normally — typical while materializing), 'constrained' (sustained pressure worth acting on). Null when resource metrics are not exposed.","examples":["idle"]},"storage_usage_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Storage Usage Mb","description":"Storage usage in MB","examples":[1024.7]},"alerts":{"items":{"type":"string"},"type":"array","title":"Alerts","description":"Active alerts or warnings","examples":[["High memory usage detected"]]},"is_stale":{"type":"boolean","title":"Is Stale","description":"Whether the graph has staged changes not yet materialized","default":false},"stale_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stale Reason","description":"Reason the graph was marked stale (e.g. 'file_deleted: data.parquet')"},"stale_since":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stale Since","description":"ISO timestamp when the graph became stale"},"last_materialized_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Materialized At","description":"ISO timestamp of the last successful materialization"},"hours_since_materialization":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hours Since Materialization","description":"Hours elapsed since last materialization"}},"type":"object","required":["graph_id","status","connection_status","uptime_seconds","query_count_24h","avg_query_time_ms","error_rate_24h"],"title":"DatabaseHealthResponse","description":"Response model for database health check."},"DatabaseInfoResponse":{"properties":{"graph_id":{"type":"string","title":"Graph Id","description":"Graph database identifier","examples":["kg1a2b3c4d5"]},"database_name":{"type":"string","title":"Database Name","description":"Database name","examples":["kg1a2b3c4d5"]},"database_size_bytes":{"type":"integer","title":"Database Size Bytes","description":"Database size in bytes","examples":[1048576]},"database_size_mb":{"type":"number","title":"Database Size Mb","description":"Database size in MB","examples":[1.0]},"node_count":{"type":"integer","title":"Node Count","description":"Total number of nodes","examples":[1250]},"relationship_count":{"type":"integer","title":"Relationship Count","description":"Total number of relationships","examples":[2340]},"node_labels":{"items":{"type":"string"},"type":"array","title":"Node Labels","description":"List of node labels","examples":[["Entity","Report","Fact"]]},"relationship_types":{"items":{"type":"string"},"type":"array","title":"Relationship Types","description":"List of relationship types","examples":[["HAS_REPORT","REPORTED_IN","HAS_ELEMENT"]]},"created_at":{"type":"string","title":"Created At","description":"Database creation timestamp","examples":["2024-01-15T10:00:00Z"]},"last_modified":{"type":"string","title":"Last Modified","description":"Last modification timestamp","examples":["2024-01-15T10:30:00Z"]},"schema_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schema Version","description":"Schema version","examples":["1.0.0"]},"read_only":{"type":"boolean","title":"Read Only","description":"Whether database is read-only","examples":[false]},"backup_count":{"type":"integer","title":"Backup Count","description":"Number of available backups","examples":[5]},"last_backup_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Backup Date","description":"Date of last backup","examples":["2024-01-15T09:00:00Z"]}},"type":"object","required":["graph_id","database_name","database_size_bytes","database_size_mb","node_count","relationship_count","node_labels","relationship_types","created_at","last_modified","read_only","backup_count"],"title":"DatabaseInfoResponse","description":"Response model for database information and statistics."},"DatabaseStorageEntry":{"properties":{"graph_id":{"type":"string","title":"Graph Id","description":"Database identifier"},"is_parent":{"type":"boolean","title":"Is Parent","description":"Whether this is the parent graph","default":false},"size_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Size Mb","description":"Database size in MB"}},"type":"object","required":["graph_id"],"title":"DatabaseStorageEntry","description":"Storage for a single database on the instance."},"DeleteDocumentOp":{"properties":{"document_id":{"type":"string","minLength":1,"title":"Document Id","description":"Document id to delete"}},"type":"object","required":["document_id"],"title":"DeleteDocumentOp","description":"Body for delete-document (corpus content-op)."},"DeleteFileOp":{"properties":{"file_id":{"type":"string","minLength":1,"title":"File Id","description":"File id to delete"},"cascade":{"type":"boolean","title":"Cascade","description":"Also delete the file's rows from DuckDB tables and mark the graph stale","default":false}},"type":"object","required":["file_id"],"title":"DeleteFileOp","description":"Body for delete-file (raw content-op)."},"DeleteForecastRequest":{"properties":{"structure_id":{"type":"string","title":"Structure Id","description":"Structure ID of the forecast block."}},"type":"object","required":["structure_id"],"title":"DeleteForecastRequest","description":"Delete a forecast block.\n\nRemoves the scenario's entire parallel universe: the lever FactSet\nAND every computed scenario FactSet (the forward statement/metric\nmonths keyed by this scenario). Actuals are never touched."},"DeleteGraphOp":{"properties":{"confirm":{"type":"string","title":"Confirm","description":"Must equal the graph_id in the URL — confirms the caller intends to destroy this specific graph."},"at_period_end":{"type":"boolean","title":"At Period End","description":"If true, defer cancellation and teardown to the end of the current billing period (graph stays usable until then). If false (default), cancel and tear down immediately.","default":false}},"type":"object","required":["confirm"],"title":"DeleteGraphOp","description":"Body for the delete-graph operation.\n\nPermanently destroys the graph and cancels its subscription. Two modes:\n\n- **Immediate** (default): subscription canceled now (`ends_at = now`) and\n  fast-path deprovisioning fires within ~10 minutes. Use when you want\n  the data gone and the slot freed right away.\n- **At period end** (`at_period_end=true`): subscription canceled but\n  `ends_at = current_period_end` so the graph stays usable through the\n  paid period. The existing suspend → deprovision sensor pipeline tears\n  it down after the retention window once the period closes.\n\nRequires `confirm` to equal the URL `graph_id` as a guard against\naccidental destructive calls."},"DeleteInformationBlockRequest":{"oneOf":[{"$ref":"#/components/schemas/_DeleteScheduleArm"},{"$ref":"#/components/schemas/_DeleteRollforwardArm"},{"$ref":"#/components/schemas/_DeleteForecastArm"},{"$ref":"#/components/schemas/_DeleteLegacyArm"}],"title":"DeleteInformationBlockRequest","description":"Delete an Information Block. The body is a discriminated union on\n`block_type` mirroring `CreateInformationBlockRequest`. The schedule\narm carries a fully typed delete payload; statement and metric arms\nreturn HTTP 501.","discriminator":{"propertyName":"block_type","mapping":{"balance_sheet":"#/components/schemas/_DeleteLegacyArm","cash_flow_statement":"#/components/schemas/_DeleteLegacyArm","comprehensive_income":"#/components/schemas/_DeleteLegacyArm","equity_statement":"#/components/schemas/_DeleteLegacyArm","forecast":"#/components/schemas/_DeleteForecastArm","income_statement":"#/components/schemas/_DeleteLegacyArm","metric":"#/components/schemas/_DeleteLegacyArm","reconciliation":"#/components/schemas/_DeleteLegacyArm","regulatory_disclosure":"#/components/schemas/_DeleteLegacyArm","rollforward":"#/components/schemas/_DeleteRollforwardArm","schedule":"#/components/schemas/_DeleteScheduleArm"}}},"DeleteInformationBlockResponse":{"properties":{"deleted":{"type":"boolean","const":true,"title":"Deleted","default":true},"structure_id":{"type":"string","title":"Structure Id"},"block_type":{"type":"string","title":"Block Type"},"name":{"type":"string","title":"Name"}},"type":"object","required":["structure_id","block_type","name"],"title":"DeleteInformationBlockResponse","description":"Response for `delete-information-block`.\n\nThe envelope is gone once the block is deleted, so the response is a\nthin confirmation instead — structure_id + block_type + name for\ncaller bookkeeping."},"DeleteJournalEntryRequest":{"properties":{"entry_id":{"type":"string","title":"Entry Id","description":"The draft entry to delete."}},"type":"object","required":["entry_id"],"title":"DeleteJournalEntryRequest","description":"Hard delete a draft journal entry. Posted entries cannot be\ndeleted — reverse them instead.","examples":[{"entry_id":"ent_01HVF8T0M2YTAY3BBNRH0V0"}]},"DeleteMappingAssociationOperation":{"properties":{"mapping_id":{"type":"string","title":"Mapping Id","description":"The mapping structure containing the association."},"association_id":{"type":"string","title":"Association Id","description":"The association edge to delete."}},"type":"object","required":["mapping_id","association_id"],"title":"DeleteMappingAssociationOperation","description":"Delete a single CoA → reporting-concept mapping edge.","examples":[{"association_id":"assoc_01HVF8T0M2YTAY3BBNRH0V0","mapping_id":"map_01HVF8T0M2YTAY3BBNRH0V0"}]},"DeletePortfolioBlockOperation":{"properties":{"portfolio_id":{"type":"string","title":"Portfolio Id","description":"Target portfolio ID."},"confirm_active_positions":{"type":"boolean","title":"Confirm Active Positions","description":"Required acknowledgement when the portfolio has active positions. Set `true` to consent to cascade-deleting them; leave `false` and the operation returns 409 if any active positions exist.","default":false}},"type":"object","required":["portfolio_id"],"title":"DeletePortfolioBlockOperation","description":"CQRS body for `POST /operations/delete-portfolio-block`.\n\nCascade-deletes the portfolio plus all of its positions. When the\nportfolio still has active positions, the operation is rejected\nunless `confirm_active_positions=true` is set — safety belt to\nprevent accidental cascade.","examples":[{"portfolio_id":"port_watchlist_2026"},{"confirm_active_positions":true,"portfolio_id":"port_legacy_2024"}]},"DeletePortfolioBlockResponse":{"properties":{"deleted":{"type":"boolean","title":"Deleted","description":"`true` when the portfolio row was removed."},"portfolio_id":{"type":"string","title":"Portfolio Id","description":"ID of the portfolio that was deleted."},"positions_deleted":{"type":"integer","title":"Positions Deleted","description":"Count of position rows cascade-deleted with the portfolio."}},"type":"object","required":["deleted","portfolio_id","positions_deleted"],"title":"DeletePortfolioBlockResponse","description":"Result envelope for `delete-portfolio-block`. `positions_deleted`\ncarries the count of position rows removed alongside the portfolio."},"DeletePublishListOperation":{"properties":{"list_id":{"type":"string","title":"List Id","description":"The publish list to delete."}},"type":"object","required":["list_id"],"title":"DeletePublishListOperation","description":"Delete a publish list. All membership rows are removed; reports\npreviously shared via this list are not affected (each share is an\nindependent copy in the recipient's graph).","examples":[{"list_id":"pl_01HVF8T0M2YTAY3BBNRH0V0"}]},"DeleteReportOperation":{"properties":{"report_id":{"type":"string","title":"Report Id","description":"The Report to delete."}},"type":"object","required":["report_id"],"title":"DeleteReportOperation","description":"Delete a Report definition and all its facts.","examples":[{"report_id":"rpt_01HVF8T0M2YTAY3BBNRH0V0"}]},"DeleteResult":{"properties":{"deleted":{"type":"boolean","title":"Deleted","description":"`true` when the row was deleted in this call. Always `true` today — 404 covers the not-found case at the HTTP layer rather than via this field."}},"type":"object","required":["deleted"],"title":"DeleteResult","description":"Shared response shape for delete / soft-delete operations.\n\n`deleted=True` means the operation succeeded (a row was deleted or\nflipped). A row that never existed gets a 404 — this shape never carries\n\"not found\".\n\nDefined once here, and used by both roboledger and roboinvestor, so the\nOpenAPI components key resolves to a single schema."},"DeleteRollforwardRequest":{"properties":{"structure_id":{"type":"string","title":"Structure Id","description":"Structure ID of the rollforward block."}},"type":"object","required":["structure_id"],"title":"DeleteRollforwardRequest","description":"Delete a rollforward block.\n\nCascades through any synthetic facts produced by this block's filter\nevaluations. The underlying ledger LineItems are not touched — only\nthe rollforward IB's projection of them."},"DeleteScheduleRequest":{"properties":{"structure_id":{"type":"string","title":"Structure Id"}},"type":"object","required":["structure_id"],"title":"DeleteScheduleRequest","description":"Delete a schedule and everything under it. Permanent and irreversible.\n\nRemoves the Structure, its Facts and Associations, its draft entries and\nits unposted obligations. Refused once any of the schedule's entries has\nposted, because the schedule is their support. To end a schedule early\nand keep its history, use `terminate-schedule` (no entry) or\n`create-event-block(event_type='asset_disposed')`, whose handler voids\nthe remaining obligations and posts the disposal entry in one step."},"DeleteSecurityOperation":{"properties":{"security_id":{"type":"string","title":"Security Id","description":"Target security ID."}},"type":"object","required":["security_id"],"title":"DeleteSecurityOperation","description":"CQRS body for `POST /operations/delete-security` (soft delete).","examples":[{"security_id":"sec_misclassified_warrant"}]},"DeleteSubgraphOp":{"properties":{"subgraph_name":{"type":"string","maxLength":20,"minLength":1,"pattern":"^[a-zA-Z0-9]+$","title":"Subgraph Name","description":"Subgraph name to delete (e.g., 'dev', 'staging')"},"force":{"type":"boolean","title":"Force","description":"Delete even if subgraph contains data","default":false},"backup_first":{"type":"boolean","title":"Backup First","description":"Take a full backup of the subgraph before deleting it. The backup is registered on the parent graph's backup list, where it can be listed and downloaded after the subgraph is gone. If the backup fails the subgraph is not deleted.","default":true}},"type":"object","required":["subgraph_name"],"title":"DeleteSubgraphOp","description":"Body for the delete-subgraph operation."},"DeleteTaxonomyBlockRequest":{"properties":{"taxonomy_id":{"type":"string","title":"Taxonomy Id","description":"The taxonomy to delete."},"cascade_facts":{"type":"boolean","title":"Cascade Facts","description":"When true, also deletes any Fact rows referencing elements in this taxonomy. When false (default), the operation fails with 422 if such rows exist.","default":false},"reason":{"type":"string","minLength":1,"title":"Reason","description":"Human-readable justification (audit log)."}},"type":"object","required":["taxonomy_id","reason"],"title":"DeleteTaxonomyBlockRequest","description":"Request body for the `delete-taxonomy-block` operation.\n\n`cascade_facts=False` (default) fails the delete if any Fact rows\nreference elements in this taxonomy. `cascade_facts=True` deletes the\nreferencing facts alongside the taxonomy; the response reports\n`facts_deleted`.","examples":[{"reason":"Replaced by Acme CoA v2.","taxonomy_id":"tax_acme_coa_legacy"},{"cascade_facts":true,"reason":"Pruning historical experiment — facts no longer needed.","taxonomy_id":"tax_acme_coa_legacy"}]},"DeleteTaxonomyBlockResponse":{"properties":{"deleted":{"type":"boolean","const":true,"title":"Deleted","default":true},"taxonomy_id":{"type":"string","title":"Taxonomy Id"},"name":{"type":"string","title":"Name"},"facts_deleted":{"type":"integer","title":"Facts Deleted","default":0},"cascade_applied":{"type":"boolean","title":"Cascade Applied","default":false}},"type":"object","required":["taxonomy_id","name"],"title":"DeleteTaxonomyBlockResponse","description":"Response for `delete-taxonomy-block`."},"DescribeFilingRequest":{"properties":{"ticker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ticker","description":"Company ticker. On shared-repository graphs (SEC) it resolves the latest matching filing when report_id is not given; ignored on tenant graphs."},"report_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Id","description":"Specific report identifier. Required on tenant graphs; on SEC, optional when ticker is given."},"fiscal_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fiscal Year","description":"Narrow auto-resolution to this fiscal year focus"},"period_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Type","description":"Which forms auto-resolution considers: annual (10-K / 20-F / 40-F, the default) or quarterly (10-Q as well)"},"accession":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accession","description":"SEC only, with ticker: one filing by accession number — a report, or an 8-K from resolved_report.recent_releases"},"form":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form","description":"SEC only, with ticker: '8-K' reads the latest earnings release, or with fiscal_year the latest filed in that calendar year"}},"type":"object","title":"DescribeFilingRequest","description":"Request for the describe-filing view op — how a filing is laid out."},"DescribeFilingResponse":{"properties":{"graph_id":{"type":"string","title":"Graph Id"},"report_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Id"},"accession":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accession"},"resolved_report":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Resolved Report"},"profile":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Profile"},"filing":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filing"},"entity":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Entity"},"counts":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Counts"},"sections":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sections"}},"additionalProperties":true,"type":"object","required":["graph_id"],"title":"DescribeFilingResponse","description":"The describe-filing view op's result: xbrlkit's layout of the filing."},"DetailedTransactionsResponse":{"properties":{"transactions":{"items":{"$ref":"#/components/schemas/EnhancedCreditTransactionResponse"},"type":"array","title":"Transactions"},"summary":{"additionalProperties":{"$ref":"#/components/schemas/TransactionSummaryResponse"},"type":"object","title":"Summary"},"total_count":{"type":"integer","title":"Total Count"},"filtered_count":{"type":"integer","title":"Filtered Count"},"date_range":{"additionalProperties":{"type":"string"},"type":"object","title":"Date Range"}},"type":"object","required":["transactions","summary","total_count","filtered_count","date_range"],"title":"DetailedTransactionsResponse","description":"Detailed response for transaction queries."},"Dimension":{"properties":{"name":{"type":"string","title":"Name","description":"Dimension name (e.g., 'Element', 'Period')"},"type":{"$ref":"#/components/schemas/DimensionType","description":"Dimension type"},"members":{"items":{"type":"string"},"type":"array","title":"Members","description":"List of dimension members"}},"type":"object","required":["name","type"],"title":"Dimension"},"DimensionType":{"type":"string","enum":["element","period","entity"],"title":"DimensionType"},"DisclosuresRequest":{"properties":{"ticker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ticker","description":"Company ticker. On shared-repository graphs (SEC) it resolves the latest matching filing when report_id is not given; ignored on tenant graphs."},"report_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Id","description":"Specific report identifier. Required on tenant graphs; on SEC, optional when ticker is given."},"fiscal_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fiscal Year","description":"Narrow auto-resolution to this fiscal year focus"},"period_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Type","description":"Which forms auto-resolution considers: annual (10-K / 20-F / 40-F, the default) or quarterly (10-Q as well)"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic","description":"A disclosure family's name, or part of it (\"leases\", \"income taxes\"), for that family's blocks. Omit for the whole map."}},"type":"object","title":"DisclosuresRequest","description":"Request for the disclosures view op — the map of a report's sections."},"DisclosuresResponse":{"properties":{"graph_id":{"type":"string","title":"Graph Id"},"report_id":{"type":"string","title":"Report Id"},"resolved_report":{"anyOf":[{"$ref":"#/components/schemas/ResolvedReportInfo"},{"type":"null"}]},"disclosures":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Disclosures"},"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count"},"disclosure":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disclosure"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"blocks":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Blocks"},"block_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Block Count"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"additionalProperties":true,"type":"object","required":["graph_id","report_id"],"title":"DisclosuresResponse","description":"The disclosures view op's result: xbrlkit's map, stamped with the graph\nand report it was read from.\n\nWithout `topic`: `disclosures` / `count`. With `topic`:\n`disclosure` / `category` / `blocks` / `block_count`."},"DocumentDetailResponse":{"properties":{"id":{"type":"string","title":"Id"},"graph_id":{"type":"string","title":"Graph Id"},"user_id":{"type":"string","title":"User Id"},"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"folder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"source_type":{"type":"string","title":"Source Type"},"source_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Provider"},"sections_indexed":{"type":"integer","title":"Sections Indexed"},"file":{"anyOf":[{"$ref":"#/components/schemas/DocumentFileInfo"},{"type":"null"}],"description":"The stored file, for a document that is one; its `content` is empty. Download it from `GET /documents/{document_id}/file`."},"evidence_for":{"items":{"$ref":"#/components/schemas/DocumentEvidence"},"type":"array","title":"Evidence For","description":"The live events that name this document as their evidence (an invoice, a bill, a statement balance), newest first, at most 50. While any are listed, the document cannot be deleted."},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","graph_id","user_id","title","content","source_type","sections_indexed","created_at","updated_at"],"title":"DocumentDetailResponse","description":"Full document detail with raw content."},"DocumentEvidence":{"properties":{"event_id":{"type":"string","title":"Event Id"},"event_type":{"type":"string","title":"Event Type"},"status":{"type":"string","title":"Status"},"occurred_at":{"type":"string","title":"Occurred At"}},"type":"object","required":["event_id","event_type","status","occurred_at"],"title":"DocumentEvidence","description":"A live event on the books that names the document as its evidence."},"DocumentFileDownloadResponse":{"properties":{"document_id":{"type":"string","title":"Document Id"},"download_url":{"type":"string","title":"Download Url","description":"Presigned URL to GET the file."},"expires_in":{"type":"integer","title":"Expires In","description":"Seconds until the URL expires."},"file":{"$ref":"#/components/schemas/DocumentFileInfo"}},"type":"object","required":["document_id","download_url","expires_in","file"],"title":"DocumentFileDownloadResponse","description":"A short-lived link to a stored document file."},"DocumentFileInfo":{"properties":{"file_name":{"type":"string","title":"File Name","description":"The file's name as uploaded."},"content_type":{"type":"string","title":"Content Type","description":"The file's media type."},"size_bytes":{"type":"integer","title":"Size Bytes","description":"The stored file's size."},"sha256":{"type":"string","title":"Sha256","description":"Hex SHA-256 of the stored bytes, taken when the upload completed. A stored file never changes, so this identifies it."}},"type":"object","required":["file_name","content_type","size_bytes","sha256"],"title":"DocumentFileInfo","description":"The stored file behind a document, when it is one."},"DocumentLimits":{"properties":{"current_count":{"type":"integer","title":"Current Count","description":"Uploaded documents currently stored for this graph"},"max_documents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Documents","description":"Maximum uploaded documents for this tier (null when uncapped)"},"approaching_limit":{"type":"boolean","title":"Approaching Limit","description":"Whether approaching document limit (>80%)"}},"type":"object","required":["current_count","approaching_limit"],"title":"DocumentLimits","description":"Knowledge-base document usage against the tier's cap."},"DocumentListItem":{"properties":{"id":{"type":"string","title":"Id"},"document_title":{"type":"string","title":"Document Title"},"section_count":{"type":"integer","title":"Section Count"},"source_type":{"type":"string","title":"Source Type"},"folder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"file":{"anyOf":[{"$ref":"#/components/schemas/DocumentFileInfo"},{"type":"null"}],"description":"The stored file, for a document that is one."},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","document_title","section_count","source_type","created_at","updated_at"],"title":"DocumentListItem","description":"A document in the document list."},"DocumentListResponse":{"properties":{"total":{"type":"integer","title":"Total"},"documents":{"items":{"$ref":"#/components/schemas/DocumentListItem"},"type":"array","title":"Documents"},"graph_id":{"type":"string","title":"Graph Id"}},"type":"object","required":["total","documents","graph_id"],"title":"DocumentListResponse","description":"Response from listing indexed documents."},"DocumentSection":{"properties":{"document_id":{"type":"string","title":"Document Id"},"graph_id":{"type":"string","title":"Graph Id"},"source_type":{"type":"string","title":"Source Type"},"parent_document_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Document Id"},"part":{"type":"integer","title":"Part","default":1},"part_count":{"type":"integer","title":"Part Count","default":1},"next_document_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Document Id"},"entity_ticker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Ticker"},"entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Name"},"entity_cik":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Cik"},"section_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Label"},"section_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Id"},"element_qname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Element Qname"},"filing_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filing Date"},"fiscal_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fiscal Year"},"fiscal_period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fiscal Period"},"form_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form Type"},"accession_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accession Number"},"xbrl_elements":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Xbrl Elements"},"content":{"type":"string","title":"Content"},"content_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Url"},"content_length":{"type":"integer","title":"Content Length","default":0},"document_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Title"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"folder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder"}},"type":"object","required":["document_id","graph_id","source_type","content"],"title":"DocumentSection","description":"Full document section retrieved by ID — one part of it when the section\nis long; `next_document_id` continues it."},"DownloadQuota":{"properties":{"limit_per_month":{"type":"integer","title":"Limit Per Month","description":"Maximum downloads allowed per month"},"used_this_month":{"type":"integer","title":"Used This Month","description":"Number of downloads used this month"},"remaining":{"type":"integer","title":"Remaining","description":"Downloads remaining this month"},"resets_at":{"type":"string","format":"date-time","title":"Resets At","description":"When the monthly limit resets (UTC)"}},"type":"object","required":["limit_per_month","used_this_month","remaining","resets_at"],"title":"DownloadQuota","description":"Download quota information for shared repository backups."},"ElementLite":{"properties":{"id":{"type":"string","title":"Id"},"qname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qname"},"name":{"type":"string","title":"Name"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"element_type":{"type":"string","title":"Element Type","description":"concept | abstract | axis | member | hypercube"},"is_abstract":{"type":"boolean","title":"Is Abstract","default":false},"is_monetary":{"type":"boolean","title":"Is Monetary","default":true},"balance_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Balance Type"},"period_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Type"},"item_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Type","description":"Value-domain vocabulary (monetary | ratio | percent | multiple | days | string | …). None means untyped; fall back to is_monetary."},"documentation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documentation","description":"The element's documentation-role label — the catalog's authoritative value semantics (e.g. whether a percent driver is a growth rate or a rate-on-base fraction). None when the element carries no documentation label."}},"type":"object","required":["id","name","element_type"],"title":"ElementLite","description":"Element projection for bundling inside an Information Block envelope.\n\nNarrower than :class:`LibraryElementResponse` — excludes the heavy fields\n(labels, references, classifications) that library browsing needs but\nblock consumers don't. Agents + frontends ask for those on demand via\nthe full library GraphQL fields when they need them."},"ElementSummary":{"properties":{"count":{"type":"integer","title":"Count","description":"Number of facts for this element"},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total","description":"Sum of values across the returned facts. Duration elements only — a balance summed across periods is not a balance, so instants omit it."},"average":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average","description":"Mean value across the returned facts. Duration elements only; omitted for instants."},"min":{"type":"number","title":"Min","description":"Minimum value across the returned facts"},"max":{"type":"number","title":"Max","description":"Maximum value across the returned facts"}},"type":"object","required":["count","min","max"],"title":"ElementSummary"},"ElementUpdatePatch":{"properties":{"qname":{"type":"string","title":"Qname","description":"qname identifier of the element to update."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"trait":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trait"},"balance_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Balance Type"},"period_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Type"},"is_monetary":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Monetary"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"parent_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Ref"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"Retire (`false`) or reactivate (`true`) a chart account. Retiring keeps its history and hides it from account pickers and the chart tree, and new line items on it are refused — the way to take an account with activity out of use, since removal needs no facts and no line items."}},"type":"object","required":["qname"],"title":"ElementUpdatePatch","description":"Partial-update patch for a single element, keyed by qname."},"EmailVerificationRequest":{"properties":{"token":{"type":"string","title":"Token","description":"Email verification token from email link"}},"type":"object","required":["token"],"title":"EmailVerificationRequest","description":"Email verification request model."},"EnhancedCreditTransactionResponse":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type"},"amount":{"type":"number","title":"Amount"},"description":{"type":"string","title":"Description"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","title":"Created At"},"operation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operation Id"},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}},"type":"object","required":["id","type","amount","description","metadata","created_at"],"title":"EnhancedCreditTransactionResponse","description":"Enhanced credit transaction response with more details."},"EnhancedFileStatusLayers":{"properties":{"s3":{"$ref":"#/components/schemas/FileLayerStatus","description":"S3 layer status (immutable source)"},"duckdb":{"$ref":"#/components/schemas/FileLayerStatus","description":"DuckDB layer status (mutable staging)"},"graph":{"$ref":"#/components/schemas/FileLayerStatus","description":"Graph layer status (immutable materialized view)"}},"type":"object","required":["s3","duckdb","graph"],"title":"EnhancedFileStatusLayers"},"EntityLite":{"properties":{"id":{"type":"string","title":"Id","description":"Entity ID (`ent_*` ULID)."},"name":{"type":"string","title":"Name","description":"Display name of the entity."},"source_graph_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Graph Id","description":"Tenant graph this entity is anchored to, when known. `null` for entities not yet linked to a graph."}},"type":"object","required":["id","name"],"title":"EntityLite","description":"Lightweight entity projection for embedding in portfolio-block /\nposition envelopes. Carries identity-only fields; full entity data\nlives behind the Master Data entity APIs."},"EntityTaxonomyResponse":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"The entity that was linked."},"taxonomy_id":{"type":"string","title":"Taxonomy Id","description":"The taxonomy that was linked."},"basis":{"type":"string","title":"Basis","description":"Linkage role (see request)."},"is_primary":{"type":"boolean","title":"Is Primary","description":"Whether this is the primary linkage."},"adoption_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Adoption Context","description":"Adoption context recorded at link time."}},"type":"object","required":["entity_id","taxonomy_id","basis","is_primary"],"title":"EntityTaxonomyResponse","description":"Result of `link-entity-taxonomy` — the ENTITY_HAS_TAXONOMY edge."},"EntryTemplateRequest":{"properties":{"debit_element_id":{"type":"string","title":"Debit Element Id","description":"CoA element id to debit (e.g. Depreciation Expense). This is a chart-of-accounts element id — the `id` returned by get-unmapped-elements / get-graph-schema — NOT a taxonomy qname."},"credit_element_id":{"type":"string","title":"Credit Element Id","description":"CoA element id to credit (e.g. Accumulated Depreciation). A chart-of-accounts element id (see get-unmapped-elements), not a taxonomy qname. One template = one debit/credit pair; model a multi-account entry as several schedules."},"entry_type":{"type":"string","enum":["standard","adjusting","closing","reversing"],"title":"Entry Type","description":"Entry type for generated entries","default":"closing"},"memo_template":{"type":"string","title":"Memo Template","description":"Memo template ({structure_name} is replaced)","default":""},"auto_reverse":{"type":"boolean","title":"Auto Reverse","description":"Auto-generate a reversing entry on the first day of the next period","default":false}},"type":"object","required":["debit_element_id","credit_element_id"],"title":"EntryTemplateRequest"},"ErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Human-readable error message explaining what went wrong","examples":["Insufficient credits for operation"]},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Machine-readable error code for programmatic handling","examples":["INSUFFICIENT_CREDITS"]},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id","description":"Unique request ID for tracking and debugging","examples":["req_1234567890abcdef"]},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp","description":"Timestamp when the error occurred","examples":["2024-01-01T00:00:00Z"]}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Error body returned by every endpoint.","example":{"code":"RESOURCE_NOT_FOUND","detail":"Resource not found","request_id":"req_1234567890abcdef","timestamp":"2024-01-01T00:00:00Z"}},"EvaluateRulesRequest":{"properties":{"structure_id":{"type":"string","title":"Structure Id","description":"Structure to evaluate rules for. Resolves all rules scoped to this structure plus rules attached to its elements and associations."},"fact_set_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fact Set Id","description":"Optional FactSet id to stamp on each VerificationResult row. Allows results to be scoped to a specific period run once write paths populate the FactSet table on every run."},"period_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period Start","description":"Lower bound on the fact period window (inclusive)."},"period_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period End","description":"Upper bound on the fact period window (inclusive)."}},"type":"object","required":["structure_id"],"title":"EvaluateRulesRequest","description":"Request body for the `evaluate-rules` operation.\n\nRuns every rule scoped to `structure_id` (plus element/association-\nscoped rules for the structure's atoms), binds `$Variable` references\nto facts via qname lookup, and writes one\n:class:`VerificationResult` row per rule.\n\nOptional `period_start` / `period_end` narrow the fact-binding\nwindow; without them the engine uses the most recent `in_scope` fact\nfor each element regardless of period.","examples":[{"structure_id":"str_balance_sheet"},{"period_end":"2026-03-31","period_start":"2026-01-01","structure_id":"str_income_statement"},{"fact_set_id":"fs_01HVF8T0M2YTAY3BBNRH0V0","period_end":"2026-03-31","period_start":"2026-01-01","structure_id":"str_balance_sheet"}]},"EvaluateRulesResponse":{"properties":{"structure_id":{"type":"string","title":"Structure Id"},"results":{"items":{"$ref":"#/components/schemas/VerificationResultLite"},"type":"array","title":"Results"},"summary":{"additionalProperties":{"type":"integer"},"type":"object","title":"Summary","description":"Status counts keyed by outcome string: `{'pass': N, 'fail': N, 'error': N, 'skipped': N}`."}},"type":"object","required":["structure_id","results"],"title":"EvaluateRulesResponse","description":"Response for the `evaluate-rules` operation.\n\n`results` is the full list of :class:`VerificationResultLite` rows\nwritten by this evaluation run. `summary` gives counts keyed by\nstatus for quick display without iterating the list."},"EventBlockEnvelope":{"properties":{"id":{"type":"string","title":"Id","description":"Event ID (`evt_*` ULID)."},"event_type":{"type":"string","title":"Event Type","description":"Open-vocabulary event type (e.g. `invoice_issued`, `bank_transaction`, `control_executed`)."},"event_category":{"type":"string","title":"Event Category","description":"REA category, scoped by `event_class` — economic (`sales`, `purchase`, `financing`, `payroll`, `treasury`, `adjustment`, `recognition`, `other`), support (`control`, `approval`, `reconciliation`, `inquiry`), or operational (`pipeline`, `engagement`, `schedule`, `other`) for occurrences that drive no GL — a lead, a lifecycle change, an outreach, a schedule setup."},"status":{"type":"string","title":"Status","description":"Lifecycle state. One of: `captured` (raw, pre-classification), `classified` (handler ran, GL pending), `committed` (GL entries posted), `pending` (committed but awaiting fulfillment of an obligation), `fulfilled` (obligation discharged — retractable while its ledger rows are still drafts), `voided` (canceled — terminal), `superseded` (replaced by a corrected event — terminal). See `UpdateEventBlockRequest.transition_to` for the valid transition graph."},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At","description":"When the event happened in the real world (UTC)."},"effective_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective At","description":"Accounting recognition date, when different from `occurred_at`."},"source":{"type":"string","title":"Source","description":"Capture source: `manual`, `system`, `schedule`, a connected provider name (e.g. `quickbooks`), or a registered external source_name. Used for adapter routing."},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"Source-system dedup key. Unique with `source` when set, so adapter retries are idempotent."},"external_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Url","description":"Deep link back to the source-system record."},"amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount","description":"Economic value in **cents** of `currency`, signed (inflows positive, outflows negative). `null` for non-economic events."},"currency":{"type":"string","title":"Currency","description":"ISO 4217 currency code for `amount`."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text human-readable summary."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Free-form payload — handler-specific keys when the event ran through a handler, otherwise whatever the adapter captured."},"is_reconciling_item":{"type":"boolean","title":"Is Reconciling Item","description":"True when this event is a reconciling item: a source re-sync surfaced a changed upstream payload for an event whose GL is already posted (committed/fulfilled are immutable to sync) — the local books legitimately no longer mirror the source, and the difference awaits an explicit disposition (restate the affected months, or book a catch-up entry in the open period). The live payload and GL are untouched; the incoming payload is stashed in `metadata.drift_payload` with `metadata.drift_detected_at`.","default":false},"dimension_ids":{"items":{"type":"string"},"type":"array","title":"Dimension Ids","description":"Dimension-member IDs tagging this event (department, fund, project). Propagate to GL entries produced by the handler."},"event_class":{"type":"string","title":"Event Class","description":"REA event class — `economic` (drives GL postings) or `support` (audit-trail / value-chain primitive, no GL impact)."},"event_action":{"anyOf":[{"type":"string","enum":["produce","raise","consume","lower","use","cite","work","deliverService","pickup","dropoff","accept","transferCustody","transferAllRights","transfer","move","modify","combine","separate","copy"]},{"type":"null"}],"title":"Event Action","description":"Canonical action verb refining `event_category`. Null when the source adapter or capture path didn't supply one."},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Counterparty agent ID, when the event involves one."},"resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Type","description":"REA resource kind being exchanged (`goods`, `services`, `money`, `right`, `obligation`, `information`, `labor`)."},"resource_element_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Element Id","description":"Specific element ID being exchanged, when known."},"replaced_by_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Replaced By Event Id","description":"ID of the event that replaces this one. Set when this event was superseded (`status='superseded'`); points forward in the correction chain."},"replaces_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Replaces Event Id","description":"ID of the event this one replaces, when applicable. Points backward in the correction chain. Mirror of `replaced_by_event_id` on the predecessor."},"obligated_by_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Obligated By Event Id","description":"Forward-materialization link — the event that scheduled or obligated this one (e.g. depreciation entries point at the originating `asset_acquired` event)."},"discharges_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discharges Event Id","description":"Settlement link — the obligation this event discharges (e.g. `cash_received` pointing at the originating `sale_invoiced`)."},"document_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Id","description":"The stored document the event rests on (an invoice, a bill, a receipt, a statement); read it with get-document."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Row creation timestamp (UTC)."},"created_by":{"type":"string","title":"Created By","description":"ID of the user who captured the event. For adapter-sourced events, the system actor associated with the adapter."}},"type":"object","required":["id","event_type","event_category","status","occurred_at","source","currency","metadata","dimension_ids","event_class","created_at","created_by"],"title":"EventBlockEnvelope","description":"Read projection for a single event block.\n\nReturned by `create-event-block`, `update-event-block`,\n`preview-event-block`, and the read-side `get-event-block`. Mirrors\nthe request shape plus server-assigned fields (id, status, audit\ntimestamps) and the four nullable correction/duality links."},"EventHandlerResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"event_type":{"type":"string","title":"Event Type"},"event_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Category"},"match_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Source"},"match_agent_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Agent Type"},"match_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Resource Type"},"match_metadata_expression":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Match Metadata Expression"},"transaction_template":{"additionalProperties":true,"type":"object","title":"Transaction Template"},"priority":{"type":"integer","title":"Priority"},"is_active":{"type":"boolean","title":"Is Active"},"origin":{"type":"string","title":"Origin"},"suggested_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested By"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"approved_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved By"},"approved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Approved At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"}},"type":"object","required":["id","name","event_type","transaction_template","priority","is_active","origin"],"title":"EventHandlerResponse"},"ExecuteEventBlockRequest":{"properties":{"event_id":{"type":"string","title":"Event Id","description":"Event ID (`evt_*` ULID) to publish. The event's `metadata.connection_id` determines which QB connection to write to; the connection's `write_policy` governs whether a write fires."},"connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Id","description":"Override for the connection to route the write through. Used by the close-period batch path where schedule-originated events don't carry `connection_id` in their metadata. When unset, the command reads `event.metadata.connection_id`."}},"type":"object","required":["event_id"],"title":"ExecuteEventBlockRequest","description":"Request to publish an event to the source-of-truth system.\n\nFor events on a connection with `write_policy='qb_authoritative'`\n(or `'hybrid'`), this triggers a synchronous write to QuickBooks:\neach draft entry posts as its own JournalEntry, with the entry id as\nthe RequestId, and its QuickBooks id is recorded per entry on\n`event.metadata.qb_entry_ids`. The event goes `fulfilled` once no\ndraft remains, or `pending` when QuickBooks rejects an entry (what\nlanded is kept).\n\n`'native'`-policy events fast-path through with no QB write —\nRoboSystems IS the source of truth, no outbound publish needed."},"ExecuteEventBlockResponse":{"properties":{"event_id":{"type":"string","title":"Event Id","description":"Echo of the event ID."},"status":{"type":"string","title":"Status","description":"The event's status after the call. Unchanged when no write fired (native policy, a source that does not publish) or when drafts in a later period are still unpublished. `'fulfilled'` once every draft entry of the event is in QuickBooks and posted. `'pending'` when QuickBooks rejected an entry — see `qb_error`; retry after fixing the underlying issue."},"qb_external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qb External Id","description":"QuickBooks JournalEntry ID of the first entry this call published. Null when nothing was published. When a call publishes several entries, `qb_entry_ids` holds them all."},"qb_entry_ids":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Qb Entry Ids","description":"Every entry of the event now in QuickBooks: ledger entry ID → QuickBooks JournalEntry ID. Null when none are."},"qb_error":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Qb Error","description":"QB rejection detail when a publish failed. Shape: `{code, message, qb_response_at}`. Operator retries after fixing CoA mapping / amount validation / closed-period."}},"type":"object","required":["event_id","status"],"title":"ExecuteEventBlockResponse","description":"Outcome of an `execute-event-block` call."},"ExternalConnectionConfig":{"properties":{"source_name":{"type":"string","maxLength":64,"minLength":2,"pattern":"^[a-z][a-z0-9_-]{1,63}$","title":"Source Name","description":"Source slug the integration stamps on the events it emits (lowercase letters, digits, '-', '_'; must start with a letter). Unique per graph among live connections."},"display_name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Display Name","description":"Human-readable label for the connections UI."}},"type":"object","required":["source_name"],"title":"ExternalConnectionConfig","description":"External-integration connection configuration.\n\nRegisters a source namespace for an integration the platform does not\nrun: the connection is registration + telemetry, not execution config.\nThe platform holds no credentials for the external source — the\nintegration authenticates to its own source and writes here through\nthe public API, stamping `source_name` on everything it emits."},"FactLite":{"properties":{"id":{"type":"string","title":"Id"},"element_id":{"type":"string","title":"Element Id"},"element_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Element Name"},"element_qname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Element Qname"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value","description":"Numeric value; null for Nonnumeric (text-block) facts."},"text_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text Value","description":"Text payload for Nonnumeric facts; null for numeric."},"fact_type":{"type":"string","title":"Fact Type","description":"Numeric | Nonnumeric","default":"Numeric"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type","description":"MIME type of text_value (e.g. 'text/markdown')."},"period_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period Start"},"period_end":{"type":"string","format":"date","title":"Period End"},"period_type":{"type":"string","title":"Period Type"},"unit":{"type":"string","title":"Unit","default":"USD"},"fact_scope":{"type":"string","title":"Fact Scope","description":"historical | in_scope"},"fact_set_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fact Set Id"}},"type":"object","required":["id","element_id","period_end","period_type","fact_scope"],"title":"FactLite","description":"Fact projection — just the values the envelope caller cares about."},"FactRecord":{"properties":{"element_id":{"type":"string","title":"Element Id","description":"Element qname (e.g., 'us-gaap:Assets')"},"element_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Element Name","description":"Element local name"},"period_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Start","description":"Period start date (YYYY-MM-DD); null for instant facts. A duration fact is identified by (start, end) — two facts for the same element can share an end date and differ only here (e.g. a quarterly and a year-to-date figure from the same 10-Q)."},"period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period End","description":"Period end date (YYYY-MM-DD)"},"duration_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duration Type","description":"Period duration classification (e.g. 'quarterly', 'nine_months', 'annual'); null for instant facts. Use with period_start to tell overlapping windows apart."},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value","description":"Numeric fact value"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"Unit of measure (e.g., 'USD')"},"entity_ticker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Ticker","description":"Entity ticker; present only when an entity filter was applied"},"entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Name","description":"Entity name; present only when an entity filter was applied"}},"type":"object","required":["element_id"],"title":"FactRecord"},"FactSetLite":{"properties":{"id":{"type":"string","title":"Id"},"structure_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Structure Id"},"period_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period Start"},"period_end":{"type":"string","format":"date","title":"Period End"},"factset_type":{"type":"string","title":"Factset Type","description":"'report' | 'schedule' | 'custom' | 'disclosure' | 'metric'. Enum closure enforced by the `public.fact_sets` CHECK constraint."},"entity_id":{"type":"string","title":"Entity Id"},"report_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Id","description":"Back-pointer to the parent row in `reports`. Null when the FactSet does not belong to a report package."},"scenario_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scenario Id","description":"Scenario axis (the forecast engine). NULL = actuals; non-NULL names the owning forecast block whose parallel universe this set belongs to."},"provenance":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Provenance","description":"Typed `FactProvenance` descriptor (discriminated on `origin`: pivot | schedule | derived | asserted | document | forecast | filed) recording how this FactSet was constructed. It describes the set, not each fact: a `pivot` set's mapped leaves aggregate posted line items, while its subtotals and derivations are computed from those leaves. Surfaced as JSON, mirroring how mechanics is exposed. Null when the FactSet carries no descriptor."}},"type":"object","required":["id","period_end","factset_type","entity_id"],"title":"FactSetLite","description":"FactSet projection — period-specific instantiation of the Structure.\n\nThe envelope carries one `FactSetLite` per block when a FactSet row exists\nfor the requested period, and leaves `fact_set` null when none does."},"FileInfo":{"properties":{"file_id":{"type":"string","title":"File Id","description":"Unique file identifier"},"file_name":{"type":"string","title":"File Name","description":"Original file name"},"file_format":{"type":"string","title":"File Format","description":"File format (parquet, csv, etc.)"},"size_bytes":{"type":"integer","title":"Size Bytes","description":"File size in bytes"},"row_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Row Count","description":"Estimated row count"},"upload_status":{"type":"string","title":"Upload Status","description":"Current upload status"},"upload_method":{"type":"string","title":"Upload Method","description":"Upload method used"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"File creation timestamp"},"uploaded_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uploaded At","description":"File upload completion timestamp"},"s3_key":{"type":"string","title":"S3 Key","description":"S3 object key"}},"type":"object","required":["file_id","file_name","file_format","size_bytes","upload_status","upload_method","s3_key"],"title":"FileInfo"},"FileLayerStatus":{"properties":{"status":{"type":"string","title":"Status","description":"Layer status"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp","description":"Status timestamp"},"row_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Row Count","description":"Row count (if available)"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes","description":"Size in bytes (S3 layer only)"}},"type":"object","required":["status"],"title":"FileLayerStatus"},"FileReportRequest":{"properties":{"report_id":{"type":"string","title":"Report Id","description":"The Report to file."}},"type":"object","required":["report_id"],"title":"FileReportRequest","description":"Transition a Report to `filed` — locks the package.\n\nAcceptable from `draft` or `under_review`. `filed_by` and\n`filed_at` are stamped from the auth context + server clock; the\nrequest itself carries no fields today (kept as a model for OpenAPI\nshape consistency and to avoid breaking changes if we add fields).\nUse `transition-filing-status` for the non-file legs of the\nlifecycle (`draft ↔ under_review`, `filed → archived`).","examples":[{"report_id":"rpt_01HVF8T0M2YTAY3BBNRH0V0"}]},"FileUploadRequest":{"properties":{"file_name":{"type":"string","title":"File Name","description":"File name to upload","examples":["entities.parquet","transactions.csv","data.json"]},"content_type":{"type":"string","title":"Content Type","description":"File MIME type","default":"application/x-parquet","examples":["application/x-parquet","text/csv","application/json"]},"table_name":{"anyOf":[{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},{"type":"null"}],"title":"Table Name","description":"Table name to associate file with (required for first-class /files endpoint)","examples":["Entity","Fact","PERSON_WORKS_FOR_COMPANY"]},"file_size_bytes":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"File Size Bytes","description":"Size of the file about to be uploaded, in bytes. Optional; when supplied, an over-limit file is rejected here instead of after it has been pushed to S3 and rejected by ingest-file. Advisory only — the authoritative check measures the object after upload.","examples":[1048576]}},"additionalProperties":false,"type":"object","required":["file_name"],"title":"FileUploadRequest","examples":[{"content_type":"application/x-parquet","file_name":"entities.parquet","table_name":"Entity"},{"content_type":"text/csv","file_name":"transactions.csv","table_name":"Fact"}]},"FilingLinks":{"properties":{"viewer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Viewer","description":"The xbrlkit viewer over the published holon — the link to show the filing"},"holon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Holon"},"tavi":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tavi"},"as_filed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Filed","description":"The primary document as filed"},"exhibits":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Exhibits","description":"An 8-K's exhibits by exhibit number (EX-99.1)"},"manifest":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manifest","description":"Every file in the filing's public folder, with its URL"},"edgar":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edgar","description":"The filing's folder on EDGAR"}},"additionalProperties":true,"type":"object","title":"FilingLinks","description":"Where a filing on a shared repository is served."},"FinancialStatementAnalysisRequest":{"properties":{"statement_type":{"type":"string","title":"Statement Type","description":"income_statement | balance_sheet | cash_flow_statement | equity_statement"},"ticker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ticker","description":"Company ticker (required on shared-repo graphs, ignored otherwise)"},"report_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Id","description":"Specific report identifier. If omitted, auto-resolves latest by ticker + filters."},"fiscal_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fiscal Year","description":"Filter by fiscal year focus when auto-resolving the report"},"period_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Type","description":"annual | quarterly | instant"},"limit":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Limit","default":1000}},"type":"object","required":["statement_type"],"title":"FinancialStatementAnalysisRequest","description":"Request for financial-statement-analysis (graph-backed Cypher)."},"FinancialStatementAnalysisResponse":{"properties":{"graph_id":{"type":"string","title":"Graph Id"},"statement_type":{"type":"string","title":"Statement Type"},"ticker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ticker"},"report_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Id"},"resolved_report":{"anyOf":[{"$ref":"#/components/schemas/ResolvedReportInfo"},{"type":"null"}]},"facts":{"items":{"$ref":"#/components/schemas/AnalyticalStatementFactRow"},"type":"array","title":"Facts"},"fact_count":{"type":"integer","title":"Fact Count"}},"type":"object","required":["graph_id","statement_type","facts","fact_count"],"title":"FinancialStatementAnalysisResponse","description":"Results of the financial-statement-analysis view op."},"FiscalCalendarResponse":{"properties":{"graph_id":{"type":"string","title":"Graph Id"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity whose calendar this is."},"fiscal_year_start_month":{"type":"integer","title":"Fiscal Year Start Month"},"closed_through":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Closed Through","description":"Latest closed period (YYYY-MM), or null if nothing closed"},"close_target":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Close Target","description":"Target period the user wants closed through (YYYY-MM)"},"gap_periods":{"type":"integer","title":"Gap Periods","description":"Number of periods between closed_through and close_target (inclusive of close_target). 0 means caught up.","default":0},"catch_up_sequence":{"items":{"type":"string"},"type":"array","title":"Catch Up Sequence","description":"Ordered list of periods that a close run would process"},"closeable_now":{"type":"boolean","title":"Closeable Now","description":"Whether the next period in the catch-up sequence passes all closeable gates","default":false},"blockers":{"items":{"type":"string"},"type":"array","title":"Blockers","description":"Structured blocker codes when closeable_now is False: 'sequence_violation', 'period_incomplete', 'sync_stale', 'calendar_not_initialized', 'period_already_closed', 'pending_obligations', 'stranded_obligations', 'reconciling_items', 'unposted_source_events', 'unreconciled_accounts'"},"pending_obligation_count":{"type":"integer","title":"Pending Obligation Count","description":"Number of pending schedule_entry_due events blocking close. Non-zero only when `pending_obligations` is in `blockers`.","default":0},"pending_obligation_sample":{"items":{"$ref":"#/components/schemas/PendingObligationDetailResponse"},"type":"array","title":"Pending Obligation Sample","description":"Sample of up to 5 pending obligations (schedule_id, schedule_name, period, event_id) ordered by occurred_at. Use `list-event-blocks` with event_type=schedule_entry_due&status=pending for the full set."},"earliest_pending_period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Earliest Pending Period","description":"Earliest period (YYYY-MM) with a pending obligation blocking close. Null when no pending_obligations blocker is active."},"sync_stale_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sync Stale Days","description":"Days the most recent sync is stale relative to the period to close. Populated only when `sync_stale` is in `blockers` and last_sync_at exists (null when there's a connection but no sync has ever run)."},"stranded_obligation_count":{"type":"integer","title":"Stranded Obligation Count","description":"Matured schedule_entry_due events already at 'classified' with no drafted closing entry for their (schedule, period) — adjusting entries a close would silently omit. Resolve by running promote-obligations with dispatch_handlers=true (which reaches them) or voiding the obligation.","default":0},"stranded_obligation_sample":{"items":{"$ref":"#/components/schemas/PendingObligationDetailResponse"},"type":"array","title":"Stranded Obligation Sample","description":"Sample of up to 5 stranded obligations (schedule_id, schedule_name, period, event_id) ordered by occurred_at."},"reconciling_item_count":{"type":"integer","title":"Reconciling Item Count","description":"Posted events in or before this period whose source payload changed afterwards and that nobody has dispositioned — differences between the books and the source system. Resolve each with resolve-reconciling-item, or close over them knowingly with allow_reconciling_items.","default":0},"reconciling_item_sample":{"items":{"type":"string"},"type":"array","title":"Reconciling Item Sample","description":"Source identifiers (or event ids) of up to 5 unresolved reconciling items, so the blocker names what is holding the close."},"unposted_source_event_count":{"type":"integer","title":"Unposted Source Event Count","description":"Source events dated in this period that were never committed: bank-feed lines still captured or classified, and QuickBooks transactions whose automatic posting failed. Commit or void each, or close over them knowingly with allow_unposted_source_events.","default":0},"unposted_source_event_sample":{"items":{"type":"string"},"type":"array","title":"Unposted Source Event Sample","description":"Source identifiers (or event ids) of up to 5 unposted source events, so the blocker names what is holding the close."},"unreconciled_account_count":{"type":"integer","title":"Unreconciled Account Count","description":"Reconciliations the close waits on that are not reconciled for this period, including any never compared for it. Run refresh-reconciliations and clear what it reports, release one with set-reconciliation-policy, or close over them knowingly with allow_unreconciled_accounts.","default":0},"unreconciled_account_sample":{"items":{"type":"string"},"type":"array","title":"Unreconciled Account Sample","description":"Name and status of up to 5 of those reconciliations, so the blocker names what is holding the close."},"last_close_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Close At"},"initialized_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Initialized At"},"last_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync At","description":"Most recent QB sync timestamp (if connected)"},"periods":{"items":{"$ref":"#/components/schemas/FiscalPeriodSummary"},"type":"array","title":"Periods","description":"Fiscal period rows for this graph"}},"type":"object","required":["graph_id","fiscal_year_start_month"],"title":"FiscalCalendarResponse","description":"Current fiscal calendar state for one entity of a graph."},"FiscalPeriodSummary":{"properties":{"name":{"type":"string","title":"Name","description":"Period name (YYYY-MM)"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"status":{"type":"string","title":"Status","description":"'open' | 'closing' | 'closed'"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"has_close_receipt":{"type":"boolean","title":"Has Close Receipt","description":"Whether this period carries a close receipt. A flag rather than the receipt itself keeps the calendar listing compact; fetch the receipt from `get-period-close-status` for the period. False on open periods and on periods closed before receipts shipped.","default":false}},"type":"object","required":["name","start_date","end_date","status"],"title":"FiscalPeriodSummary","description":"One fiscal period row — header view used in calendar listings.\n\nStatus lifecycle: `open` → `closing` → `closed`. `closing`\nis the transient state during a close run; `closed_at` stamps when\nthe lock landed."},"ForecastMechanics":{"properties":{"kind":{"type":"string","const":"forecast","title":"Kind","default":"forecast"},"scenario_kind":{"type":"string","enum":["budget","forecast","projection"],"title":"Scenario Kind","description":"Scenario kind — display/filter metadata, not machinery.","default":"forecast"},"horizon_months":{"type":"integer","maximum":36.0,"minimum":1.0,"title":"Horizon Months","description":"Forward months projected past the base period."},"base_period":{"type":"string","title":"Base Period","description":"Origin month (`YYYY-MM`) of the authored horizon window — resolved at create time (request → fiscal calendar closed-through → newest actual report month) and stored so recompute is deterministic. Every lever, line assertion and growth rate is keyed to a month in `base_period + 1 … base_period + horizon_months`, so this never moves on its own; `base_anchor` decides whether the *walk* still seeds here."},"base_anchor":{"type":"string","enum":["seam","fixed"],"title":"Base Anchor","description":"Where the walk takes its opening balances. `seam` (default) re-anchors on the newest closed month at or after `base_period`, so a scenario survives a period close without being rebuilt and its first forward month rolls off real balances. `fixed` pins the walk to `base_period` — the deliberate counterfactual (“if we had restarted in July”), whose balances diverge from actuals on purpose.","default":"seam"},"levers":{"items":{"$ref":"#/components/schemas/LeverAssertionLite"},"type":"array","title":"Levers","description":"Expanded lever assertions (authoring order)."},"line_assertions":{"items":{"$ref":"#/components/schemas/LineAssertionLite"},"type":"array","title":"Line Assertions","description":"Direct statement-line assertions (authoring order) — manual overrides that win over driver rules and carry-forward for the months they name."},"line_growth":{"items":{"$ref":"#/components/schemas/LineGrowthLite"},"type":"array","title":"Line Growth","description":"Per-line growth trajectories (authoring order) — each grows an income-statement leaf month-over-month at the asserted rate, compounding from the base month."},"computed_months":{"type":"integer","title":"Computed Months","description":"Number of forward months with computed scenario FactSets. Runtime state filled at envelope-build time — 0 until the first compute-forecast run.","default":0}},"type":"object","required":["horizon_months","base_period","levers"],"title":"ForecastMechanics","description":"Authored scenario container for `block_type='forecast'`.\n\nThe block IS the scenario: its structure id is the `scenario_id`\nevery derived forward FactSet carries (NULL = actuals). The authored\nsurface is exactly this — scenario identity, horizon, base period,\nlever assertions; everything downstream is derived by\n`compute-forecast` (levers → driven rs-gaap anchors via the\nrs-driver Derive rules → carry-forward for unmodeled IS lines →\ncalc-DAG subtotals), landing in the EXISTING statement/metric block\ntypes stamped with the scenario. Reads directly from the typed\n`structures.artifact_mechanics` JSONB column."},"ForecastMonthLite":{"properties":{"period":{"type":"string","title":"Period","description":"Month key (`YYYY-MM`)."},"period_start":{"type":"string","format":"date","title":"Period Start"},"period_end":{"type":"string","format":"date","title":"Period End"},"income_statement_fact_set_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Income Statement Fact Set Id","description":"Scenario IS FactSet upserted for the month."},"balance_sheet_fact_set_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Balance Sheet Fact Set Id","description":"Scenario BS FactSet upserted for the month — the full roll: carry-forward, rule-driven working capital, schedule movements, RE roll, balancing cash (A = L + E by construction)."},"cash_flow_fact_set_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cash Flow Fact Set Id","description":"Scenario CF FactSet upserted for the month — indirect-method, derived from BS deltas + NI, reconciled to the balancing ΔCash."},"computed_count":{"type":"integer","title":"Computed Count","description":"Number of facts emitted for the month across all sets.","default":0},"verification_passed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verification Passed","description":"Whether every rule evaluated against the month's scenario sets passed. Three states, and the third is not the first: `true` = rules ran and all passed; `false` = at least one failed or errored, which halts the walk (see `halted_at`); `null` = **no rules ran**, so the month is unverified rather than verified. Treat null as absence of evidence, never as a pass."},"verification_failures":{"items":{"type":"string"},"type":"array","title":"Verification Failures","description":"Failed/errored rule messages for the month (capped)."}},"type":"object","required":["period","period_start","period_end"],"title":"ForecastMonthLite","description":"One computed forward month in a `compute-forecast` response."},"ForgetOp":{"properties":{"memory_id":{"type":"string","pattern":"^mem_[0-9a-f]{32}$","title":"Memory Id","description":"Server-generated memory id to forget"}},"type":"object","required":["memory_id"],"title":"ForgetOp","description":"Body for the forget operation (delete a semantic memory by id)."},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"Email address to send reset link"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest","description":"Forgot password request model."},"GetFileInfoResponse":{"properties":{"file_id":{"type":"string","title":"File Id","description":"Unique file identifier"},"graph_id":{"type":"string","title":"Graph Id","description":"Graph database identifier"},"table_id":{"type":"string","title":"Table Id","description":"Table identifier"},"table_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Table Name","description":"Table name"},"file_name":{"type":"string","title":"File Name","description":"Original file name"},"file_format":{"type":"string","title":"File Format","description":"File format (parquet, csv, etc.)"},"size_bytes":{"type":"integer","title":"Size Bytes","description":"File size in bytes"},"row_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Row Count","description":"Estimated row count"},"upload_status":{"type":"string","title":"Upload Status","description":"Current upload status"},"upload_method":{"type":"string","title":"Upload Method","description":"Upload method used"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"File creation timestamp"},"uploaded_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uploaded At","description":"File upload completion timestamp"},"s3_key":{"type":"string","title":"S3 Key","description":"S3 object key"},"layers":{"anyOf":[{"$ref":"#/components/schemas/EnhancedFileStatusLayers"},{"type":"null"}],"description":"Multi-layer pipeline status (S3 → DuckDB → Graph). Shows status, timestamps, and row counts for each layer independently."}},"type":"object","required":["file_id","graph_id","table_id","file_name","file_format","size_bytes","upload_status","upload_method","s3_key"],"title":"GetFileInfoResponse"},"GraphCapacityResponse":{"properties":{"tiers":{"items":{"$ref":"#/components/schemas/TierCapacity"},"type":"array","title":"Tiers","description":"Capacity status per tier"}},"type":"object","required":["tiers"],"title":"GraphCapacityResponse","description":"Response containing capacity status for all customer-facing tiers."},"GraphInfo":{"properties":{"graphId":{"type":"string","title":"Graphid","description":"Graph database identifier","examples":["kg1a2b3c4d5","sec"]},"graphName":{"type":"string","title":"Graphname","description":"Display name for the graph","examples":["Acme Consulting LLC","SEC EDGAR Filings"]},"description":{"type":"string","title":"Description","description":"Free-form description ('' when unset)","default":"","examples":["","Primary operating entity, consolidated monthly"]},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"Organizational tags for the graph","examples":[[],["consulting","production"]]},"role":{"type":"string","title":"Role","description":"User's role/access level","examples":["admin","member","read"]},"isSelected":{"type":"boolean","title":"Isselected","description":"Whether this is the currently selected graph","examples":[true,false]},"createdAt":{"type":"string","title":"Createdat","description":"Creation timestamp","examples":["2024-01-15T10:00:00Z"]},"isRepository":{"type":"boolean","title":"Isrepository","description":"Whether this is a shared repository (vs user graph)","default":false,"examples":[false,true]},"repositoryType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repositorytype","description":"Repository type if isRepository=true","examples":[null,"sec","industry","economic"]},"schemaExtensions":{"items":{"type":"string"},"type":"array","title":"Schemaextensions","description":"List of schema extensions installed on this graph","examples":[[],["roboledger"],["roboledger","roboinvestor"]]},"isSubgraph":{"type":"boolean","title":"Issubgraph","description":"Whether this is a subgraph (vs a main graph)","default":false,"examples":[false,true]},"parentGraphId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentgraphid","description":"Parent graph ID if this is a subgraph","examples":[null,"kg1a2b3c4d5"]},"graphType":{"type":"string","title":"Graphtype","description":"Type of graph: generic, entity, or repository","default":"entity","examples":["entity","generic","repository"]},"status":{"type":"string","title":"Status","description":"Graph lifecycle status: active, suspended, deprovisioned","default":"active","examples":["active","suspended"]}},"type":"object","required":["graphId","graphName","role","isSelected","createdAt"],"title":"GraphInfo","description":"Graph information for user.","examples":[{"createdAt":"2024-01-15T10:00:00Z","description":"Primary operating entity, consolidated monthly","graphId":"kg1a2b3c4d5","graphName":"Acme Consulting LLC","graphType":"entity","isRepository":false,"isSelected":true,"isSubgraph":false,"role":"admin","schemaExtensions":["roboledger"],"status":"active","tags":["consulting","production"]},{"createdAt":"2024-02-20T14:30:00Z","description":"","graphId":"kg9z8y7x6w5_dev","graphName":"TechCorp Enterprises - Dev","graphType":"entity","isRepository":false,"isSelected":false,"isSubgraph":true,"parentGraphId":"kg9z8y7x6w5","role":"member","schemaExtensions":["roboledger","roboinvestor"],"status":"active","tags":["sandbox"]},{"createdAt":"2024-01-01T00:00:00Z","description":"","graphId":"sec","graphName":"SEC EDGAR Filings","graphType":"repository","isRepository":true,"isSelected":false,"isSubgraph":false,"repositoryType":"sec","role":"read","schemaExtensions":[],"status":"active","tags":[]}]},"GraphLimitsResponse":{"properties":{"graph_id":{"type":"string","title":"Graph Id","description":"Graph database identifier"},"subscription_tier":{"type":"string","title":"Subscription Tier","description":"Rate-limit tier enforced for requests to this graph"},"graph_tier":{"type":"string","title":"Graph Tier","description":"Graph's database tier"},"is_shared_repository":{"type":"boolean","title":"Is Shared Repository","description":"Whether this is a shared repository"},"storage":{"$ref":"#/components/schemas/StorageLimits","description":"Storage limits and usage"},"queries":{"$ref":"#/components/schemas/QueryLimits","description":"Query operation limits"},"copy_operations":{"$ref":"#/components/schemas/CopyOperationLimits","description":"Copy/ingestion operation limits"},"backups":{"$ref":"#/components/schemas/BackupLimits","description":"Backup operation limits"},"rate_limits":{"$ref":"#/components/schemas/RateLimits","description":"API rate limits"},"credits":{"anyOf":[{"$ref":"#/components/schemas/CreditLimits"},{"type":"null"}],"description":"AI credit limits (if applicable)"},"documents":{"anyOf":[{"$ref":"#/components/schemas/DocumentLimits"},{"type":"null"}],"description":"Knowledge-base document usage and tier cap (user graphs only)"},"subgraphs":{"anyOf":[{"$ref":"#/components/schemas/SubgraphLimits"},{"type":"null"}],"description":"Subgraph count and tier cap (parent user graphs only)"},"content":{"anyOf":[{"$ref":"#/components/schemas/ContentLimits"},{"type":"null"}],"description":"Per-operation materialization limits (if applicable)"},"instance":{"anyOf":[{"$ref":"#/components/schemas/InstanceUsage"},{"type":"null"}],"description":"Aggregate instance storage usage (user graphs only)"}},"type":"object","required":["graph_id","subscription_tier","graph_tier","is_shared_repository","storage","queries","copy_operations","backups","rate_limits"],"title":"GraphLimitsResponse","description":"Every operational limit that applies to a graph, and its usage.","examples":[{"backups":{"backup_retention_days":7,"max_backup_size_gb":10,"max_backups_per_day":2},"content":{"chunk_size_rows":250000,"max_rows_per_copy":1000000,"max_single_table_rows":2500000},"copy_operations":{"concurrent_operations":1,"daily_copy_operations":25,"max_file_size_gb":1.0,"max_files_per_operation":100,"supported_formats":["parquet","csv","json","delta","iceberg"],"timeout_seconds":900},"credits":{"current_balance":7500,"monthly_ai_credits":8000},"documents":{"approaching_limit":false,"current_count":12,"max_documents":100},"graph_id":"kg1a2b3c4d5","graph_tier":"ladybug-standard","instance":{"databases":[{"graph_id":"kg1a2b3c4d5","is_parent":true,"size_mb":2150.0},{"graph_id":"kg1a2b3c4d5_dev","is_parent":false,"size_mb":360.0}],"limit_gb":20,"node_count":150000,"status":"healthy","total_storage_gb":2.45,"usage_percentage":12.3},"is_shared_repository":false,"queries":{"chunk_size":500,"concurrent_queries":1,"max_rows_per_query":10000,"max_timeout_seconds":45},"rate_limits":{"burst_capacity":60,"requests_per_hour":3600,"requests_per_minute":60},"storage":{"approaching_limit":false,"current_usage_gb":2.45,"max_storage_gb":20},"subgraphs":{"approaching_limit":false,"current_count":1,"max_allowed":3,"remaining":2},"subscription_tier":"ladybug-standard"},{"backups":{"backup_retention_days":90,"max_backup_size_gb":100,"max_backups_per_day":5},"copy_operations":{"concurrent_operations":3,"daily_copy_operations":-1,"max_file_size_gb":10.0,"max_files_per_operation":10000,"supported_formats":["parquet","csv","json","delta","iceberg"],"timeout_seconds":3600},"graph_id":"sec","graph_tier":"ladybug-shared","is_shared_repository":true,"queries":{"chunk_size":2500,"concurrent_queries":1,"max_rows_per_query":10000,"max_timeout_seconds":300},"rate_limits":{"burst_capacity":60,"requests_per_hour":3600,"requests_per_minute":60},"storage":{"approaching_limit":false,"max_storage_gb":20.0},"subscription_tier":"ladybug-standard"}]},"GraphMemberListResponse":{"properties":{"members":{"items":{"$ref":"#/components/schemas/GraphMemberResponse"},"type":"array","title":"Members"},"total":{"type":"integer","title":"Total"},"graph_id":{"type":"string","title":"Graph Id"}},"type":"object","required":["members","total","graph_id"],"title":"GraphMemberListResponse","description":"All users with access to a graph."},"GraphMemberResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"role":{"$ref":"#/components/schemas/GraphRole"},"source":{"type":"string","enum":["explicit","org_role"],"title":"Source","description":"'explicit' for a direct grant; 'org_role' for implicit admin held by org owners/admins"},"granted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Granted At","description":"When the explicit grant was created (null for implicit access)"}},"type":"object","required":["user_id","name","email","role","source"],"title":"GraphMemberResponse","description":"A user with access to a graph."},"GraphMetadata":{"properties":{"graph_name":{"type":"string","title":"Graph Name","description":"Display name for the graph","examples":["Acme Consulting LLC"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Optional description","examples":["Professional consulting services with full accounting integration"]},"schema_extensions":{"items":{"type":"string"},"type":"array","title":"Schema Extensions","description":"Schema extensions to enable","examples":[["roboledger"]]},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"Tags for organizing graphs","examples":[["consulting","professional-services"]]}},"type":"object","required":["graph_name"],"title":"GraphMetadata","description":"Metadata for graph creation."},"GraphMetadataResult":{"properties":{"graph_id":{"type":"string","title":"Graph Id","description":"Graph the metadata belongs to"},"graph_name":{"type":"string","title":"Graph Name","description":"Display name after the update"},"description":{"type":"string","title":"Description","description":"Description after the update ('' when unset)","default":""},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"Tags after the update (empty when unset)"},"updated_fields":{"items":{"type":"string"},"type":"array","title":"Updated Fields","description":"Fields this call actually changed. Empty when the submitted values already matched what was stored."}},"type":"object","required":["graph_id","graph_name"],"title":"GraphMetadataResult","description":"Result payload for the update-graph-metadata operation."},"GraphMetricsResponse":{"properties":{"graph_id":{"type":"string","title":"Graph Id","description":"Graph database identifier"},"graph_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Graph Name","description":"Display name for the graph"},"user_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Role","description":"User's role in this graph"},"timestamp":{"type":"string","title":"Timestamp","description":"Metrics collection timestamp"},"total_nodes":{"type":"integer","title":"Total Nodes","description":"Total number of nodes"},"total_relationships":{"type":"integer","title":"Total Relationships","description":"Total number of relationships"},"node_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Node Counts","description":"Node counts by label"},"relationship_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Relationship Counts","description":"Relationship counts by type"},"storage":{"additionalProperties":true,"type":"object","title":"Storage","description":"Measured on-disk storage: total_bytes/kb/mb/gb plus itemized `items` (graph, memory, subgraph, vectors, staging). Carries `error` instead if the instance could not be reached — the fields are absent rather than estimated."},"health_status":{"additionalProperties":true,"type":"object","title":"Health Status","description":"Database health information"}},"type":"object","required":["graph_id","timestamp","total_nodes","total_relationships","node_counts","relationship_counts","storage","health_status"],"title":"GraphMetricsResponse","description":"Response model for graph metrics."},"GraphRole":{"type":"string","enum":["viewer","member","admin"],"title":"GraphRole","description":"Ordered per-graph roles: viewer < member < admin."},"GraphSubscriptionResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Subscription ID"},"resource_type":{"type":"string","title":"Resource Type","description":"Resource type (graph or repository)"},"resource_id":{"type":"string","title":"Resource Id","description":"Resource identifier"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"Organization member the subscription belongs to. Set for repository subscriptions, which are billed to the org but granted per user."},"plan_name":{"type":"string","title":"Plan Name","description":"Current plan name"},"plan_display_name":{"type":"string","title":"Plan Display Name","description":"Human-readable plan name for UI display"},"billing_interval":{"type":"string","title":"Billing Interval","description":"Billing interval"},"status":{"type":"string","title":"Status","description":"Subscription status"},"base_price_cents":{"type":"integer","title":"Base Price Cents","description":"Base price in cents"},"current_period_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Period Start","description":"Current billing period start"},"current_period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Period End","description":"Current billing period end"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At","description":"Subscription start date"},"canceled_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canceled At","description":"Cancellation date"},"ends_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ends At","description":"Subscription end date (when access will be revoked, especially relevant for cancelled subscriptions)"},"created_at":{"type":"string","title":"Created At","description":"Creation timestamp"},"operation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operation Id","description":"Operation ID for tracking async tier changes via SSE"}},"type":"object","required":["id","resource_type","resource_id","plan_name","plan_display_name","billing_interval","status","base_price_cents","created_at"],"title":"GraphSubscriptionResponse","description":"Response for graph or repository subscription details."},"GraphSubscriptionTier":{"properties":{"name":{"type":"string","title":"Name","description":"Infrastructure tier identifier (e.g., ladybug-standard)"},"display_name":{"type":"string","title":"Display Name","description":"Display name for UI"},"description":{"type":"string","title":"Description","description":"Tier description"},"monthly_price_per_graph":{"type":"number","title":"Monthly Price Per Graph","description":"Monthly price in USD per graph"},"monthly_credits_per_graph":{"type":"integer","title":"Monthly Credits Per Graph","description":"Monthly AI credits per graph"},"infrastructure":{"type":"string","title":"Infrastructure","description":"Infrastructure description"},"features":{"items":{"type":"string"},"type":"array","title":"Features","description":"List of features"},"backup_retention_days":{"type":"integer","title":"Backup Retention Days","description":"Backup retention in days"},"priority_support":{"type":"boolean","title":"Priority Support","description":"Whether priority support is included"},"max_subgraphs":{"type":"integer","title":"Max Subgraphs","description":"Maximum subgraphs supported","default":0},"api_rate_multiplier":{"type":"number","title":"Api Rate Multiplier","description":"API rate multiplier"},"backend":{"type":"string","title":"Backend","description":"Database backend identifier"},"instance_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instance Type","description":"Instance type"},"instance_storage_limit_gb":{"type":"number","title":"Instance Storage Limit Gb","description":"Soft storage cap for the instance in GB","default":0}},"type":"object","required":["name","display_name","description","monthly_price_per_graph","monthly_credits_per_graph","infrastructure","features","backup_retention_days","priority_support","api_rate_multiplier","backend"],"title":"GraphSubscriptionTier","description":"Information about a graph infrastructure tier.\n\nEach tier represents a per-graph subscription option with specific\ninfrastructure, performance, and pricing characteristics."},"GraphSubscriptions":{"properties":{"description":{"type":"string","title":"Description","description":"Description of graph subscriptions"},"pricing_model":{"type":"string","title":"Pricing Model","description":"Pricing model type (per_graph or per_organization)"},"tiers":{"items":{"$ref":"#/components/schemas/GraphSubscriptionTier"},"type":"array","title":"Tiers","description":"Available infrastructure tiers"},"notes":{"items":{"type":"string"},"type":"array","title":"Notes","description":"Important notes"}},"type":"object","required":["description","pricing_model","tiers","notes"],"title":"GraphSubscriptions","description":"Graph subscription offerings.\n\nGraph subscriptions are per-graph, not per-organization. Each graph\ncreated by an organization has its own subscription with its own\ninfrastructure tier, pricing, and credit allocation."},"GraphTierBackup":{"properties":{"max_backup_size_gb":{"type":"integer","title":"Max Backup Size Gb","description":"Maximum backup size in GB"},"backup_retention_days":{"type":"integer","title":"Backup Retention Days","description":"Backup retention period in days"},"max_backups_per_day":{"type":"integer","title":"Max Backups Per Day","description":"Maximum backups per day"}},"type":"object","required":["max_backup_size_gb","backup_retention_days","max_backups_per_day"],"title":"GraphTierBackup","description":"Backup configuration for a tier."},"GraphTierCopyOperations":{"properties":{"max_file_size_gb":{"type":"number","title":"Max File Size Gb","description":"Maximum file size in GB"},"timeout_seconds":{"type":"integer","title":"Timeout Seconds","description":"Operation timeout in seconds"},"concurrent_operations":{"type":"integer","title":"Concurrent Operations","description":"Maximum concurrent operations"},"max_files_per_operation":{"type":"integer","title":"Max Files Per Operation","description":"Maximum files per operation"},"daily_copy_operations":{"type":"integer","title":"Daily Copy Operations","description":"Daily operation limit"}},"type":"object","required":["max_file_size_gb","timeout_seconds","concurrent_operations","max_files_per_operation","daily_copy_operations"],"title":"GraphTierCopyOperations","description":"Copy operation limits for a tier."},"GraphTierInfo":{"properties":{"tier":{"type":"string","title":"Tier","description":"Tier identifier"},"name":{"type":"string","title":"Name","description":"Tier name"},"display_name":{"type":"string","title":"Display Name","description":"Display name for UI"},"description":{"type":"string","title":"Description","description":"Tier description"},"backend":{"type":"string","title":"Backend","description":"Database backend identifier"},"enabled":{"type":"boolean","title":"Enabled","description":"Whether tier is available"},"max_subgraphs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Subgraphs","description":"Maximum subgraphs allowed"},"monthly_credits":{"type":"integer","title":"Monthly Credits","description":"Monthly AI credits"},"api_rate_multiplier":{"type":"number","title":"Api Rate Multiplier","description":"API rate limit multiplier"},"monthly_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Price","description":"Monthly price in USD"},"features":{"items":{"type":"string"},"type":"array","title":"Features","description":"List of tier features"},"instance":{"$ref":"#/components/schemas/GraphTierInstance","description":"Instance specifications"},"limits":{"$ref":"#/components/schemas/GraphTierLimits","description":"Resource limits"}},"type":"object","required":["tier","name","display_name","description","backend","enabled","max_subgraphs","monthly_credits","api_rate_multiplier","features","instance","limits"],"title":"GraphTierInfo","description":"Complete information about a graph database tier."},"GraphTierInstance":{"properties":{"type":{"type":"string","title":"Type","description":"Instance type identifier"},"memory_mb":{"type":"integer","title":"Memory Mb","description":"LadybugDB memory budget for the whole instance in megabytes (below physical RAM after OS overhead; not a per-graph allocation)"},"is_multitenant":{"type":"boolean","title":"Is Multitenant","description":"Whether this tier shares infrastructure with other graphs"}},"type":"object","required":["type","memory_mb","is_multitenant"],"title":"GraphTierInstance","description":"Instance specifications for a tier."},"GraphTierLimits":{"properties":{"monthly_credits":{"type":"integer","title":"Monthly Credits","description":"Monthly credit allocation"},"max_subgraphs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Subgraphs","description":"Maximum subgraphs (null for unlimited)"},"copy_operations":{"$ref":"#/components/schemas/GraphTierCopyOperations","description":"Copy operation limits"},"backup":{"$ref":"#/components/schemas/GraphTierBackup","description":"Backup configuration"}},"type":"object","required":["monthly_credits","max_subgraphs","copy_operations","backup"],"title":"GraphTierLimits","description":"Resource limits for a tier."},"GraphUsageResponse":{"properties":{"graph_id":{"type":"string","title":"Graph Id","description":"Graph database identifier"},"time_range":{"type":"string","title":"Time Range","description":"Time range for usage data"},"storage_summary":{"anyOf":[{"$ref":"#/components/schemas/StorageSummary"},{"type":"null"}],"description":"Storage usage summary"},"credit_summary":{"anyOf":[{"$ref":"#/components/schemas/CreditSummary"},{"type":"null"}],"description":"Credit consumption summary"},"performance_insights":{"anyOf":[{"$ref":"#/components/schemas/PerformanceInsights"},{"type":"null"}],"description":"Performance analytics"},"recent_events":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Recent Events","description":"Recent usage events"},"timestamp":{"type":"string","title":"Timestamp","description":"Usage collection timestamp"}},"type":"object","required":["graph_id","time_range","timestamp"],"title":"GraphUsageResponse","description":"Response model for graph usage statistics."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthStatus":{"properties":{"status":{"type":"string","pattern":"^(healthy|degraded|unhealthy)$","title":"Status","description":"Current health status","examples":["healthy"]},"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"Time of health check","examples":["2024-01-01T00:00:00Z"]},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details","description":"Additional health check details"}},"type":"object","required":["status","timestamp"],"title":"HealthStatus","description":"Health check status information."},"IndexDocumentOp":{"properties":{"document_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Id","description":"Present → update that document; absent → create a new one"},"title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Title","description":"Required when creating"},"content":{"anyOf":[{"type":"string","maxLength":500000},{"type":"null"}],"title":"Content","description":"Required when creating"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Optional labels"},"folder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder","description":"Optional folder"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"Upsert key (create): re-indexing the same id replaces"}},"type":"object","title":"IndexDocumentOp","description":"Body for index-document (corpus content-op).\n\nCreate a new document when `document_id` is absent; update the named\ndocument (partial — only supplied fields) when present."},"InformationBlockEnvelope":{"properties":{"id":{"type":"string","title":"Id"},"block_type":{"type":"string","title":"Block Type","description":"Discriminator — 'schedule', …"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name","description":"Registry-sourced display label (e.g., 'Schedule')."},"category":{"type":"string","title":"Category","description":"Registry-sourced sidebar grouping ('Close', 'Reporting', …)."},"taxonomy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Id","description":"Source taxonomy the Structure was seeded from. Always present for currently-registered block types (the Structure → Taxonomy FK is non-null); declared optional to keep the shape forward-compatible with future synthetic blocks that don't originate from a taxonomy."},"taxonomy_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Name","description":"Display name of the source taxonomy."},"disclosure_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disclosure Id","description":"Qname of the named Disclosure this block corresponds to (e.g., 'disclosures:BalanceSheet'), when an inbound reportedDisclosure-requiresDisclosure arc identifies one. Null for tenant-authored blocks without a Disclosure mapping."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity whose books the envelope reads. A schedule, reconciliation or forecast is one entity's own and always reads its owner's; a block shared by the group (statements, metrics) reads the entity asked for, else the group parent. Null on the library and on a graph with no entity yet."},"information_model":{"$ref":"#/components/schemas/InformationModelResponse"},"artifact":{"$ref":"#/components/schemas/ArtifactResponse"},"elements":{"items":{"$ref":"#/components/schemas/ElementLite"},"type":"array","title":"Elements"},"connections":{"items":{"$ref":"#/components/schemas/ConnectionLite"},"type":"array","title":"Connections"},"facts":{"items":{"$ref":"#/components/schemas/FactLite"},"type":"array","title":"Facts"},"rules":{"items":{"$ref":"#/components/schemas/RuleLite"},"type":"array","title":"Rules"},"dimensions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Dimensions"},"fact_set":{"anyOf":[{"$ref":"#/components/schemas/FactSetLite"},{"type":"null"}],"description":"The period-specific FactSet this envelope instantiates. Null when the underlying block has no FactSet row yet — typically library-seeded statement Structures with no tenant-generated facts, or Schedule rows written before the create-side FactSet stamping was added."},"verification_results":{"items":{"$ref":"#/components/schemas/VerificationResultLite"},"type":"array","title":"Verification Results"},"verification_summary":{"anyOf":[{"$ref":"#/components/schemas/VerificationSummary"},{"type":"null"}],"description":"Server-computed aggregate over `verification_results` — overall pass/fail/error/skip counts plus a per-rule_category breakdown for the grouped Verification Results panel. Null when the block has no verification results."},"view":{"$ref":"#/components/schemas/ViewProjections","description":"Server-computed view projections (the six `type-of` View projections). `view.rendering` carries pre-computed rows + periods + validation for blocks where rendering is deterministic (the statement family today). Projections without backend support yet are empty — see :class:`ViewProjections`."}},"type":"object","required":["id","block_type","name","display_name","category","information_model","artifact"],"title":"InformationBlockEnvelope","description":"The Information Block exchange format.\n\nOne envelope per block instance. Carries the block's identity + type,\nInformation-Model attributes, the Artifact branch (mechanics +\ntopic/template), and bundled atoms (elements, connections, facts).\nRules / dimensions / FactSet / verification_results are present-but-\nempty for blocks where the upstream content (rule engine, FactSet\nexpand, dimension catalog) has not yet been implemented."},"InformationBlockRequest":{"properties":{"ticker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ticker","description":"Company ticker. On shared-repository graphs (SEC) it resolves the latest matching filing when report_id is not given; ignored on tenant graphs."},"report_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Id","description":"Specific report identifier. Required on tenant graphs; on SEC, optional when ticker is given."},"fiscal_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fiscal Year","description":"Narrow auto-resolution to this fiscal year focus"},"period_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Type","description":"Which forms auto-resolution considers: annual (10-K / 20-F / 40-F, the default) or quarterly (10-Q as well)"},"block":{"type":"string","title":"Block","description":"The block id from disclosures (a role name or its last segment also resolves)"},"periods":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Periods","description":"Period keys to keep, from a previous call's columns. Default keeps the budgeted set, year and balance columns first on an annual form."},"member":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Member","description":"Keep only breakdowns whose member key contains this text (a segment name)"},"max_rows":{"anyOf":[{"type":"integer","maximum":400.0,"minimum":1.0},{"type":"null"}],"title":"Max Rows","description":"Cap on presentation rows (default 400)"},"max_members":{"anyOf":[{"type":"integer","maximum":200.0,"minimum":1.0},{"type":"null"}],"title":"Max Members","description":"An explicit cap on member breakdowns, instead of the response budget"},"offset":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Offset","description":"Rows to skip: the next_offset a truncated response returned"}},"type":"object","required":["block"],"title":"InformationBlockRequest","description":"Request for the information-block view op — one section read whole."},"InformationBlockResponse":{"properties":{"graph_id":{"type":"string","title":"Graph Id"},"report_id":{"type":"string","title":"Report Id"},"resolved_report":{"anyOf":[{"$ref":"#/components/schemas/ResolvedReportInfo"},{"type":"null"}]},"block":{"additionalProperties":true,"type":"object","title":"Block"},"columns":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Columns"},"axes":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Axes"},"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows"},"row_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Row Count"},"truncated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Truncated"},"offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Offset"},"ancestors":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Ancestors"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"},"calculation":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Calculation"},"text":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Text"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"additionalProperties":true,"type":"object","required":["graph_id","report_id","block"],"title":"InformationBlockResponse","description":"The information-block view op's result: xbrlkit's block, stamped."},"InformationModelResponse":{"properties":{"concept_arrangement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Concept Arrangement","description":"roll_up | roll_forward | variance | adjustment | set | arithmetic | textblock. Null for block types where the concept arrangement is implicit in their mechanics."},"member_arrangement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Member Arrangement","description":"is_a | whole_part | nested_whole_part | two_dimension_aggregation | complex_aggregating_whole_part, or null if non-hypercube."}},"type":"object","title":"InformationModelResponse","description":"The block's intrinsic shape — concept + member arrangement patterns."},"IngestFileOp":{"properties":{"file_id":{"type":"string","minLength":1,"title":"File Id","description":"Uploaded file id to ingest"},"ingest_to_graph":{"type":"boolean","title":"Ingest To Graph","description":"Auto-materialize into the graph after DuckDB staging. Refused with 409 while another materialization of the graph is running.","default":false}},"type":"object","required":["file_id"],"title":"IngestFileOp","description":"Body for ingest-file (raw→staging content flow).\n\nMarks an uploaded file ready and triggers DuckDB staging. Set\n`ingest_to_graph` to auto-chain graph materialization after staging."},"InitialEntityData":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Entity name"},"uri":{"type":"string","minLength":1,"title":"Uri","description":"Entity website or URI"},"ticker":{"anyOf":[{"type":"string","maxLength":10,"minLength":1},{"type":"null"}],"title":"Ticker","description":"Entity symbol/ticker (e.g., 'HARB', 'NVDA'). Auto-generated from name if not provided."},"cik":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cik","description":"CIK number for SEC filings"},"sic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sic","description":"SIC code"},"sic_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sic Description","description":"SIC description"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Business category"},"state_of_incorporation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Of Incorporation","description":"State of incorporation"},"fiscal_year_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fiscal Year End","description":"Fiscal year end (MMDD)"},"ein":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ein","description":"Employer Identification Number"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type","description":"Entity legal form (e.g. 'corporation', 'llc' / 'limited_liability_company', 'partnership', 'sole_proprietorship', 'non_profit'). Drives the graph's default Reporting Style at creation — partnership and llc get dedicated equity-form Styles; everything else defaults to corporate. Blank falls back to corporate."},"reporting_style_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reporting Style Id","description":"Optional explicit Reporting Style Structure id to pin on the entity, overriding the entity_type-derived default. Leave blank to derive from entity_type. Change later via the change-reporting-style operation."}},"type":"object","required":["name","uri"],"title":"InitialEntityData","description":"Initial entity data for entity-focused graph creation.\n\nWhen creating an entity graph with an initial entity node, this model defines\nthe entity's identifying information and metadata.","examples":[{"cik":"0000320193","ein":"94-2404110","fiscal_year_end":"0930","name":"Apple Inc.","sic":"3571","sic_description":"Electronic Computers","state_of_incorporation":"California","uri":"https://www.apple.com"},{"category":"Professional Services","ein":"12-3456789","name":"Acme Consulting LLC","state_of_incorporation":"Delaware","uri":"https://acmeconsulting.com"},{"name":"Startup Inc","uri":"https://startup.io"}]},"InitializeChartOfAccountsRequest":{"properties":{"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity to give a chart to, by id. Omit for the group parent. A sibling already having one is no bar."},"template":{"type":"string","enum":["saas","services","product"],"title":"Template","description":"Template key: `saas` (subscription software — deferred revenue, cost of revenue, R&D / S&M / G&A), `services` (professional services — no inventory, no COGS), `product` (inventory and cost of goods sold, direct + wholesale + subscription revenue)."},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type","description":"Legal form for the equity mapping: `corporation`, `llc` or `partnership`. Defaults to the graph's primary entity, then to corporation."},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name","description":"Chart display name. Defaults to 'Chart of Accounts'."}},"type":"object","required":["template"],"title":"InitializeChartOfAccountsRequest","description":"Create the graph's chart of accounts from a shipped template.\n\nRefused (409) when the entity already has an active `chart_of_accounts`\ntaxonomy — a QuickBooks-synced tenant never needs this, and a chart is\nnever replaced. Each entity of the group keeps its own chart; omit\n`entity_id` for the group parent. The template's equity rows are mapped by the entity's\nlegal form (`entity_type`: corporation / llc / partnership); omit it\nto use the graph's primary entity, falling back to corporation.","examples":[{"template":"saas"},{"entity_type":"llc","name":"Cascade Books","template":"services"}]},"InitializeChartOfAccountsResponse":{"properties":{"taxonomy_id":{"type":"string","title":"Taxonomy Id","description":"The new chart's taxonomy id."},"name":{"type":"string","title":"Name"},"template":{"type":"string","enum":["saas","services","product"],"title":"Template"},"entity_type":{"type":"string","title":"Entity Type","description":"Legal form the equity rows were mapped for."},"elements_created":{"type":"integer","title":"Elements Created"},"mappings_created":{"type":"integer","title":"Mappings Created"},"frameworks":{"items":{"type":"string"},"type":"array","title":"Frameworks","description":"Frameworks the chart was mapped into — each template mapping set whose framework this graph's library carries (rs-gaap today; every framework in the graph's pin once it is plural)."},"unresolved":{"items":{"type":"string"},"type":"array","title":"Unresolved","description":"What could not be mapped, never fatal — the accounts exist and can be mapped by hand: a target qname the framework's library copy did not resolve, `<framework>: not in this graph's library` for a template mapping set whose framework this graph does not carry, or a template row naming an account it does not declare."}},"type":"object","required":["taxonomy_id","name","template","entity_type","elements_created","mappings_created"],"title":"InitializeChartOfAccountsResponse"},"InitializeLedgerRequest":{"properties":{"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity whose books this acts on, by id. Omit for the group parent — the single-entity default."},"closed_through":{"anyOf":[{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},{"type":"null"}],"title":"Closed Through","description":"YYYY-MM period. Periods ≤ this date are treated as historical (already closed before the user joined). Set to null for a fresh business with no prior close state."},"fiscal_year_start_month":{"type":"integer","maximum":12.0,"minimum":1.0,"title":"Fiscal Year Start Month","description":"Fiscal year start month (1-12). Defaults to calendar year.","default":1},"auto_seed_schedules":{"type":"boolean","title":"Auto Seed Schedules","description":"If true, run the SchedulerAgent to create schedules from historical BS activity. NOT YET IMPLEMENTED — returns a warning in v1.","default":false},"earliest_data_period":{"anyOf":[{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},{"type":"null"}],"title":"Earliest Data Period","description":"YYYY-MM period representing the earliest month that has transaction data. Used to create FiscalPeriod rows. Defaults to 24 months before the current month."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Free-form note attached to the audit event"}},"type":"object","title":"InitializeLedgerRequest","description":"One-time setup for a graph's fiscal calendar.\n\nCreates the `FiscalCalendar` row, seeds `FiscalPeriod` rows from\n`earliest_data_period` (or 24 months ago) through the current month,\nand stamps periods on or before `closed_through` as already closed.\nSubsequent calls return 409 — there's no re-initialize.\n\nThe two pointers it sets up:\n\n- `closed_through` (system-maintained): the latest period whose\n  books are locked. Set on init for businesses with prior close\n  history; null for a fresh start.\n- `close_target` (user-controlled): the goal date the user is\n  closing toward. Set independently via `set-close-target`.","examples":[{"fiscal_year_start_month":1},{"closed_through":"2025-12","earliest_data_period":"2024-01","fiscal_year_start_month":1,"note":"Migrating from QuickBooks; 2025 already closed there."},{"closed_through":"2026-03","fiscal_year_start_month":7,"note":"FY runs July–June."}]},"InitializeLedgerResponse":{"properties":{"fiscal_calendar":{"$ref":"#/components/schemas/FiscalCalendarResponse"},"periods_created":{"type":"integer","title":"Periods Created","description":"Number of FiscalPeriod rows created by initialization","default":0},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","description":"Non-fatal warnings (e.g., auto_seed_schedules not implemented)"}},"type":"object","required":["fiscal_calendar"],"title":"InitializeLedgerResponse"},"InstanceUsage":{"properties":{"node_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Node Count","description":"Current node count (informational, no limit enforced)"},"total_storage_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Storage Gb","description":"Total storage used across all databases in GB"},"limit_gb":{"type":"number","title":"Limit Gb","description":"Soft storage limit for this tier in GB"},"usage_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Usage Percentage","description":"Storage usage as percentage of limit (e.g. 105.2). Derived from the enforced figure — durable bytes only, excluding `transient` build artifacts — so it can read lower than total_storage_gb/limit_gb while a blue-green rebuild is in flight."},"status":{"type":"string","title":"Status","description":"Instance status: 'healthy' (<80%), 'approaching' (80-100%), 'over_limit' (>100%)"},"databases":{"items":{"$ref":"#/components/schemas/DatabaseStorageEntry"},"type":"array","title":"Databases","description":"Per-database storage breakdown"},"items":{"items":{"$ref":"#/components/schemas/StorageItem"},"type":"array","title":"Items","description":"Itemized storage by type — graph, memory, subgraph, vectors, staging, transient, orphan. Sums to total_storage_gb. Only `subgraph` items correspond to live subgraphs, so this is the type to sum when reconciling against the subgraph list."}},"type":"object","required":["limit_gb","status"],"title":"InstanceUsage","description":"Aggregate storage usage across the dedicated instance.\n\nCovers the parent graph, all subgraphs, DuckDB staging, and vector indexes."},"InvitationPreviewResponse":{"properties":{"org_name":{"type":"string","title":"Org Name"},"email":{"type":"string","title":"Email"},"role":{"$ref":"#/components/schemas/OrgRole"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["org_name","email","role","expires_at"],"title":"InvitationPreviewResponse","description":"Public preview of an invitation, looked up by its token."},"Invoice":{"properties":{"id":{"type":"string","title":"Id","description":"Invoice ID"},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number","description":"Invoice number"},"status":{"type":"string","title":"Status","description":"Invoice status (paid, open, void, uncollectible)"},"amount_due":{"type":"integer","title":"Amount Due","description":"Amount due in cents"},"amount_paid":{"type":"integer","title":"Amount Paid","description":"Amount paid in cents"},"currency":{"type":"string","title":"Currency","description":"Currency code (usd)"},"created":{"type":"string","title":"Created","description":"Invoice creation date (ISO format)"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Due Date","description":"Invoice due date (ISO format)"},"paid_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paid At","description":"Payment date (ISO format)"},"invoice_pdf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Pdf","description":"PDF download URL"},"hosted_invoice_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hosted Invoice Url","description":"Hosted invoice URL"},"line_items":{"items":{"$ref":"#/components/schemas/InvoiceLineItem"},"type":"array","title":"Line Items","description":"Invoice line items"},"subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Id","description":"Associated subscription ID"}},"type":"object","required":["id","status","amount_due","amount_paid","currency","created","line_items"],"title":"Invoice","description":"Invoice information."},"InvoiceLineItem":{"properties":{"description":{"type":"string","title":"Description","description":"Line item description"},"amount":{"type":"integer","title":"Amount","description":"Amount in cents"},"quantity":{"type":"integer","title":"Quantity","description":"Quantity"},"period_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Start","description":"Billing period start"},"period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period End","description":"Billing period end"}},"type":"object","required":["description","amount","quantity"],"title":"InvoiceLineItem","description":"Invoice line item."},"InvoicesResponse":{"properties":{"invoices":{"items":{"$ref":"#/components/schemas/Invoice"},"type":"array","title":"Invoices","description":"List of invoices"},"total_count":{"type":"integer","title":"Total Count","description":"Total number of invoices"},"has_more":{"type":"boolean","title":"Has More","description":"Whether more invoices are available"}},"type":"object","required":["invoices","total_count","has_more"],"title":"InvoicesResponse","description":"Response for invoice list."},"JournalEntryLineItemInput":{"properties":{"element_id":{"type":"string","title":"Element Id","description":"Element ULID identifying the account to post to."},"debit_amount":{"type":"integer","title":"Debit Amount","description":"Debit amount in cents. Must be 0 if `credit_amount` > 0.","default":0},"credit_amount":{"type":"integer","title":"Credit Amount","description":"Credit amount in cents. Must be 0 if `debit_amount` > 0.","default":0},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Per-line memo (overrides the entry-level memo on this line)."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Optional per-line metadata stamped on `LineItem.metadata_`. Used to carry source-system fields the standard columns don't cover — e.g. an external flow-tag code that drives rollforward attribution (`transaction_description_code`), an external memo, or a cost-center hint. Pass-through is non-validating; the renderer / filter engine reads keys it knows about and ignores the rest. `None` is normalized to `{}` at persist time."}},"type":"object","required":["element_id"],"title":"JournalEntryLineItemInput","description":"One debit/credit line in a journal entry create/update payload.\n\nExactly one of `debit_amount` / `credit_amount` must be non-zero; the\nother must be zero. Amounts are in minor currency units (cents)."},"JournalEntryLineItemResponse":{"properties":{"id":{"type":"string","title":"Id"},"element_id":{"type":"string","title":"Element Id"},"debit_amount":{"type":"integer","title":"Debit Amount"},"credit_amount":{"type":"integer","title":"Credit Amount"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"line_order":{"type":"integer","title":"Line Order"}},"type":"object","required":["id","element_id","debit_amount","credit_amount","line_order"],"title":"JournalEntryLineItemResponse","description":"One line in a journal entry response."},"JournalEntryResponse":{"properties":{"id":{"type":"string","title":"Id"},"transaction_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transaction Id"},"type":{"type":"string","title":"Type"},"status":{"type":"string","title":"Status"},"posting_date":{"type":"string","format":"date","title":"Posting Date"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"provenance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provenance"},"reversal_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reversal Of"},"posted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Posted At"},"line_items":{"items":{"$ref":"#/components/schemas/JournalEntryLineItemResponse"},"type":"array","title":"Line Items"},"total_debit":{"type":"integer","title":"Total Debit"},"total_credit":{"type":"integer","title":"Total Credit"}},"type":"object","required":["id","type","status","posting_date","line_items","total_debit","total_credit"],"title":"JournalEntryResponse","description":"The common response shape for journal entry write operations."},"LearnClassificationDefaultsRequest":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run","description":"Report what would be learned without writing it.","default":false}},"type":"object","title":"LearnClassificationDefaultsRequest","description":"Seed counterparty defaults from the bank lines already committed."},"LearnClassificationDefaultsResponse":{"properties":{"agents_learned":{"type":"integer","title":"Agents Learned","description":"Counterparties given a default from their committed lines."},"agents_kept":{"type":"integer","title":"Agents Kept","description":"Counterparties that already had a default, left as they were."},"lines_read":{"type":"integer","title":"Lines Read","description":"Committed lines classified to a single account that were read."},"open_lines_resuggested":{"type":"integer","title":"Open Lines Resuggested","description":"Still-open lines whose suggestion changed as a result."},"dry_run":{"type":"boolean","title":"Dry Run"}},"type":"object","required":["agents_learned","agents_kept","lines_read","open_lines_resuggested","dry_run"],"title":"LearnClassificationDefaultsResponse","description":"What seeding the defaults learned."},"LedgerAgentResponse":{"properties":{"id":{"type":"string","title":"Id"},"agent_type":{"type":"string","title":"Agent Type"},"name":{"type":"string","title":"Name"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"registration_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration Number"},"duns":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duns"},"lei":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lei"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address"},"source":{"type":"string","title":"Source"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"is_active":{"type":"boolean","title":"Is Active"},"is_1099_recipient":{"type":"boolean","title":"Is 1099 Recipient"},"classification":{"anyOf":[{"$ref":"#/components/schemas/AgentClassification"},{"type":"null"}],"description":"The default account its bank lines are suggested."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"}},"type":"object","required":["id","agent_type","name","source","is_active","is_1099_recipient"],"title":"LedgerAgentResponse"},"LedgerEntityResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Entity identifier (ULID)."},"name":{"type":"string","title":"Name","description":"Display name shown in UI."},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name","description":"Full registered legal name (when different from `name`)."},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri","description":"Canonical URL / external identifier."},"cik":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cik","description":"SEC CIK (Central Index Key)."},"ticker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ticker","description":"Stock ticker symbol."},"exchange":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exchange","description":"Listing exchange (e.g. 'NASDAQ', 'NYSE')."},"sic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sic","description":"SIC industry code."},"sic_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sic Description","description":"SIC code description."},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Filer category (e.g. 'Large Accelerated Filer')."},"state_of_incorporation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Of Incorporation","description":"US state or country of incorporation."},"fiscal_year_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fiscal Year End","description":"Fiscal year-end as MM-DD (e.g. '12-31', '06-30')."},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id","description":"Tax ID (EIN / SSN)."},"lei":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lei","description":"Legal Entity Identifier (ISO 17442)."},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry","description":"Free-form industry label."},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type","description":"Legal form (e.g. 'corporation', 'llc', 'lp')."},"reporting_style_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reporting Style Id","description":"Active Reporting Style (Structure id) governing this entity's statement layout. Change it via the change-reporting-style operation."},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"status":{"type":"string","title":"Status","description":"Operational status: 'active' | 'inactive' | 'dissolved'.","default":"active"},"is_parent":{"type":"boolean","title":"Is Parent","description":"True for top-level entities; False for subsidiaries.","default":true},"parent_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Entity Id","description":"Parent entity ID for subsidiaries; null for top-level."},"ownership_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ownership Pct","description":"The parent's share of this entity, as a percent (100 = wholly owned). Null on the group parent, and where it was never recorded."},"source":{"type":"string","title":"Source","description":"Provenance: 'native' | 'sec' | 'quickbooks' | 'xero' | 'plaid'.","default":"native"},"source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id","description":"Source-system primary key for sync reconciliation."},"source_graph_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Graph Id","description":"Origin graph for received entities (cross-graph linking, e.g. RoboInvestor portfolio holdings)."},"connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Id","description":"Source connection that ingested this row."},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1"},"address_city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address City"},"address_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address State"},"address_postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Postal Code"},"address_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Country"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","name"],"title":"LedgerEntityResponse","description":"Entity details from the extensions OLTP database.\n\nReturned by entity reads and `update-entity`. Identifiers\n(CIK / ticker / SIC / LEI / tax_id) are present when sourced from\nSEC or registry data; many are null for private companies. The\naddress fields are flattened (no nested object) to make them easy\nto project into reporting forms."},"LeverAssertionLite":{"properties":{"qname":{"type":"string","title":"Qname","description":"rs-driver lever element qname."},"element_id":{"type":"string","title":"Element Id","description":"Resolved tenant element id."},"item_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Type","description":"Format family from the catalog (percent | days | ...)."},"values_by_period":{"additionalProperties":{"type":"number"},"type":"object","title":"Values By Period","description":"Expanded per-month assertions keyed by `YYYY-MM`."}},"type":"object","required":["qname","element_id","values_by_period"],"title":"LeverAssertionLite","description":"One lever's persisted assertion inside `ForecastMechanics`.\n\nThe create handler expands the wire-level assertion (uniform `value`\n+ per-month overrides) into the explicit `values_by_period` map so\ncompute never interpolates — every asserted month is stated. The\nvalues are duplicated as authored facts in the scenario's lever\nFactSet (rules for mechanics, **facts for values** — the facts are\nwhat `compute-forecast` binds); this mechanics copy is the\noperator-legible round-trip shape."},"LeverAssertionRequest":{"properties":{"qname":{"type":"string","title":"Qname","description":"QName of the rs-driver lever element (e.g. `rs-driver:RevenueGrowthRate`)."},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value","description":"Uniform value asserted for every month of the horizon."},"values_by_period":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Values By Period","description":"Per-month overrides keyed by `YYYY-MM`. Wins over `value` for the months it names."}},"type":"object","required":["qname"],"title":"LeverAssertionRequest","description":"One lever's asserted values for the scenario.\n\n`qname` must resolve to an `rs-driver:*` catalog element (the\ncreate handler rejects anything else). Each lever's value semantics\nare defined by its catalog element's documentation — surfaced as\n`documentation` on the elements bundled in the forecast block's\nenvelope (`get-information-block`). Percent levers are decimals but\ntheir *meaning* varies by lever: growth levers are month-over-month\nrates (`RevenueGrowthRate` 0.03 = +3%/month, compounding), while\nrate-on-base levers are fractions of the same month's base\n(`CostOfRevenueRate` 0.62 = cost of revenue at 62% of that month's\nrevenues — not a growth rate). Days levers (`DaysSalesOutstanding`,\n`DaysPayableOutstanding`) are day counts.\n\n`value` is a uniform fill across the whole horizon;\n`values_by_period` overrides individual months (`\"YYYY-MM\"`\nkeys) — e.g. a margin-compression ramp asserts a different rate each\nmonth. At least one of the two must be provided. Months covered by\nneither carry no assertion — the lever's rule is inactive for that\nmonth and its target falls to the engine's carry-forward default."},"LineAssertionLite":{"properties":{"qname":{"type":"string","title":"Qname","description":"Asserted statement-leaf qname."},"element_id":{"type":"string","title":"Element Id","description":"Resolved tenant element id."},"item_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Type","description":"Format family from the element (monetary | ...)."},"period_type":{"type":"string","title":"Period Type","description":"The element's period type — duration assertions pin IS lines; instant assertions pin BS lines through the roll.","default":"duration"},"values_by_period":{"additionalProperties":{"type":"number"},"type":"object","title":"Values By Period","description":"Expanded per-month assertions keyed by `YYYY-MM`."}},"type":"object","required":["qname","element_id","values_by_period"],"title":"LineAssertionLite","description":"One statement line's persisted direct assertion inside\n`ForecastMechanics`.\n\nThe manual-override sibling of :class:`LeverAssertionLite`: a lever\nasserts a *driver* whose rule derives a line; a line assertion pins\nthe **line itself** (a calc-DAG leaf) to typed values for the months\nit names — winning over driver rules and carry-forward for exactly\nthose months (a displaced rule surfaces in the compute response's\n`skipped` list). Subtotals stay calc-DAG-derived, so a manual line\nstill articulates through RollUps, RE, balancing cash, and derived\nCF, and stays verification-gated.\n\nSame persistence doctrine as levers: values are duplicated as\nauthored facts in the scenario's lever FactSet (facts are what\n`compute-forecast` binds); this mechanics copy is the\noperator-legible round-trip shape."},"LineAssertionRequest":{"properties":{"qname":{"type":"string","title":"Qname","description":"QName of the statement leaf to assert (e.g. `rs-gaap:NonoperatingIncomeExpense`). Must be a calc-DAG leaf; rs-driver concepts belong in `levers`."},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value","description":"Uniform value asserted for every month of the horizon."},"values_by_period":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Values By Period","description":"Per-month overrides keyed by `YYYY-MM`. Wins over `value` for the months it names."}},"type":"object","required":["qname"],"title":"LineAssertionRequest","description":"One statement line's directly asserted values for the scenario.\n\nThe manual-override half of the authored surface: where a lever\nasserts a *driver* (growth %, DSO) whose rule derives the line, a\nline assertion asserts the **line itself** — an rs-gaap (or tenant\nextension) statement leaf pinned to typed values for the months it\nnames. Assertions win over driver rules and carry-forward for those\nmonths (a displaced rule lands in `skipped`, legibly); months the\nassertion doesn't name keep the engine's normal derivation.\n\n**Leaves only** — subtotals stay calc-DAG-derived, so a manually set\nline still articulates through RollUps, RE, balancing cash, and the\nderived CF, and stays verification-gated (the whole pitch vs a\nspreadsheet cell). The create handler rejects calc-parent qnames.\n\nValue/period grammar is identical to levers: `value` is a uniform\nfill across the horizon, `values_by_period` overrides individual\nmonths. The canonical uses: zero out a base-month one-off so\ncarry-forward stops replicating it, or hold a line at a known budget\nnumber no driver models."},"LineGrowthLite":{"properties":{"qname":{"type":"string","title":"Qname","description":"Grown statement-leaf qname."},"element_id":{"type":"string","title":"Element Id","description":"Resolved tenant element id."},"item_type":{"type":"string","title":"Item Type","description":"Always 'percent' — the grid row renders rates, not values.","default":"percent"},"values_by_period":{"additionalProperties":{"type":"number"},"type":"object","title":"Values By Period","description":"Expanded per-month growth rates keyed by `YYYY-MM`."}},"type":"object","required":["qname","element_id","values_by_period"],"title":"LineGrowthLite","description":"One statement line's persisted growth trajectory inside\n`ForecastMechanics`.\n\nThe generic per-line form of the revenue growth lever: grows an\nincome-statement leaf month-over-month at the asserted rate\n(`line[t] = line[t-1] * (1 + rate[t])`), compounding from the base\nmonth's value. Months without a rate keep the engine's carry-forward.\nDuration leaves only; disjoint from `line_assertions` and from any\nactive catalog rule's target (one owner per line).\n\nPersistence deviates from levers/assertions deliberately: rates are\nNOT duplicated as facts in the scenario FactSet — a growth rate on a\nmonetary statement element would be a unit-lying fact. This mechanics\ncopy is the single authored store; `compute-forecast` binds rates\nfrom here."},"LineGrowthRequest":{"properties":{"qname":{"type":"string","title":"Qname","description":"QName of the income-statement leaf to grow (e.g. `rs-gaap:ResearchAndDevelopmentExpense`). Must be a calc-DAG duration leaf."},"value":{"anyOf":[{"type":"number","exclusiveMinimum":-1.0},{"type":"null"}],"title":"Value","description":"Uniform month-over-month growth rate for every month of the horizon (decimal: 0.02 = +2%/mo, -0.05 = -5%/mo)."},"values_by_period":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Values By Period","description":"Per-month rate overrides keyed by `YYYY-MM`. Wins over `value` for the months it names; months named by neither carry the line's prior value (rate 0)."}},"type":"object","required":["qname"],"title":"LineGrowthRequest","description":"One statement line's asserted growth trajectory for the scenario.\n\nThe generic per-line sibling of `rs-driver:RevenueGrowthRate`: where\nthe catalog lever grows *revenue* through its seeded rule, a line\ngrowth entry grows **any income-statement leaf** at a month-over-month\nrate — `value` -0.05 cuts the line 5% per month, compounding from\nthe base month's value. This is what expense trajectories (\"opex +2%/mo\nwith inflation\", \"cut costs 5%/mo starting October\") use; without it\nevery unmodeled line just carries flat.\n\nSemantics per month: `line[t] = line[t-1] * (1 + rate[t])`. Months\nthe entry doesn't name keep the engine's carry-forward (grow-then-hold\nramps fall out of `values_by_period` naturally). **Duration leaves\nonly**: balance-sheet lines roll from the IS and the working-capital\nlevers — grow the driving IS line instead. A line already driven by an\nactive catalog rule (e.g. Revenues with `RevenueGrowthRate` set) or\nnamed by a `line_assertions` entry is rejected — one owner per line."},"LineItemMetadataPredicate":{"properties":{"kind":{"type":"string","const":"line_item_metadata_field","title":"Kind","description":"Discriminator value selecting this predicate shape.","default":"line_item_metadata_field"},"field":{"type":"string","title":"Field","description":"Accepted but ignored. The flow tag lives in the typed `flow_element_id` FK, not JSONB metadata. Retained for wire-compatibility.","default":"transaction_description_code"},"values":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Values","description":"Flow-concept qnames that route to this filter's target concept. A LineItem matches when its `flow_element_id` is one of the elements named here AND the line falls within the rollforward's period."}},"type":"object","required":["values"],"title":"LineItemMetadataPredicate","description":"Filter ledger LineItems by flow concept.\n\nThe single predicate kind shipped to date. `values` are flow-concept\nqnames — mini's `TransactionDescriptionCode` values, rs-gaap flow\nconcepts (what the enrichment classifier emits for QuickBooks data),\nfuture XBRL GL `GenericFlowCategory` codes. The engine resolves them\nto element_ids and matches the first-class `LineItem.flow_element_id`\nFK; matched lines aggregate signed into the attributed fact for the\nperiod.\n\n`field` is accepted but ignored: the flow tag lives in the typed\n`flow_element_id` FK, not in JSONB metadata. It stays on the wire so\nexisting request bodies keep validating."},"LinkBankAccountRequest":{"properties":{"connection_id":{"type":"string","minLength":1,"title":"Connection Id","description":"The feed's connection."},"account_id":{"type":"string","minLength":1,"title":"Account Id","description":"The provider's id for the account."},"element_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Element Id","description":"The chart account to link; its chart's entity takes the feed."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"With `element_id`, the entity the account must belong to. Alone, the entity in whose chart a new account is created for the feed account."}},"type":"object","required":["connection_id","account_id"],"title":"LinkBankAccountRequest","description":"Point a bank feed's account at a chart account.\n\nName `element_id` for an existing active account, or `entity_id` alone to\ncreate one in that entity's chart. The chart the account is in decides\nwhose books the feed's lines go into, so this is also how a feed account\nis bound to a subsidiary. Lines still in the inbox move with it; posted\nentries stay where they were posted."},"LinkBankAccountResponse":{"properties":{"connection_id":{"type":"string","title":"Connection Id"},"provider":{"type":"string","title":"Provider"},"account_id":{"type":"string","title":"Account Id"},"element_id":{"type":"string","title":"Element Id","description":"The chart account the feed now books to."},"previous_element_id":{"type":"string","title":"Previous Element Id"},"entity_id":{"type":"string","title":"Entity Id","description":"The entity the feed's lines now belong to."},"account_created":{"type":"boolean","title":"Account Created","description":"A new account was created in the entity's chart.","default":false},"events_repointed":{"type":"integer","title":"Events Repointed","description":"Inbox lines moved to the new account (posted entries stay).","default":0},"events_unclassified":{"type":"integer","title":"Events Unclassified","description":"Lines returned to `captured`: their classification named an account in the previous entity's chart.","default":0},"pairs_across_entities":{"type":"integer","title":"Pairs Across Entities","description":"Open transfer pairs whose two legs now sit on two entities, because only one leg's account moved. Intercompany; the commit guard refuses them until the other leg follows.","default":0},"changed":{"type":"boolean","title":"Changed","description":"False when the link already stood and no line moved.","default":true}},"type":"object","required":["connection_id","provider","account_id","element_id","previous_element_id","entity_id"],"title":"LinkBankAccountResponse","description":"What `link-bank-account` did."},"LinkEntityTaxonomyRequest":{"properties":{"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity to link, by id. Omit for the group parent."},"taxonomy_id":{"type":"string","title":"Taxonomy Id","description":"The taxonomy to link to."},"basis":{"type":"string","enum":["reporting","chart_of_accounts","mapping","schedule"],"title":"Basis","description":"Linkage role: `chart_of_accounts` (the entity's CoA), `reporting` (reporting standard like us-gaap), `mapping` (CoA→reporting rollup), `schedule` (schedule structure).","default":"chart_of_accounts"},"is_primary":{"type":"boolean","title":"Is Primary","description":"Mark this as the primary linkage for the basis. False allows secondary attachments (e.g. parallel reporting standards).","default":true},"adoption_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Adoption Context","description":"Why the entity is reporting under this taxonomy (e.g. 'voluntary', 'regulatory', 'lender_requirement').","default":"voluntary"}},"type":"object","required":["taxonomy_id"],"title":"LinkEntityTaxonomyRequest","description":"Link an entity to a taxonomy (creates the ENTITY_HAS_TAXONOMY edge).\n\nThis is how a graph declares \"this entity reports under this taxonomy.\"\nFor `chart_of_accounts` taxonomies, this tells the platform which CoA\nthe entity uses. For reporting taxonomies, which standard (us-gaap,\nifrs). Idempotent — re-linking returns the existing edge unchanged.\n\nCoA blocks auto-link at create time; use this to switch the primary\nCoA, link a reporting extension, or attach a custom ontology\nexplicitly.","examples":[{"basis":"chart_of_accounts","taxonomy_id":"tax_acme_coa"},{"adoption_context":"lender_requirement","basis":"reporting","taxonomy_id":"tax_usgaap_reporting"}]},"ListSubgraphsResponse":{"properties":{"parent_graph_id":{"type":"string","title":"Parent Graph Id","description":"Parent graph identifier","examples":["kg5f2e5e0da65d45d69645"]},"parent_graph_name":{"type":"string","title":"Parent Graph Name","description":"Parent graph name","examples":["My Company Graph"]},"parent_graph_tier":{"type":"string","title":"Parent Graph Tier","description":"Parent graph tier","examples":["ladybug-large","ladybug-xlarge"]},"subgraphs_enabled":{"type":"boolean","title":"Subgraphs Enabled","description":"Whether subgraphs are enabled for this tier"},"subgraph_count":{"type":"integer","minimum":0.0,"title":"Subgraph Count","description":"Total number of subgraphs"},"max_subgraphs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Subgraphs","description":"Maximum allowed subgraphs for this tier (None = unlimited)"},"total_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Size Bytes","description":"Combined on-disk footprint of all subgraphs in bytes"},"total_size_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Size Mb","description":"Combined size of all subgraphs in megabytes"},"subgraphs":{"items":{"$ref":"#/components/schemas/SubgraphSummary"},"type":"array","title":"Subgraphs","description":"List of subgraphs"}},"type":"object","required":["parent_graph_id","parent_graph_name","parent_graph_tier","subgraphs_enabled","subgraph_count","subgraphs"],"title":"ListSubgraphsResponse","description":"Response model for listing subgraphs."},"ListTableFilesResponse":{"properties":{"graph_id":{"type":"string","title":"Graph Id","description":"Graph database identifier"},"table_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Table Name","description":"Table name (null if listing all files in graph)"},"files":{"items":{"$ref":"#/components/schemas/FileInfo"},"type":"array","title":"Files","description":"List of files in the table"},"total_files":{"type":"integer","title":"Total Files","description":"Total number of files"},"total_size_bytes":{"type":"integer","title":"Total Size Bytes","description":"Total size of all files in bytes"}},"type":"object","required":["graph_id","files","total_files","total_size_bytes"],"title":"ListTableFilesResponse"},"LiveFinancialStatementRequest":{"properties":{"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity whose books this acts on, by id. Omit for the group parent — the single-entity default."},"statement_type":{"type":"string","title":"Statement Type","description":"income_statement | balance_sheet | cash_flow_statement | equity_statement. `equity_statement` is provisional — equity balances, not a rollforward — and is not offered on the MCP surface until it articulates."},"period_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period Start","description":"Explicit window start. Overrides period_type/fiscal_year."},"period_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period End","description":"Explicit window end. Overrides period_type/fiscal_year."},"period_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Type","description":"annual | quarterly | instant (ignored when dates supplied)"},"fiscal_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fiscal Year","description":"Fiscal year for annual window (anchored on FiscalCalendar)"},"consolidated":{"type":"boolean","title":"Consolidated","description":"A combined statement, not a consolidation: every entity of the reporting group rendered under the group parent's Reporting Style and summed per rs-gaap concept, with nothing eliminated between them. Only on the group parent (422 on a subsidiary). An entity with no CoA mapping yet contributes nothing and is left out of `combined_entity_ids`.","default":false},"limit":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Limit","description":"Max fact rows returned. Defaults to the ceiling so a statement is never cut mid-section — visible rows would stop footing to visible subtotals. Lower it only for a preview.","default":1000}},"type":"object","required":["statement_type"],"title":"LiveFinancialStatementRequest","description":"Request for live-financial-statement (OLTP, entity graphs only)."},"LiveFinancialStatementResponse":{"properties":{"graph_id":{"type":"string","title":"Graph Id"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity whose books were rendered."},"consolidated":{"type":"boolean","title":"Consolidated","description":"Whether the group's entities were summed into this: a combined statement, not a consolidation — nothing is eliminated between them.","default":false},"combined_entity_ids":{"items":{"type":"string"},"type":"array","title":"Combined Entity Ids","description":"The entities summed into a combined statement, parent first."},"statement_type":{"type":"string","title":"Statement Type"},"periods":{"items":{"$ref":"#/components/schemas/PeriodSpec"},"type":"array","title":"Periods","description":"Rendered columns, aligned with each row's `values`. Current and prior for income_statement and balance_sheet; current only for cash_flow_statement — the prior period is pivoted as the indirect-method delta basis and not rendered."},"facts":{"items":{"$ref":"#/components/schemas/LiveStatementFactRow"},"type":"array","title":"Facts"},"fact_count":{"type":"integer","title":"Fact Count"},"validation":{"anyOf":[{"$ref":"#/components/schemas/ValidationCheckResponse"},{"type":"null"}],"description":"Guard-rail outcome for the rendered columns — accounting equation, net-income equation, totals footing, operating-plug size. Null only when no structure rendered."},"unmapped_count":{"type":"integer","title":"Unmapped Count","default":0},"truncated":{"type":"boolean","title":"Truncated","default":false}},"type":"object","required":["graph_id","statement_type","periods","facts","fact_count"],"title":"LiveFinancialStatementResponse","description":"Rendered OLTP-backed ad-hoc statement."},"LiveStatementFactRow":{"properties":{"qname":{"type":"string","title":"Qname"},"name":{"type":"string","title":"Name"},"trait":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trait"},"values":{"items":{"anyOf":[{"type":"number"},{"type":"null"}]},"type":"array","title":"Values"},"depth":{"type":"integer","title":"Depth","default":0},"is_subtotal":{"type":"boolean","title":"Is Subtotal","default":false}},"type":"object","required":["qname","name","values"],"title":"LiveStatementFactRow","description":"A single row of an OLTP-backed ad-hoc statement."},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"User's email address"},"password":{"type":"string","minLength":8,"title":"Password","description":"User's password"}},"type":"object","required":["email","password"],"title":"LoginRequest","description":"Login request model."},"MaterializeOp":{"properties":{"force":{"type":"boolean","title":"Force","description":"Force materialization even if already up to date","default":false},"rebuild":{"type":"boolean","title":"Rebuild","description":"Rebuild the graph from scratch, dropping existing data. Required (staged source) when materializing new uploads into a graph that already contains materialized data — staging replays all uploaded files, so a non-rebuild pass would re-copy ingested rows (409). An extensions source always rebuilds a graph that already exists: the new copy is built alongside and swapped in, regardless of this flag.","default":false},"dry_run":{"type":"boolean","title":"Dry Run","description":"Validate tables without writing to the graph","default":false},"source":{"anyOf":[{"type":"string","pattern":"^(staged|extensions)$"},{"type":"null"}],"title":"Source","description":"Materialization source: 'extensions' for OLTP, omit for DuckDB staging tables"},"materialize_embeddings":{"type":"boolean","title":"Materialize Embeddings","description":"Generate vector embeddings during materialization","default":false}},"type":"object","title":"MaterializeOp","description":"Body for the materialize operation."},"MemoryListResponse":{"properties":{"total":{"type":"integer","title":"Total"},"memories":{"items":{"$ref":"#/components/schemas/MemoryRecord"},"type":"array","title":"Memories"},"graph_id":{"type":"string","title":"Graph Id"}},"type":"object","required":["total","memories","graph_id"],"title":"MemoryListResponse","description":"Governance list of memories for a graph."},"MemoryRecallRequest":{"properties":{"query":{"type":"string","maxLength":500,"minLength":1,"title":"Query","description":"Recall query"},"k":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"K","description":"Max results to return","default":10},"memory_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Type","description":"Filter by memory type"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Filter by source"}},"type":"object","required":["query"],"title":"MemoryRecallRequest","description":"Body for recall (ranked semantic search over memory)."},"MemoryRecord":{"properties":{"id":{"type":"string","title":"Id"},"text":{"type":"string","title":"Text"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"memory_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Type"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"source_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Ref"},"provenance":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Provenance"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","text"],"title":"MemoryRecord","description":"A stored memory (never includes the raw embedding vector)."},"MercuryConnectionConfig":{"properties":{"since_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Since Date","description":"First day of the backfill (ISO 8601). Defaults to two years back. Incremental syncs never look back before it, and lines dated in a closed period are never captured."},"include_treasury":{"type":"boolean","title":"Include Treasury","description":"Capture treasury-account activity alongside checking/savings.","default":true},"api_key":{"anyOf":[{"type":"string","minLength":8},{"type":"null"}],"title":"Api Key","description":"A personal read-only Mercury API token, for deployments that allow the api_key credential mode. Omit to connect over OAuth."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity whose books the feed's accounts land on: a subsidiary's id, or omit for the group parent. Required when QuickBooks keeps the parent's books. Each account can be moved to another entity later with `link-bank-account`."}},"type":"object","title":"MercuryConnectionConfig","description":"Mercury bank-feed connection configuration.\n\nA bank feed is native accounting: the entity its accounts land on must\nalready have a chart of accounts and must not be the one QuickBooks keeps\n(the group parent, while QuickBooks is connected). Over OAuth (the hosted\ndefault) the connection is created `pending_oauth` and activated by the\ncallback. `api_key` — a personal **read-only** Mercury token — connects\nat once without a browser round-trip, but only on deployments that turn\non `MERCURY_API_KEY_CONNECTIONS_ENABLED` (self-hosted and local); the\nhosted product refuses it."},"MetricMechanics":{"properties":{"kind":{"type":"string","const":"metric","title":"Kind","default":"metric"},"source_block_ids":{"items":{"type":"string"},"type":"array","title":"Source Block Ids","description":"Ordered list of Structure ids this metric sources from. Must be non-empty at evaluation time; empty lists are accepted so library scaffolding can register metric templates before source linkage is wired."},"derivation_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Derivation Type","description":"Free-form label for the derivation kind — 'ratio', 'trailing_twelve_month', 'covenant_test', etc. The evaluator dispatches on this tag; the set may be locked with a CHECK constraint once the derivation catalog stabilizes."},"expression":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expression","description":"Derivation expression in the metric DSL — evaluated at envelope read time to produce the derivative fact value. Opaque string today; the metric-side parser / evaluator is not yet implemented."},"unit":{"type":"string","title":"Unit","description":"Output unit of the derived value — 'ratio', 'percent', 'USD', 'count', etc. Used by the renderer to format the metric badge.","default":"ratio"}},"type":"object","title":"MetricMechanics","description":"Derivative mechanics for `block_type='metric'`.\n\nA metric block composes its facts from one or more source blocks at\nread time — covenant tests, ratios, KPI trend computations. The typed\narm ships today so the discriminated union covers all three\nconstruction modes (declarative / compositional / derivative); the\nderivation evaluator that actually computes facts from source-block\nFactSets is not yet implemented.\n\n`source_block_ids` is the ordered list of Structure ids this metric\nderives from; `derivation_type` names the kind of computation\n(`ratio`, `trailing_twelve_month`, `covenant_test`, …), and\n`expression` carries the agent-authored derivation string that the\nevaluator will consume at envelope build time."},"MetricObservation":{"properties":{"qname":{"type":"string","minLength":1,"title":"Qname","description":"Metric element qname (e.g. rsx:GithubStars). Must resolve to a concept on the structure's presentation catalog."},"value":{"type":"number","title":"Value","description":"Observed value."}},"type":"object","required":["qname","value"],"title":"MetricObservation","description":"One externally-observed value in an `assert-metrics` request."},"MfaOptionsRequest":{"properties":{"mfa_token":{"type":"string","title":"Mfa Token","description":"Token from a login that returned mfa_required"}},"type":"object","required":["mfa_token"],"title":"MfaOptionsRequest","description":"Request assertion options for the second factor."},"MfaStatusResponse":{"properties":{"passkey_count":{"type":"integer","title":"Passkey Count","description":"Enrolled passkey count"},"recovery_codes_remaining":{"type":"integer","title":"Recovery Codes Remaining","description":"Unused recovery codes remaining"},"enforcement_applies":{"type":"boolean","title":"Enforcement Applies","description":"Whether the MFA requirement applies to this user's roles"}},"type":"object","required":["passkey_count","recovery_codes_remaining","enforcement_applies"],"title":"MfaStatusResponse","description":"The user's MFA posture, for account settings."},"MfaVerifyRequest":{"properties":{"mfa_token":{"type":"string","title":"Mfa Token","description":"Token from a login that returned mfa_required"},"assertion":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Assertion","description":"WebAuthn assertion (browser JSON, opaque)"},"recovery_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recovery Code","description":"Single-use recovery code"}},"type":"object","required":["mfa_token"],"title":"MfaVerifyRequest","description":"Complete the second factor with an assertion or a recovery code."},"MutationAuditEntry":{"properties":{"id":{"type":"string","title":"Id","description":"Audit entry identifier"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At","description":"When the call finished"},"surface":{"type":"string","enum":["api","mcp","operator"],"title":"Surface","description":"Where the call came from: 'api' for a REST operation, 'mcp' for an external MCP client, 'operator' for an in-app AI operator run such as the console's /do"},"operation_name":{"type":"string","title":"Operation Name","description":"The operation or MCP tool that ran"},"status":{"type":"string","enum":["completed","failed","pending"],"title":"Status","description":"Whether the call succeeded; a failed call changed nothing it reports. 'pending' means the call started background work; follow its operation_id for the outcome"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Why a failed call failed"},"duration_ms":{"type":"number","title":"Duration Ms","description":"How long the call took"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"The user the call ran as"},"auth_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Method","description":"How the caller authenticated, for example 'api_key' or 'oauth'"},"api_key_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key Prefix","description":"The first characters of the API key used, when one was"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id","description":"The HTTP request that made the call"},"operation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operation Id","description":"The REST operation's envelope id, or the operator run's operation id: every write an operator run makes shares it"},"operator_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Type","description":"The operator that made the call, for surface 'operator'"},"arguments_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arguments Fingerprint","description":"SHA-256 of the call's arguments. The arguments themselves are not stored"},"object_ids":{"items":{"type":"string"},"type":"array","title":"Object Ids","description":"Identifiers of the objects the call touched"}},"type":"object","required":["id","occurred_at","surface","operation_name","status","duration_ms"],"title":"MutationAuditEntry","description":"One mutating call on the graph."},"MutationAuditListResponse":{"properties":{"graph_id":{"type":"string","title":"Graph Id"},"entries":{"items":{"$ref":"#/components/schemas/MutationAuditEntry"},"type":"array","title":"Entries"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor` for the next, older page; null on the last page"}},"type":"object","required":["graph_id","entries"],"title":"MutationAuditListResponse","description":"A page of the graph's mutation audit, newest first."},"OAuthCallbackRequest":{"properties":{"code":{"type":"string","title":"Code","description":"Authorization code from the OAuth provider (Plaid: the public_token Link returned)"},"state":{"type":"string","title":"State","description":"OAuth state for verification"},"realm_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Realm Id","description":"QuickBooks-specific realm ID"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"OAuth error if authorization failed"},"error_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description","description":"OAuth error details"}},"type":"object","required":["code","state"],"title":"OAuthCallbackRequest","description":"OAuth callback parameters."},"OAuthCallbackResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the connection was established"},"message":{"type":"string","title":"Message","description":"Human-readable outcome of the exchange"},"connection_id":{"type":"string","title":"Connection Id","description":"Connection the authorization was linked to"},"auto_sync_task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auto Sync Task Id","description":"Task id of the initial sync started after connecting, or null when no sync was kicked off"}},"type":"object","required":["success","message","connection_id"],"title":"OAuthCallbackResponse","description":"Result of completing an OAuth authorization flow."},"OAuthGrantInfo":{"properties":{"id":{"type":"string","title":"Id","description":"Grant ID"},"client_name":{"type":"string","title":"Client Name","description":"The connected client's display name"},"client_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Uri","description":"The client's homepage, if declared"},"client_is_trusted":{"type":"boolean","title":"Client Is Trusted","description":"Whether the client is on the trusted list (pre-registered, or a known metadata-document host). Untrusted clients registered themselves."},"graph_id":{"type":"string","title":"Graph Id","description":"The one graph this consent reaches"},"graph_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Graph Name","description":"The graph's display name, when the graph still exists"},"resource":{"type":"string","title":"Resource","description":"The MCP URL the grant's tokens are bound to (their audience)"},"scope":{"type":"string","title":"Scope","description":"Granted scopes, space-separated"},"created_at":{"type":"string","title":"Created At","description":"When the user consented"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At","description":"Last token use, if any"}},"type":"object","required":["id","client_name","client_is_trusted","graph_id","resource","scope","created_at"],"title":"OAuthGrantInfo","description":"A connected app: one OAuth consent for one client on one graph."},"OAuthGrantsResponse":{"properties":{"grants":{"items":{"$ref":"#/components/schemas/OAuthGrantInfo"},"type":"array","title":"Grants","description":"Active OAuth grants, newest first"}},"type":"object","required":["grants"],"title":"OAuthGrantsResponse","description":"Response model for listing connected apps."},"OAuthInitRequest":{"properties":{"connection_id":{"type":"string","title":"Connection Id","description":"Connection ID to link OAuth to"},"redirect_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri","description":"Override default redirect URI"},"additional_params":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Additional Params","description":"Provider-specific parameters"}},"type":"object","required":["connection_id"],"title":"OAuthInitRequest","description":"Request to initiate OAuth flow."},"OAuthInitResponse":{"properties":{"auth_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Url","description":"URL to redirect the user to for authorization. Null for providers that authorize in an embedded widget (Plaid: see link_token)."},"link_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link Token","description":"Plaid only: the token that opens Plaid Link. Link's public_token completes the flow through the callback, as code."},"state":{"type":"string","title":"State","description":"OAuth state for security"},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"When this OAuth request expires"}},"type":"object","required":["state","expires_at"],"title":"OAuthInitResponse","description":"Where the user authorizes: a redirect URL, or a token for an embedded widget."},"OIDCProviderInfo":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Whether OIDC SSO is available"},"provider_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Label","description":"Display label for the OIDC provider (e.g. 'Okta')"}},"type":"object","required":["enabled"],"title":"OIDCProviderInfo","description":"OIDC provider availability model."},"OfferingRepositoryPlan":{"properties":{"plan":{"type":"string","title":"Plan","description":"Plan identifier"},"name":{"type":"string","title":"Name","description":"Plan name"},"monthly_price":{"type":"number","title":"Monthly Price","description":"Monthly price in USD"},"monthly_credits":{"type":"integer","title":"Monthly Credits","description":"Monthly credit allocation"},"access_level":{"type":"string","title":"Access Level","description":"Access level"},"features":{"items":{"type":"string"},"type":"array","title":"Features","description":"List of features"},"rate_limits":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Rate Limits","description":"Rate limits for this plan"}},"type":"object","required":["plan","name","monthly_price","monthly_credits","access_level","features"],"title":"OfferingRepositoryPlan","description":"Information about a repository plan."},"OperationCosts":{"properties":{"description":{"type":"string","title":"Description","description":"Description of operation costs"},"ai_operations":{"additionalProperties":{"type":"number"},"type":"object","title":"Ai Operations","description":"Base costs for AI operations"},"token_pricing":{"additionalProperties":{"$ref":"#/components/schemas/TokenPricing"},"type":"object","title":"Token Pricing","description":"Token pricing by model"},"included_operations":{"items":{"type":"string"},"type":"array","title":"Included Operations","description":"Operations that don't consume credits"},"notes":{"items":{"type":"string"},"type":"array","title":"Notes","description":"Important notes about costs"}},"type":"object","required":["description","ai_operations","token_pricing","included_operations","notes"],"title":"OperationCosts","description":"Operation cost information."},"OperationEnvelope":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{},{"type":"null"}],"title":"Result","description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope","description":"Uniform response shape for every operation endpoint.\n\nEvery dispatch carries an `op_<ULID>` operation_id, which is the bridge\nto the monitoring surface: pass it to\n`GET /v1/operations/{operation_id}/stream` (see `routers/operations.py`)\nto subscribe to SSE progress events. Sync commands complete in the envelope\nitself (`status: \"completed\"`, HTTP 200); async commands\n(`status: \"pending\"`, HTTP 202) hand off to a background worker and stream\ntheir tail through that SSE endpoint. Failed dispatches still mint an\n`operation_id` so the audit log and any partial SSE events stay\ncorrelatable.\n\n`TResult` parameterizes `result` so per-op response shapes surface in\nOpenAPI. Operations that pin `OperationSpec.result_type` get\n`OperationEnvelope[YourEnvelope]` as their response model; the rest keep\nthe default `Any` shape (`result: any | null` on the wire)."},"OperationEnvelope_AssertMetricsResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/AssertMetricsResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[AssertMetricsResponse]"},"OperationEnvelope_AssociationResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/AssociationResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[AssociationResponse]"},"OperationEnvelope_BackfillPlanHistoryResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/BackfillPlanHistoryResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[BackfillPlanHistoryResponse]"},"OperationEnvelope_BindTextBlockResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/BindTextBlockResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[BindTextBlockResponse]"},"OperationEnvelope_BlockSourceGraphResult_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/BlockSourceGraphResult"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[BlockSourceGraphResult]"},"OperationEnvelope_BlockedSourceGraphResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/BlockedSourceGraphResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[BlockedSourceGraphResponse]"},"OperationEnvelope_ChangeCalendarStartResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/ChangeCalendarStartResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[ChangeCalendarStartResponse]"},"OperationEnvelope_ChangeReportingStyleResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/ChangeReportingStyleResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[ChangeReportingStyleResponse]"},"OperationEnvelope_ClosePeriodResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/ClosePeriodResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[ClosePeriodResponse]"},"OperationEnvelope_ComputeForecastResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/ComputeForecastResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[ComputeForecastResponse]"},"OperationEnvelope_ComputeMetricsResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/ComputeMetricsResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[ComputeMetricsResponse]"},"OperationEnvelope_DeleteInformationBlockResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/DeleteInformationBlockResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[DeleteInformationBlockResponse]"},"OperationEnvelope_DeletePortfolioBlockResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/DeletePortfolioBlockResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[DeletePortfolioBlockResponse]"},"OperationEnvelope_DeleteResult_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/DeleteResult"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[DeleteResult]"},"OperationEnvelope_DeleteTaxonomyBlockResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/DeleteTaxonomyBlockResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[DeleteTaxonomyBlockResponse]"},"OperationEnvelope_DescribeFilingResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/DescribeFilingResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[DescribeFilingResponse]"},"OperationEnvelope_DisclosuresResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/DisclosuresResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[DisclosuresResponse]"},"OperationEnvelope_EntityTaxonomyResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/EntityTaxonomyResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[EntityTaxonomyResponse]"},"OperationEnvelope_EvaluateRulesResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/EvaluateRulesResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[EvaluateRulesResponse]"},"OperationEnvelope_EventBlockEnvelope_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/EventBlockEnvelope"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[EventBlockEnvelope]"},"OperationEnvelope_EventHandlerResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/EventHandlerResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[EventHandlerResponse]"},"OperationEnvelope_ExecuteEventBlockResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/ExecuteEventBlockResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[ExecuteEventBlockResponse]"},"OperationEnvelope_FinancialStatementAnalysisResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/FinancialStatementAnalysisResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[FinancialStatementAnalysisResponse]"},"OperationEnvelope_FiscalCalendarResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/FiscalCalendarResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[FiscalCalendarResponse]"},"OperationEnvelope_GraphMetadataResult_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/GraphMetadataResult"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[GraphMetadataResult]"},"OperationEnvelope_InformationBlockEnvelope_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/InformationBlockEnvelope"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[InformationBlockEnvelope]"},"OperationEnvelope_InformationBlockResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/InformationBlockResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[InformationBlockResponse]"},"OperationEnvelope_InitializeChartOfAccountsResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/InitializeChartOfAccountsResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[InitializeChartOfAccountsResponse]"},"OperationEnvelope_InitializeLedgerResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/InitializeLedgerResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[InitializeLedgerResponse]"},"OperationEnvelope_JournalEntryResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/JournalEntryResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[JournalEntryResponse]"},"OperationEnvelope_LearnClassificationDefaultsResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/LearnClassificationDefaultsResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[LearnClassificationDefaultsResponse]"},"OperationEnvelope_LedgerAgentResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/LedgerAgentResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[LedgerAgentResponse]"},"OperationEnvelope_LedgerEntityResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/LedgerEntityResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[LedgerEntityResponse]"},"OperationEnvelope_LinkBankAccountResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/LinkBankAccountResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[LinkBankAccountResponse]"},"OperationEnvelope_LiveFinancialStatementResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/LiveFinancialStatementResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[LiveFinancialStatementResponse]"},"OperationEnvelope_PortfolioBlockEnvelope_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/PortfolioBlockEnvelope"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[PortfolioBlockEnvelope]"},"OperationEnvelope_PreviewEventBlockResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/PreviewEventBlockResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[PreviewEventBlockResponse]"},"OperationEnvelope_PromoteObligationsResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/PromoteObligationsResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[PromoteObligationsResponse]"},"OperationEnvelope_PublishListResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/PublishListResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[PublishListResponse]"},"OperationEnvelope_ReadTextResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/ReadTextResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[ReadTextResponse]"},"OperationEnvelope_ReconciliationListResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/ReconciliationListResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[ReconciliationListResponse]"},"OperationEnvelope_ReconciliationPolicyResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/ReconciliationPolicyResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[ReconciliationPolicyResponse]"},"OperationEnvelope_ReconciliationPreviewResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/ReconciliationPreviewResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[ReconciliationPreviewResponse]"},"OperationEnvelope_ReconciliationSummary_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/ReconciliationSummary"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[ReconciliationSummary]"},"OperationEnvelope_ReconcilingItemPlan_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/ReconcilingItemPlan"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[ReconcilingItemPlan]"},"OperationEnvelope_ReportResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/ReportResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[ReportResponse]"},"OperationEnvelope_ResolveReconcilingItemResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/ResolveReconcilingItemResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[ResolveReconcilingItemResponse]"},"OperationEnvelope_RevokeReportShareResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/RevokeReportShareResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[RevokeReportShareResponse]"},"OperationEnvelope_ScheduleCreatedResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/ScheduleCreatedResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[ScheduleCreatedResponse]"},"OperationEnvelope_SearchTextResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/SearchTextResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[SearchTextResponse]"},"OperationEnvelope_SecurityResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/SecurityResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[SecurityResponse]"},"OperationEnvelope_ShareReportResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/ShareReportResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[ShareReportResponse]"},"OperationEnvelope_TaxonomyBlockEnvelope_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/TaxonomyBlockEnvelope"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[TaxonomyBlockEnvelope]"},"OperationEnvelope_TerminateScheduleResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/TerminateScheduleResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[TerminateScheduleResponse]"},"OperationEnvelope_ViewResponse_":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"$ref":"#/components/schemas/ViewResponse"},{"type":"null"}],"description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[ViewResponse]"},"OperationEnvelope_list_PublishListMemberResponse__":{"properties":{"operation":{"type":"string","title":"Operation","description":"Kebab-case operation name"},"operationId":{"type":"string","title":"Operationid","description":"op_-prefixed ULID for audit and SSE correlation"},"status":{"type":"string","enum":["completed","pending","failed"],"title":"Status","description":"Operation lifecycle state"},"result":{"anyOf":[{"items":{"$ref":"#/components/schemas/PublishListMemberResponse"},"type":"array"},{"type":"null"}],"title":"Result","description":"Command-specific result payload"},"at":{"type":"string","title":"At","description":"ISO-8601 UTC timestamp"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby","description":"User ID that initiated the operation"},"idempotentReplay":{"type":"boolean","title":"Idempotentreplay","description":"True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.","default":false}},"type":"object","required":["operation","operationId","status","at"],"title":"OperationEnvelope[list[PublishListMemberResponse]]"},"OperationResumeRequest":{"properties":{"input":{"additionalProperties":true,"type":"object","title":"Input","description":"The decision the paused run asked for, in whatever shape its prompt described. Delivered to the task as `params['resume']['input']`."}},"type":"object","title":"OperationResumeRequest","description":"Answer for an operation paused at a checkpoint (`awaiting_input`).","examples":[{"input":{"approved":true}}]},"OperatorListResponse":{"properties":{"operators":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Operators","description":"Dictionary of available operators with metadata"},"total":{"type":"integer","title":"Total","description":"Total number of operators"}},"type":"object","required":["operators","total"],"title":"OperatorListResponse","description":"Response for listing available operators."},"OperatorMessage":{"properties":{"role":{"type":"string","title":"Role","description":"Message role (user/assistant)"},"content":{"type":"string","maxLength":100000,"title":"Content","description":"Message content"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp","description":"Message timestamp"}},"type":"object","required":["role","content"],"title":"OperatorMessage","description":"Message in conversation history."},"OperatorMetadataResponse":{"properties":{"name":{"type":"string","title":"Name","description":"Operator name"},"description":{"type":"string","title":"Description","description":"Operator description"},"version":{"type":"string","title":"Version","description":"Operator version"},"capabilities":{"items":{"type":"string"},"type":"array","title":"Capabilities","description":"Operator capabilities"},"supported_modes":{"items":{"type":"string"},"type":"array","title":"Supported Modes","description":"Supported execution modes"},"requires_credits":{"type":"boolean","title":"Requires Credits","description":"Whether operator requires credits"},"author":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author","description":"Operator author"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"Operator tags"}},"type":"object","required":["name","description","version","capabilities","supported_modes","requires_credits"],"title":"OperatorMetadataResponse","description":"Response for operator metadata."},"OperatorMode":{"type":"string","enum":["quick","standard","extended","streaming"],"title":"OperatorMode","description":"Operator execution modes."},"OperatorRequest":{"properties":{"message":{"type":"string","maxLength":100000,"minLength":1,"title":"Message","description":"The query or message to process"},"history":{"items":{"$ref":"#/components/schemas/OperatorMessage"},"type":"array","maxItems":100,"title":"History","description":"Conversation history"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context","description":"Additional context for analysis (e.g., enable_rag, include_schema)"},"mode":{"anyOf":[{"$ref":"#/components/schemas/OperatorMode"},{"type":"null"}],"description":"Execution mode","default":"standard"},"operator_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Type","description":"Specific operator type to use (optional)"},"selection_criteria":{"anyOf":[{"$ref":"#/components/schemas/SelectionCriteria"},{"type":"null"}],"description":"Criteria for operator selection"},"force_extended_analysis":{"type":"boolean","title":"Force Extended Analysis","description":"Force extended analysis mode with comprehensive research","default":false},"enable_rag":{"type":"boolean","title":"Enable Rag","description":"Enable RAG context enrichment","default":true},"stream":{"type":"boolean","title":"Stream","description":"Enable streaming response","default":false},"max_credits":{"anyOf":[{"type":"number","maximum":100000.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Credits","description":"Per-question credit ceiling. Once the run's consumed credits reach this number, no further tool step starts and the operator answers from what it has (the wrap-up itself may carry the total slightly past the ceiling). Omit for the mode's default step-bounded behavior."}},"type":"object","required":["message"],"title":"OperatorRequest","description":"Request model for operator interactions.","examples":[{"enable_rag":true,"message":"What was Apple's revenue in Q4 2023?"},{"enable_rag":true,"history":[{"content":"What was Apple's revenue in Q4 2023?","role":"user"},{"content":"Apple's Q4 2023 revenue was $89.5 billion, representing a 1% year-over-year decline.","role":"assistant"}],"message":"How did that compare to the previous quarter?"},{"context":{"focus_areas":["market_share","growth_trends"],"industry":"technology","time_period":"2023-2024"},"enable_rag":true,"force_extended_analysis":true,"message":"Analyze the competitive landscape in cloud computing, focusing on market share and growth trends","mode":"extended","selection_criteria":{"max_response_time":45.0,"min_confidence":0.7,"preferred_mode":"extended","required_capabilities":["financial_analysis","market_research"]}}]},"OperatorResponse":{"properties":{"content":{"type":"string","title":"Content","description":"The operator's response content"},"operator_used":{"type":"string","title":"Operator Used","description":"The operator type that handled the request"},"mode_used":{"$ref":"#/components/schemas/OperatorMode","description":"The execution mode used"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Response metadata including routing info"},"tokens_used":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Tokens Used","description":"Token usage statistics"},"confidence_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence Score","description":"Confidence score of the response (0.0-1.0 scale)"},"operation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operation Id","description":"Operation ID for SSE monitoring"},"is_partial":{"type":"boolean","title":"Is Partial","description":"Whether this is a partial response","default":false},"error_details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error Details","description":"Error details if any"},"execution_time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Execution Time","description":"Execution time in seconds"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"Response timestamp"}},"type":"object","required":["content","operator_used","mode_used"],"title":"OperatorResponse","description":"Response model for operator interactions.","examples":[{"confidence_score":0.92,"content":"Apple's Q4 2023 revenue was $89.5 billion, representing a 1% year-over-year decline. This was driven by strong iPhone sales offset by weakness in the Mac and iPad segments. Services revenue grew 16% to $22.3 billion, continuing its strong growth trajectory.","execution_time":3.45,"metadata":{"rag_enrichment":{"documents_retrieved":5,"sources":["Apple 10-Q Q4 2023","Earnings Call Transcript Oct 2023"]},"routing_info":{"candidates_evaluated":3,"confidence_scores":{"financial":0.92,"rag":0.23,"research":0.45},"selection_reason":"Financial query with revenue and metrics keywords"}},"mode_used":"standard","operator_used":"financial","timestamp":"2024-01-15T10:30:45Z","tokens_used":{"completion_tokens":320,"prompt_tokens":450,"total_tokens":770}},{"confidence_score":0.88,"content":"The cloud computing market is dominated by three major players: AWS (32% market share), Microsoft Azure (23%), and Google Cloud (10%). Over the past year, growth rates have been: AWS 12%, Azure 27%, Google Cloud 28%. The market shows clear consolidation trends...","execution_time":12.3,"metadata":{"analysis_depth":"comprehensive","routing_info":{"candidates_evaluated":3,"selection_reason":"Market research query requiring comprehensive analysis"},"sources_consulted":15},"mode_used":"extended","operator_used":"research","timestamp":"2024-01-15T10:35:22Z","tokens_used":{"completion_tokens":850,"prompt_tokens":1200,"total_tokens":2050}}]},"OrgDetailResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"org_type":{"$ref":"#/components/schemas/OrgType"},"user_role":{"$ref":"#/components/schemas/OrgRole"},"members":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Members"},"graphs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Graphs"},"limits":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Limits"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","org_type","user_role","members","graphs","limits","created_at","updated_at"],"title":"OrgDetailResponse","description":"Detailed organization response."},"OrgInvitationListResponse":{"properties":{"invitations":{"items":{"$ref":"#/components/schemas/OrgInvitationResponse"},"type":"array","title":"Invitations"},"total":{"type":"integer","title":"Total"},"org_id":{"type":"string","title":"Org Id"}},"type":"object","required":["invitations","total","org_id"],"title":"OrgInvitationListResponse","description":"List of pending organization invitations response."},"OrgInvitationResponse":{"properties":{"id":{"type":"string","title":"Id"},"org_id":{"type":"string","title":"Org Id"},"email":{"type":"string","title":"Email"},"role":{"$ref":"#/components/schemas/OrgRole"},"status":{"type":"string","title":"Status"},"invited_by_user_id":{"type":"string","title":"Invited By User Id"},"invited_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invited By Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"is_expired":{"type":"boolean","title":"Is Expired"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token","description":"Test-support only: the raw invite token. Populated ONLY when AUTH_INVITE_TOKEN_IN_RESPONSE is enabled in a non-production environment; always null in production. Lets automated authorization tests complete the invite -> register flow without email interception."}},"type":"object","required":["id","org_id","email","role","status","invited_by_user_id","invited_by_name","created_at","expires_at","is_expired"],"title":"OrgInvitationResponse","description":"Organization invitation response."},"OrgLimitsResponse":{"properties":{"org_id":{"type":"string","title":"Org Id"},"max_graphs":{"type":"integer","title":"Max Graphs"},"current_usage":{"additionalProperties":true,"type":"object","title":"Current Usage"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"can_create_graph":{"type":"boolean","title":"Can Create Graph"}},"type":"object","required":["org_id","max_graphs","current_usage","warnings","can_create_graph"],"title":"OrgLimitsResponse","description":"Organization limits response."},"OrgListResponse":{"properties":{"orgs":{"items":{"$ref":"#/components/schemas/OrgResponse"},"type":"array","title":"Orgs"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["orgs","total"],"title":"OrgListResponse","description":"List of organizations response."},"OrgMemberListResponse":{"properties":{"members":{"items":{"$ref":"#/components/schemas/OrgMemberResponse"},"type":"array","title":"Members"},"total":{"type":"integer","title":"Total"},"org_id":{"type":"string","title":"Org Id"}},"type":"object","required":["members","total","org_id"],"title":"OrgMemberListResponse","description":"List of organization members response."},"OrgMemberResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"role":{"$ref":"#/components/schemas/OrgRole"},"joined_at":{"type":"string","format":"date-time","title":"Joined At"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["user_id","name","email","role","joined_at","is_active"],"title":"OrgMemberResponse","description":"Organization member response."},"OrgResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"org_type":{"$ref":"#/components/schemas/OrgType"},"role":{"$ref":"#/components/schemas/OrgRole"},"member_count":{"type":"integer","title":"Member Count"},"graph_count":{"type":"integer","title":"Graph Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"joined_at":{"type":"string","format":"date-time","title":"Joined At"}},"type":"object","required":["id","name","org_type","role","member_count","graph_count","created_at","joined_at"],"title":"OrgResponse","description":"Organization summary response."},"OrgRole":{"type":"string","enum":["owner","admin","member"],"title":"OrgRole"},"OrgType":{"type":"string","enum":["personal","team","enterprise"],"title":"OrgType"},"OrgUsageResponse":{"properties":{"org_id":{"type":"string","title":"Org Id"},"period_days":{"type":"integer","title":"Period Days"},"start_date":{"type":"string","format":"date-time","title":"Start Date"},"end_date":{"type":"string","format":"date-time","title":"End Date"},"summary":{"$ref":"#/components/schemas/OrgUsageSummary"},"graph_details":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Graph Details"},"daily_trend":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Daily Trend"}},"type":"object","required":["org_id","period_days","start_date","end_date","summary","graph_details","daily_trend"],"title":"OrgUsageResponse","description":"Organization usage response."},"OrgUsageSummary":{"properties":{"total_credits_used":{"type":"number","title":"Total Credits Used"},"total_ai_operations":{"type":"integer","title":"Total Ai Operations"},"total_storage_gb":{"type":"number","title":"Total Storage Gb"},"daily_avg_credits":{"type":"number","title":"Daily Avg Credits"},"projected_monthly_credits":{"type":"number","title":"Projected Monthly Credits"},"credits_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits Limit"},"storage_limit_gb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Storage Limit Gb"}},"type":"object","required":["total_credits_used","total_ai_operations","total_storage_gb","daily_avg_credits","projected_monthly_credits","credits_limit","storage_limit_gb"],"title":"OrgUsageSummary","description":"Organization usage summary."},"PasskeyDeleteRequest":{"properties":{"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password","description":"Current password (password-holding users)"},"assertion":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Assertion","description":"Fresh WebAuthn assertion from the re-auth ceremony"}},"type":"object","title":"PasskeyDeleteRequest","description":"Re-authentication proof for removing a passkey."},"PasskeyInfo":{"properties":{"id":{"type":"string","title":"Id","description":"Passkey identifier"},"name":{"type":"string","title":"Name","description":"User-facing label"},"created_at":{"type":"string","title":"Created At","description":"Enrollment time (ISO 8601)"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At","description":"Last successful assertion time (ISO 8601)"},"backup_eligible":{"type":"boolean","title":"Backup Eligible","description":"Whether the credential is synced (multi-device) capable"},"backup_state":{"type":"boolean","title":"Backup State","description":"Whether the credential is currently backed up"}},"type":"object","required":["id","name","created_at","backup_eligible","backup_state"],"title":"PasskeyInfo","description":"One enrolled passkey, as listed in account settings."},"PasskeyListResponse":{"properties":{"passkeys":{"items":{"$ref":"#/components/schemas/PasskeyInfo"},"type":"array","title":"Passkeys","description":"Enrolled passkeys"}},"type":"object","required":["passkeys"],"title":"PasskeyListResponse","description":"The user's enrolled passkeys."},"PasskeyLoginVerifyRequest":{"properties":{"assertion":{"additionalProperties":true,"type":"object","title":"Assertion","description":"WebAuthn assertion (browser JSON, opaque)"}},"type":"object","required":["assertion"],"title":"PasskeyLoginVerifyRequest","description":"Complete a passwordless login with a discoverable-credential assertion."},"PasskeyRegisterOptionsRequest":{"properties":{"mfa_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfa Token","description":"Enrollment token from a login that returned mfa_enrollment_required"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password","description":"Current password — settings-lane re-authentication"},"assertion":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Assertion","description":"Fresh WebAuthn assertion from the re-auth ceremony (settings lane)"}},"type":"object","title":"PasskeyRegisterOptionsRequest","description":"Begin enrollment.\n\nTwo disjoint lanes: `mfa_token` (forced enrollment — the token was minted\nseconds after a password verify, so it is its own freshness proof) or an\nauthenticated settings-flow enrollment, which must carry a fresh re-auth\nproof — `password`, or a `reauth`-ceremony `assertion` when adding a\npasskey beside an existing one."},"PasskeyRegisterVerifyRequest":{"properties":{"credential":{"additionalProperties":true,"type":"object","title":"Credential","description":"WebAuthn registration credential (browser JSON, opaque)"},"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name","description":"User-facing label for this passkey"},"mfa_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfa Token","description":"Enrollment token when finishing a forced enrollment"}},"type":"object","required":["credential"],"title":"PasskeyRegisterVerifyRequest","description":"Finish enrollment with the authenticator's attestation response."},"PasskeyRegisterVerifyResponse":{"properties":{"passkey":{"$ref":"#/components/schemas/PasskeyInfo","description":"The newly enrolled passkey"},"recovery_codes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Recovery Codes","description":"Single-use recovery codes — returned exactly once, at first enrollment"},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthResponse"},{"type":"null"}],"description":"Completed login (forced-enrollment lane only)"}},"type":"object","required":["passkey"],"title":"PasskeyRegisterVerifyResponse","description":"Enrollment result; the first passkey also carries recovery codes and,\nin the forced-enrollment lane, the completed login."},"PasswordCheckRequest":{"properties":{"password":{"type":"string","maxLength":128,"minLength":1,"title":"Password","description":"Password to check"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"User email for personalization checks"}},"type":"object","required":["password"],"title":"PasswordCheckRequest","description":"Password strength check request model."},"PasswordCheckResponse":{"properties":{"is_valid":{"type":"boolean","title":"Is Valid","description":"Whether password meets requirements"},"strength":{"type":"string","title":"Strength","description":"Password strength level"},"score":{"type":"integer","title":"Score","description":"Password strength score (0-100)"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","description":"Validation errors"},"suggestions":{"items":{"type":"string"},"type":"array","title":"Suggestions","description":"Improvement suggestions"},"character_types":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Character Types","description":"Character type analysis"}},"type":"object","required":["is_valid","strength","score","errors","suggestions","character_types"],"title":"PasswordCheckResponse","description":"Password strength check response model."},"PasswordPolicyResponse":{"properties":{"policy":{"additionalProperties":true,"type":"object","title":"Policy","description":"Current password policy requirements"}},"type":"object","required":["policy"],"title":"PasswordPolicyResponse","description":"Password policy response model."},"PaymentMethod":{"properties":{"id":{"type":"string","title":"Id","description":"Payment method ID"},"type":{"type":"string","title":"Type","description":"Payment method type (card, bank_account, etc.)"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand","description":"Card brand (visa, mastercard, etc.)"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4","description":"Last 4 digits of the card or account number"},"exp_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exp Month","description":"Expiration month of the card"},"exp_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exp Year","description":"Expiration year of the card"},"is_default":{"type":"boolean","title":"Is Default","description":"Whether this is the default payment method"}},"type":"object","required":["id","type","is_default"],"title":"PaymentMethod","description":"Payment method information."},"PendingObligationDetailResponse":{"properties":{"event_id":{"type":"string","title":"Event Id"},"schedule_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule Id"},"schedule_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule Name"},"period":{"type":"string","title":"Period","description":"Period in YYYY-MM format"}},"type":"object","required":["event_id","period"],"title":"PendingObligationDetailResponse","description":"One pending schedule-derived obligation blocking close.\n\nSurfaced on `FiscalCalendarResponse` when `pending_obligations` is in\nthe blockers list so callers can name which schedules to promote."},"PerformanceInsights":{"properties":{"analysis_period_days":{"type":"integer","title":"Analysis Period Days","description":"Analysis period in days"},"total_operations":{"type":"integer","title":"Total Operations","description":"Total operations analyzed"},"operation_stats":{"additionalProperties":true,"type":"object","title":"Operation Stats","description":"Performance stats by operation type"},"slow_queries":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Slow Queries","description":"Top slow queries (over 5 seconds)"},"performance_score":{"type":"integer","title":"Performance Score","description":"Performance score (0-100)"}},"type":"object","required":["analysis_period_days","total_operations","operation_stats","slow_queries","performance_score"],"title":"PerformanceInsights","description":"Performance analytics."},"PeriodSpec":{"properties":{"start":{"type":"string","format":"date","title":"Start","description":"Period start date (inclusive). Window the column rolls up."},"end":{"type":"string","format":"date","title":"End","description":"Period end date (inclusive). Window the column rolls up."},"label":{"type":"string","title":"Label","description":"Column header label (e.g. 'FY2025 Q3', '2024', 'YTD')."}},"type":"object","required":["start","end","label"],"title":"PeriodSpec","description":"A single reporting period column.\n\nReports render facts in N period columns side-by-side. Each\n`PeriodSpec` is one column — its `start`/`end` define the\nwindow the report's facts roll up into; `label` is what the renderer\nprints in the column header. For year-over-year statements, supply two\nPeriodSpecs (current + comparative); for YTD by quarter, supply four."},"PlaidConnectionConfig":{"properties":{"since_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Since Date","description":"First day of the backfill (ISO 8601), and how much history Plaid is asked to pull for the new Item (at most two years). Defaults to as far back as Plaid goes. Lines dated in a closed period are never captured, whatever the window."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity whose books the feed's accounts land on: a subsidiary's id, or omit for the group parent. Required when QuickBooks keeps the parent's books. Each account can be moved to another entity later with `link-bank-account`."}},"type":"object","title":"PlaidConnectionConfig","description":"Plaid bank-feed connection configuration.\n\nA bank feed is native accounting: the entity its accounts land on must\nalready have a chart of accounts and must not be the one QuickBooks keeps\n(the group parent, while QuickBooks is connected). The connection is\ncreated `pending_oauth`; `POST /oauth/init` returns a `link_token` for\nPlaid Link, and the `public_token` Link hands back completes it through\n`POST /oauth/callback/plaid` (as `code`). One connection per institution\nlogin; a graph can hold several."},"PortalSessionResponse":{"properties":{"portal_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portal Url","description":"Stripe Customer Portal URL where user can manage payment methods"},"billing_disabled":{"type":"boolean","title":"Billing Disabled","description":"True when billing is disabled on this deployment (no portal exists)","default":false}},"type":"object","title":"PortalSessionResponse","description":"Response for customer portal session creation."},"PortfolioBlockEnvelope":{"properties":{"id":{"type":"string","title":"Id","description":"Portfolio ID (`port_*` ULID)."},"name":{"type":"string","title":"Name","description":"Display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description."},"strategy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy","description":"Free-text strategy classification."},"inception_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Inception Date","description":"Date the portfolio was established."},"base_currency":{"type":"string","title":"Base Currency","description":"ISO 4217 currency code for portfolio aggregates."},"owner":{"anyOf":[{"$ref":"#/components/schemas/EntityLite"},{"type":"null"}],"description":"Embedded owning entity, when set. `null` for unattributed portfolios."},"positions":{"items":{"$ref":"#/components/schemas/PositionBlock"},"type":"array","title":"Positions","description":"All positions in this portfolio, including disposed ones (filter by `status` for active-only display)."},"total_cost_basis_dollars":{"type":"number","title":"Total Cost Basis Dollars","description":"Sum of `cost_basis_dollars` across every position."},"total_current_value_dollars":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Current Value Dollars","description":"Sum of `current_value_dollars` across every position. `null` when any active position lacks a mark."},"active_position_count":{"type":"integer","title":"Active Position Count","description":"Count of positions with `status='active'`."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Row creation timestamp (UTC)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Last-modified timestamp (UTC)."}},"type":"object","required":["id","name","base_currency","positions","total_cost_basis_dollars","active_position_count","created_at","updated_at"],"title":"PortfolioBlockEnvelope","description":"Molecular response shape for portfolio-block operations.\n\nBundles the portfolio core, its embedded positions, and pre-computed\ntotals into a single payload — the contract for `create-portfolio-block`,\n`update-portfolio-block`, and the read-side `get-portfolio-block`.\nCents-precision values aren't surfaced here; use `PositionResponse`\n/ `PortfolioResponse` for those."},"PortfolioBlockPortfolioFields":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"Display name for the portfolio. 1-200 characters."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description of the portfolio."},"strategy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy","description":"Free-text strategy classification (e.g. `value`, `growth`, `income`). Open vocabulary."},"inception_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Inception Date","description":"Date the portfolio was established (YYYY-MM-DD)."},"base_currency":{"type":"string","title":"Base Currency","description":"ISO 4217 currency code used for portfolio-level aggregates (e.g. `total_cost_basis_dollars`).","default":"USD"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"ID of the owning entity (e.g. fund, trust, or person). Optional — leave unset for unattributed portfolios."}},"type":"object","required":["name"],"title":"PortfolioBlockPortfolioFields","description":"Fields settable on the portfolio core when creating a block."},"PortfolioBlockPortfolioPatch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"New display name. Unset = unchanged."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"New description. Unset = unchanged."},"strategy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy","description":"New strategy classification. Unset = unchanged."},"inception_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Inception Date","description":"New inception date (YYYY-MM-DD). Unset = unchanged."},"base_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Currency","description":"New ISO 4217 base currency code. Unset = unchanged. Note: changing base currency does not retroactively reprice historical positions."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"New owning-entity ID. Unset = unchanged."}},"type":"object","title":"PortfolioBlockPortfolioPatch","description":"Patchable portfolio fields on `update-portfolio-block`. Unset fields ignored."},"PortfolioBlockPositionAdd":{"properties":{"security_id":{"type":"string","title":"Security Id","description":"ID of the existing security this position holds. Securities are minted via `create-security`; the operation returns 404 if the ID is unknown."},"quantity":{"type":"number","title":"Quantity","description":"Quantity held, in units defined by `quantity_type` (e.g. share count for `shares`, face value for `principal`)."},"quantity_type":{"type":"string","title":"Quantity Type","description":"Unit basis for `quantity`. Common values: `shares` (equity units), `units` (generic), `principal` (debt face value).","default":"shares"},"cost_basis":{"type":"integer","title":"Cost Basis","description":"Total cost basis for this lot, in **cents** of `currency`. Stored as integer cents to avoid float precision drift; $1,250.00 USD is `125000`.","default":0},"currency":{"type":"string","title":"Currency","description":"ISO 4217 currency code for `cost_basis` and `current_value`.","default":"USD"},"current_value":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current Value","description":"Latest mark-to-market value in **cents** of `currency`, or `null` if unmarked. Pair with `valuation_date` and `valuation_source` when set."},"valuation_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valuation Date","description":"Date `current_value` was sourced (YYYY-MM-DD)."},"valuation_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valuation Source","description":"Free-text source attribution for `current_value` (e.g. `manual`, `broker_statement`, vendor name)."},"acquisition_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Acquisition Date","description":"Date the position was originally acquired (YYYY-MM-DD)."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","description":"Free-text notes attached to the position."}},"type":"object","required":["security_id","quantity"],"title":"PortfolioBlockPositionAdd","description":"A single new position to mint inside a portfolio-block create/update.\n\nReferences an existing security; this surface never creates securities\n(Master Data CRUD owns that lifecycle)."},"PortfolioBlockPositionDispose":{"properties":{"id":{"type":"string","title":"Id","description":"Target position ID to dispose. Must belong to the portfolio identified by `portfolio_id` on the parent operation."},"disposition_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disposition Reason","description":"Optional free-text reason recorded under `metadata.disposition_reason` on the disposed position."}},"type":"object","required":["id"],"title":"PortfolioBlockPositionDispose","description":"Dispose-by-id for an existing position in `update-portfolio-block`.\n\nSoft-delete: status flips to `disposed` and `disposition_date` is\nstamped. `disposition_reason`, when supplied, is recorded under\n`metadata.disposition_reason`."},"PortfolioBlockPositionUpdate":{"properties":{"id":{"type":"string","title":"Id","description":"Target position ID. Must belong to the portfolio identified by `portfolio_id` on the parent operation."},"quantity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Quantity","description":"New quantity in units of `quantity_type`. Unset = unchanged."},"quantity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantity Type","description":"New unit basis (`shares` | `units` | `principal`). Unset = unchanged."},"cost_basis":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cost Basis","description":"New cost basis in **cents** of the position's currency. Unset = unchanged."},"current_value":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current Value","description":"New mark-to-market value in **cents**. Unset = unchanged. Set alongside `valuation_date` / `valuation_source` to record a fresh valuation event."},"valuation_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valuation Date","description":"New valuation date (YYYY-MM-DD). Unset = unchanged."},"valuation_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valuation Source","description":"New valuation source attribution. Unset = unchanged."},"acquisition_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Acquisition Date","description":"New acquisition date (YYYY-MM-DD). Unset = unchanged."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","description":"New notes. Unset = unchanged."}},"type":"object","required":["id"],"title":"PortfolioBlockPositionUpdate","description":"Patch-by-id for an existing position in `update-portfolio-block`.\n\nUnset fields are ignored; `id` is the only required field."},"PortfolioBlockPositions":{"properties":{"add":{"items":{"$ref":"#/components/schemas/PortfolioBlockPositionAdd"},"type":"array","title":"Add","description":"New positions to mint inside this portfolio. Each references an existing `security_id`."},"update":{"items":{"$ref":"#/components/schemas/PortfolioBlockPositionUpdate"},"type":"array","title":"Update","description":"Patches to existing positions, addressed by position `id`. Unset fields on each entry are left unchanged."},"dispose":{"items":{"$ref":"#/components/schemas/PortfolioBlockPositionDispose"},"type":"array","title":"Dispose","description":"Positions to soft-dispose, addressed by position `id`. Status flips to `disposed` and `disposition_date` is stamped."}},"type":"object","title":"PortfolioBlockPositions","description":"Position deltas applied atomically inside `update-portfolio-block`."},"PositionBlock":{"properties":{"id":{"type":"string","title":"Id","description":"Position ID (`pos_*` ULID)."},"quantity":{"type":"number","title":"Quantity","description":"Quantity held in `quantity_type` units."},"quantity_type":{"type":"string","title":"Quantity Type","description":"Unit basis (`shares`, `units`, `principal`)."},"cost_basis_dollars":{"type":"number","title":"Cost Basis Dollars","description":"Cost basis in dollars (pre-converted from cents)."},"current_value_dollars":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Value Dollars","description":"Latest mark-to-market value in dollars. `null` when the position has not been marked."},"valuation_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valuation Date","description":"Date the current value was sourced."},"valuation_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valuation Source","description":"Free-text source attribution for the valuation."},"acquisition_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Acquisition Date","description":"Date the position was acquired."},"status":{"type":"string","title":"Status","description":"Lifecycle state (`active`, `disposed`, `archived`). See `PositionResponse.status` for the full vocabulary."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","description":"Free-text notes attached to the position."},"security":{"$ref":"#/components/schemas/SecurityLite","description":"Embedded security details — name, type, issuer."}},"type":"object","required":["id","quantity","quantity_type","cost_basis_dollars","status","security"],"title":"PositionBlock","description":"Position projection embedded inside a `PortfolioBlockEnvelope`.\n\nPre-converts cents fields to dollars (`cost_basis_dollars`,\n`current_value_dollars`) for display; the cents-precision fields\nlive on the standalone `PositionResponse`. Embeds a `SecurityLite`\nso callers can render the security name without a follow-up fetch."},"PreviewEventBlockResponse":{"properties":{"matched_handler":{"anyOf":[{"$ref":"#/components/schemas/EventHandlerResponse"},{"type":"null"}]},"planned_transactions":{"items":{"$ref":"#/components/schemas/TransactionPreview"},"type":"array","title":"Planned Transactions"},"validation_errors":{"items":{"type":"string"},"type":"array","title":"Validation Errors"},"would_succeed":{"type":"boolean","title":"Would Succeed"},"handler_metadata":{"additionalProperties":true,"type":"object","title":"Handler Metadata","description":"Handler-specific compute output. For Python handlers like 'asset_disposed', includes NBV, gain/loss, accumulated depreciation. Empty for DSL-handler previews."}},"type":"object","required":["would_succeed"],"title":"PreviewEventBlockResponse","description":"Dry-run result — what would happen if this event block were created."},"PreviewReconciliationsRequest":{"properties":{"period":{"type":"string","title":"Period","description":"Period to compare at its last day, as YYYY-MM.","examples":["2026-08"]},"method":{"type":"string","enum":["source_ledger","schedule_register","statement"],"title":"Method","description":"Which check to preview. `source_ledger` compares every account with the synced accounting system's own trial balance. `schedule_register` compares each asset account a schedule carries a balance on with what its schedules say it holds. `statement` compares each account that has a statement covering the period with that balance, adjusted on a bank-fed account by the lines the bank had not cleared.","default":"source_ledger"},"include_tied":{"type":"boolean","title":"Include Tied","description":"Also return the accounts that tie. Off by default: the differences are the work, and the counts cover the rest.","default":false},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity whose books to compare, by id. Omit for the group parent. `source_ledger` applies to the group parent only: QuickBooks keeps its books, not a subsidiary's."}},"type":"object","required":["period"],"title":"PreviewReconciliationsRequest","description":"Compare the ledger's balances at a period end with an independent source."},"PreviewReconcilingItemRequest":{"properties":{"event_id":{"type":"string","title":"Event Id","description":"Event id (evt_ prefixed) to inspect"}},"type":"object","required":["event_id"],"title":"PreviewReconcilingItemRequest","description":"Read what changed on a reconciling item, and what resolving it would do."},"PromoteObligationsRequest":{"properties":{"dispatch_handlers":{"type":"boolean","title":"Dispatch Handlers","description":"When True (default), also fire the schedule_entry_due handler for each promoted obligation so the draft closing entry materializes immediately (autopilot). When False, flip status only (co-pilot) — the draft is created separately.","default":true}},"type":"object","title":"PromoteObligationsRequest","description":"On-demand trigger for the obligation-promotion sweep.\n\nMirrors what the `scheduled_obligation_promoter` Dagster sensor does\non its tick, but lets an interactive caller or an MCP close co-pilot\nrun it now instead of waiting for the background cadence — required to\ndrive a schedule-driven close to completion in a single session.\nFlips matured `pending` `schedule_entry_due` events (period boundary\npassed) to `classified`; with `dispatch_handlers` it also drafts the\nclosing entries in the same transaction (idempotent — reconciles to an\nexisting draft). The sweep also reaches *stranded* obligations —\nalready `classified` (by an earlier flip-only sweep) but with no\nclosing entry ever drafted — dispatching them in the same pass."},"PromoteObligationsResponse":{"properties":{"classified_count":{"type":"integer","title":"Classified Count","description":"Matured obligations flipped pending → classified."},"dispatched_count":{"type":"integer","title":"Dispatched Count","description":"Obligations whose closing entry was drafted this run."},"error_count":{"type":"integer","title":"Error Count","description":"Per-obligation handler errors (non-fatal)."},"stranded_count":{"type":"integer","title":"Stranded Count","description":"Matured obligations found already at 'classified' with no drafted closing entry. With dispatch_handlers=true they were drafted this run (included in dispatched_count); with dispatch_handlers=false they still have no draft — re-run with dispatch_handlers=true or void them.","default":0},"classified_event_ids":{"items":{"type":"string"},"type":"array","title":"Classified Event Ids"},"stranded_event_ids":{"items":{"type":"string"},"type":"array","title":"Stranded Event Ids","description":"Event ids of the stranded obligations found this sweep."},"errors":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Errors","description":"Per-obligation errors as {event_id, error}; the sweep continues past them."}},"type":"object","required":["classified_count","dispatched_count","error_count"],"title":"PromoteObligationsResponse","description":"Counts from a single on-demand promotion sweep."},"PublishListMemberResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Membership row identifier (ULID)."},"target_graph_id":{"type":"string","title":"Target Graph Id","description":"Recipient graph ID."},"target_graph_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Graph Name","description":"Display name of the recipient graph (if known)."},"target_org_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Org Name","description":"Display name of the org that owns the recipient graph."},"added_by":{"type":"string","title":"Added By","description":"User ID that added this member."},"added_at":{"type":"string","format":"date-time","title":"Added At","description":"When the member was added."}},"type":"object","required":["id","target_graph_id","added_by","added_at"],"title":"PublishListMemberResponse","description":"One recipient graph in a publish list."},"PublishListResponse":{"properties":{"id":{"type":"string","title":"Id","description":"List identifier (ULID)."},"name":{"type":"string","title":"Name","description":"Human-readable list name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-form description."},"member_count":{"type":"integer","title":"Member Count","description":"Number of recipient graphs currently on the list.","default":0},"created_by":{"type":"string","title":"Created By","description":"User ID that created the list."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the list was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Last metadata update (name/description)."}},"type":"object","required":["id","name","created_by","created_at","updated_at"],"title":"PublishListResponse","description":"Publish list summary — header metadata, no members."},"QueryLimits":{"properties":{"max_timeout_seconds":{"type":"integer","title":"Max Timeout Seconds","description":"Maximum query timeout in seconds"},"chunk_size":{"type":"integer","title":"Chunk Size","description":"Maximum chunk size for result streaming"},"max_rows_per_query":{"type":"integer","title":"Max Rows Per Query","description":"Maximum rows returned per query"},"concurrent_queries":{"type":"integer","title":"Concurrent Queries","description":"Maximum concurrent queries allowed"}},"type":"object","required":["max_timeout_seconds","chunk_size","max_rows_per_query","concurrent_queries"],"title":"QueryLimits","description":"Query operation limits."},"QuickBooksConnectionConfig":{"properties":{"realm_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Realm Id","description":"QuickBooks Realm ID"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token","description":"OAuth refresh token"}},"type":"object","title":"QuickBooksConnectionConfig","description":"QuickBooks-specific connection configuration."},"RateLimits":{"properties":{"requests_per_minute":{"type":"integer","title":"Requests Per Minute","description":"Requests per minute limit"},"requests_per_hour":{"type":"integer","title":"Requests Per Hour","description":"Requests per hour limit"},"burst_capacity":{"type":"integer","title":"Burst Capacity","description":"Burst capacity for short spikes"}},"type":"object","required":["requests_per_minute","requests_per_hour","burst_capacity"],"title":"RateLimits","description":"API rate limits."},"ReadTextRequest":{"properties":{"ticker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ticker","description":"Company ticker. On shared-repository graphs (SEC) it resolves the latest matching filing when report_id is not given; ignored on tenant graphs."},"report_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Id","description":"Specific report identifier. Required on tenant graphs; on SEC, optional when ticker is given."},"fiscal_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fiscal Year","description":"Narrow auto-resolution to this fiscal year focus"},"period_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Type","description":"Which forms auto-resolution considers: annual (10-K / 20-F / 40-F, the default) or quarterly (10-Q as well)"},"accession":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accession","description":"SEC only, with ticker: one filing by accession number — a report, or an 8-K from resolved_report.recent_releases"},"form":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form","description":"SEC only, with ticker: '8-K' reads the latest earnings release, or with fiscal_year the latest filed in that calendar year"},"offset":{"type":"integer","minimum":0.0,"title":"Offset","description":"Character offset to start from","default":0},"length":{"anyOf":[{"type":"integer","maximum":8000.0,"minimum":1.0},{"type":"null"}],"title":"Length","description":"Characters to return (default 4000)"}},"type":"object","title":"ReadTextRequest","description":"Request for the read-text view op — a window of one filing's text."},"ReadTextResponse":{"properties":{"graph_id":{"type":"string","title":"Graph Id"},"report_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Id"},"accession":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accession"},"resolved_report":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Resolved Report"},"offset":{"type":"integer","title":"Offset"},"length":{"type":"integer","title":"Length"},"text":{"type":"string","title":"Text"},"text_chars":{"type":"integer","title":"Text Chars"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"},"section":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section"}},"additionalProperties":true,"type":"object","required":["graph_id","offset","length","text","text_chars"],"title":"ReadTextResponse","description":"The read-text view op's result: one window of the filing's text."},"RebuildScheduleRequest":{"properties":{"structure_id":{"type":"string","title":"Structure Id","description":"The schedule structure to regenerate in place."}},"type":"object","required":["structure_id"],"title":"RebuildScheduleRequest","description":"Re-run the schedule generator in place on an existing schedule.\n\nAtomic alternative to delete-then-recreate: the structure id and its\nelement associations are preserved, the old pending obligation chain\nis voided, the old facts + rules are deleted, and a fresh set of\nforward facts + a fresh obligation chain are regenerated from the\nschedule's stored definition (entry_template / schedule_metadata /\nmonthly_amount / period bounds on the Structure's metadata).\n\nThe historical-vs-in-scope split is re-derived from the CURRENT fiscal\ncalendar `closed_through`, so a rebuild re-scopes the schedule to\ntoday's close state. Use this to pick up a fixed generator (e.g. the\nroll-forward direction fix) without orphaning obligations."},"ReconciliationComponent":{"properties":{"name":{"type":"string","title":"Name","description":"The schedule's name, the statement and its date, or the outstanding line's description."},"amount":{"type":"number","title":"Amount","description":"What this part says the account holds, debit-positive."},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind","description":"`schedule`, `statement`, or `outstanding`: a ledger line on a bank-fed account that did not come from the feed, dated on or before the statement, so the bank had not cleared it."},"posting_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Posting Date","description":"An `outstanding` line's posting date."},"entry_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entry Id","description":"The journal entry an `outstanding` line belongs to."},"structure_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Structure Id","description":"The schedule, for a `schedule_register` part."},"event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Id","description":"The recorded balance, for a `statement` part; the event behind an `outstanding` line, when it has one."},"document_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Id","description":"The statement document given as evidence, when one was."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Why a schedule carries nothing (disposed of, or ended early), or the note recorded with a statement balance."}},"type":"object","required":["name","amount"],"title":"ReconciliationComponent","description":"One part of an account's independent balance: what a single schedule\nsays the account carries, a recorded statement balance, or a ledger line\noutstanding at the statement's date."},"ReconciliationListResponse":{"properties":{"period":{"type":"string","title":"Period","description":"The period, as YYYY-MM."},"as_of":{"type":"string","format":"date","title":"As Of","description":"The period's last day."},"reconciliations":{"items":{"$ref":"#/components/schemas/ReconciliationSummary"},"type":"array","title":"Reconciliations","description":"One entry per reconciliation block, oldest block first."},"notes":{"items":{"type":"string"},"type":"array","title":"Notes","description":"What a refresh could not compare, such as a check skipped because its source is no longer connected. Empty on a plain read."}},"type":"object","required":["period","as_of","reconciliations"],"title":"ReconciliationListResponse","description":"Every reconciliation's standing for one period."},"ReconciliationMechanics":{"properties":{"kind":{"type":"string","const":"reconciliation","title":"Kind","default":"reconciliation"},"scope":{"type":"string","enum":["ledger","account"],"title":"Scope","description":"Whether the block covers the whole ledger or one account."},"method":{"type":"string","enum":["source_ledger","schedule_register","statement"],"title":"Method","description":"Where the independent side comes from."},"element_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Element Id","description":"The account reconciled; null for a ledger-scope block."},"required_for_close":{"type":"boolean","title":"Required For Close","description":"Whether the period's close waits on this reconciliation.","default":true},"materiality":{"type":"number","minimum":0.0,"title":"Materiality","description":"A difference up to this amount still counts as reconciled. Zero means the two sides must agree to the cent.","default":0.0},"review_required":{"type":"boolean","title":"Review Required","description":"Whether the close waits for a sign-off as well, not just for the two sides to reconcile.","default":false},"separate_reviewer":{"type":"boolean","title":"Separate Reviewer","description":"Whether the person who signs off must be someone other than the person who ran the comparison.","default":false},"statement_cycle":{"anyOf":[{"type":"string","enum":["monthly","quarterly","annual"]},{"type":"null"}],"title":"Statement Cycle","description":"`statement` blocks only: how often the account's statement is issued; unset is monthly. A period is covered by the latest statement ending within the cycle that ends with it."}},"type":"object","required":["scope","method"],"title":"ReconciliationMechanics","description":"Mechanics for `block_type='reconciliation'`: what is compared, against\nwhat, and how much the close cares.\n\nA `ledger`-scope reconciliation checks the whole ledger against one\nsource (the synced accounting system's own trial balance). An\n`account`-scope one ties a single account to an independent balance."},"ReconciliationPolicyResponse":{"properties":{"structure_id":{"type":"string","title":"Structure Id"},"required_for_close":{"type":"boolean","title":"Required For Close"},"materiality":{"type":"number","title":"Materiality"},"review_required":{"type":"boolean","title":"Review Required"},"separate_reviewer":{"type":"boolean","title":"Separate Reviewer"},"statement_cycle":{"anyOf":[{"type":"string","enum":["monthly","quarterly","annual"]},{"type":"null"}],"title":"Statement Cycle","description":"`statement` blocks only: how often the statement is issued."}},"type":"object","required":["structure_id","required_for_close","materiality","review_required","separate_reviewer"],"title":"ReconciliationPolicyResponse","description":"A reconciliation's policy after a change."},"ReconciliationPreviewResponse":{"properties":{"period":{"type":"string","title":"Period"},"as_of":{"type":"string","format":"date","title":"As Of","description":"The period's last day."},"fiscal_year_start":{"type":"string","format":"date","title":"Fiscal Year Start","description":"Income-statement accounts are compared from this date to `as_of`."},"method":{"type":"string","enum":["source_ledger","schedule_register","statement"],"title":"Method"},"source":{"type":"string","title":"Source","description":"The system the independent side was read from."},"report_basis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Basis","description":"Accounting basis the source reported on."},"last_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync At","description":"When the source was last synced. A difference on a sync older than the period end may be activity not yet synced, not a fault in the mirror."},"accounts_compared":{"type":"integer","title":"Accounts Compared","description":"Accounts with a balance on either side; zero on both is left out."},"accounts_tied":{"type":"integer","title":"Accounts Tied"},"accounts_different":{"type":"integer","title":"Accounts Different","description":"Every account that does not tie, whatever the reason."},"total_difference":{"type":"number","title":"Total Difference","description":"Sum of the absolute differences across accounts, not a net figure: one missing transaction counts on each account it touches."},"rows":{"items":{"$ref":"#/components/schemas/ReconciliationRow"},"type":"array","title":"Rows","description":"Accounts that do not tie, largest difference first; tied accounts follow when `include_tied` is set."},"notes":{"items":{"type":"string"},"type":"array","title":"Notes","description":"How the comparison was made, and anything that qualifies it."}},"type":"object","required":["period","as_of","fiscal_year_start","method","source","accounts_compared","accounts_tied","accounts_different","total_difference","rows"],"title":"ReconciliationPreviewResponse","description":"The comparison for one period end. Nothing is written."},"ReconciliationRollForward":{"properties":{"statement_as_of":{"type":"string","format":"date","title":"Statement As Of","description":"The statement's ending date."},"through":{"type":"string","format":"date","title":"Through","description":"The period's last day."},"bank_lines":{"type":"integer","title":"Bank Lines","description":"Booked feed lines dated after the statement, to the period end."},"bank_activity":{"type":"number","title":"Bank Activity","description":"Their net effect on the account, debit-positive."},"bank_balance":{"type":"number","title":"Bank Balance","description":"The statement balance carried to the period end by those lines: what the bank held then, debit-positive."},"ledger_balance":{"type":"number","title":"Ledger Balance","description":"The ledger's balance at the period end, as the close will leave it, debit-positive."},"outstanding":{"type":"number","title":"Outstanding","description":"Ledger lines not from the feed and dated on or before the period end, net: the ledger minus the carried bank balance."},"feed_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Feed Balance","description":"A cross-check, never the figure reconciled: the bank feed's own balance from the first reading on or after the period end, less the booked feed lines between the period end and that reading. Null when the feed has no reading within ten days."},"feed_balance_read_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Feed Balance Read On","description":"The day of the feed reading `feed_balance` starts from."}},"type":"object","required":["statement_as_of","through","bank_lines","bank_activity","bank_balance","ledger_balance","outstanding"],"title":"ReconciliationRollForward","description":"A statement carried from its ending date to the period's last day on a\nbank-fed account, where every line the feed brought is the bank's own."},"ReconciliationRow":{"properties":{"element_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Element Id","description":"The chart account; null when the ledger has none for it."},"account_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Code","description":"The chart account's code."},"account_name":{"type":"string","title":"Account Name","description":"The account's name in the ledger, else in the source."},"source_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Account Id","description":"The account's id in the source system, when it has one."},"statement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statement","description":"`balance_sheet` or `income_statement`. Balance-sheet accounts are compared cumulatively to the period end; income-statement accounts from the start of the fiscal year. Null when the ledger has no account."},"ledger_balance":{"type":"number","title":"Ledger Balance","description":"What the ledger holds. For `source_ledger`, landed entries only. For `schedule_register`, the balance as the period's close will leave it: landed entries, drafts awaiting the close, and schedule entries not yet drafted."},"independent_balance":{"type":"number","title":"Independent Balance","description":"What the independent source says. For a `statement` on a bank-fed account, the statement balance adjusted by its outstanding lines."},"difference":{"type":"number","title":"Difference","description":"Ledger minus independent."},"status":{"type":"string","title":"Status","description":"`tied`: both sides agree to the cent. `different`: both know the account and disagree. `not_in_ledger`: the source reports an account the ledger has none for. `not_in_source`: the ledger holds a balance on an account the source does not have."},"as_of":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of","description":"The date both balances are stated at, when it is not the period's last day: a statement that ends mid-period is compared with the ledger at the statement's own date."},"components":{"items":{"$ref":"#/components/schemas/ReconciliationComponent"},"type":"array","title":"Components","description":"Account-scope methods only: what makes up the independent balance. One entry per schedule for `schedule_register`; the recorded statement for `statement`, then each outstanding line."},"roll_forward":{"anyOf":[{"$ref":"#/components/schemas/ReconciliationRollForward"},{"type":"null"}],"description":"`statement` on a bank-fed account whose statement ends before the period's last day: the statement carried to it by the feed's lines."}},"type":"object","required":["account_name","ledger_balance","independent_balance","difference","status"],"title":"ReconciliationRow","description":"One account: the ledger's balance, the independent balance, the difference.\n\nBalances are debit-positive, so a credit balance is negative on both sides."},"ReconciliationSummary":{"properties":{"structure_id":{"type":"string","title":"Structure Id","description":"The reconciliation block."},"name":{"type":"string","title":"Name","description":"The block's name."},"scope":{"type":"string","title":"Scope","description":"`ledger`: the whole ledger against one source. `account`: one account against an independent balance."},"method":{"type":"string","title":"Method","description":"Where the independent side comes from. `source_ledger` is the synced accounting system's own trial balance. `schedule_register` is what the account's schedules say it carries. `statement` is the ending balance of a statement recorded for the account."},"element_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Element Id","description":"The account reconciled; null for a ledger-scope block."},"required_for_close":{"type":"boolean","title":"Required For Close","description":"Whether the period's close waits on this reconciliation."},"materiality":{"type":"number","title":"Materiality","description":"A difference up to this amount still counts as reconciled."},"statement_cycle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statement Cycle","description":"`statement` blocks only: how often the account's statement is issued, `monthly`, `quarterly` or `annual`."},"period":{"type":"string","title":"Period","description":"The period, as YYYY-MM."},"as_of":{"type":"string","format":"date","title":"As Of","description":"The period's last day."},"status":{"type":"string","title":"Status","description":"`not_started`: not compared for this period. `stale`: the books have changed since it was compared, so run refresh-reconciliations. `unreconciled`: the sides differ by more than the materiality. `reconciled`: they agree within it. `reviewed`: reconciled and signed off."},"unreconciled_difference":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unreconciled Difference","description":"What is left unexplained at the last comparison; null when the period has not been compared. For a ledger-scope block, the sum of every account's absolute difference. For an account-scope block, the ledger balance minus the independent one."},"accounts_compared":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Accounts Compared","description":"Ledger-scope only: accounts with a balance on either side."},"accounts_different":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Accounts Different","description":"Ledger-scope only: accounts that do not tie."},"ledger_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ledger Balance","description":"Account-scope only: the account's balance at the last comparison, debit-positive, as the period's close will leave it."},"independent_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Independent Balance","description":"Account-scope only: what the independent source said at the last comparison, debit-positive."},"balance_as_of":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Balance As Of","description":"Account-scope only: the date the two balances are stated at. The period's last day, unless the statement covering it ended earlier."},"components":{"items":{"$ref":"#/components/schemas/ReconciliationComponent"},"type":"array","title":"Components","description":"Account-scope only: what makes up the independent balance. One entry per schedule for `schedule_register`; the recorded statement for `statement`, then each outstanding line."},"roll_forward":{"anyOf":[{"$ref":"#/components/schemas/ReconciliationRollForward"},{"type":"null"}],"description":"`statement` on a bank-fed account whose statement ends before the period's last day: the statement carried to it by the feed's lines."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"The system the independent side was read from."},"compared_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Compared At","description":"When the two sides were last compared."},"fact_set_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fact Set Id","description":"The FactSet holding the period's comparison."},"compared_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compared By","description":"The user whose action ran the last comparison."},"compared_via":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compared Via","description":"`operation` when someone ran refresh-reconciliations; `sync` when a source sync refreshed it."},"review_required":{"type":"boolean","title":"Review Required","description":"Whether the close also waits for a sign-off."},"separate_reviewer":{"type":"boolean","title":"Separate Reviewer","description":"Whether the reviewer must be someone other than the person who ran the comparison."},"reviewed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewed By","description":"The user who signed off the comparison as it stands. Null when nobody has, or when the balances changed after the sign-off."},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At","description":"When the standing sign-off was made."},"self_reviewed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Self Reviewed","description":"True when the reviewer is the person who ran the comparison they signed off. Null when there is no standing sign-off."},"differences":{"items":{"$ref":"#/components/schemas/ReconciliationRow"},"type":"array","title":"Differences","description":"Ledger-scope only: the accounts that did not tie at the last comparison, largest difference first."}},"type":"object","required":["structure_id","name","scope","method","required_for_close","materiality","period","as_of","status","review_required","separate_reviewer"],"title":"ReconciliationSummary","description":"One reconciliation's standing for a period."},"ReconcilingItemCatchUp":{"properties":{"event_id":{"type":"string","title":"Event Id"},"entry_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entry Id"},"transaction_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transaction Id"},"posting_date":{"type":"string","format":"date","title":"Posting Date"},"status":{"type":"string","title":"Status"}},"type":"object","required":["event_id","posting_date","status"],"title":"ReconcilingItemCatchUp","description":"The catch-up entry a resolution posted."},"ReconcilingItemDeltaLine":{"properties":{"element_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Element Id","description":"CoA element id; null when the account is unmapped"},"element_external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Element External Id","description":"Source-system account id, when the line carried one"},"element_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Element Code","description":"Account code"},"element_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Element Name","description":"Account name"},"prior_net":{"type":"integer","title":"Prior Net","description":"Net of the posted entries, debit-positive"},"accepted_net":{"type":"integer","title":"Accepted Net","description":"Net of the new payload, debit-positive"},"delta":{"type":"integer","title":"Delta","description":"accepted_net - prior_net"}},"type":"object","required":["prior_net","accepted_net","delta"],"title":"ReconcilingItemDeltaLine","description":"One account's net change between the posted entries and the new payload.\n\nAmounts are signed minor units in debit-positive convention: a positive\nfigure is a net debit, a negative one a net credit. `delta` is what a\ncatch-up entry would post to bring the books level."},"ReconcilingItemEntrySummary":{"properties":{"entry_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entry Id","description":"Entry id; null for the accepted side, which is not posted yet"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"posting_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Posting Date"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"Entry status; null on the accepted side"},"total_debit":{"type":"integer","title":"Total Debit","default":0},"total_credit":{"type":"integer","title":"Total Credit","default":0}},"type":"object","title":"ReconcilingItemEntrySummary","description":"One entry on either side of the comparison."},"ReconcilingItemPlan":{"properties":{"event_id":{"type":"string","title":"Event Id"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"source":{"type":"string","title":"Source"},"event_type":{"type":"string","title":"Event Type"},"event_status":{"type":"string","title":"Event Status"},"drift_detected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Drift Detected At","description":"When the sync first saw this difference"},"default_disposition":{"type":"string","enum":["restate","catch_up","acknowledge"],"title":"Default Disposition","description":"What resolve would do with no disposition given: restate while every affected period is open and nothing blocks it, catch_up otherwise."},"default_posting_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Default Posting Date","description":"Where a catch-up entry would land by default"},"affected_posting_dates":{"items":{"type":"string","format":"date"},"type":"array","title":"Affected Posting Dates","description":"Posting dates of the event's entries"},"closed_periods":{"items":{"type":"string"},"type":"array","title":"Closed Periods","description":"Names of closed periods the event's entries sit in"},"prior_entries":{"items":{"$ref":"#/components/schemas/ReconcilingItemEntrySummary"},"type":"array","title":"Prior Entries"},"accepted_entries":{"items":{"$ref":"#/components/schemas/ReconcilingItemEntrySummary"},"type":"array","title":"Accepted Entries"},"delta":{"items":{"$ref":"#/components/schemas/ReconcilingItemDeltaLine"},"type":"array","title":"Delta","description":"Per-account net change; empty when none"},"no_gl_effect":{"type":"boolean","title":"No Gl Effect","description":"The change moves no money — a memo or reference edit. catch_up posts nothing; restate still regenerates so the entries carry the new text.","default":false},"restate_blockers":{"items":{"type":"string"},"type":"array","title":"Restate Blockers","description":"Why restate is unavailable, if it is: a closed period, an entry that was reversed or is not posted, or entries from elsewhere sharing this event's transaction."},"unmapped_element_external_ids":{"items":{"type":"string"},"type":"array","title":"Unmapped Element External Ids","description":"Accounts in the new payload with no mapping in this graph. Both dispositions that write need them mapped first."}},"type":"object","required":["event_id","source","event_type","event_status","default_disposition"],"title":"ReconcilingItemPlan","description":"What changed upstream, and what each disposition would do about it."},"ReconcilingItemRegenerated":{"properties":{"transaction_ids":{"items":{"type":"string"},"type":"array","title":"Transaction Ids"},"entry_ids":{"items":{"type":"string"},"type":"array","title":"Entry Ids"}},"type":"object","title":"ReconcilingItemRegenerated","description":"The entries a restate rebuilt."},"RecordStatementBalanceRequest":{"properties":{"element_id":{"type":"string","title":"Element Id","description":"The balance-sheet account the statement is for (a chart-of-accounts element id)."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity whose books the account is in, by id. Omit for the group parent. The account must be in that entity's chart."},"as_of":{"type":"string","format":"date","title":"As Of","description":"The statement's ending date.","examples":["2026-08-31"]},"balance":{"type":"number","maximum":10000000000000.0,"minimum":-10000000000000.0,"title":"Balance","description":"The ending balance as the statement shows it, as a positive number in the account's normal direction: money in a bank account, or the amount owed on a loan or a card. Negative for the opposite, such as an overdrawn bank account.","examples":[18250.75]},"document_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Id","description":"The statement itself, as a document already added with create-document. Kept on the record as evidence."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Anything worth keeping with the recorded balance."}},"type":"object","required":["element_id","as_of","balance"],"title":"RecordStatementBalanceRequest","description":"Record the ending balance of a statement for one account."},"RecoveryCodesRequest":{"properties":{"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password","description":"Current password (password-holding users)"},"assertion":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Assertion","description":"Fresh WebAuthn assertion from the re-auth ceremony"}},"type":"object","title":"RecoveryCodesRequest","description":"Re-authentication proof for regenerating recovery codes."},"RecoveryCodesResponse":{"properties":{"codes":{"items":{"type":"string"},"type":"array","title":"Codes","description":"Single-use recovery codes"}},"type":"object","required":["codes"],"title":"RecoveryCodesResponse","description":"A fresh recovery-code set — shown exactly once."},"RefreshReconciliationsRequest":{"properties":{"period":{"type":"string","title":"Period","description":"Period to reconcile at its last day, as YYYY-MM.","examples":["2026-08"]},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity whose books to reconcile, by id. Omit for the group parent. Each entity's reconciliations, and the close they hold, are its own."}},"type":"object","required":["period"],"title":"RefreshReconciliationsRequest","description":"Compare each reconciliation at a period end and record the result."},"RegenerateReportOperation":{"properties":{"period_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period Start","description":"New current-period start. Optional — omit to keep the existing window."},"period_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period End","description":"New current-period end. Optional — omit to keep the existing window."},"periods":{"anyOf":[{"items":{"$ref":"#/components/schemas/PeriodSpec"},"type":"array"},{"type":"null"}],"title":"Periods","description":"New explicit period columns. Overrides `period_start`/`period_end` when supplied."},"report_id":{"type":"string","title":"Report Id","description":"The Report to regenerate."}},"type":"object","required":["report_id"],"title":"RegenerateReportOperation","description":"Regenerate facts for an existing Report. Carries `report_id` from\nthe path-style RPC body; period overrides are inherited from\n:class:`RegenerateReportRequest`.","examples":[{"report_id":"rpt_01HVF8T0M2YTAY3BBNRH0V0"},{"period_end":"2026-06-30","period_start":"2026-04-01","report_id":"rpt_01HVF8T0M2YTAY3BBNRH0V0"}]},"RegisterRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"User's display name"},"email":{"type":"string","format":"email","title":"Email","description":"User's email address"},"password":{"type":"string","maxLength":128,"minLength":12,"title":"Password","description":"User's password (must meet security requirements)"},"captcha_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Captcha Token","description":"CAPTCHA verification token (required in production)"},"invite_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invite Token","description":"Org invitation token from an invitation email. When present, the new user joins the inviting organization at the invited role instead of receiving a personal organization."}},"type":"object","required":["name","email","password"],"title":"RegisterRequest","description":"Registration request model."},"RememberOp":{"properties":{"text":{"type":"string","maxLength":10000,"minLength":1,"title":"Text","description":"Memory content"},"source":{"type":"string","maxLength":64,"title":"Source","description":"Origin of the memory","default":"api"},"memory_type":{"type":"string","maxLength":64,"title":"Memory Type","description":"Freeform classifier","default":"note"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Optional labels"},"source_ref":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Source Ref","description":"Optional external reference/URI"},"provenance":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Provenance","description":"Opaque provenance metadata"}},"type":"object","required":["text"],"title":"RememberOp","description":"Body for the remember operation (write a semantic memory)."},"RemovePublishListMemberOperation":{"properties":{"list_id":{"type":"string","title":"List Id","description":"The publish list."},"member_id":{"type":"string","title":"Member Id","description":"The membership row to remove."}},"type":"object","required":["list_id","member_id"],"title":"RemovePublishListMemberOperation","description":"Remove a single recipient from a publish list.","examples":[{"list_id":"pl_01HVF8T0M2YTAY3BBNRH0V0","member_id":"plm_01HVF8T0M2YTAY3BBNRH0V0"}]},"RenderingLite":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/RenderingRowLite"},"type":"array","title":"Rows"},"periods":{"items":{"$ref":"#/components/schemas/RenderingPeriodLite"},"type":"array","title":"Periods"},"validation":{"anyOf":[{"$ref":"#/components/schemas/ValidationLite"},{"type":"null"}]},"unmapped_count":{"type":"integer","title":"Unmapped Count","default":0}},"type":"object","title":"RenderingLite","description":"Pre-computed rendering projection of an Information Block.\n\nComputed server-side at envelope-build time for blocks where rendering\nis deterministic (the statement family today; future block types add\ntheir own rendering builders). The frontend's `BlockView`\n`Rendering` projection consumes this directly — no client-side\nrollup, depth computation, or calculation walk needed."},"RenderingPeriodLite":{"properties":{"start":{"type":"string","format":"date","title":"Start"},"end":{"type":"string","format":"date","title":"End"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"forecast":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Forecast","description":"True when this column comes from a forecast scenario's FactSet — the machine-readable seam marker (labels also carry a '(forecast)' suffix, but consumers should key styling off this flag, not label parsing). None/absent = an actuals column."}},"type":"object","required":["start","end"],"title":"RenderingPeriodLite","description":"One period column in a rendered statement."},"RenderingRowLite":{"properties":{"element_id":{"type":"string","title":"Element Id"},"element_qname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Element Qname"},"element_name":{"type":"string","title":"Element Name"},"classification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classification","description":"FASB elementsOfFinancialStatements trait identifier — 'asset', 'liability', 'equity', 'revenue', 'expense'. Surfaced so the viewer can color-code or group rows without a follow-up trait lookup."},"balance_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Balance Type"},"item_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Type","description":"Value-domain format family from the element (monetary | ratio | percent | multiple | days | …). Drives per-row value formatting; None falls back to is_monetary on the element."},"values":{"items":{"anyOf":[{"type":"number"},{"type":"null"}]},"type":"array","title":"Values"},"text_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text Value","description":"Narrative payload for text-block disclosure rows (markdown); numeric rows carry values instead."},"is_subtotal":{"type":"boolean","title":"Is Subtotal","default":false},"depth":{"type":"integer","title":"Depth","default":0}},"type":"object","required":["element_id","element_name"],"title":"RenderingRowLite","description":"One row of a server-side rendered statement.\n\nMirrors :class:`FactRow` in\n:mod:`robosystems.operations.roboledger.reports.fact_grid`, restated at the\nAPI boundary so envelope consumers don't depend on that module. `values`\nholds one entry per period column in :class:`RenderingLite.periods`."},"ReopenPeriodOperation":{"properties":{"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity whose books this acts on, by id. Omit for the group parent — the single-entity default."},"reason":{"type":"string","minLength":1,"title":"Reason","description":"Required reason for the reopen (captured in audit log)"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Additional free-form note"},"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","title":"Period","description":"Period to reopen, in YYYY-MM. Only the latest closed period (the current `closed_through`) can be reopened, and reopening it retreats `closed_through` by one month. To reach an earlier period, reopen the later ones first, latest to earliest."}},"type":"object","required":["reason","period"],"title":"ReopenPeriodOperation","description":"Reopen a closed fiscal period.","examples":[{"period":"2026-03","reason":"Discovered late vendor invoice — needs to land in March."}]},"ReportResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Report identifier (ULID)."},"name":{"type":"string","title":"Name","description":"Human-readable report name."},"taxonomy_id":{"type":"string","title":"Taxonomy Id","description":"Taxonomy this report renders against."},"generation_status":{"type":"string","title":"Generation Status","description":"Computation lifecycle: `generating`, `published`, `failed`. Orthogonal to `filing_status`."},"period_type":{"type":"string","title":"Period Type","description":"Period cadence: `monthly`, `quarterly`, `annual`."},"period_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period Start","description":"Current-period start."},"period_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period End","description":"Current-period end."},"comparative":{"type":"boolean","title":"Comparative","description":"True when an auto-generated prior-period column is included."},"periods":{"anyOf":[{"items":{"$ref":"#/components/schemas/PeriodSpec"},"type":"array"},{"type":"null"}],"title":"Periods","description":"Explicit period columns when the report was created with a multi-period layout."},"mapping_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mapping Id","description":"CoA → taxonomy mapping the facts were rolled up through."},"ai_generated":{"type":"boolean","title":"Ai Generated","description":"True when the report was created by an AI agent rather than a user.","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the report row was created."},"last_generated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Generated","description":"When the facts were last (re)generated."},"structures":{"items":{"$ref":"#/components/schemas/StructureSummary"},"type":"array","title":"Structures","description":"Structures available for this report's taxonomy — renderable sections (BS / IS / CF / Equity / Schedules)."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity the report is about. Null on a shared-in copy, and on a report from before entities were recorded, which is the group parent's."},"entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Name","description":"Display name of the entity the report is tagged to."},"filing_status":{"type":"string","title":"Filing Status","description":"Filing lifecycle (orthogonal to `generation_status`): `draft`, `under_review`, `filed`, `archived`.","default":"draft"},"filed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Filed At","description":"When the report was transitioned to `filed`. On a report shared in from another graph this is the sender's filing time, carried over with `filing_status` so a recipient can tell a draft they were sent from final statements."},"filed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filed By","description":"User ID that transitioned the report to `filed`. Always null on a report shared in from another graph: the sender's user id resolves to nobody in the recipient's graph, so it is deliberately not carried across with `filing_status` and `filed_at`."},"supersedes_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supersedes Id","description":"When this report restates an earlier filing, the predecessor's report ID."},"superseded_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Superseded By Id","description":"When this report has been restated, the successor's report ID."},"source_graph_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Graph Id","description":"Origin graph for received (shared) reports — populated only on the recipient's copy."},"source_report_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Report Id","description":"Origin report ID for received (shared) reports — populated only on the recipient's copy."},"shared_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Shared At","description":"When the report was shared into this graph (recipient side)."},"rule_summary":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Rule Summary","description":"Counts by rule outcome (e.g. `{'passed': 12, 'failed': 1}`) from the most recent evaluation. Null until rules run."}},"type":"object","required":["id","name","taxonomy_id","generation_status","period_type","comparative","created_at"],"title":"ReportResponse","description":"Report definition summary — header metadata, no facts.\n\nReturned by `create-report`, `regenerate-report`,\n`file-report`, and `transition-filing-status`. Use the package\nread endpoint to retrieve a Report rehydrated with its rendered\n`InformationBlockEnvelope` items."},"RepositoryInfo":{"properties":{"type":{"type":"string","title":"Type","description":"Repository type identifier"},"name":{"type":"string","title":"Name","description":"Repository name"},"description":{"type":"string","title":"Description","description":"Repository description"},"enabled":{"type":"boolean","title":"Enabled","description":"Whether repository is enabled"},"coming_soon":{"type":"boolean","title":"Coming Soon","description":"Whether repository is coming soon"},"plans":{"items":{"$ref":"#/components/schemas/OfferingRepositoryPlan"},"type":"array","title":"Plans","description":"Available plans"}},"type":"object","required":["type","name","description","enabled","coming_soon","plans"],"title":"RepositoryInfo","description":"Information about a shared repository."},"RepositorySubscriptions":{"properties":{"description":{"type":"string","title":"Description","description":"Description of repository subscriptions"},"pricing_model":{"type":"string","title":"Pricing Model","description":"Pricing model type (per_graph or per_organization)"},"repositories":{"items":{"$ref":"#/components/schemas/RepositoryInfo"},"type":"array","title":"Repositories","description":"Available repositories"},"notes":{"items":{"type":"string"},"type":"array","title":"Notes","description":"Important notes"}},"type":"object","required":["description","pricing_model","repositories","notes"],"title":"RepositorySubscriptions","description":"Repository subscription offerings.\n\nRepository subscriptions are per-organization, not per-graph. All members\nof an organization share access to subscribed repositories."},"ResetPasswordRequest":{"properties":{"token":{"type":"string","title":"Token","description":"Password reset token from email link"},"new_password":{"type":"string","maxLength":128,"minLength":12,"title":"New Password","description":"New password (must meet security requirements)"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordRequest","description":"Reset password request model."},"ResetPasswordValidateResponse":{"properties":{"valid":{"type":"boolean","title":"Valid","description":"Whether the token is valid"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Masked email address if token is valid"}},"type":"object","required":["valid"],"title":"ResetPasswordValidateResponse","description":"Password reset token validation response model."},"ResolveReconcilingItemRequest":{"properties":{"event_id":{"type":"string","title":"Event Id","description":"Event id (evt_ prefixed) to resolve"},"expected_drift_detected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Drift Detected At","description":"The `drift_detected_at` of the preview this resolution was decided on. Pass it: the resolution is refused when the item has been flagged again since, with a newer payload nobody has seen, and must be previewed again."},"disposition":{"anyOf":[{"type":"string","enum":["restate","catch_up","acknowledge"]},{"type":"null"}],"title":"Disposition","description":"How to dispose of the difference. Omit to take the default the preview reports: restate when every period the event touches is open, catch_up when any is closed."},"posting_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Posting Date","description":"catch_up only: when to post the catch-up entry. Defaults to the end of the earliest open period."},"status":{"type":"string","enum":["draft","posted"],"title":"Status","description":"catch_up only: whether the catch-up entry is drafted for review at close (default) or posted immediately. A draft appears in list-period-drafts and posts locally when the period closes.","default":"draft"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Why this disposition. Required for acknowledge, where it is the only record of what was done instead."},"reference_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Event Id","description":"acknowledge only: the event that already handled this difference (e.g. an alignment entry authored by hand), recorded on the trail."}},"type":"object","required":["event_id"],"title":"ResolveReconcilingItemRequest","description":"Dispose of one reconciling item and clear its flag."},"ResolveReconcilingItemResponse":{"properties":{"event_id":{"type":"string","title":"Event Id"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"disposition":{"type":"string","enum":["restate","catch_up","acknowledge"],"title":"Disposition"},"delta":{"items":{"$ref":"#/components/schemas/ReconcilingItemDeltaLine"},"type":"array","title":"Delta"},"no_gl_effect":{"type":"boolean","title":"No Gl Effect","default":false},"catch_up":{"anyOf":[{"$ref":"#/components/schemas/ReconcilingItemCatchUp"},{"type":"null"}],"description":"Present when the disposition posted a catch-up entry"},"regenerated":{"anyOf":[{"$ref":"#/components/schemas/ReconcilingItemRegenerated"},{"type":"null"}],"description":"Present when the disposition rebuilt the event's entries"},"reference_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Event Id"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"resolved_at":{"type":"string","format":"date-time","title":"Resolved At"},"resolved_by":{"type":"string","title":"Resolved By"}},"type":"object","required":["event_id","disposition","resolved_at","resolved_by"],"title":"ResolveReconcilingItemResponse","description":"The outcome of resolving one reconciling item."},"ResolvedReportInfo":{"properties":{"report_id":{"type":"string","title":"Report Id"},"form":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form"},"filing_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filing Date"},"fiscal_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fiscal Year"},"fiscal_period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fiscal Period"},"links":{"anyOf":[{"$ref":"#/components/schemas/FilingLinks"},{"type":"null"}]}},"type":"object","required":["report_id"],"title":"ResolvedReportInfo","description":"Information about the auto-resolved report."},"ResponseMode":{"type":"string","enum":["auto","sync","async","stream"],"title":"ResponseMode","description":"Response modes for execution."},"RevokeReportShareOperation":{"properties":{"target_graph_id":{"type":"string","title":"Target Graph Id","description":"Recipient graph whose copy should be withdrawn."},"report_id":{"type":"string","title":"Report Id","description":"The Report whose share to withdraw."}},"type":"object","required":["target_graph_id","report_id"],"title":"RevokeReportShareOperation","description":"Withdraw a shared Report from one recipient graph.","examples":[{"report_id":"rpt_01HVF8T0M2YTAY3BBNRH0V0","target_graph_id":"kg1a2b3c4d5e6f7a8b9c"}]},"RevokeReportShareResponse":{"properties":{"report_id":{"type":"string","title":"Report Id","description":"The report whose share was revoked."},"target_graph_id":{"type":"string","title":"Target Graph Id","description":"Recipient the copy was pulled from."},"revoked_at":{"type":"string","format":"date-time","title":"Revoked At","description":"When the share was revoked."},"copy_deleted":{"type":"boolean","title":"Copy Deleted","description":"True when a copy was found and deleted in the recipient's schema. False when the recipient had already deleted it themselves — the share is still marked revoked."}},"type":"object","required":["report_id","target_graph_id","revoked_at","copy_deleted"],"title":"RevokeReportShareResponse","description":"Outcome of withdrawing a shared report from one recipient."},"RollforwardMechanics":{"properties":{"kind":{"type":"string","const":"rollforward","title":"Kind","default":"rollforward"},"bs_source_element_id":{"type":"string","title":"Bs Source Element Id","description":"Element id of the balance-sheet source whose period delta this block decomposes. Resolved from `bs_source_qname` at create time."},"bs_source_qname":{"type":"string","title":"Bs Source Qname","description":"QName of the BS source element (e.g. `mini:CashAndCashEquivalents`). Round-tripped for caller convenience; `bs_source_element_id` is authoritative."},"default_change_tag_element_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Change Tag Element Id","description":"Element id of the default change tag — the fallback flow concept that receives any residual (Δ BS − Σ filter matches). Null when no default is declared; behavior on residual then follows `validation_mode`."},"default_change_tag_qname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Change Tag Qname","description":"QName of the default change tag (e.g. `rs-gaap:IncreaseDecreaseInCashAndCashEquivalents`). Round-tripped for caller convenience and operator-readable envelopes; `default_change_tag_element_id` is authoritative. Null iff `default_change_tag_element_id` is null."},"attribution_filters":{"items":{"$ref":"#/components/schemas/AttributionFilter"},"type":"array","title":"Attribution Filters","description":"Filter predicates routing LineItems to flow concepts. The renderer evaluates each filter against the period's LineItems, aggregates signed amounts, and emits one fact per filter per period."},"validation_mode":{"type":"string","enum":["strict","residual_as_default","warn_only"],"title":"Validation Mode","description":"Renderer arbitration policy when Σ filter matches != Δ BS. `strict` raises; `residual_as_default` emits the residual as a default-tag fact (the common case); `warn_only` logs and lets the imbalance pass.","default":"residual_as_default"}},"type":"object","required":["bs_source_element_id","bs_source_qname"],"title":"RollforwardMechanics","description":"Filter-based attribution mechanics for `block_type='rollforward'`.\n\nFilter-based attribution: each block decomposes one BS source\nelement's period delta into a list of flow concepts via declared\n:class:`AttributionFilter` predicates. The renderer evaluates the\nfilters against ledger LineItems at envelope-build time, emits one\nattributed fact per filter per period, and arbitrates any residual\nagainst the default change tag fallback.\n\nReads directly from the typed `structures.artifact_mechanics` JSONB\ncolumn. `attribution_filters` rides as nested JSON; the predicate\nunion widens as new predicate shapes are added — currently only\n`line_item_metadata_field` is carried."},"RuleLite":{"properties":{"id":{"type":"string","title":"Id"},"rule_category":{"type":"string","title":"Rule Category","description":"One of 8 cm:VerificationRule subclasses — AutomatedAccountingAndReportingChecks, FundamentalAccountingConceptRelation, PeerConsistencyRule, PriorPeriodConsistencyRule, ReportLevelModelStructureRule, ReportingSystemSpecificRule, ToDoManualTask, XBRLTechnicalSyntaxRule."},"rule_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Pattern","description":"Arithmetic / logical pattern evaluated over fact values. One of 11 cm:BusinessRulePattern mechanisms — Adjustment, CoExists, EqualTo, Exists, GreaterThan, GreaterThanOrEqualToZero, LessThan, RollForward, RollUp, SumEquals, Variance. Null when the rule is a structural check (see rule_check_kind)."},"rule_check_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Check Kind","description":"Model-structure check kind evaluated over the association graph. One of 6 kinds — LeafHasClassification, LibraryOriginImmutability, NoCycles, NoOrphanArcs, ParentBeforeChild, UniqueQNameInTaxonomy. Null when the rule is an arithmetic pattern (see rule_pattern). Exactly one of rule_pattern / rule_check_kind is non-null per rule."},"rule_expression":{"type":"string","title":"Rule Expression"},"rule_target":{"anyOf":[{"$ref":"#/components/schemas/RuleTargetLite"},{"type":"null"}]},"rule_variables":{"items":{"$ref":"#/components/schemas/RuleVariableLite"},"type":"array","title":"Rule Variables"},"rule_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Message"},"rule_severity":{"type":"string","title":"Rule Severity","description":"Failure severity — 'info' | 'warning' | 'error'. Enum closure enforced by the `public.rules` CHECK constraint.","default":"error"},"rule_origin":{"type":"string","title":"Rule Origin","description":"Provenance — 'forked' (from an upstream artifact, e.g. an external XBRL taxonomy) or 'native' (authored in this seed or by a tenant). Enum closure enforced by the `public.rules` CHECK constraint.","default":"native"}},"type":"object","required":["id","rule_category","rule_expression"],"title":"RuleLite","description":"Rule projection for the Information Block envelope.\n\nOne row per `public.rules` entry scoped to this block. The rule\nengine consumes `rule_expression` + `rule_variables` to evaluate\nagainst the in-scope fact set; the envelope surfaces the rules so\nthe UI can render them as a checklist alongside any persisted\nverification results."},"RuleTargetLite":{"properties":{"target_kind":{"type":"string","title":"Target Kind","description":"Which atom type the rule targets — 'structure' | 'element' | 'association' | 'taxonomy'. Enum closure enforced by the `public.rules` CHECK constraint."},"target_ref_id":{"type":"string","title":"Target Ref Id","description":"UUID of the target atom — structure_id, element_id, association_id, or taxonomy_id depending on `target_kind`."}},"type":"object","required":["target_kind","target_ref_id"],"title":"RuleTargetLite","description":"Polymorphic rule target — points at the atom the rule is scoped to."},"RuleVariableLite":{"properties":{"variable_name":{"type":"string","title":"Variable Name","description":"Local name in the rule expression, e.g. 'Assets'."},"variable_qname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variable Qname","description":"Concept qname the variable resolves to, e.g. 'fac:Assets'. Null for tenant CoA elements (which key on `code`/`element_id`, not qname) — in that case the binding is carried by `variable_element_id`."},"variable_element_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variable Element Id","description":"Element id the variable binds to directly. Set for schedule SumEquals rules over CoA-debit elements that have no qname; null otherwise."}},"type":"object","required":["variable_name"],"title":"RuleVariableLite","description":"`$Variable` → concept qname binding for a rule expression."},"SSOCompleteRequest":{"properties":{"session_id":{"type":"string","title":"Session Id","description":"Temporary session ID from secure handoff"}},"type":"object","required":["session_id"],"title":"SSOCompleteRequest","description":"SSO completion request model."},"SSOExchangeRequest":{"properties":{"token":{"type":"string","title":"Token","description":"Temporary SSO token"},"target_app":{"type":"string","title":"Target App","description":"Target application identifier"},"return_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Url","description":"Optional return URL after authentication"}},"type":"object","required":["token","target_app"],"title":"SSOExchangeRequest","description":"SSO token exchange request model."},"SSOExchangeResponse":{"properties":{"session_id":{"type":"string","title":"Session Id","description":"Temporary session ID for secure handoff"},"redirect_url":{"type":"string","title":"Redirect Url","description":"URL to redirect to for authentication"},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"Session expiration time"}},"type":"object","required":["session_id","redirect_url","expires_at"],"title":"SSOExchangeResponse","description":"SSO token exchange response model."},"SSOTokenResponse":{"properties":{"token":{"type":"string","title":"Token","description":"Temporary SSO token for cross-app authentication"},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"Token expiration time"},"apps":{"items":{"type":"string"},"type":"array","title":"Apps","description":"Available apps for this user"}},"type":"object","required":["token","expires_at","apps"],"title":"SSOTokenResponse","description":"SSO token response model."},"ScheduleCreatedResponse":{"properties":{"structure_id":{"type":"string","title":"Structure Id"},"name":{"type":"string","title":"Name"},"taxonomy_id":{"type":"string","title":"Taxonomy Id"},"total_periods":{"type":"integer","title":"Total Periods"},"total_facts":{"type":"integer","title":"Total Facts"},"rule_summary":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Rule Summary"},"schedule_created_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule Created Event Id"},"pending_event_count":{"type":"integer","title":"Pending Event Count","default":0}},"type":"object","required":["structure_id","name","taxonomy_id","total_periods","total_facts"],"title":"ScheduleCreatedResponse"},"ScheduleMechanics":{"properties":{"kind":{"type":"string","const":"closing_entry_generator","title":"Kind","default":"closing_entry_generator"},"entry_template":{"$ref":"#/components/schemas/EntryTemplateRequest","description":"Debit/credit elements + memo template + auto_reverse flag that drive fact→entry generation for each in-scope period."},"schedule_metadata":{"anyOf":[{"$ref":"#/components/schemas/ScheduleMetadataRequest"},{"type":"null"}],"description":"Method (straight_line / declining_balance / units_of_production), original_amount, residual_value, useful_life_months, optional asset_element_id for net-book-value cross-reference."},"periods_with_entries":{"type":"integer","title":"Periods With Entries","description":"Number of in-scope periods that have at least one closing entry posted. Runtime state derived at envelope-build time from the Entry table.","default":0}},"type":"object","required":["entry_template"],"title":"ScheduleMechanics","description":"Closing-entry generator mechanics for `block_type='schedule'`.\n\nReads the typed `structures.artifact_mechanics` JSONB column, falling back\nto `structures.metadata_` for Schedule rows that lack it.\n`entry_template` and `schedule_metadata` reuse the wire-level request\nshapes so OpenAPI emits one canonical type per concept."},"ScheduleMetadataRequest":{"properties":{"method":{"type":"string","title":"Method","description":"Calculation method. 'straight_line' (default) distributes `monthly_amount` evenly across periods with the final period absorbing rounding. 'custom' requires `periodic_amounts` — the generator uses those values verbatim instead of computing. Other strings are labels only; fact values still come from `monthly_amount` or `periodic_amounts`.","default":"straight_line"},"original_amount":{"type":"integer","title":"Original Amount","description":"Cost basis in cents","default":0},"residual_value":{"type":"integer","title":"Residual Value","description":"Salvage value in cents. The schedule expenses `original_amount` less this; net book value ends at it.","default":0},"useful_life_months":{"type":"integer","title":"Useful Life Months","description":"Useful life in months","default":0},"asset_element_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Element Id","description":"BS asset element for net book value"},"booked_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Booked On","description":"The date the cost went on the books, when that is before the schedule's first period: a policy paid in December that starts amortizing in January, or an asset bought the month before it is placed in service. From this date until the first period the schedule carries its full cost, so the schedule reconciliation does not report that balance as unscheduled. Leave it out when the cost is booked in the first period."},"periodic_amounts":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Periodic Amounts","description":"Explicit per-period amounts in cents. When set, the generator uses these values instead of `monthly_amount` — enabling non-straight-line schedules (effective-interest bond discount amortization, day-count interest accrual, variable lease payments, pre-computed effective-yield curves, etc.). Length must match the number of monthly periods between `period_start` and `period_end`; sum must equal `original_amount` less `residual_value` exactly. The auto-generated SumEquals rule proves that total regardless of the curve shape."}},"type":"object","title":"ScheduleMetadataRequest"},"SchemaExportResponse":{"properties":{"graph_id":{"type":"string","title":"Graph Id","description":"Graph ID","examples":["sec","kg1a2b3c4d5"]},"schema_definition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}],"title":"Schema Definition","description":"Exported schema definition (format depends on 'format' parameter)","examples":[{"description":"Schema for SEC financial data analysis","name":"financial_analysis_schema","nodes":[{"name":"Company","properties":[{"name":"cik","type":"STRING","is_primary_key":true},{"name":"name","type":"STRING","nullable":false},{"name":"ticker","type":"STRING"},{"name":"market_cap","type":"INT64"},{"name":"sector","type":"STRING"}]},{"name":"Filing","properties":[{"name":"accession_number","type":"STRING","is_primary_key":true},{"name":"form_type","type":"STRING","nullable":false},{"name":"filing_date","type":"DATE"},{"name":"fiscal_year","type":"INT32"}]}],"relationships":[{"from_node":"Company","name":"FILED","properties":[{"name":"filing_count","type":"INT32"}],"to_node":"Filing"}],"type":"custom","version":"1.0.0"},"name: financial_analysis_schema\nversion: '1.0.0'\ntype: custom\ndescription: Schema for SEC financial data analysis\nnodes:\n  - name: Company\n    properties:\n      - name: cik\n        type: STRING\n        is_primary_key: true\n      - name: name\n        type: STRING\n        nullable: false\n      - name: ticker\n        type: STRING\n      - name: market_cap\n        type: INT64\nrelationships:\n  - name: FILED\n    from_node: Company\n    to_node: Filing","CREATE NODE TABLE Company (\n  cik STRING PRIMARY KEY,\n  name STRING NOT NULL,\n  ticker STRING,\n  market_cap INT64,\n  sector STRING\n);\n\nCREATE NODE TABLE Filing (\n  accession_number STRING PRIMARY KEY,\n  form_type STRING NOT NULL,\n  filing_date DATE,\n  fiscal_year INT32\n);\n\nCREATE REL TABLE FILED (\n  FROM Company TO Filing,\n  filing_count INT32\n);"]},"format":{"type":"string","title":"Format","description":"Export format used","examples":["json","yaml","cypher"]},"exported_at":{"type":"string","title":"Exported At","description":"Export timestamp","examples":["2025-10-29T10:30:00Z"]},"data_stats":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data Stats","description":"Data statistics if requested (only when include_data_stats=true)","examples":[{"node_counts":{"Company":8500,"Filing":125000,"Industry":1200},"node_labels_count":4,"node_properties_count":12,"relationship_types_count":3,"total_nodes":134700}]}},"type":"object","required":["graph_id","schema_definition","format","exported_at"],"title":"SchemaExportResponse","description":"Response model for schema export."},"SchemaInfoResponse":{"properties":{"graph_id":{"type":"string","title":"Graph Id","description":"Graph database identifier"},"schema":{"additionalProperties":true,"type":"object","title":"Schema","description":"Runtime schema information showing actual database structure"}},"type":"object","required":["graph_id","schema"],"title":"SchemaInfoResponse","description":"Response model for runtime schema introspection.\n\nThis model represents the actual current state of the graph database,\nshowing what node labels, relationship types, and properties exist right now.","examples":[{"graph_id":"sec","schema":{"node_labels":["Entity","Report","Fact","Element","Period","Unit","Dimension","Taxonomy","Structure","Association"],"node_properties":{"Entity":{"cik":"STRING","entity_type":"STRING","fiscal_year_end":"STRING","industry":"STRING","name":"STRING","state_of_incorporation":"STRING","ticker":"STRING"},"Fact":{"decimals":"INT64","fact_type":"STRING","numeric_value":"DOUBLE"},"Report":{"accession_number":"STRING","filing_date":"STRING","form":"STRING","name":"STRING","report_date":"STRING"}},"relationship_types":["ENTITY_HAS_REPORT","REPORT_HAS_FACT","FACT_HAS_ELEMENT","FACT_HAS_PERIOD","FACT_HAS_UNIT","FACT_HAS_DIMENSION","REPORT_USES_TAXONOMY","STRUCTURE_HAS_TAXONOMY","STRUCTURE_HAS_ASSOCIATION","ASSOCIATION_HAS_FROM_ELEMENT","ASSOCIATION_HAS_TO_ELEMENT"]}},{"graph_id":"kg1a2b3c4d5","schema":{"node_labels":["Transaction","LineItem","Element","Report","Entity","Fact","Period","Unit"],"node_properties":{"Element":{"balance":"STRING","classification":"STRING","name":"STRING"},"LineItem":{"credit_amount":"DOUBLE","debit_amount":"DOUBLE"},"Transaction":{"date":"STRING","description":"STRING","type":"STRING"}},"relationship_types":["TRANSACTION_HAS_ENTRY","ENTRY_HAS_LINE_ITEM","LINE_ITEM_RELATES_TO_ELEMENT","ENTITY_HAS_REPORT","REPORT_HAS_FACT","FACT_HAS_ELEMENT","FACT_HAS_PERIOD","FACT_HAS_UNIT"]}},{"graph_id":"kg9f8e7d6c5","schema":{"node_labels":["Person","Company","Project"],"node_properties":{"Company":{"identifier":"STRING","industry":"STRING","location":"STRING","name":"STRING"},"Person":{"identifier":"STRING","interests":"STRING","name":"STRING","title":"STRING"},"Project":{"budget":"DOUBLE","name":"STRING","status":"STRING"}},"relationship_types":["PERSON_WORKS_FOR_COMPANY","PERSON_WORKS_ON_PROJECT","COMPANY_SPONSORS_PROJECT"]}},{"graph_id":"kg2x3y4z5a6","schema":{"node_labels":[],"node_properties":{},"relationship_types":[]}}]},"SchemaValidationRequest":{"properties":{"schema_definition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}],"title":"Schema Definition","description":"Schema definition as JSON dict or JSON/YAML string","examples":[{"description":"Schema for financial data with companies and filings","name":"financial_analysis","nodes":[{"name":"Company","properties":[{"name":"cik","type":"STRING","is_primary_key":true},{"name":"name","type":"STRING","nullable":false},{"name":"ticker","type":"STRING"},{"name":"market_cap","type":"INT64"}]},{"name":"Filing","properties":[{"name":"accession_number","type":"STRING","is_primary_key":true},{"name":"form_type","type":"STRING","nullable":false},{"name":"filing_date","type":"DATE"}]}],"relationships":[{"from_node":"Company","name":"FILED","properties":[{"name":"filing_count","type":"INT32"}],"to_node":"Filing"}],"version":"1.0.0"},"name: inventory_management\nversion: '1.0.0'\ndescription: Inventory tracking schema\nnodes:\n  - name: Product\n    properties:\n      - name: sku\n        type: STRING\n        is_primary_key: true\n      - name: name\n        type: STRING\n        nullable: false\n      - name: quantity\n        type: INT32\n  - name: Warehouse\n    properties:\n      - name: location_id\n        type: STRING\n        is_primary_key: true\n      - name: name\n        type: STRING\nrelationships:\n  - name: STORED_IN\n    from_node: Product\n    to_node: Warehouse",{"name":"invalid_schema_example","nodes":[{"name":"Company","properties":[{"name":"name","type":"INVALID_TYPE"}]}],"relationships":[{"from_node":"Company","name":"RELATED_TO","to_node":"NonExistentNode"}],"version":"1.0.0"}]},"format":{"type":"string","title":"Format","description":"Schema format: json, yaml, or dict","default":"json","examples":["json","yaml","dict"]},"check_compatibility":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Check Compatibility","description":"List of existing schema extensions to check compatibility with","examples":[null,["roboledger"],["sec_base","industry"]]}},"type":"object","required":["schema_definition"],"title":"SchemaValidationRequest","description":"Request model for schema validation."},"SchemaValidationResponse":{"properties":{"valid":{"type":"boolean","title":"Valid","description":"Whether the schema is valid","examples":[true,false,true]},"message":{"type":"string","title":"Message","description":"Validation message","examples":["Schema is valid","Schema validation failed","Schema is valid with 2 warning(s)"]},"errors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Errors","description":"List of validation errors (only present when valid=false)","examples":[null,["Invalid data type 'INVALID_TYPE' for property 'name' in node 'Company'","Relationship 'RELATED_TO' references non-existent node 'NonExistentNode'","Node 'Company' has no primary key defined"]]},"warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Warnings","description":"List of validation warnings (schema is still valid but has potential issues)","examples":[null,["Isolated nodes with no relationships: ['Warehouse', 'Location']","Schema has no relationships defined","Property 'deprecated_field' uses deprecated type DECIMAL"]]},"stats":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Stats","description":"Schema statistics (only present when valid=true)","examples":[{"nodes":2,"primary_keys":2,"relationships":1,"total_properties":7},{"nodes":5,"primary_keys":5,"relationships":8,"total_properties":32}]},"compatibility":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Compatibility","description":"Compatibility check results (only when check_compatibility specified)","examples":[{"checked_extensions":["roboledger"],"compatible":true,"conflicts":[]},{"checked_extensions":["roboledger","sec_base"],"compatible":false,"conflicts":["Node 'Transaction' conflicts with existing definition in 'roboledger'","Property 'amount' type mismatch: INT64 vs DOUBLE"]}]}},"type":"object","required":["valid","message"],"title":"SchemaValidationResponse","description":"Response model for schema validation."},"SearchHit":{"properties":{"document_id":{"type":"string","title":"Document Id"},"score":{"type":"number","title":"Score"},"source_type":{"type":"string","title":"Source Type"},"parent_document_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Document Id"},"part":{"type":"integer","title":"Part","default":1},"part_count":{"type":"integer","title":"Part Count","default":1},"next_document_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Document Id"},"entity_ticker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Ticker"},"entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Name"},"section_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Label"},"section_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Id"},"element_qname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Element Qname"},"filing_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filing Date"},"fiscal_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fiscal Year"},"form_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form Type"},"accession_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accession Number"},"xbrl_elements":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Xbrl Elements"},"snippet":{"type":"string","title":"Snippet"},"content_length":{"type":"integer","title":"Content Length","default":0},"content_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Url"},"document_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Title"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"folder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder"},"also_in_filings":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Also In Filings"}},"type":"object","required":["document_id","score","source_type","snippet"],"title":"SearchHit","description":"A single search result with snippet.\n\nA long SEC section (an MD&A, a commitments note) is indexed in parts, each\na document of its own: `part` of `part_count`, `parent_document_id`\nshared by the section's parts, `next_document_id` to read on.\n\nOn a grouped search, `also_in_filings` counts the other filings of the\nsame filer whose same section (and part) matched and were folded into\nthis hit."},"SearchRequest":{"properties":{"query":{"type":"string","maxLength":500,"minLength":1,"title":"Query","description":"Search query"},"entity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity","description":"Filter by CIK (exactly one filer), ticker, or entity name. A name, or a ticker that is also a word, is a loose word match that can include other filers"},"form_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form Type","description":"Filter by SEC form type (10-K, 10-Q)"},"section":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section","description":"Filter by section ID: an Item (item_1, item_1a, item_7, ...) or, for iXBRL disclosures, the element qname (us-gaap:GoodwillDisclosureTextBlock)"},"element":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Element","description":"Filter by XBRL element qname (e.g., us-gaap:Goodwill)"},"source_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Type","description":"Filter by source type (xbrl_textblock, narrative_section, ixbrl_disclosure, uploaded_doc, connection_doc)"},"fiscal_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fiscal Year","description":"Filter by fiscal year"},"date_from":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"Date From","description":"Filter filings on or after date (YYYY-MM-DD)"},"date_to":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"Date To","description":"Filter filings on or before date (YYYY-MM-DD)"},"semantic":{"type":"boolean","title":"Semantic","description":"Enable hybrid semantic search (BM25 + KNN). Default is BM25-only for speed.","default":false},"group":{"type":"boolean","title":"Group","description":"Fold hits from successive filings of the same filer and section into the best-ranked one; also_in_filings counts the others. Ignored when entity is set, where a filer's filing history is the point. A grouped page is drawn from the first 100 hits.","default":false},"size":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Size","description":"Max results to return","default":10},"offset":{"type":"integer","minimum":0.0,"title":"Offset","description":"Pagination offset","default":0},"snippet_chars":{"anyOf":[{"type":"integer","maximum":1500.0,"minimum":80.0},{"type":"null"}],"title":"Snippet Chars","description":"Approximate snippet budget per hit in characters; the default is three highlight fragments of about 200"}},"type":"object","required":["query"],"title":"SearchRequest","description":"Request model for document search."},"SearchResponse":{"properties":{"total":{"type":"integer","title":"Total","description":"Matching documents before any grouping, as OpenSearch counts them (it stops counting at 10,000). Not the number of distinct results a grouped search can page through."},"hits":{"items":{"$ref":"#/components/schemas/SearchHit"},"type":"array","title":"Hits"},"query":{"type":"string","title":"Query"},"graph_id":{"type":"string","title":"Graph Id"}},"type":"object","required":["total","hits","query","graph_id"],"title":"SearchResponse","description":"Response model for document search."},"SearchTextRequest":{"properties":{"ticker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ticker","description":"Company ticker. On shared-repository graphs (SEC) it resolves the latest matching filing when report_id is not given; ignored on tenant graphs."},"report_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Id","description":"Specific report identifier. Required on tenant graphs; on SEC, optional when ticker is given."},"fiscal_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fiscal Year","description":"Narrow auto-resolution to this fiscal year focus"},"period_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Type","description":"Which forms auto-resolution considers: annual (10-K / 20-F / 40-F, the default) or quarterly (10-Q as well)"},"accession":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accession","description":"SEC only, with ticker: one filing by accession number — a report, or an 8-K from resolved_report.recent_releases"},"form":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form","description":"SEC only, with ticker: '8-K' reads the latest earnings release, or with fiscal_year the latest filed in that calendar year"},"query":{"type":"string","maxLength":500,"minLength":1,"title":"Query","description":"Words matched in order across any spacing, case-insensitive; `|` between alternative phrases, a trailing `*` for a stem. Not a regular expression."},"window":{"anyOf":[{"type":"integer","maximum":1500.0,"minimum":40.0},{"type":"null"}],"title":"Window","description":"Characters of context around each match (default 300)"},"max_hits":{"anyOf":[{"type":"integer","maximum":25.0,"minimum":1.0},{"type":"null"}],"title":"Max Hits","description":"Matches to return (default 10)"}},"type":"object","required":["query"],"title":"SearchTextRequest","description":"Request for the search-text view op — words inside one filing."},"SearchTextResponse":{"properties":{"graph_id":{"type":"string","title":"Graph Id"},"report_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Id"},"accession":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accession"},"resolved_report":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Resolved Report"},"query":{"type":"string","title":"Query"},"total":{"type":"integer","title":"Total"},"hits":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Hits"},"text_chars":{"type":"integer","title":"Text Chars"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"sections":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Sections"},"sections_omitted":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sections Omitted"},"terms":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Terms"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"additionalProperties":true,"type":"object","required":["graph_id","query","total","text_chars"],"title":"SearchTextResponse","description":"The search-text view op's result: matches in document order."},"SecurityLite":{"properties":{"id":{"type":"string","title":"Id","description":"Security ID (`sec_*` ULID)."},"name":{"type":"string","title":"Name","description":"Display name of the security."},"security_type":{"type":"string","title":"Security Type","description":"Instrument family (e.g. `common_stock`, `preferred_stock`, `warrant`)."},"security_subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Security Subtype","description":"Optional subtype refinement (e.g. `class_a`)."},"is_active":{"type":"boolean","title":"Is Active","description":"`true` when the security is in active status."},"issuer":{"anyOf":[{"$ref":"#/components/schemas/EntityLite"},{"type":"null"}],"description":"Embedded issuer entity, when one is linked. `null` for pre-issuer securities."},"source_graph_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Graph Id","description":"Tenant graph the security is pre-associated to, if any."}},"type":"object","required":["id","name","security_type","is_active"],"title":"SecurityLite","description":"Lightweight security projection for embedding in position\nenvelopes. Skips `terms`, `outstanding_shares`, etc. — fetch the\nfull `SecurityResponse` when those are needed."},"SecurityResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Security ID (`sec_*` ULID)."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"ID of the issuing entity, when set."},"entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Name","description":"Cached display name of the issuing entity, denormalized for list rendering. May lag the entity row's current name briefly."},"source_graph_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Graph Id","description":"Tenant graph this security is pre-associated to, when the issuer entity hasn't been promoted yet."},"name":{"type":"string","title":"Name","description":"Display name of the security."},"security_type":{"type":"string","title":"Security Type","description":"Instrument family (e.g. `common_stock`, `preferred_stock`, `warrant`, `convertible_note`)."},"security_subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Security Subtype","description":"Optional subtype refinement (e.g. `class_a`, `series_a`)."},"terms":{"additionalProperties":true,"type":"object","title":"Terms","description":"Instrument-specific terms blob. Shape depends on `security_type` — see `CreateSecurityRequest.terms` for common keys."},"is_active":{"type":"boolean","title":"Is Active","description":"`true` when the security is in active status; `false` after a soft-delete or deactivation."},"authorized_shares":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Authorized Shares","description":"Total shares authorized for this class, when set."},"outstanding_shares":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Outstanding Shares","description":"Shares currently issued and outstanding."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Row creation timestamp (UTC)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Last-modified timestamp (UTC)."}},"type":"object","required":["id","name","security_type","terms","is_active","created_at","updated_at"],"title":"SecurityResponse","description":"Read projection for a single security."},"SelectionCriteria":{"properties":{"min_confidence":{"type":"number","title":"Min Confidence","description":"Minimum confidence score","default":0.3},"required_capabilities":{"items":{"type":"string"},"type":"array","title":"Required Capabilities","description":"Required operator capabilities"},"preferred_mode":{"anyOf":[{"$ref":"#/components/schemas/OperatorMode"},{"type":"null"}],"description":"Preferred execution mode"},"max_response_time":{"type":"number","title":"Max Response Time","description":"Maximum response time in seconds","default":60.0},"excluded_operators":{"items":{"type":"string"},"type":"array","title":"Excluded Operators","description":"Operators to exclude from selection"}},"type":"object","title":"SelectionCriteria","description":"Criteria for operator selection."},"ServiceOfferingSummary":{"properties":{"total_graph_tiers":{"type":"integer","title":"Total Graph Tiers","description":"Total number of graph tiers"},"total_repositories":{"type":"integer","title":"Total Repositories","description":"Total number of repositories"},"enabled_repositories":{"type":"integer","title":"Enabled Repositories","description":"Number of enabled repositories"},"coming_soon_repositories":{"type":"integer","title":"Coming Soon Repositories","description":"Number of coming soon repositories"}},"type":"object","required":["total_graph_tiers","total_repositories","enabled_repositories","coming_soon_repositories"],"title":"ServiceOfferingSummary","description":"Summary of service offerings."},"ServiceOfferingsResponse":{"properties":{"billing_enabled":{"type":"boolean","title":"Billing Enabled","description":"Whether billing and payments are enabled"},"graph_subscriptions":{"$ref":"#/components/schemas/GraphSubscriptions","description":"Graph subscription offerings"},"repository_subscriptions":{"$ref":"#/components/schemas/RepositorySubscriptions","description":"Repository subscription offerings"},"operation_costs":{"$ref":"#/components/schemas/OperationCosts","description":"Operation cost information"},"summary":{"$ref":"#/components/schemas/ServiceOfferingSummary","description":"Summary information"}},"type":"object","required":["billing_enabled","graph_subscriptions","repository_subscriptions","operation_costs","summary"],"title":"ServiceOfferingsResponse","description":"Complete service offerings response."},"SetCloseTargetOperation":{"properties":{"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity whose books this acts on, by id. Omit for the group parent — the single-entity default."},"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","title":"Period","description":"Target period in YYYY-MM format. Must be > current `closed_through`."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Free-form note attached to the audit event"}},"type":"object","required":["period"],"title":"SetCloseTargetOperation","examples":[{"period":"2026-03"},{"note":"Year-end target — accelerated close required.","period":"2026-12"}]},"SetReconciliationPolicyRequest":{"properties":{"structure_id":{"type":"string","title":"Structure Id","description":"The reconciliation block."},"required_for_close":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Required For Close","description":"Whether the period's close waits on it. Omit to keep."},"materiality":{"anyOf":[{"type":"number","maximum":10000000000000.0,"minimum":0.0},{"type":"null"}],"title":"Materiality","description":"A difference up to this amount still counts as reconciled. Omit to keep."},"review_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Review Required","description":"Whether the close also waits for a sign-off, not just for the two sides to reconcile. Omit to keep."},"separate_reviewer":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Separate Reviewer","description":"Whether the person who signs off must be someone other than the person who ran the comparison. It can only be turned on when the graph has at least two members who can write. Omit to keep."},"statement_cycle":{"anyOf":[{"type":"string","enum":["monthly","quarterly","annual"]},{"type":"null"}],"title":"Statement Cycle","description":"`statement` blocks only: how often the account's statement is issued. A period is covered by the latest statement ending within the cycle that ends with it, so a quarterly statement covers the two months before the next one. Omit to keep."}},"type":"object","required":["structure_id"],"title":"SetReconciliationPolicyRequest","description":"Change how much the close cares about one reconciliation."},"SetSelectedGraphRequest":{"properties":{"graph_id":{"type":"string","minLength":1,"title":"Graph Id","description":"The graph the apps open on the caller's next load","examples":["kg1a2b3c4d5"]}},"type":"object","required":["graph_id"],"title":"SetSelectedGraphRequest","description":"Request model for setting the user's selected graph."},"SetWritePolicyRequest":{"properties":{"write_policy":{"type":"string","enum":["qb_authoritative","shadow"],"title":"Write Policy","description":"'qb_authoritative' = QuickBooks authoritative, entries publish to QB; 'shadow' = QuickBooks authoritative and RoboSystems only observes: nothing is written to QuickBooks, the close posts nothing locally, its drafts become shadowed expectations and its gates are findings. 'native', books kept in RoboSystems with no write-back, is what disconnecting or severing leaves, not a choice for a live connection."}},"type":"object","required":["write_policy"],"title":"SetWritePolicyRequest","description":"Request to set a connection's source-of-truth write policy.\n\nThe explicit operator opt-in for outbound write-back. `hybrid` is omitted\nuntil its code path ships."},"ShareReportOperation":{"properties":{"publish_list_id":{"type":"string","title":"Publish List Id","description":"Publish list whose members will receive the report. Created via `create-publish-list`."},"report_id":{"type":"string","title":"Report Id","description":"The published Report to share."}},"type":"object","required":["publish_list_id","report_id"],"title":"ShareReportOperation","description":"Share a published Report to every member of a publish list.","examples":[{"publish_list_id":"pl_01HVF8T0M2YTAY3BBNRH0V0","report_id":"rpt_01HVF8T0M2YTAY3BBNRH0V0"}]},"ShareReportResponse":{"properties":{"report_id":{"type":"string","title":"Report Id","description":"The report that was shared."},"results":{"items":{"$ref":"#/components/schemas/ShareResultItem"},"type":"array","title":"Results","description":"Per-recipient outcomes. Inspect to find partial failures — the share operation does not fail-fast across targets."}},"type":"object","required":["report_id","results"],"title":"ShareReportResponse","description":"Result of sharing a report to a publish list — one row per target."},"ShareResultItem":{"properties":{"target_graph_id":{"type":"string","title":"Target Graph Id","description":"Recipient graph ID (a publish-list member)."},"status":{"type":"string","title":"Status","description":"`shared` when the copy succeeded; `error` when this target failed (other targets may still have succeeded)."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message when `status='error'`, else null."},"fact_count":{"type":"integer","title":"Fact Count","description":"Number of facts copied into the target on success.","default":0}},"type":"object","required":["target_graph_id","status"],"title":"ShareResultItem","description":"Per-target outcome of a `share-report` call."},"SignOffReconciliationRequest":{"properties":{"structure_id":{"type":"string","title":"Structure Id","description":"The reconciliation block."},"period":{"type":"string","title":"Period","description":"The period signed off, as YYYY-MM.","examples":["2026-08"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"What the reviewer looked at, kept on the sign-off."}},"type":"object","required":["structure_id","period"],"title":"SignOffReconciliationRequest","description":"Sign off a reconciliation for a period as its reviewer."},"SkippedForecastLite":{"properties":{"rule_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Id"},"element_qname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Element Qname"},"period":{"type":"string","title":"Period","description":"Month key (`YYYY-MM`) of the skip."},"reason":{"type":"string","title":"Reason"},"missing":{"items":{"type":"string"},"type":"array","title":"Missing"}},"type":"object","required":["period","reason"],"title":"SkippedForecastLite","description":"One rule/month soft-skip in a `compute-forecast` response.\n\nA skipped rule never aborts the walk — its target falls back to the\ncarry-forward value for that month (when a prior value exists)."},"SkippedMetricLite":{"properties":{"rule_id":{"type":"string","title":"Rule Id","description":"Derive rule that was skipped."},"element_qname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Element Qname","description":"Metric element qname the rule targets."},"reason":{"type":"string","title":"Reason","description":"Why the metric was skipped."},"missing":{"items":{"type":"string"},"type":"array","title":"Missing","description":"Operand qnames with no bound fact at the period, when applicable."}},"type":"object","required":["rule_id","reason"],"title":"SkippedMetricLite","description":"One metric a `compute-metrics` run could not compute.\n\nSoft-fail by design: a missing operand fact (e.g. InterestExpense for a\ndebt-free entity) or an undefined ratio (division by zero) skips the\nmetric with a reason — it never errors the run."},"SqlStatementRequest":{"properties":{"sql":{"type":"string","title":"Sql","description":"SQL query over the graph's columnar tables (DuckDB) — a relational lens on the same graph-centric data, often ahead of the materialized graph. Use ? placeholders or $param_name for dynamic values to prevent SQL injection.","examples":["SELECT * FROM Entity WHERE entity_type = ? LIMIT ?","SELECT COUNT(*) FROM Transaction WHERE amount > ? AND date >= ?","SELECT * FROM Entity WHERE industry = $industry LIMIT $limit","SELECT * FROM Entity LIMIT 10"]},"parameters":{"anyOf":[{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Parameters","description":"Query parameters for safe value substitution. ALWAYS use parameters instead of string concatenation. Pass a list for positional placeholders (`?` or `$1`) and an object for named ones (`$param_name`) — the two forms cannot be mixed in one statement.","examples":[["Company",100],[1000,"2024-01-01"],{"industry":"Technology","limit":10},null]}},"additionalProperties":false,"type":"object","required":["sql"],"title":"SqlStatementRequest","examples":[{"parameters":["Company",100],"sql":"SELECT * FROM Entity WHERE entity_type = ? LIMIT ?"},{"parameters":[1000,"2024-01-01"],"sql":"SELECT COUNT(*) FROM Transaction WHERE amount > ? AND date >= ?"},{"sql":"SELECT * FROM Entity LIMIT 10"}]},"SqlStatementResponse":{"properties":{"columns":{"items":{"type":"string"},"type":"array","title":"Columns","description":"Column names"},"rows":{"items":{"items":{},"type":"array"},"type":"array","title":"Rows","description":"Query results"},"row_count":{"type":"integer","title":"Row Count","description":"Number of rows returned"},"execution_time_ms":{"type":"number","title":"Execution Time Ms","description":"Query execution time"}},"type":"object","required":["columns","rows","row_count","execution_time_ms"],"title":"SqlStatementResponse"},"StatementMechanics":{"properties":{"kind":{"type":"string","const":"statement_renderer","title":"Kind","default":"statement_renderer"},"template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Id","description":"Pinned template id — when set, the renderer uses that template's layout instead of the block's default. The templates table is not yet implemented; the column is reserved so tenant writes can stamp it without another migration round-trip when it lands."},"rollup_root_element_ids":{"items":{"type":"string"},"type":"array","title":"Rollup Root Element Ids","description":"Element ids that anchor the statement's roll-up roots (e.g. the Assets and LiabilitiesAndEquity totals on a Balance Sheet). Empty on library-seeded rows until tenant adoption."},"period_comparisons":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Period Comparisons","description":"Number of period columns to render in comparative mode: 1 = single-period, 2 = prior-period comparison, 3-4 = multi-year trailing view. Defaults to single-period; overridden by the template when one is attached.","default":1}},"type":"object","title":"StatementMechanics","description":"Renderer mechanics for the statement family of block types.\n\nCovers `balance_sheet`, `income_statement`, `cash_flow_statement`,\nand `equity_statement`. All fields are optional so library-seeded\nrows that haven't been enriched yet still validate against an empty\ntagged body. The existing `statement(...)` GraphQL field continues\nto serve rendered output; this mechanics model is the source of truth\nfor future renderer configuration."},"StorageItem":{"properties":{"type":{"type":"string","title":"Type","description":"One of: graph, memory, subgraph, vectors, staging, transient (blue-green build artifact), orphan (a `{parent}_*` database, vector index, or staging file with no row in the graph registry — leftover of a deleted subgraph). Transient and orphan items are collected by the platform's daily storage-reclaim job."},"id":{"type":"string","title":"Id","description":"Database or index identifier"},"bytes":{"type":"integer","title":"Bytes","description":"Size in bytes"}},"type":"object","required":["type","id","bytes"],"title":"StorageItem","description":"One itemized piece of a graph's on-disk footprint."},"StorageLimits":{"properties":{"current_usage_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Usage Gb","description":"Current storage usage in GB"},"max_storage_gb":{"type":"number","title":"Max Storage Gb","description":"Maximum storage limit in GB"},"approaching_limit":{"type":"boolean","title":"Approaching Limit","description":"Whether approaching storage limit (>80%)"}},"type":"object","required":["max_storage_gb","approaching_limit"],"title":"StorageLimits","description":"Storage limits information."},"StorageSummary":{"properties":{"graph_tier":{"type":"string","title":"Graph Tier","description":"Subscription tier"},"avg_storage_gb":{"type":"number","title":"Avg Storage Gb","description":"Time-weighted average storage in GB over the period"},"max_storage_gb":{"type":"number","title":"Max Storage Gb","description":"Peak storage in GB"},"min_storage_gb":{"type":"number","title":"Min Storage Gb","description":"Minimum storage in GB"},"measurement_count":{"type":"integer","title":"Measurement Count","description":"Number of measurements taken"}},"type":"object","required":["graph_tier","avg_storage_gb","max_storage_gb","min_storage_gb","measurement_count"],"title":"StorageSummary","description":"Storage usage summary."},"StructureSummary":{"properties":{"id":{"type":"string","title":"Id","description":"Structure identifier."},"name":{"type":"string","title":"Name","description":"Human-readable structure name."},"block_type":{"type":"string","title":"Block Type","description":"Structure category: `balance_sheet`, `income_statement`, `cash_flow_statement`, `equity_statement`, `schedule`."}},"type":"object","required":["id","name","block_type"],"title":"StructureSummary","description":"A structure available within this report's taxonomy.\n\nEach structure is a renderable section (Balance Sheet, Income\nStatement, Cash Flow Statement, Equity, or a Schedule). The Report\nrow owns the facts; structures are the lenses that project them."},"StructureUpdatePatch":{"properties":{"structure_id":{"type":"string","title":"Structure Id","description":"Structure id to update."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"role_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Uri"},"concept_arrangement":{"anyOf":[{"type":"string","enum":["set","roll_up","roll_forward","roll_forward_info","adjustment","variance","arithmetic","text_block","level1_textblock","level2_textblock","level3_textblock","level4_detail","table_equivalent_textblock","grid","compound_fact"]},{"type":"null"}],"title":"Concept Arrangement"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["structure_id"],"title":"StructureUpdatePatch","description":"Partial-update patch for a single structure, keyed by structure_id.\n\n`concept_arrangement` makes a mis-CAP'd structure repairable in\nplace (e.g. promoting a `set` note to `roll_up` so it gains a\nfooting rule); `block_type` stays immutable — it drives block-type\nrouting, so changing it is a re-create, not an edit."},"SubgraphLimits":{"properties":{"current_count":{"type":"integer","minimum":0.0,"title":"Current Count","description":"Subgraphs currently provisioned under this graph"},"max_allowed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Allowed","description":"Maximum subgraphs for this tier (null when uncapped)"},"remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining","description":"Subgraphs that can still be created (null when uncapped)"},"approaching_limit":{"type":"boolean","title":"Approaching Limit","description":"Whether approaching subgraph limit (>80%)"}},"type":"object","required":["current_count","approaching_limit"],"title":"SubgraphLimits","description":"Subgraph count against the parent graph tier's cap.\n\nSubgraphs are refused at the tier cap regardless of how small they are,\nso this is a count axis independent of the storage one — `instance`\nalready itemizes their footprint."},"SubgraphResponse":{"properties":{"graph_id":{"type":"string","title":"Graph Id","description":"Full subgraph identifier (e.g., kg123_dev)","examples":["kg5f2e5e0da65d45d69645_dev"]},"parent_graph_id":{"type":"string","title":"Parent Graph Id","description":"Parent graph identifier","examples":["kg5f2e5e0da65d45d69645"]},"subgraph_index":{"type":"integer","title":"Subgraph Index","description":"Numeric index of the subgraph","examples":[1,2,3]},"subgraph_name":{"type":"string","title":"Subgraph Name","description":"Alphanumeric name of the subgraph","examples":["dev","staging","prod"]},"display_name":{"type":"string","title":"Display Name","description":"Human-readable display name","examples":["Development Environment"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the subgraph's purpose"},"subgraph_type":{"$ref":"#/components/schemas/SubgraphType","description":"Type of subgraph"},"status":{"type":"string","title":"Status","description":"Current status of the subgraph","examples":["active","creating","deleting","failed"]},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the subgraph was created"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the subgraph was last updated"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes","description":"On-disk footprint in bytes — the database, its write-ahead log, and its vector index. Prefer this over size_mb at subgraph scale."},"size_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Size Mb","description":"Size of the subgraph database in megabytes"},"node_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Node Count","description":"Number of nodes in the subgraph"},"edge_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Edge Count","description":"Number of edges in the subgraph"},"last_accessed":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Accessed","description":"When the subgraph was last accessed"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata for the subgraph"}},"type":"object","required":["graph_id","parent_graph_id","subgraph_index","subgraph_name","display_name","subgraph_type","status","created_at","updated_at"],"title":"SubgraphResponse","description":"Response model for a subgraph."},"SubgraphSummary":{"properties":{"graph_id":{"type":"string","title":"Graph Id","description":"Full subgraph identifier","examples":["kg5f2e5e0da65d45d69645_dev"]},"subgraph_name":{"type":"string","title":"Subgraph Name","description":"Alphanumeric name","examples":["dev"]},"display_name":{"type":"string","title":"Display Name","description":"Human-readable name","examples":["Development Environment"]},"subgraph_type":{"$ref":"#/components/schemas/SubgraphType","description":"Type of subgraph"},"status":{"type":"string","title":"Status","description":"Current status","examples":["active"]},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes","description":"On-disk footprint in bytes — the database, its write-ahead log, and its vector index. Prefer this over size_mb at subgraph scale."},"size_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Size Mb","description":"Same footprint in megabytes. Derived from size_bytes; kept for callers that render MB directly."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp"},"last_accessed":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Accessed","description":"Last access timestamp"}},"type":"object","required":["graph_id","subgraph_name","display_name","subgraph_type","status","created_at"],"title":"SubgraphSummary","description":"Summary model for listing subgraphs."},"SubgraphType":{"type":"string","enum":["static","knowledge","empty"],"title":"SubgraphType","description":"Types of subgraphs."},"SuccessResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Indicates the operation completed successfully","default":true},"message":{"type":"string","title":"Message","description":"Human-readable success message","examples":["Operation completed successfully"]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data","description":"Optional additional data related to the operation"}},"type":"object","required":["message"],"title":"SuccessResponse","description":"Standard success response for operations without specific return data.","example":{"data":{"deleted_count":1},"message":"Resource deleted successfully","success":true}},"SyncConnectionRequest":{"properties":{"full_rebuild":{"type":"boolean","title":"Full Rebuild","description":"Pull complete history from the provider, ignoring lookback window. Takes precedence over since_date.","default":false},"since_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Since Date","description":"Sync data from this date forward (ISO 8601). Ignored if full_rebuild=True. If neither set, provider default applies (e.g., QuickBooks: 60 days)."},"sync_options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sync Options","description":"Provider-specific sync options (escape hatch for fields not exposed at the top level)."}},"type":"object","title":"SyncConnectionRequest","description":"Request to sync a connection."},"TableInfo":{"properties":{"table_name":{"type":"string","title":"Table Name","description":"Table name"},"row_count":{"type":"integer","title":"Row Count","description":"Approximate row count"},"file_count":{"type":"integer","title":"File Count","description":"Number of files","default":0},"total_size_bytes":{"type":"integer","title":"Total Size Bytes","description":"Total size in bytes","default":0},"s3_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Location","description":"S3 location for external tables"}},"type":"object","required":["table_name","row_count"],"title":"TableInfo"},"TableListResponse":{"properties":{"tables":{"items":{"$ref":"#/components/schemas/TableInfo"},"type":"array","title":"Tables","description":"List of tables"},"total_count":{"type":"integer","title":"Total Count","description":"Total number of tables"}},"type":"object","required":["tables","total_count"],"title":"TableListResponse"},"TaxonomyBlockAssociation":{"properties":{"id":{"type":"string","title":"Id"},"structure_id":{"type":"string","title":"Structure Id"},"from_element_qname":{"type":"string","title":"From Element Qname"},"to_element_qname":{"type":"string","title":"To Element Qname"},"association_type":{"type":"string","title":"Association Type"},"order_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Order Value"},"arcrole":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arcrole"},"weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight"}},"type":"object","required":["id","structure_id","from_element_qname","to_element_qname","association_type"],"title":"TaxonomyBlockAssociation","description":"Association projection for the Taxonomy Block envelope."},"TaxonomyBlockAssociationRequest":{"properties":{"structure_ref":{"type":"string","title":"Structure Ref","description":"Envelope-local structure name (references a structure declared in the same envelope)."},"from_ref":{"type":"string","title":"From Ref","description":"qname of the source element."},"to_ref":{"type":"string","title":"To Ref","description":"qname of the target element."},"association_type":{"type":"string","enum":["presentation","calculation","mapping","equivalence","general-special","essence-alias"],"title":"Association Type","description":"DB `associations.association_type` enum. `presentation` = parent-child hierarchy; `calculation` = summation arc."},"order_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Order Value"},"arcrole":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arcrole"},"weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight","description":"Calculation-arc coefficient (+1 / -1 for summation, other values for weighted rollups). Null for non-calculation arcs."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["structure_ref","from_ref","to_ref","association_type"],"title":"TaxonomyBlockAssociationRequest","description":"Association (arc) between two elements, scoped to a structure."},"TaxonomyBlockElement":{"properties":{"id":{"type":"string","title":"Id"},"qname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qname"},"name":{"type":"string","title":"Name"},"trait":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trait"},"balance_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Balance Type"},"period_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Type"},"element_type":{"type":"string","title":"Element Type","default":"concept"},"is_monetary":{"type":"boolean","title":"Is Monetary","default":true},"parent_qname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Qname"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"},"origin":{"type":"string","enum":["library","tenant"],"title":"Origin","description":"Provenance — 'library' if the element's taxonomy is locked (`is_locked=true`), else 'tenant'."}},"type":"object","required":["id","name","origin"],"title":"TaxonomyBlockElement","description":"Element projection for the Taxonomy Block envelope."},"TaxonomyBlockElementRequest":{"properties":{"qname":{"type":"string","title":"Qname","description":"Envelope-local element identifier. Must be unique within the envelope's `elements` list. Used as the reference token for associations, rules, and update patches."},"name":{"type":"string","title":"Name","description":"Human-readable element name (e.g. 'Total Assets')."},"trait":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trait","description":"FASB metamodel trait for the element. Required for `chart_of_accounts` blocks; optional for `custom_ontology`."},"balance_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Balance Type","description":"'debit' | 'credit' | null for non-monetary concepts."},"element_type":{"type":"string","title":"Element Type","description":"'concept' | 'abstract' | 'axis' | 'member' | 'hypercube'.","default":"concept"},"period_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Type","description":"'instant' | 'duration' | null (null = derive from classification during validation)."},"is_monetary":{"type":"boolean","title":"Is Monetary","description":"True for dollar-denominated concepts.","default":true},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Optional chart-of-accounts code (e.g. '1000', '4100-02'). Only meaningful for `chart_of_accounts` blocks."},"sub_classification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Classification"},"parent_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Ref","description":"qname of the parent element — either another envelope-local qname or, for `reporting_extension` blocks, a library element qname."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["qname","name"],"title":"TaxonomyBlockElementRequest","description":"Element definition inside a Taxonomy Block envelope.\n\n`qname` is the envelope-local identifier — must be unique within the\nenvelope's `elements` list and is used by association / rule / patch\npayloads as the reference token. `parent_ref` may reference another\nenvelope-local qname or, for `reporting_extension` blocks, a library\nelement qname."},"TaxonomyBlockEnvelope":{"properties":{"id":{"type":"string","title":"Id","description":"Taxonomy row id."},"name":{"type":"string","title":"Name"},"taxonomy_type":{"type":"string","title":"Taxonomy Type","description":"Block-type discriminator — 'reporting_standard' | 'reporting_extension' | 'chart_of_accounts' | 'custom_ontology'."},"display_name":{"type":"string","title":"Display Name","description":"Registry-sourced display label."},"category":{"type":"string","title":"Category","description":"Registry-sourced sidebar grouping."},"parent_taxonomy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Taxonomy Id"},"parent_taxonomy_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Taxonomy Name"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"standard":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Standard"},"namespace_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Namespace Uri"},"is_locked":{"type":"boolean","title":"Is Locked","default":false},"elements":{"items":{"$ref":"#/components/schemas/TaxonomyBlockElement"},"type":"array","title":"Elements"},"structures":{"items":{"$ref":"#/components/schemas/TaxonomyBlockStructure"},"type":"array","title":"Structures"},"associations":{"items":{"$ref":"#/components/schemas/TaxonomyBlockAssociation"},"type":"array","title":"Associations"},"rules":{"items":{"$ref":"#/components/schemas/TaxonomyBlockRule"},"type":"array","title":"Rules"},"verification_results":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Verification Results"},"element_count":{"type":"integer","title":"Element Count","default":0},"structure_count":{"type":"integer","title":"Structure Count","default":0},"association_count":{"type":"integer","title":"Association Count","default":0}},"type":"object","required":["id","name","taxonomy_type","display_name","category"],"title":"TaxonomyBlockEnvelope","description":"The Taxonomy Block exchange format.\n\nOne envelope per taxonomy instance. Carries identity + type,\nregistry-sourced display metadata, the parent taxonomy pointer (for\n`reporting_extension` blocks), and bundled atoms (elements,\nstructures, associations, rules, verification results)."},"TaxonomyBlockRule":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"rule_category":{"type":"string","title":"Rule Category"},"rule_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Pattern"},"rule_check_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Check Kind"},"rule_expression":{"type":"string","title":"Rule Expression"},"severity":{"type":"string","title":"Severity","default":"error"},"origin":{"type":"string","title":"Origin","description":"'forked' | 'native' | 'auto' — matches DB CHECK.","default":"native"},"target_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Kind"},"target_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Ref","description":"Polymorphic display string — structure_id, element qname, association_id, or taxonomy_id depending on `target_kind`."}},"type":"object","required":["id","name","rule_category","rule_expression"],"title":"TaxonomyBlockRule","description":"Rule projection for the Taxonomy Block envelope.\n\nExactly one of `rule_pattern` (arithmetic) or `rule_check_kind`\n(model-structure) is non-null per row, enforced by the\n`check_rule_pattern_kind_xor` DB constraint."},"TaxonomyBlockRuleRequest":{"properties":{"name":{"type":"string","title":"Name","description":"Rule identifier, unique within envelope."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"rule_category":{"type":"string","enum":["AutomatedAccountingAndReportingChecks","DisclosureMechanicsRule","FundamentalAccountingConceptRelation","PeerConsistencyRule","PriorPeriodConsistencyRule","ReportLevelModelStructureRule","ReportingSystemSpecificRule","ToDoManualTask","XBRLTechnicalSyntaxRule"],"title":"Rule Category","description":"One of 8 cm:VerificationRule subclasses."},"rule_pattern":{"type":"string","enum":["Adjustment","CoExists","Derive","EqualTo","Exists","GreaterThan","GreaterThanOrEqualToZero","LessThan","RollForward","RollUp","SumEquals","Variance"],"title":"Rule Pattern","description":"One of the cm:BusinessRulePattern mechanisms. 'Derive' rules COMPUTE a value from bound operand facts (compute-metrics) rather than verify one — the tenant-authored-metric pattern."},"expression":{"type":"string","title":"Expression","description":"XPath-flavored predicate body (the rule expression)."},"variables":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Variables","description":"`$Variable` → qname bindings. Each entry is `{'variable_name': str, 'variable_qname': str}`."},"severity":{"type":"string","enum":["info","warning","error"],"title":"Severity","default":"error"},"target_structure_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Structure Ref","description":"Envelope-local structure name this rule targets (for structure-scoped rules). Mutually exclusive with the other target_* fields."},"target_element_qname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Element Qname","description":"qname of the element this rule targets. Mutually exclusive with the other target_* fields."},"target_taxonomy_self":{"type":"boolean","title":"Target Taxonomy Self","description":"True iff the rule targets the envelope's own taxonomy row (`target_kind='taxonomy'`). Mutually exclusive with the other target_* fields.","default":false},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["name","rule_category","rule_pattern","expression"],"title":"TaxonomyBlockRuleRequest","description":"Rule definition inside a Taxonomy Block envelope.\n\nExactly one of `target_structure_ref`, `target_element_qname`, or\n`target_taxonomy_self` must be set (or all null for a global rule).\nThe `model_validator` enforces this contract at the Pydantic layer.\n\nOnly **arithmetic** rule patterns are user-creatable via this API\n(the `rule_pattern` Literal below). The 6 model-structure check\nkinds (`NoCycles`, `NoOrphanArcs`, `ParentBeforeChild`,\n`LeafHasClassification`, `LibraryOriginImmutability`,\n`UniqueQNameInTaxonomy`) are system-managed — they're auto-emitted\nby :func:`emit_auto_rules` at taxonomy-block creation time and\npopulate `rules.rule_check_kind` instead of `rule_pattern`."},"TaxonomyBlockStructure":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"block_type":{"type":"string","title":"Block Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"role_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Uri"},"target_framework":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Framework","description":"`coa_mapping` only: the framework the mapping maps into."}},"type":"object","required":["id","name","block_type"],"title":"TaxonomyBlockStructure","description":"Structure projection for the Taxonomy Block envelope."},"TaxonomyBlockStructureRequest":{"properties":{"name":{"type":"string","title":"Name","description":"Envelope-local structure name (unique within envelope)."},"block_type":{"type":"string","enum":["chart_of_accounts","custom","balance_sheet","income_statement","cash_flow_statement","equity_statement","coa_mapping","schedule","rollforward","reconciliation","policy","metric","regulatory_disclosure"],"title":"Block Type","description":"DB `structures.block_type` enum. CoA blocks use `chart_of_accounts`; reporting extensions use the statement family, `regulatory_disclosure` (disclosure notes), or `custom`; custom ontology uses `custom`."},"concept_arrangement":{"anyOf":[{"type":"string","enum":["set","roll_up","roll_forward","roll_forward_info","adjustment","variance","arithmetic","text_block","level1_textblock","level2_textblock","level3_textblock","level4_detail","table_equivalent_textblock","grid","compound_fact"]},{"type":"null"}],"title":"Concept Arrangement","description":"Concept Arrangement Pattern (CAP) — how the structure's concepts relate (mirrors the `structures.concept_arrangement` CHECK vocabulary). A disclosure note footing members to a total is `roll_up`. Null leaves the pattern unset."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"role_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Uri"},"target_framework":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Framework","description":"`coa_mapping` only: the framework this mapping maps the chart into, e.g. `rs-gaap`. Omitted means the graph's book framework. A chart holds one mapping per framework."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["name","block_type"],"title":"TaxonomyBlockStructureRequest","description":"Structure definition inside a Taxonomy Block envelope."},"TerminateScheduleRequest":{"properties":{"structure_id":{"type":"string","title":"Structure Id","description":"The schedule structure to terminate."},"new_end_date":{"type":"string","format":"date","title":"New End Date","description":"Last date the schedule covers — must be the last day of a month (schedule facts are whole-month). Facts and obligations for periods starting after this date are removed/voided."},"reason":{"type":"string","minLength":1,"title":"Reason","description":"Why the schedule is ending early — captured in the audit log."}},"type":"object","required":["structure_id","new_end_date","reason"],"title":"TerminateScheduleRequest","description":"End a schedule early at a month-end cutoff — no entry is booked.\n\nThe no-entry half of schedule retirement, for terminations whose GL\neffect is already booked (an asset transferred via a manual journal\nentry, a prepaid refunded in the source system) or where none is\nwanted. In one transaction: deletes forward facts past the cutoff,\nvoids the remaining obligation chain past it (pending and classified\nrows), and rewrites the SumEquals rule to prove the truncated curve.\nHistory at or before the cutoff is untouched.\n\nWhen the derecognition entry still needs to be booked, use\n`create-event-block(event_type='asset_disposed')` instead — the\ndisposal handler posts it atomically with the same obligation void."},"TerminateScheduleResponse":{"properties":{"structure_id":{"type":"string","title":"Structure Id"},"name":{"type":"string","title":"Name"},"new_end_date":{"type":"string","format":"date","title":"New End Date"},"facts_deleted":{"type":"integer","title":"Facts Deleted"},"obligations_voided":{"type":"integer","title":"Obligations Voided"},"rule_updated":{"type":"boolean","title":"Rule Updated"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["structure_id","name","new_end_date","facts_deleted","obligations_voided","rule_updated","reason"],"title":"TerminateScheduleResponse"},"TierCapacity":{"properties":{"tier":{"type":"string","title":"Tier","description":"Tier identifier (e.g. ladybug-standard)"},"display_name":{"type":"string","title":"Display Name","description":"Human-readable tier name"},"status":{"type":"string","title":"Status","description":"Capacity status: ready or at_capacity"},"message":{"type":"string","title":"Message","description":"Human-readable status message for frontend display"}},"type":"object","required":["tier","display_name","status","message"],"title":"TierCapacity","description":"Capacity status for a single tier."},"TokenPricing":{"properties":{"input_per_1k_tokens":{"type":"number","title":"Input Per 1K Tokens","description":"Credits per 1K input tokens"},"output_per_1k_tokens":{"type":"number","title":"Output Per 1K Tokens","description":"Credits per 1K output tokens"}},"type":"object","required":["input_per_1k_tokens","output_per_1k_tokens"],"title":"TokenPricing","description":"AI token pricing for a specific model."},"TransactionPreview":{"properties":{"entry_index":{"type":"integer","title":"Entry Index"},"debit_element_id":{"type":"string","title":"Debit Element Id"},"credit_element_id":{"type":"string","title":"Credit Element Id"},"amount_cents":{"type":"integer","title":"Amount Cents"},"interpolated_debit_amount":{"type":"string","title":"Interpolated Debit Amount"},"interpolated_credit_amount":{"type":"string","title":"Interpolated Credit Amount"}},"type":"object","required":["entry_index","debit_element_id","credit_element_id","amount_cents","interpolated_debit_amount","interpolated_credit_amount"],"title":"TransactionPreview","description":"A planned GL entry line from preview-event-block (no rows written)."},"TransactionSummaryResponse":{"properties":{"operation_type":{"type":"string","title":"Operation Type"},"total_amount":{"type":"number","title":"Total Amount"},"transaction_count":{"type":"integer","title":"Transaction Count"},"average_amount":{"type":"number","title":"Average Amount"},"first_transaction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Transaction"},"last_transaction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Transaction"}},"type":"object","required":["operation_type","total_amount","transaction_count","average_amount"],"title":"TransactionSummaryResponse","description":"Summary of transactions by operation type."},"TransactionTemplate":{"properties":{"transactions":{"items":{"$ref":"#/components/schemas/TransactionTemplateItem"},"type":"array","minItems":1,"title":"Transactions","description":"At least one debit/credit entry pair"}},"type":"object","required":["transactions"],"title":"TransactionTemplate","description":"The handler's output spec — one or more balanced entries to post.\n\nWire shape::\n\n    {\n      \"transactions\": [{\n        \"entry_template\": {\n          \"debit\": {\"element_id\": \"elem_...\", \"amount\": \"{{ event.amount }}\"},\n          \"credit\": {\"element_id\": \"elem_...\", \"amount\": \"{{ event.amount }}\"}\n        }\n      }]\n    }"},"TransactionTemplateEntry":{"properties":{"debit":{"$ref":"#/components/schemas/TransactionTemplateLeg"},"credit":{"$ref":"#/components/schemas/TransactionTemplateLeg"}},"type":"object","required":["debit","credit"],"title":"TransactionTemplateEntry","description":"One balanced entry (debit + credit pair) — the inner shape of entry_template."},"TransactionTemplateItem":{"properties":{"entry_template":{"$ref":"#/components/schemas/TransactionTemplateEntry"}},"type":"object","required":["entry_template"],"title":"TransactionTemplateItem","description":"One item in the transactions list — wraps entry_template to match the DSL shape."},"TransactionTemplateLeg":{"properties":{"element_id":{"type":"string","title":"Element Id","description":"Element ULID (elem_ prefixed) identifying the account to post to"},"amount":{"type":"string","title":"Amount","description":"Amount expression. Supports: '{{ event.amount }}' — raw event amount (cents); '{{ event.amount }} / 2' — half of event amount; '{{ event.metadata.fee_cents }}' — field from event metadata"}},"type":"object","required":["element_id","amount"],"title":"TransactionTemplateLeg","description":"One side of a journal entry leg (debit or credit)."},"TransitionFilingStatusRequest":{"properties":{"report_id":{"type":"string","title":"Report Id","description":"The Report to transition."},"target_status":{"type":"string","title":"Target Status","description":"Target lifecycle state: `under_review` (submit a draft for review), `draft` (send it back), `archived` (take a filed report off the current list; it stays a record) or `filed` (unarchive). Filing a draft goes through `file-report` so audit fields land cleanly."}},"type":"object","required":["report_id","target_status"],"title":"TransitionFilingStatusRequest","description":"Generic filing-status transition — escape hatch for non-file moves.\n\nUsed for `draft ↔ under_review` (submit for review, or send back),\n`filed → archived` (take a filed report off the current list) and\n`archived → filed` (bring it back). Filing a draft goes through\n:class:`FileReportRequest` so `filed_at` / `filed_by` audit fields\nland cleanly.","examples":[{"report_id":"rpt_01HVF8T0M2YTAY3BBNRH0V0","target_status":"under_review"},{"report_id":"rpt_01HVF8T0M2YTAY3BBNRH0V0","target_status":"archived"}]},"UnblockSourceGraphOperation":{"properties":{"source_graph_id":{"type":"string","maxLength":64,"title":"Source Graph Id","description":"Graph ID to unblock."}},"type":"object","required":["source_graph_id"],"title":"UnblockSourceGraphOperation","description":"Lift a block on a source graph.","examples":[{"source_graph_id":"kg1a2b3c4d5e6f7a8b9c"}]},"UpcomingInvoice":{"properties":{"amount_due":{"type":"integer","title":"Amount Due","description":"Estimated amount due in cents"},"currency":{"type":"string","title":"Currency","description":"Currency code"},"period_start":{"type":"string","title":"Period Start","description":"Billing period start"},"period_end":{"type":"string","title":"Period End","description":"Billing period end"},"line_items":{"items":{"$ref":"#/components/schemas/InvoiceLineItem"},"type":"array","title":"Line Items","description":"Estimated line items"},"subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Id","description":"Associated subscription ID"}},"type":"object","required":["amount_due","currency","period_start","period_end","line_items"],"title":"UpcomingInvoice","description":"Upcoming invoice preview."},"UpdateAPIKeyRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name","description":"New name for the API key"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"New description"}},"type":"object","title":"UpdateAPIKeyRequest","description":"Request model for updating an API key."},"UpdateAgentRequest":{"properties":{"agent_id":{"type":"string","title":"Agent Id","description":"The agent to update."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"registration_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration Number"},"duns":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duns"},"lei":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lei"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"Toggle activation. Inactive agents are hidden from new-transaction pickers."},"is_1099_recipient":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is 1099 Recipient"},"classification_element_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classification Element Id","description":"The chart account this counterparty's bank lines are usually classified to, suggested on each new line. An empty string clears it. Its still-open lines are re-suggested at once. Omit to keep."},"classification_mode":{"anyOf":[{"type":"string","enum":["suggest","always_ask"]},{"type":"null"}],"title":"Classification Mode","description":"`suggest` offers the default on each line; `always_ask` offers none, for a counterparty whose lines go to different accounts. Omit to keep."},"metadata_patch":{"additionalProperties":true,"type":"object","title":"Metadata Patch","description":"Deep-merged into agent.metadata. Pass `{}` to leave unchanged. The default classification is set with the fields above, not here."}},"type":"object","required":["agent_id"],"title":"UpdateAgentRequest","description":"Patch an agent. All fields except `agent_id` are optional —\npass only what changes. `metadata_patch` is deep-merged into the\nexisting metadata dict.","examples":[{"agent_id":"agt_01HVF8T0M2YTAY3BBNRH0V0","is_1099_recipient":true,"tax_id":"12-3456789"},{"agent_id":"agt_01HVF8T0M2YTAY3BBNRH0V0","is_active":false}]},"UpdateEntityRequest":{"properties":{"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity to update. Omit to target the group parent — the single-entity default."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"cik":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cik"},"ticker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ticker"},"exchange":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exchange"},"sic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sic"},"sic_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sic Description"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"state_of_incorporation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Of Incorporation"},"fiscal_year_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fiscal Year End","description":"Fiscal year-end as MM-DD (e.g. '12-31', '06-30')."},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"lei":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lei"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1"},"address_city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address City"},"address_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address State"},"address_postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Postal Code"},"address_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Country"},"ownership_pct":{"anyOf":[{"type":"number","maximum":100.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Ownership Pct","description":"The parent's share of this entity, as a percent. Refused on the group parent, which has no owner in the graph."}},"type":"object","title":"UpdateEntityRequest","description":"Update an entity of the graph's reporting group. All fields are\noptional — pass only what changes. Identifiers (CIK, LEI, tax_id) are\ntypically set once at onboarding; address fields are flattened to make\nthem easy to project into reporting forms (1099, state filings).\n\nOmit `entity_id` to target the group parent.","examples":[{"entity_type":"corporation","fiscal_year_end":"12-31","legal_name":"Acme Corporation, Inc.","name":"Acme Corp","state_of_incorporation":"DE","tax_id":"12-3456789"},{"address_city":"Seattle","address_country":"US","address_line1":"100 Main St","address_postal_code":"98101","address_state":"WA"},{"name":"Acme Holdings, LLC"},{"entity_id":"ent_01J9ZK3M4N5P6Q7R8S9T0V1W2X","ownership_pct":80}]},"UpdateEventBlockRequest":{"properties":{"event_id":{"type":"string","title":"Event Id","description":"Target event ID."},"transition_to":{"anyOf":[{"type":"string","enum":["classified","committed","pending","fulfilled","voided","superseded"]},{"type":"null"}],"title":"Transition To","description":"Status transition. Valid moves depend on current status: captured → classified | committed | voided | superseded; classified → committed | pending | fulfilled | voided | superseded; committed → pending | fulfilled | voided | superseded; pending → fulfilled | voided | superseded; fulfilled → voided | superseded. A retraction (voided, superseded) is final and is refused from any status once the event's ledger rows have posted or it has published to QuickBooks — reverse the posted entries instead. captured → classified records an account choice without posting (bank-feed lines: patch classified_element_id, or accept_suggestion: true, in the same call); the later commit fires the handler. Note: classified and fulfilled are otherwise set by handlers, not by callers, but the transition is allowed for corrections."},"superseded_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Superseded By Id","description":"New event id that replaces this one. Required when transition_to='superseded'."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Replacement free-text summary. Unset = unchanged; pass an empty string to clear."},"effective_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective At","description":"New accounting recognition date. Unset = unchanged. Useful when an event was captured against the wrong period."},"metadata_patch":{"additionalProperties":true,"type":"object","title":"Metadata Patch","description":"Key-value pairs merged into existing metadata (additive patch, not replace)."},"event_action":{"anyOf":[{"type":"string","enum":["produce","raise","consume","lower","use","cite","work","deliverService","pickup","dropoff","accept","transferCustody","transferAllRights","transfer","move","modify","combine","separate","copy"]},{"type":"null"}],"title":"Event Action","description":"Set or correct the canonical action verb. Unset = unchanged. Useful when an adapter improvement makes a previously-NULL verb fillable, or when reclassifying after the fact."},"obligated_by_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Obligated By Event Id","description":"Set/update the forward-materialization link."},"discharges_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discharges Event Id","description":"Set/update the settlement link."},"document_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Id","description":"Set or replace the stored document the event rests on; an empty string detaches it. Must be a document on this graph. Unset = unchanged."}},"type":"object","required":["event_id"],"title":"UpdateEventBlockRequest","description":"Status transitions and field corrections for an event block.\n\nAll fields except event_id are optional — only supplied fields are updated.","examples":[{"event_id":"evt_abc123","transition_to":"committed"},{"description":"Reviewed and approved by controller","effective_at":"2026-04-30T23:59:59Z","event_id":"evt_abc123","metadata_patch":{"review_note":"Recognized in April per terms","reviewed_by":"usr_controller_jane"}},{"event_id":"evt_oldwrong","superseded_by_id":"evt_newcorrect","transition_to":"superseded"}]},"UpdateEventHandlerRequest":{"properties":{"event_handler_id":{"type":"string","title":"Event Handler Id","description":"The handler to update."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"New name. Omit to leave unchanged."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"New description."},"event_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Category"},"match_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Source"},"match_agent_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Agent Type"},"match_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Resource Type"},"match_metadata_expression":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Match Metadata Expression"},"transaction_template":{"anyOf":[{"$ref":"#/components/schemas/TransactionTemplate"},{"type":"null"}],"description":"Replacement template. Whole-template replace — no partial patch. Omit to leave unchanged."},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"Toggle activation. False removes the handler from match-time consideration without deleting it."},"approve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Approve","description":"Approval shortcut: True stamps approved_by/approved_at to the current user; False clears both."},"metadata_patch":{"additionalProperties":true,"type":"object","title":"Metadata Patch","description":"Deep-merged into the existing handler.metadata. Pass `{}` to leave metadata unchanged."}},"type":"object","required":["event_handler_id"],"title":"UpdateEventHandlerRequest","description":"Update an existing event handler. All fields except\n`event_handler_id` are optional — pass only what changes.\n\n`transaction_template` is **fully replaced** when supplied (no\npartial template patches). `metadata_patch` does deep-merge into\nthe existing metadata. `approve=true` sets `approved_by` and\n`approved_at`; `approve=false` clears them.","examples":[{"event_handler_id":"evh_01HVF8T0M2YTAY3BBNRH0V0","is_active":false},{"approve":true,"event_handler_id":"evh_01HVF8T0M2YTAY3BBNRH0V0","priority":100}]},"UpdateForecastRequest":{"properties":{"structure_id":{"type":"string","title":"Structure Id","description":"Structure ID of the forecast block."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"scenario_kind":{"anyOf":[{"type":"string","enum":["budget","forecast","projection"]},{"type":"null"}],"title":"Scenario Kind"},"horizon_months":{"anyOf":[{"type":"integer","maximum":36.0,"minimum":1.0},{"type":"null"}],"title":"Horizon Months"},"base_period":{"anyOf":[{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},{"type":"null"}],"title":"Base Period"},"base_anchor":{"anyOf":[{"type":"string","enum":["seam","fixed"]},{"type":"null"}],"title":"Base Anchor","description":"Switch the walk between seam-anchored (default) and pinned to `base_period`. Changes nothing about the authored window, so unlike `base_period` it needs no levers re-supplied."},"levers":{"anyOf":[{"items":{"$ref":"#/components/schemas/LeverAssertionRequest"},"type":"array","minItems":1},{"type":"null"}],"title":"Levers","description":"Full replacement of the lever set when provided."},"line_assertions":{"anyOf":[{"items":{"$ref":"#/components/schemas/LineAssertionRequest"},"type":"array"},{"type":"null"}],"title":"Line Assertions","description":"Full replacement of the line-assertion set when provided. Pass an empty list to clear every assertion."},"line_growth":{"anyOf":[{"items":{"$ref":"#/components/schemas/LineGrowthRequest"},"type":"array"},{"type":"null"}],"title":"Line Growth","description":"Full replacement of the line-growth set when provided. Pass an empty list to clear every growth entry."}},"type":"object","required":["structure_id"],"title":"UpdateForecastRequest","description":"Update a forecast block in place.\n\nMutable: name, scenario_kind, horizon_months, base_period, levers,\nline_assertions. `levers` and `line_assertions` are each a\n**full replace** when provided (partial edits would make the asserted\nset ambiguous); replacing one leaves the other as stored. Updating\ndoes NOT recompute — previously computed scenario months go stale\nuntil the next `compute-forecast` run (the compute-metrics drift\nsemantics)."},"UpdateGraphMemberRoleRequest":{"properties":{"role":{"$ref":"#/components/schemas/GraphRole"}},"type":"object","required":["role"],"title":"UpdateGraphMemberRoleRequest","description":"Request to change a graph member's role."},"UpdateGraphMetadataOp":{"properties":{"graph_name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Graph Name","description":"New display name. Omit to leave unchanged; cannot be cleared."},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description","description":"New description. Omit to leave unchanged; pass '' to clear."},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":20},{"type":"null"}],"title":"Tags","description":"Replaces the full tag list (not a merge). Omit to leave unchanged; pass [] to clear. Tags are trimmed, de-duplicated, and capped at 50 characters each."}},"type":"object","title":"UpdateGraphMetadataOp","description":"Body for the update-graph-metadata operation.\n\nPartial update — only supplied (non-null) fields change, so a caller\nediting just the display name need not resend the description and tags.\nBecause `None` means \"leave alone\", clearing a field uses its empty\nvalue instead: pass `\"\"` to clear the description and `[]` to clear\nthe tags. `graph_name` cannot be cleared; it is the graph's label\neverywhere it is listed.\n\nThis is the platform-level label for the graph, independent of the\nentity name shown on financial statements — change that through\n`POST /extensions/roboledger/{graph_id}/operations/update-entity`.","examples":[{"graph_name":"Acme Consulting LLC"},{"description":"Primary operating entity, consolidated monthly","graph_name":"Acme Consulting LLC","tags":["consulting","production"]},{"description":"","tags":[]}]},"UpdateInformationBlockRequest":{"oneOf":[{"$ref":"#/components/schemas/_UpdateScheduleArm"},{"$ref":"#/components/schemas/_UpdateRollforwardArm"},{"$ref":"#/components/schemas/_UpdateForecastArm"},{"$ref":"#/components/schemas/_UpdateLegacyArm"}],"title":"UpdateInformationBlockRequest","description":"Update an Information Block. The body is a discriminated union on\n`block_type` mirroring `CreateInformationBlockRequest`. The schedule\narm carries a fully typed update payload; statement and metric arms\nreturn HTTP 501 (statements are library-seeded; metric updates are\npending).","discriminator":{"propertyName":"block_type","mapping":{"balance_sheet":"#/components/schemas/_UpdateLegacyArm","cash_flow_statement":"#/components/schemas/_UpdateLegacyArm","comprehensive_income":"#/components/schemas/_UpdateLegacyArm","equity_statement":"#/components/schemas/_UpdateLegacyArm","forecast":"#/components/schemas/_UpdateForecastArm","income_statement":"#/components/schemas/_UpdateLegacyArm","metric":"#/components/schemas/_UpdateLegacyArm","reconciliation":"#/components/schemas/_UpdateLegacyArm","regulatory_disclosure":"#/components/schemas/_UpdateLegacyArm","rollforward":"#/components/schemas/_UpdateRollforwardArm","schedule":"#/components/schemas/_UpdateScheduleArm"}}},"UpdateJournalEntryRequest":{"properties":{"entry_id":{"type":"string","title":"Entry Id","description":"The draft entry to update."},"posting_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Posting Date","description":"New posting date."},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo","description":"New entry-level memo."},"type":{"anyOf":[{"type":"string","enum":["standard","adjusting","closing","reversing"]},{"type":"null"}],"title":"Type","description":"New entry type. `closing` should normally only be set by close-period."},"line_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/JournalEntryLineItemInput"},"type":"array"},{"type":"null"}],"title":"Line Items","description":"Replacement line items. Whole-list replacement (not patch). The new set must still balance (total_debit == total_credit). Omit to leave existing lines untouched."}},"type":"object","required":["entry_id"],"title":"UpdateJournalEntryRequest","description":"Update a draft journal entry. Posted entries cannot be updated —\ncreate a reversal and a corrected entry instead.\n\nOmitted fields are left unchanged. If `line_items` is provided, the\nexisting line items are replaced entirely (atomic delete + insert)\nand the new set must still balance. If `line_items` is omitted, the\nexisting line items are left untouched.","examples":[{"entry_id":"ent_01HVF8T0M2YTAY3BBNRH0V0","memo":"Corrected vendor reference"},{"entry_id":"ent_01HVF8T0M2YTAY3BBNRH0V0","line_items":[{"debit_amount":12500,"element_id":"elem_coa_office_supplies"},{"credit_amount":12500,"element_id":"elem_coa_accounts_payable"}]}]},"UpdateMemberRoleRequest":{"properties":{"role":{"$ref":"#/components/schemas/OrgRole"}},"type":"object","required":["role"],"title":"UpdateMemberRoleRequest","description":"Request to update a member's role."},"UpdateMemoryOp":{"properties":{"memory_id":{"type":"string","pattern":"^mem_[0-9a-f]{32}$","title":"Memory Id","description":"Server-generated memory id to update"},"text":{"anyOf":[{"type":"string","maxLength":10000,"minLength":1},{"type":"null"}],"title":"Text","description":"New memory content"},"memory_type":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Memory Type","description":"Freeform classifier"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Optional labels"},"source_ref":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Source Ref","description":"Optional external reference/URI"},"provenance":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Provenance","description":"Opaque provenance metadata"}},"type":"object","required":["memory_id"],"title":"UpdateMemoryOp","description":"Body for the update-memory operation (partial update of a stored memory).\n\nOnly supplied fields are changed; the memory is re-embedded when `text`\nchanges."},"UpdateOrgRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"org_type":{"anyOf":[{"$ref":"#/components/schemas/OrgType"},{"type":"null"}]}},"type":"object","title":"UpdateOrgRequest","description":"Request to update organization details."},"UpdatePasswordRequest":{"properties":{"current_password":{"type":"string","minLength":8,"title":"Current Password","description":"Current password"},"new_password":{"type":"string","minLength":8,"title":"New Password","description":"New password"},"confirm_password":{"type":"string","minLength":8,"title":"Confirm Password","description":"Confirm new password"}},"type":"object","required":["current_password","new_password","confirm_password"],"title":"UpdatePasswordRequest","description":"Request model for updating user password."},"UpdatePortfolioBlockOperation":{"properties":{"portfolio_id":{"type":"string","title":"Portfolio Id","description":"Target portfolio ID."},"portfolio":{"$ref":"#/components/schemas/PortfolioBlockPortfolioPatch","description":"Patch to portfolio core fields. Omit or leave fields unset to leave the portfolio core unchanged."},"positions":{"$ref":"#/components/schemas/PortfolioBlockPositions","description":"Position deltas — additions, in-place updates, and dispositions — applied atomically with the portfolio patch."}},"type":"object","required":["portfolio_id"],"title":"UpdatePortfolioBlockOperation","description":"CQRS body for `POST /operations/update-portfolio-block`.\n\nCarries an optional patch to portfolio fields and three position\ndelta lists (`add` / `update` / `dispose`). All apply atomically\nwith the portfolio patch — partial failures roll back.","examples":[{"portfolio":{"description":"Pivoted toward defensive holdings"},"portfolio_id":"port_q1_growth_2026","positions":{"add":[],"dispose":[{"disposition_reason":"Liquidated; rotated capital","id":"pos_oldcorp_lot_3"}],"update":[{"current_value":1980000,"id":"pos_aapl_lot_1","valuation_date":"2026-05-06","valuation_source":"broker_statement"},{"current_value":2310000,"id":"pos_msft_lot_1","valuation_date":"2026-05-06","valuation_source":"broker_statement"}]}},{"portfolio_id":"port_q1_growth_2026","positions":{"add":[{"acquisition_date":"2026-05-01","cost_basis":4250000,"quantity":25,"security_id":"sec_googl"}]}}]},"UpdatePublishListOperation":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name","description":"New list name. Omit to leave unchanged."},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"New description. Omit to leave unchanged."},"list_id":{"type":"string","title":"List Id","description":"The publish list to update."}},"type":"object","required":["list_id"],"title":"UpdatePublishListOperation","description":"Update a publish list's metadata. Carries `list_id`.","examples":[{"list_id":"pl_01HVF8T0M2YTAY3BBNRH0V0","name":"Senior Lenders"}]},"UpdateRollforwardRequest":{"properties":{"structure_id":{"type":"string","title":"Structure Id","description":"Structure ID of the rollforward block."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"default_change_tag_qname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Change Tag Qname","description":"New default change tag qname. Pass a value to *change* the default; omit (`None`) to leave unchanged. There is no wire-level way to clear the default — see the class docstring."},"attribution_filters":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributionFilter"},"type":"array"},{"type":"null"}],"title":"Attribution Filters"},"validation_mode":{"anyOf":[{"type":"string","enum":["strict","residual_as_default","warn_only"]},{"type":"null"}],"title":"Validation Mode"}},"type":"object","required":["structure_id"],"title":"UpdateRollforwardRequest","description":"Update mutable fields on a rollforward block.\n\nEditable: name, default_change_tag_qname, attribution_filters,\nvalidation_mode. The BS source is fixed at creation — changing it would\ninvalidate every period already rendered — so switching BS source means\ndelete and re-create.\n\n**Partial-update semantics**: an omitted (`None`) field means \"leave\nunchanged\". There is no wire-level way to *clear* the default change tag or\nempty the attribution_filters list; delete and re-create the block instead.\nThe asymmetry is deliberate — a clear-sentinel costs wire-shape complexity\nfor a case that rarely arises, since default tags get swapped rather than\nremoved."},"UpdateScheduleRequest":{"properties":{"structure_id":{"type":"string","title":"Structure Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"entry_template":{"anyOf":[{"$ref":"#/components/schemas/EntryTemplateRequest"},{"type":"null"}]},"schedule_metadata":{"anyOf":[{"$ref":"#/components/schemas/ScheduleMetadataRequest"},{"type":"null"}]}},"type":"object","required":["structure_id"],"title":"UpdateScheduleRequest","description":"Update mutable fields on a schedule.\n\nEditable: name, entry_template, schedule_metadata (all live on the\nStructure row / its metadata_ JSONB column).\n\nNOT editable via this op: period_start, period_end, monthly_amount.\nThose require fact regeneration — end the schedule early via\n`terminate-schedule` (no entry) or\n`create-event-block(event_type='asset_disposed')` (with a disposal\nentry), then create a fresh schedule via `create-information-block`\n(`block_type='schedule'`).\n\nOmitted fields are left unchanged, and that holds inside\n`schedule_metadata` too: name only the fields to change."},"UpdateSecurityOperation":{"properties":{"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Reassign to a different issuing entity. Unset = unchanged."},"source_graph_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Graph Id","description":"Update the pre-association tenant graph. Unset = unchanged."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"New display name. Unset = unchanged."},"security_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Security Type","description":"New instrument family. Unset = unchanged. Reclassifying a security may invalidate existing `terms` shape; the operation does not validate the cross-field consistency."},"security_subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Security Subtype","description":"New subtype refinement. Unset = unchanged."},"terms":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Terms","description":"Replacement terms blob. Pass `null`/omit to leave existing terms unchanged; pass `{}` to clear them."},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"Active flag. Set `false` to soft-deactivate (positions remain addressable but the security is hidden from active lookups)."},"authorized_shares":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Authorized Shares","description":"New authorized share count. Unset = unchanged."},"outstanding_shares":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Outstanding Shares","description":"New outstanding share count. Unset = unchanged."},"security_id":{"type":"string","title":"Security Id","description":"Target security ID."}},"type":"object","required":["security_id"],"title":"UpdateSecurityOperation","description":"CQRS body for `POST /operations/update-security`.","examples":[{"outstanding_shares":7250000,"security_id":"sec_acme_common_a"},{"is_active":false,"security_id":"sec_legacy_pref_seed"}]},"UpdateTaxonomyBlockRequest":{"properties":{"taxonomy_id":{"type":"string","title":"Taxonomy Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"elements_to_add":{"items":{"$ref":"#/components/schemas/TaxonomyBlockElementRequest"},"type":"array","title":"Elements To Add"},"elements_to_update":{"items":{"$ref":"#/components/schemas/ElementUpdatePatch"},"type":"array","title":"Elements To Update"},"elements_to_remove":{"items":{"type":"string"},"type":"array","title":"Elements To Remove","description":"qnames of elements to remove."},"structures_to_add":{"items":{"$ref":"#/components/schemas/TaxonomyBlockStructureRequest"},"type":"array","title":"Structures To Add"},"structures_to_update":{"items":{"$ref":"#/components/schemas/StructureUpdatePatch"},"type":"array","title":"Structures To Update"},"structures_to_remove":{"items":{"type":"string"},"type":"array","title":"Structures To Remove","description":"Structure ids to remove."},"associations_to_add":{"items":{"$ref":"#/components/schemas/TaxonomyBlockAssociationRequest"},"type":"array","title":"Associations To Add"},"associations_to_remove":{"items":{"type":"string"},"type":"array","title":"Associations To Remove","description":"Association ids to remove."},"rules_to_add":{"items":{"$ref":"#/components/schemas/TaxonomyBlockRuleRequest"},"type":"array","title":"Rules To Add"},"rules_to_remove":{"items":{"type":"string"},"type":"array","title":"Rules To Remove","description":"Rule ids to remove."}},"type":"object","required":["taxonomy_id"],"title":"UpdateTaxonomyBlockRequest","description":"Request body for the `update-taxonomy-block` operation.\n\nTop-level fields (name / description / version) apply to the taxonomy\nrow itself. The delta lists mutate atoms incrementally — the validator\nre-runs every create-time check across the projected post-update\nstate before anything commits.","examples":[{"name":"Acme CoA (v2)","taxonomy_id":"tax_acme_coa","version":"2.0"},{"elements_to_add":[{"balance_type":"credit","code":"2200","name":"Deferred Revenue","qname":"acme:DeferredRevenue","trait":"liability"}],"taxonomy_id":"tax_acme_coa"},{"elements_to_remove":["acme:LegacyAccount"],"elements_to_update":[{"name":"Cash and Cash Equivalents","qname":"acme:Cash"}],"taxonomy_id":"tax_acme_coa"}]},"UpdateUserRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name","description":"User's display name"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email","description":"User's email address"},"reauth_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reauth Password","description":"Password re-entry, required to change email for a password-holding account"},"reauth_assertion":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Reauth Assertion","description":"A fresh mgmt-flow passkey assertion, required to change email for a passkey-only account"}},"type":"object","title":"UpdateUserRequest","description":"Request model for updating user profile.\n\nChanging `email` re-authenticates: a fresh proof (password re-entry or a\n`mgmt`-flow passkey assertion) must accompany the request, exactly as\npasskey enrollment and removal require. Name-only updates need no proof."},"UpgradeSubscriptionRequest":{"properties":{"new_plan_name":{"type":"string","title":"New Plan Name","description":"New plan name to change to","examples":["advanced"]},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"Organization member whose subscription to change. Defaults to the caller; targeting another member requires org owner or admin."}},"type":"object","required":["new_plan_name"],"title":"UpgradeSubscriptionRequest","description":"Request to upgrade a subscription."},"UserGraphsResponse":{"properties":{"graphs":{"items":{"$ref":"#/components/schemas/GraphInfo"},"type":"array","title":"Graphs","description":"List of accessible graphs"},"selectedGraphId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selectedgraphid","description":"Currently selected graph ID","examples":["kg1a2b3c4d5",null]}},"type":"object","required":["graphs"],"title":"UserGraphsResponse","description":"User graphs response model.","examples":[{"graphs":[{"createdAt":"2024-01-15T10:00:00Z","graphId":"kg1a2b3c4d5","graphName":"Acme Consulting LLC","isSelected":true,"role":"admin"},{"createdAt":"2024-02-20T14:30:00Z","graphId":"kg9z8y7x6w5","graphName":"TechCorp Enterprises","isSelected":false,"role":"member"}],"selectedGraphId":"kg1a2b3c4d5"},{"graphs":[]}]},"UserResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the user"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User's display name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"User's email address"},"email_verified":{"type":"boolean","title":"Email Verified","description":"Whether user's email is verified","default":false},"accounts":{"items":{"$ref":"#/components/schemas/AccountInfo"},"type":"array","title":"Accounts","description":"User's authentication accounts"}},"type":"object","required":["id"],"title":"UserResponse","description":"User information response model.","example":{"accounts":[{"provider":"github","provider_account_id":"12345","provider_type":"oauth"},{"provider":"google","provider_account_id":"67890","provider_type":"oauth"}],"email":"john@example.com","email_verified":true,"id":"user-123","name":"johndoe"}},"ValidationCheckResponse":{"properties":{"passed":{"type":"boolean","title":"Passed","description":"True iff at least one rule ran and every rule produced zero failures on every rendered column. False when nothing was checked (`status == 'inconclusive'`)."},"status":{"type":"string","title":"Status","description":"`passed` — every rule ran on every column with zero failures; `failed` — at least one rule failed; `inconclusive` — no validation rules exist for this block type, so nothing was checked."},"checks":{"items":{"type":"string"},"type":"array","title":"Checks","description":"Names of rules that were evaluated."},"failures":{"items":{"type":"string"},"type":"array","title":"Failures","description":"Human-readable descriptions of rule failures."},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","description":"Non-blocking advisories from rule evaluation."}},"type":"object","required":["passed","status","checks","failures","warnings"],"title":"ValidationCheckResponse","description":"Aggregate result of running reporting rules over a structure.\n\nEvery rule runs once per rendered period column; on a multi-column\nstatement each failure and warning is prefixed with the column it was\nfound in (`[Prior] …`)."},"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"},"ValidationLite":{"properties":{"passed":{"type":"boolean","title":"Passed","default":true},"status":{"type":"string","title":"Status","default":"passed"},"checks":{"items":{"type":"string"},"type":"array","title":"Checks"},"failures":{"items":{"type":"string"},"type":"array","title":"Failures"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","title":"ValidationLite","description":"Outcome of guard-rail validation on a rendered statement.\n\nDistinct from :class:`VerificationResultLite` (which surfaces the\nrule-engine outcomes from `public.verification_results`). This lite\ntype carries the synchronous guard-rail checks computed at\nenvelope-build time — accounting equation, totals foot, etc."},"VerificationCategorySummary":{"properties":{"category":{"type":"string","title":"Category"},"total":{"type":"integer","title":"Total","default":0},"passed":{"type":"integer","title":"Passed","default":0},"failed":{"type":"integer","title":"Failed","default":0},"errored":{"type":"integer","title":"Errored","default":0},"skipped":{"type":"integer","title":"Skipped","default":0}},"type":"object","required":["category"],"title":"VerificationCategorySummary","description":"Pass/fail/skip counts for one `rule_category` within a block's\nverification results.\n\nDrives the per-category accordions in the Verification Results panel.\n`category` is the rule's `rule_category`\n(one of the cm:VerificationRule subclasses), resolved by joining each\nresult to its Rule."},"VerificationResultLite":{"properties":{"id":{"type":"string","title":"Id"},"rule_id":{"type":"string","title":"Rule Id"},"structure_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Structure Id"},"fact_set_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fact Set Id"},"status":{"type":"string","title":"Status","description":"'pass' | 'fail' | 'error' | 'skipped'. Enum closure enforced by the `public.verification_results` CHECK constraint."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"period_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period Start"},"period_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period End"},"evaluated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Evaluated At"}},"type":"object","required":["id","rule_id","status"],"title":"VerificationResultLite","description":"Persisted outcome of one Rule evaluation.\n\nOne row per `public.verification_results` entry the rule engine\nwrites. The envelope surfaces them so the block viewer's\n\"Verification Results\" tab and MCP `list-verification-failures`\ntool can render + aggregate without a second round-trip."},"VerificationSummary":{"properties":{"total":{"type":"integer","title":"Total","default":0},"passed":{"type":"integer","title":"Passed","default":0},"failed":{"type":"integer","title":"Failed","default":0},"errored":{"type":"integer","title":"Errored","default":0},"skipped":{"type":"integer","title":"Skipped","default":0},"by_category":{"items":{"$ref":"#/components/schemas/VerificationCategorySummary"},"type":"array","title":"By Category"}},"type":"object","title":"VerificationSummary","description":"Server-computed aggregate of a block's `verification_results`.\n\nOverall counts plus a per-`rule_category` breakdown, so the viewer\nrenders the grouped Verification Results panel\nwithout a client-side results→rules join. Status closure is\n`pass | fail | error | skipped` (the `public.verification_results`\nCHECK); `total` is their sum."},"ViewAxisConfig":{"properties":{"type":{"type":"string","title":"Type","description":"Axis type: 'element', 'period', 'entity'"},"include_null_dimension":{"type":"boolean","title":"Include Null Dimension","description":"Include facts where this aspect is absent (default: false)","default":false},"selected_members":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Selected Members","description":"Specific members to include (e.g., ['2024-12-31', '2023-12-31'])"}},"type":"object","required":["type"],"title":"ViewAxisConfig","description":"Scoping configuration for one aspect of the fact query.\n\nFiltering only. Ordering and labelling are presentation concerns and\nbelong to the consumer that arranges the facts into a table."},"ViewConfig":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/ViewAxisConfig"},"type":"array","title":"Rows","description":"Row axis configuration"},"columns":{"items":{"$ref":"#/components/schemas/ViewAxisConfig"},"type":"array","title":"Columns","description":"Column axis configuration"}},"type":"object","title":"ViewConfig"},"ViewMetadata":{"properties":{"view_id":{"type":"string","title":"View Id","description":"Unique view identifier"},"facts_processed":{"type":"integer","title":"Facts Processed","description":"Number of facts processed"},"construction_time_ms":{"type":"number","title":"Construction Time Ms","description":"Time to build view in milliseconds"},"source":{"type":"string","title":"Source","description":"Data source type"},"period_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Start","description":"Period start date"},"period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period End","description":"Period end date"},"truncated":{"type":"boolean","title":"Truncated","description":"True when more facts matched than `limit` allowed. The returned facts are the most recent by period; narrow the filters or raise `limit` to see the rest.","default":false}},"type":"object","required":["view_id","facts_processed","construction_time_ms","source"],"title":"ViewMetadata"},"ViewProjections":{"properties":{"rendering":{"anyOf":[{"$ref":"#/components/schemas/RenderingLite"},{"type":"null"}]},"chart":{"anyOf":[{"$ref":"#/components/schemas/ChartLite"},{"type":"null"}]}},"type":"object","title":"ViewProjections","description":"The six `type-of` View projections of an Information Block (Rendering,\nFactTable, ModelStructure, VerificationResults, ReportElements,\nBusinessRules), surfaced at the envelope boundary.\n\nEach projection is computed server-side at envelope-build time when\nits source data is available. The frontend's `BlockView` dispatcher\nroutes to the projection component matching the user's selected view\nmode; missing projections render as empty states without breaking the\ndispatcher.\n\nToday: `rendering` is computed for the statement family, and\n`chart` (panel/series config over the rendering's rows and periods)\nfor metric blocks. Projections without backend support yet are empty;\n`fact_table` is derivable from `InformationBlockEnvelope.facts`."},"ViewResponse":{"properties":{"metadata":{"$ref":"#/components/schemas/ViewMetadata","description":"View metadata"},"dimensions":{"items":{"$ref":"#/components/schemas/Dimension"},"type":"array","title":"Dimensions","description":"Aspects spanned by the returned facts"},"facts":{"items":{"$ref":"#/components/schemas/FactRecord"},"type":"array","title":"Facts","description":"Deduplicated fact records"},"summary":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/ElementSummary"},"type":"object"},{"type":"null"}],"title":"Summary","description":"Per-element aggregates, only when include_summary=true. `total` and `average` span every returned period, so they are present for duration elements only — instants omit both (a balance summed across periods is not a balance). Overlapping duration windows sharing a period_end (quarter + year-to-date) contribute only the narrowest window, so a quarter is never double-counted inside its own YTD figure."}},"type":"object","required":["metadata"],"title":"ViewResponse","description":"Flat, deduplicated facts plus the aspects they span.\n\nNo server-side pivot: each fact is returned as its own record so the\nconsumer can arrange cells on the full aspect signature. Summing across\nentities, units, or elements that merely share a local name is a\npresentation decision this endpoint refuses to make on the caller's behalf."},"_CreateForecastArm":{"properties":{"block_type":{"type":"string","const":"forecast","title":"Block Type","description":"Discriminator value selecting this arm."},"payload":{"$ref":"#/components/schemas/CreateForecastRequest","description":"Forecast creation payload."}},"type":"object","required":["block_type","payload"],"title":"_CreateForecastArm","description":"Create-information-block body for `block_type=\"forecast\"`.\n\nCarries a typed forecast payload — the authored scenario container:\nscenario identity, horizon, base period, lever assertions on\n`rs-driver:*` catalog elements. Run `compute-forecast` after\ncreating to derive the forward months.","examples":[{"block_type":"forecast","payload":{"horizon_months":12,"levers":[{"qname":"rs-driver:RevenueGrowthRate","value":0.03},{"qname":"rs-driver:CostOfRevenueRate","value":0.62},{"qname":"rs-driver:DaysSalesOutstanding","value":45},{"qname":"rs-driver:DaysPayableOutstanding","value":30}],"name":"FY26 Operating Budget","scenario_kind":"budget"}}]},"_CreateLegacyArm":{"properties":{"block_type":{"type":"string","enum":["balance_sheet","income_statement","cash_flow_statement","equity_statement","comprehensive_income","regulatory_disclosure","metric","reconciliation"],"title":"Block Type","description":"Statement-family or metric block type. The endpoint returns 501 for these values — statements are constructed via `create-report`; metric construction is pending."},"payload":{"additionalProperties":true,"type":"object","title":"Payload","description":"Untyped payload — typed-arm validation is skipped because the dispatch handler raises 501 before the payload is consumed."}},"type":"object","required":["block_type"],"title":"_CreateLegacyArm","description":"Create-information-block body for block types that don't yet have\na typed construction path at the API boundary.\n\nStatement-family blocks (balance_sheet, income_statement,\ncash_flow_statement, equity_statement, comprehensive_income) are\nconstructed via `create-report`, not this endpoint. Disclosure\nstructures (regulatory_disclosure) are vocabulary, authored via\n`create-taxonomy-block`; their facts land when `create-report`\npicks them. Metric blocks are recognized but their evaluator has\nnot shipped. Calling this endpoint with one of these block types\nreturns HTTP 501 with a hint pointing to the correct construction\npath."},"_CreateRollforwardArm":{"properties":{"block_type":{"type":"string","const":"rollforward","title":"Block Type","description":"Discriminator value selecting this arm."},"payload":{"$ref":"#/components/schemas/CreateRollforwardRequest","description":"Rollforward creation payload."}},"type":"object","required":["block_type","payload"],"title":"_CreateRollforwardArm","description":"Create-information-block body for `block_type=\"rollforward\"`.\n\nCarries a typed rollforward payload. The block decomposes the period\nchange in a BS source element across the declared attribution\nfilters.","examples":[{"block_type":"rollforward","payload":{"attribution_filters":[{"predicate":{"field":"transaction_description_code","kind":"line_item_metadata_field","values":["mini:ProceedsFromInvestmentsByOwner"]},"target_qname":"mini:ProceedsFromInvestmentsByOwner"}],"bs_source_qname":"mini:CashAndCashEquivalents","name":"Cash and Cash Equivalents Rollforward"}}]},"_CreateScheduleArm":{"properties":{"block_type":{"type":"string","const":"schedule","title":"Block Type","description":"Discriminator value selecting this arm."},"payload":{"$ref":"#/components/schemas/CreateScheduleRequest","description":"Schedule creation payload."}},"type":"object","required":["block_type","payload"],"title":"_CreateScheduleArm","description":"Create-information-block body for `block_type=\"schedule\"`.\n\nCarries a typed schedule payload — full schedule shape is exposed\ninline in the OpenAPI schema so SDK callers see every required field.","examples":[{"block_type":"schedule","payload":{"element_ids":["<depreciation_expense_element_id>","<accumulated_depreciation_element_id>"],"entry_template":{"credit_element_id":"<accumulated_depreciation_element_id>","debit_element_id":"<depreciation_expense_element_id>","entry_type":"adjusting"},"monthly_amount":83333,"name":"Office Building Depreciation","period_end":"2030-12-31","period_start":"2026-01-01"}}]},"_DeleteForecastArm":{"properties":{"block_type":{"type":"string","const":"forecast","title":"Block Type","description":"Discriminator value selecting this arm."},"payload":{"$ref":"#/components/schemas/DeleteForecastRequest","description":"Forecast delete payload."}},"type":"object","required":["block_type","payload"],"title":"_DeleteForecastArm","description":"Delete-information-block body for `block_type=\"forecast\"`.\n\nRemoves the scenario's entire parallel universe — the lever FactSet\nand every computed scenario FactSet. Actuals are never touched.","examples":[{"block_type":"forecast","payload":{"structure_id":"struct_fy26_budget"}}]},"_DeleteLegacyArm":{"properties":{"block_type":{"type":"string","enum":["balance_sheet","income_statement","cash_flow_statement","equity_statement","comprehensive_income","regulatory_disclosure","metric","reconciliation"],"title":"Block Type","description":"Statement-family or metric block type. Deletion returns 501 — statements are library-seeded (archive the underlying Report instead); metric deletion is pending."},"payload":{"additionalProperties":true,"type":"object","title":"Payload","description":"Untyped payload — typed-arm validation is skipped because the dispatch handler raises 501 before the payload is consumed."}},"type":"object","required":["block_type"],"title":"_DeleteLegacyArm","description":"Delete-information-block body for block types that don't yet have\na typed delete path at the API boundary.\n\nStatement-family blocks cannot be deleted per tenant (the underlying\nReport should be archived via the report APIs instead). Metric\ndeletion is not yet implemented. Calls return HTTP 501."},"_DeleteRollforwardArm":{"properties":{"block_type":{"type":"string","const":"rollforward","title":"Block Type","description":"Discriminator value selecting this arm."},"payload":{"$ref":"#/components/schemas/DeleteRollforwardRequest","description":"Rollforward delete payload."}},"type":"object","required":["block_type","payload"],"title":"_DeleteRollforwardArm","description":"Delete-information-block body for `block_type=\"rollforward\"`.\n\nCascades through any synthetic facts produced by this block's filter\nevaluations. The underlying ledger LineItems are not touched.","examples":[{"block_type":"rollforward","payload":{"structure_id":"struct_rf_cash_2026"}}]},"_DeleteScheduleArm":{"properties":{"block_type":{"type":"string","const":"schedule","title":"Block Type","description":"Discriminator value selecting this arm."},"payload":{"$ref":"#/components/schemas/DeleteScheduleRequest","description":"Schedule delete payload."}},"type":"object","required":["block_type","payload"],"title":"_DeleteScheduleArm","description":"Delete-information-block body for `block_type=\"schedule\"`.\n\nCarries a typed schedule delete payload — just the `structure_id`.","examples":[{"block_type":"schedule","payload":{"structure_id":"struct_depr_office_2026"}}]},"_UpdateForecastArm":{"properties":{"block_type":{"type":"string","const":"forecast","title":"Block Type","description":"Discriminator value selecting this arm."},"payload":{"$ref":"#/components/schemas/UpdateForecastRequest","description":"Forecast update payload. Updating does NOT recompute — lever, horizon, or base-period changes leave the scenario's computed months stale until the next `compute-forecast` run."}},"type":"object","required":["block_type","payload"],"title":"_UpdateForecastArm","description":"Update-information-block body for `block_type=\"forecast\"`.\n\nMutable: name, scenario_kind, horizon_months, base_period, levers\n(full replace). Updating does not recompute — run `compute-forecast`\nto refresh the scenario's derived months.","examples":[{"block_type":"forecast","payload":{"levers":[{"qname":"rs-driver:RevenueGrowthRate","value":0.04},{"qname":"rs-driver:CostOfRevenueRate","value":0.62},{"qname":"rs-driver:DaysSalesOutstanding","value":45},{"qname":"rs-driver:DaysPayableOutstanding","value":30}],"structure_id":"struct_fy26_budget"}}]},"_UpdateLegacyArm":{"properties":{"block_type":{"type":"string","enum":["balance_sheet","income_statement","cash_flow_statement","equity_statement","comprehensive_income","regulatory_disclosure","metric","reconciliation"],"title":"Block Type","description":"Statement-family or metric block type. Updates return 501 — statement Structures are library-seeded; metric updates are pending."},"payload":{"additionalProperties":true,"type":"object","title":"Payload","description":"Untyped payload — typed-arm validation is skipped because the dispatch handler raises 501 before the payload is consumed."}},"type":"object","required":["block_type"],"title":"_UpdateLegacyArm","description":"Update-information-block body for block types that don't yet have\na typed update path at the API boundary.\n\nStatement-family blocks are library-seeded and immutable. Metric\nblock updates are not yet implemented. Calling this endpoint with\none of these block types returns HTTP 501."},"_UpdateRollforwardArm":{"properties":{"block_type":{"type":"string","const":"rollforward","title":"Block Type","description":"Discriminator value selecting this arm."},"payload":{"$ref":"#/components/schemas/UpdateRollforwardRequest","description":"Rollforward update payload."}},"type":"object","required":["block_type","payload"],"title":"_UpdateRollforwardArm","description":"Update-information-block body for `block_type=\"rollforward\"`.\n\nCarries a typed rollforward update payload. Mutable fields: name,\ndefault_change_tag_qname, attribution_filters, validation_mode.","examples":[{"block_type":"rollforward","payload":{"name":"Cash Rollforward (Renamed)","structure_id":"struct_rf_cash_2026"}}]},"_UpdateScheduleArm":{"properties":{"block_type":{"type":"string","const":"schedule","title":"Block Type","description":"Discriminator value selecting this arm."},"payload":{"$ref":"#/components/schemas/UpdateScheduleRequest","description":"Schedule update payload."}},"type":"object","required":["block_type","payload"],"title":"_UpdateScheduleArm","description":"Update-information-block body for `block_type=\"schedule\"`.\n\nCarries a typed schedule update payload — full editable shape is\nexposed inline.","examples":[{"block_type":"schedule","payload":{"name":"Office Building Depreciation (Renamed)","structure_id":"struct_depr_office_2026"}}]},"OperationError":{"type":"object","description":"Error envelope returned by extensions operation endpoints. Shape aligns with FastAPI's default error detail plus an optional `operation_id` for audit correlation.","properties":{"detail":{"oneOf":[{"type":"string"},{"type":"object"}],"description":"Human-readable error detail or structured payload"},"operation_id":{"type":"string","description":"op_-prefixed ULID if the dispatcher minted one before the failure (async ops, idempotency conflicts, etc.)"}}}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key","description":"API key for authentication"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT bearer token"}}},"tags":[{"name":"Graphs","description":"🏗️ Graphs - Create and manage knowledge graph tenants"},{"name":"Graph Operations","description":"⚙️ Graph lifecycle — Subgraphs, backups, tier changes, and materialization"},{"name":"Schema","description":"📐 Schema - Inspect and export a graph's deployed schema"},{"name":"Subgraphs","description":"🌳 Subgraphs - List and inspect subgraph databases"},{"name":"Backup","description":"💾 Backup - List, download, and inspect graph backups"},{"name":"Operator","description":"🤖 AI Operators - AI agent orchestration and execution"},{"name":"Query","description":"🕸️ Graph queries - Execute Cypher queries on the knowledge graph"},{"name":"Search","description":"🔎 Search - Full-text and semantic search on documents, narratives and disclosures"},{"name":"Memory","description":"🧠 Memory - Recall, list, and inspect the graph's per-graph semantic memory store"},{"name":"Content Operations","description":"✍️ Content operations - Write content across memory, documents, and files"},{"name":"Documents","description":"📑 Documents - List documents for search and analysis"},{"name":"Tables","description":"🗃️ Staging tables - Table metadata for the staging layer"},{"name":"Files","description":"📄 File management - List stored data files for generic graphs"},{"name":"Connections","description":"🔗 Connection management — Manage external data source integrations"},{"name":"GraphQL","description":"🧩 GraphQL endpoint - Unified GraphQL endpoint for extensions read queries"},{"name":"RoboLedger: Setup","description":"📒 Ledger setup - Initialize a ledger, seed its chart of accounts, and edit the reporting entity"},{"name":"RoboLedger: Taxonomy & Mapping","description":"🏷️ Taxonomy & mapping - Curate taxonomy blocks and map the chart of accounts to their elements"},{"name":"RoboLedger: Information Blocks","description":"🧱 Information blocks - Author the units a report is built from, and compute rules, metrics and forecasts over them"},{"name":"RoboLedger: Ledger & Events","description":"📓 Ledger & events - Agents, business events, the handlers that post them to the GL, and journal entry corrections"},{"name":"RoboLedger: Fiscal Close","description":"📅 Fiscal close - Close and reopen periods, and drive the schedules that feed the close"},{"name":"RoboLedger: Reports","description":"📄 Reports - Build, rebuild, and file a financial report"},{"name":"RoboLedger: Report Distribution","description":"📬 Report distribution - Share reports, manage publish lists, and block unwanted senders"},{"name":"RoboLedger: Analytical Views","description":"🔬 Analytical views - Read-shaped operations over the XBRL hypercube and published reports: fact grids, statements, and disclosures"},{"name":"RoboInvestor","description":"📈 RoboInvestor operations - Named commands for portfolio management writes and analytical views"},{"name":"Operations","description":"⏱️ Operation monitoring - Track SSE stream status and progress"},{"name":"Credits","description":"🪙 Credits - Manage credit-based usage and allocation"},{"name":"Usage","description":"📊 Usage - Monitor usage, metrics, and system performance"},{"name":"Graph Limits","description":"📏 Graph limits - Storage usage, operation limits, and tier configuration"},{"name":"Graph Members","description":"🧑‍🤝‍🧑 Graph members - Manage per-graph member access and roles"},{"name":"Graph Audit","description":"📜 Graph audit - Every change made to a graph, from the REST API, MCP clients, and AI operators"},{"name":"Graph Health","description":"🩺 Graph health - Database health and performance metrics"},{"name":"Graph Info","description":"ℹ️ Graph info - Database metadata and statistics"},{"name":"Org","description":"🏢 Organizations - Manage organizations and team collaboration"},{"name":"Org Members","description":"👥 Organization members - Manage team members, roles, and permissions"},{"name":"Org Usage","description":"📈 Organization usage - Track organization-wide usage, limits, and analytics"},{"name":"Subscriptions","description":"💳 Subscriptions - Shared repository subscription management"},{"name":"Billing","description":"🛒 Billing - Create and manage billing checkout sessions"},{"name":"User","description":"👤 User management - Profile, settings, and account information"},{"name":"Auth","description":"🔐 Authentication - Register, sign in, manage the session, verify email, and reset passwords"},{"name":"Auth: Passkeys","description":"🔑 Passkeys - WebAuthn registration, passwordless login, and re-authentication"},{"name":"Auth: MFA","description":"🛡️ Multi-factor auth - Assertion options, verification, status, and recovery codes"},{"name":"Auth: SSO","description":"🎫 Single sign-on - Cross-app token exchange, and enterprise OIDC where enabled"},{"name":"Service Offerings","description":"🛍️ Service offerings - View available offers and pricing"},{"name":"Status","description":"❤️ Service status - API status and monitoring"}]}