{"openapi":"3.1.0","info":{"title":"DTI-TDRA API","version":"0.1.0"},"paths":{"/api/v1/auth/signup":{"post":{"tags":["auth"],"summary":"Signup","description":"Open signup is permanently disabled — invite-only model (B5).\n\nReturns 410 Gone with `error.code = \"SIGNUP_DEPRECATED\"` so existing\nclients see an explicit \"endpoint went away\" rather than a generic\n404 they might retry. The body is parsed for shape validation only;\nno Cognito or DDB call happens.\n\nTenant onboarding now flows through `POST /api/v1/platform/customers`\n(VERIDATAI_STAFF only). Existing tenants invite new users via\n`POST /api/v1/orgs/me/invites` (ADMIN). See B5 spec.","operationId":"signup_api_v1_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"410":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/confirm":{"post":{"tags":["auth"],"summary":"Confirm","description":"Confirm user registration with verification code.","operationId":"confirm_api_v1_auth_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login","description":"Initiate SRP login. Returns tokens or challenge for next step.","operationId":"login_api_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TokenResponse"},{"$ref":"#/components/schemas/ChallengeResponse"}],"title":"Response Login Api V1 Auth Login Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/respond-challenge":{"post":{"tags":["auth"],"summary":"Respond Challenge","description":"Respond to auth challenge (SRP step 2, MFA, etc.).","operationId":"respond_challenge_api_v1_auth_respond_challenge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondChallengeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TokenResponse"},{"$ref":"#/components/schemas/ChallengeResponse"}],"title":"Response Respond Challenge Api V1 Auth Respond Challenge Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh","description":"Refresh access token.\n\nResolves the Cognito username (subject of SECRET_HASH) in this order:\n1. Decode the access token JWT and read `username` / `cognito:username`.\n2. Fall back to the explicit `username` field on the request.\n\nPage-reload bootstrap from the frontend arrives with an empty access\ntoken (XSS hardening forbids persisting access tokens), so the explicit\n`username` field is the only signal available in that path.","operationId":"refresh_api_v1_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","description":"Revoke a refresh token server-side.\n\nISS-043: useAuthStore.signOut now calls this endpoint best-effort\nbefore clearing local state. Without explicit revocation, a captured\nrefresh token stays mintable for the remainder of its Cognito TTL\n(default 30 days) even after the user \"signed out\".\n\nNo auth required — the request body IS the proof of ownership\n(Cognito validates the token signature). Rate-limited to deter abuse\n(attacker spamming arbitrary tokens to enumerate validity is bounded\nat 10/min/IP).\n\nReturns 204 regardless of revoke outcome. The endpoint is\nfire-and-forget from the client's perspective; client-side state\nclearing happens irrespective of network result.","operationId":"logout_api_v1_auth_logout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoutRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","description":"Initiate password reset. Always returns success to prevent enumeration.","operationId":"forgot_password_api_v1_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","description":"Complete password reset with verification code and new password.","operationId":"reset_password_api_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/me/reconfirm":{"post":{"tags":["auth"],"summary":"Reconfirm","description":"Re-prove possession of the password and issue a 60s\nconfirmation token bound to `(action, targetId)`.\n\nWrong-password flow:\n  - 1st-2nd failure → 401 `RECONFIRM_FAILED` + DDB counter bump.\n  - 3rd failure within 15min → row reaches threshold; subsequent\n    attempts return 423 `RECONFIRM_LOCKED` until the window\n    expires (DDB TTL sweeps).\n\nThe `action` field MUST be a value of `confirm_token.Action`.\nPydantic accepts any short string (clients can't smuggle SQL etc.\n— `action` is only used to build a token, never executed), but\nthe action enum is enforced inside `encode_confirmation_token`\nvia the `_TARGET_ID_FORMATS` table lookup.","operationId":"reconfirm_api_v1_auth_me_reconfirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconfirmRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconfirmResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/accept-invite":{"post":{"tags":["auth"],"summary":"Accept Invite","description":"Convert a pending invite into a User row + permanent Cognito\ncredentials.\n\nNo JWT required. HMAC-signed invite token IS the auth artifact.\nPer-IP slowapi limit `5/min` — anti-enumeration on this\nunauthenticated endpoint.\n\nReturns a generic success message; the frontend then runs the\nnormal SRP login flow with the password the user just chose.\nServer-side issuance of access tokens would require the\n`ADMIN_USER_PASSWORD_AUTH` flow which the customer pool app\nclient does not enable (would bypass SRP at the auth boundary).","operationId":"accept_invite_api_v1_auth_accept_invite_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInviteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments":{"post":{"tags":["assessments"],"summary":"Create Assessment","operationId":"create_assessment_api_v1_assessments_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentFull"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["assessments"],"summary":"List Assessments Endpoint","operationId":"list_assessments_endpoint_api_v1_assessments_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/{id}":{"get":{"tags":["assessments"],"summary":"Get Assessment","operationId":"get_assessment_api_v1_assessments__id__get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"pattern":"^[a-f0-9]{32}$","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentFull"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["assessments"],"summary":"Replace Assessment","operationId":"replace_assessment_api_v1_assessments__id__put","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"pattern":"^[a-f0-9]{32}$","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentDataPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentFull"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["assessments"],"summary":"Patch Assessment","operationId":"patch_assessment_api_v1_assessments__id__patch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"pattern":"^[a-f0-9]{32}$","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentMetadata"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["assessments"],"summary":"Delete Assessment","operationId":"delete_assessment_api_v1_assessments__id__delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"pattern":"^[a-f0-9]{32}$","title":"Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/me":{"get":{"tags":["orgs"],"summary":"Get Org Me","operationId":"get_org_me_api_v1_orgs_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgResponse"}}}}}},"patch":{"tags":["orgs"],"summary":"Patch Org Me","description":"Update ADMIN-mutable fields. Pydantic `extra=\"forbid\"` rejects\ncounter, limit, logo, and `inviteDomains` fields with 422 — see\n`OrgPatchRequest` docstring for why.","operationId":"patch_org_me_api_v1_orgs_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgPatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/me/share-defaults":{"get":{"tags":["orgs"],"summary":"Get Share Defaults","operationId":"get_share_defaults_api_v1_orgs_me_share_defaults_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareDefaultsResponse"}}}}}},"patch":{"tags":["orgs"],"summary":"Patch Share Defaults","description":"Update share-defaults config. ADMIN-only + reconfirm-gated.\n\n`RequireTenantRole(ADMIN)` enforces the role floor; the reconfirm\ndependency (`org.share_defaults` action) requires a fresh\nconfirmation token from the password-reauth endpoint.","operationId":"patch_share_defaults_api_v1_orgs_me_share_defaults_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareDefaultsPatch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareDefaultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/me/members":{"get":{"tags":["orgs"],"summary":"List Members","operationId":"list_members_api_v1_orgs_me_members_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberListResponse"}}}}}}},"/api/v1/orgs/me/members/{user_id}":{"patch":{"tags":["orgs"],"summary":"Update Member Role","operationId":"update_member_role_api_v1_orgs_me_members__user_id__patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberPatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["orgs"],"summary":"Remove Member","operationId":"remove_member_api_v1_orgs_me_members__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/me/profile":{"patch":{"tags":["orgs"],"summary":"Patch Profile","description":"Update displayName / jobTitle on the caller's own User row.\n\nBoth fields optional — an empty body (both None) returns 422\n`EMPTY_PATCH`. Tenant-write-lock + soft-delete gates fire in the\n`TenantUser` dep before this handler runs (`/orgs/me/*` prefix is\nwrite-locked when `purgePending` is set).\n\nReturns the full updated `MemberResponse` so the frontend can\nrefresh from a single canonical projection.","operationId":"patch_profile_api_v1_orgs_me_profile_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilePatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/me/invites":{"get":{"tags":["orgs"],"summary":"List Invites","operationId":"list_invites_api_v1_orgs_me_invites_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteListResponse"}}}}}},"post":{"tags":["orgs"],"summary":"Create Invite","description":"T-065: parse → call → map. The full invite chain (email\nnormalisation, domain gate, member pre-check, seat transact, SES\nsend) lives in `invite_flow.create_org_invite` — shared verbatim\nwith the staff mirror endpoint so the two surfaces cannot drift.\nValidation/conflict `HTTPException`s propagate from the flow\nunchanged; only the org-missing domain error is mapped here.","operationId":"create_invite_api_v1_orgs_me_invites_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/me/invites/{invite_id}/resend":{"post":{"tags":["orgs"],"summary":"Resend Invite","description":"T-068: parse → call → map. The full resend chain (token rotation,\ndelivery-state reset, SES re-send, MessageId bookkeeping) lives in\n`invite_flow.resend_org_invite` — shared verbatim with the staff\nmirror endpoint so the two surfaces cannot drift. Does NOT mutate\n`email` or `role` (immutable — privilege-escalation guard). The\nreturned row's delivery fields are reset to PENDING, so the wire\nshape reflects the fresh send rather than a stale terminal status.","operationId":"resend_invite_api_v1_orgs_me_invites__invite_id__resend_post","parameters":[{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","title":"Invite Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/me/invites/{invite_id}":{"delete":{"tags":["orgs"],"summary":"Cancel Invite","operationId":"cancel_invite_api_v1_orgs_me_invites__invite_id__delete","parameters":[{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","title":"Invite Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/me/branding/logo-upload":{"post":{"tags":["orgs"],"summary":"Logo Upload","description":"Return a presigned PUT URL bound to a server-chosen S3 key.\n\nClient never sees / supplies the S3 key. The presigning policy\npins `Content-Type` and `Content-Length` into the sigv4\nsignature, so a client that mutates either invalidates the\nupload.","operationId":"logo_upload_api_v1_orgs_me_branding_logo_upload_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoUploadRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/me/branding/logo-finalize":{"post":{"tags":["orgs"],"summary":"Logo Finalize","description":"Magic-bytes verify the temp upload, copy to canonical key,\ndelete the temp, persist the canonical key on `Org.branding`.","operationId":"logo_finalize_api_v1_orgs_me_branding_logo_finalize_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoFinalizeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoFinalizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/me/branding/logo":{"get":{"tags":["orgs"],"summary":"Get Logo Url","description":"Return a presigned GET URL for the org's logo (5min TTL).\nContent-Type and Content-Disposition are pinned via sigv4 so a\nclient cannot smuggle `attachment;filename=evil.html`.","operationId":"get_logo_url_api_v1_orgs_me_branding_logo_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoUrlResponse"}}}}}},"delete":{"tags":["orgs"],"summary":"Delete Logo","description":"Clear the logo: delete the S3 object AND clear\n`Org.branding.logoS3Key`. Idempotent — a missing object is a\nno-op.","operationId":"delete_logo_api_v1_orgs_me_branding_logo_delete","responses":{"204":{"description":"Successful Response"}}}},"/api/v1/orgs/me/branding":{"patch":{"tags":["orgs"],"summary":"Patch Branding","description":"Update `accentColor` / `heroText` only. `logoS3Key` is\nserver-managed via the upload-finalize flow; Pydantic\n`extra=\"forbid\"` rejects clients that try to send it.","operationId":"patch_branding_api_v1_orgs_me_branding_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingPatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Branding"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/me/analytics/assessments":{"get":{"tags":["orgs-analytics"],"summary":"List Org Assessments","operationId":"list_org_assessments_api_v1_orgs_me_analytics_assessments_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAnalyticsListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/me/analytics/summary":{"get":{"tags":["orgs-analytics"],"summary":"Org Analytics Summary","operationId":"org_analytics_summary_api_v1_orgs_me_analytics_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAnalyticsSummary"}}}}}}},"/api/v1/orgs/me/analytics/assessments/{id}":{"get":{"tags":["orgs-analytics"],"summary":"Org Assessment Detail","operationId":"org_assessment_detail_api_v1_orgs_me_analytics_assessments__id__get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"pattern":"^[a-f0-9]{32}$","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAssessmentDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/me/analytics/answers":{"get":{"tags":["orgs-analytics"],"summary":"Org Analytics Answers","operationId":"org_analytics_answers_api_v1_orgs_me_analytics_answers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAnswerDistribution"}}}}}}},"/api/v1/orgs/me/analytics/trends":{"get":{"tags":["orgs-analytics"],"summary":"Org Analytics Trends","operationId":"org_analytics_trends_api_v1_orgs_me_analytics_trends_get","parameters":[{"name":"granularity","in":"query","required":false,"schema":{"enum":["day","week","month"],"type":"string","default":"week","title":"Granularity"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAnalyticsTrends"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/me/analytics/export":{"post":{"tags":["orgs-analytics"],"summary":"Org Analytics Export","operationId":"org_analytics_export_api_v1_orgs_me_analytics_export_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAnalyticsExportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/{assessment_id}/pdf":{"post":{"tags":["pdf"],"summary":"Create Pdf","operationId":"create_pdf_api_v1_assessments__assessment_id__pdf_post","parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"string","title":"Assessment 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/PdfCreateRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/{assessment_id}/pdf/{pdf_id}/status":{"get":{"tags":["pdf"],"summary":"Get Pdf Status","operationId":"get_pdf_status_api_v1_assessments__assessment_id__pdf__pdf_id__status_get","parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"string","title":"Assessment Id"}},{"name":"pdf_id","in":"path","required":true,"schema":{"type":"string","title":"Pdf Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/{assessment_id}/pdf/{pdf_id}/download":{"get":{"tags":["pdf"],"summary":"Download Pdf","operationId":"download_pdf_api_v1_assessments__assessment_id__pdf__pdf_id__download_get","parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"string","title":"Assessment Id"}},{"name":"pdf_id","in":"path","required":true,"schema":{"type":"string","title":"Pdf Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/{assessment_id}/pdfs":{"get":{"tags":["pdf"],"summary":"List Pdfs","operationId":"list_pdfs_api_v1_assessments__assessment_id__pdfs_get","parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"string","title":"Assessment Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/customers":{"post":{"tags":["platform"],"summary":"Create Customer","description":"Onboard a new tenant: write the Org META row + first-admin invite\nrow in a single atomic `TransactWriteItems`, then send the SES\ninvite email.\n\nNo Cognito user is created here — the first admin's Cognito user is\nminted at accept-invite time via the existing\n`/api/v1/auth/accept-invite` path (mirrors the customer-side\n`POST /orgs/me/invites` flow).\n\nPre-checks the email is not already a Cognito user — staff\nonboarding `alice@acme.com` to two distinct orgs would otherwise\nleave a permanently-consumed seat on whichever invite is accepted\nsecond.\n\nFailure semantics:\n- 409 `EMAIL_ALREADY_REGISTERED` — caller should pick a different\n  first admin (or contact the existing tenant's admin directly).\n- 503 `ONBOARDING_TRANSIENT` — DDB transact failed (UUID collision\n  / Cognito throttle on pre-check). Atomic write means no partial\n  state.\n- SES send fails → log, return 201 anyway (operator can resend via\n  `POST /orgs/me/invites/{inviteId}/resend`).","operationId":"create_customer_api_v1_platform_customers_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomerRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["platform"],"summary":"List Customers","description":"List all tenants. Cursor-paginated; opaque cursor sub-bound to\nthe staff principal.","operationId":"list_customers_api_v1_platform_customers_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformCustomerListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/attention":{"get":{"tags":["platform"],"summary":"Get Attention","description":"Cross-org staff work queue: purges awaiting this staff's approval\nplus orgs at/over a cap.","operationId":"get_attention_api_v1_platform_attention_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformAttentionResponse"}}}}}}},"/api/v1/platform/customers/{org_id}":{"get":{"tags":["platform"],"summary":"Get Customer Detail","operationId":"get_customer_detail_api_v1_platform_customers__org_id__get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformCustomerDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["platform"],"summary":"Soft Delete Customer Endpoint","description":"Soft-delete: `Org.deletedAt = now` + DDB TTL 90d + Cognito\n`AdminDisableUser` for every member. Reversible via operator CLI\nwithin the 90d window; after that the DDB sweep evicts the row.\n\nReturns 204 on success, 404 if the org is absent (or already\nsoft-deleted — filtered by `get_org_meta`), 409 on the race-only\n`ORG_ALREADY_DELETED` path.","operationId":"soft_delete_customer_endpoint_api_v1_platform_customers__org_id__delete","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Org Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/customers/{org_id}/members":{"get":{"tags":["platform"],"summary":"List Customer Members","description":"T-067: unified member list — active members + pending invites +\nremoved (tombstoned) members, discriminated by `kind`.\n\nDeliberately NOT cursor-paginated — a deviation from this router's\nlist convention. The response is a bounded list hard-capped at\n`service.MEMBERS_RESPONSE_CAP` rows, with `truncated` + `totalCount`\nenvelope fields signalling the cut. Cursor pagination stays an\nadditive later change.","operationId":"list_customer_members_api_v1_platform_customers__org_id__members_get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformMemberList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/customers/{org_id}/invites":{"post":{"tags":["platform"],"summary":"Create Customer Invite","description":"T-065: staff-initiated member invite on behalf of the customer.\n\nWraps the tenant invite flow (`app/orgs/invite_flow.py`) with an\nIDENTICAL error contract — staff do NOT bypass the org's\ninvite-domain allowlist, member pre-check, or seat-limit transact:\n\n- 400 `INVALID_EMAIL` / `DOMAIN_NOT_ALLOWED`\n- 409 `EMAIL_ALREADY_MEMBER` / `SEAT_LIMIT_REACHED` /\n  `EMAIL_ALREADY_INVITED`\n- 404 `ORG_NOT_FOUND`, 422 `INVALID_ORG_ID`\n\nSES failure is recoverable — still 201, delivery pill stays\nPENDING (same posture as the tenant flow and `POST /customers`).","operationId":"create_customer_invite_api_v1_platform_customers__org_id__invites_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformInviteCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteResponseMirror"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/customers/{org_id}/invites/{invite_id}/resend":{"post":{"tags":["platform"],"summary":"Resend Customer Invite","description":"T-068: staff-initiated invite resend on behalf of the customer.\n\nRotates the invite token + resets the TTL and delivery state, then\nre-sends the SES email (recoverable — still 200 with a PENDING pill\non SES failure). Shares the resend core with the tenant endpoint\n(`app/orgs/invite_flow.py`) so the two surfaces cannot drift.\n\n- 404 `ORG_NOT_FOUND` (unknown / soft-deleted org),\n  404 `INVITE_NOT_FOUND`\n- 423 `ORG_LOCKED_PENDING_PURGE`\n- 422 `INVALID_ORG_ID` / malformed invite id","operationId":"resend_customer_invite_api_v1_platform_customers__org_id__invites__invite_id__resend_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Org Id"}},{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$","title":"Invite Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteResponseMirror"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/customers/{org_id}/invites/{invite_id}":{"delete":{"tags":["platform"],"summary":"Cancel Customer Invite","description":"T-068: staff-initiated invite cancel on behalf of the customer.\n\nReuses the existing atomic `orgs_dynamo.cancel_invite` (delete row +\ndecrement `seatsUsed`, guarded `> 0`) — no new transaction. 204 no\nbody on success; a second cancel of an already-gone invite is 404\n`INVITE_NOT_FOUND` (idempotent).\n\npurge-pending → 423 by design (invites die with the purge, so cancel\nis redundant; the uniform staff-write lock takes precedence — do NOT\n\"fix\" this into an allow).\n\n- 404 `ORG_NOT_FOUND` (unknown / soft-deleted org),\n  404 `INVITE_NOT_FOUND`\n- 423 `ORG_LOCKED_PENDING_PURGE`\n- 422 `INVALID_ORG_ID` / malformed invite id","operationId":"cancel_customer_invite_api_v1_platform_customers__org_id__invites__invite_id__delete","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Org Id"}},{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$","title":"Invite Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/customers/{org_id}/limits":{"patch":{"tags":["platform"],"summary":"Patch Customer Limits","description":"Update `seatLimit` and/or `assessmentLimit`. Lowering below\ncurrent usage IS allowed (spec line 159) — existing rows stay,\nnew creations begin rejecting at 409 once the new ceiling is\nreached.","operationId":"patch_customer_limits_api_v1_platform_customers__org_id__limits_patch","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformLimitsPatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformLimitsPatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/customers/{org_id}/branding/logo-upload":{"post":{"tags":["platform"],"summary":"Staff Logo Upload","description":"Presign a logo PUT for a customer org (staff-side).\n\nReuses `orgs_branding.presign_logo_upload` VERBATIM — server chooses\nthe S3 key; the client never sees / supplies it. `status_code=201`\nmatches the tenant route. 404 `ORG_NOT_FOUND` (masks soft-deleted),\n423 `ORG_LOCKED_PENDING_PURGE`, 400 `INVALID_LOGO_FORMAT`.","operationId":"staff_logo_upload_api_v1_platform_customers__org_id__branding_logo_upload_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformLogoUploadRequestMirror"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformLogoUploadResponseMirror"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/customers/{org_id}/branding/logo-finalize":{"post":{"tags":["platform"],"summary":"Staff Logo Finalize","description":"Magic-bytes verify + finalize a customer logo (staff-side).\n\nReuses `orgs_branding.verify_and_finalize_logo` VERBATIM, then stamps\n`brandingUpdatedByType=STAFF`. 200 matches the tenant finalize\nstatus. Error codes mirror the tenant route: 400 `UPLOAD_NOT_FOUND`\n/ 400 `INVALID_LOGO_FORMAT`. Returns the full branding mirror\n(superset of the tenant `{hasLogo}` — the FE refetches the preview\nfrom this same shape).","operationId":"staff_logo_finalize_api_v1_platform_customers__org_id__branding_logo_finalize_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformLogoFinalizeRequestMirror"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformBrandingMirror"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/customers/{org_id}/branding/logo":{"get":{"tags":["platform"],"summary":"Staff Get Logo Url","description":"Presigned GET URL for a customer's logo (5min TTL, staff-side).\n\nReuses `orgs_branding.presign_logo_get` VERBATIM. 200 `{url}`; 404\n`LOGO_NOT_FOUND` when the org has no logo configured (NOT\n`BRANDING_NOT_CONFIGURED` — that is the 503 for missing app wiring,\nhandled in `_branding_state`). The read audit fires BEFORE the\nexistence check in the service (read invariant).","operationId":"staff_get_logo_url_api_v1_platform_customers__org_id__branding_logo_get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformLogoUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/customers/{org_id}/branding":{"patch":{"tags":["platform"],"summary":"Staff Patch Branding","description":"Update a customer's `accentColor` / `heroText` (staff-side).\n\nValidation reuses `orgs_branding.validate_accent_color` /\n`validate_hero_text` VERBATIM; errors map to the tenant codes 400\n`INVALID_ACCENT_COLOR` / `INVALID_HERO_TEXT`. Deliberately STRICTER\nthan the tenant PATCH: the schema requires at least one field (422 on\nempty `{}`). Stamps `brandingUpdatedByType=STAFF`.","operationId":"staff_patch_branding_api_v1_platform_customers__org_id__branding_patch","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformBrandingPatchRequestMirror"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformBrandingMirror"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/customers/{org_id}/assessments":{"get":{"tags":["platform"],"summary":"List Customer Assessments","description":"STAFF cross-tenant read — list. Mirror of `/api/v1/assessments`;\nsame `assess_svc.list_assessments` carries the work.","operationId":"list_customer_assessments_api_v1_platform_customers__org_id__assessments_get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Org Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/search":{"get":{"tags":["platform"],"summary":"Platform Search","operationId":"platform_search_api_v1_platform_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":25,"minimum":1,"default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/query/{surface}":{"get":{"tags":["platform"],"summary":"Platform Query","operationId":"platform_query_api_v1_platform_query__surface__get","parameters":[{"name":"surface","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":32,"title":"Surface"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/export/{surface}":{"post":{"tags":["platform"],"summary":"Platform Export","operationId":"platform_export_api_v1_platform_export__surface__post","parameters":[{"name":"surface","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":32,"title":"Surface"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/customers/{org_id}/activity":{"get":{"tags":["platform"],"summary":"Get Customer Activity","operationId":"get_customer_activity_api_v1_platform_customers__org_id__activity_get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Org Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityFeedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/auth/reconfirm":{"post":{"tags":["platform"],"summary":"Staff Reconfirm","description":"Mint a 60s destructive-confirmation token for a staff-class\naction (`customer.soft_delete`, `customer.purge_*`).\n\nRe-auth check is `auth_time` freshness (≤5 min) — JumpCloud-issued\nvia SAML, refreshed on a ForceAuthn=true AuthnRequest. No password\nis sent (the staff pool has no password flow).\n\nThe reconfirm endpoint at `/api/v1/auth/me/reconfirm` (tenant) is\nthe sibling for tenant-class actions; that one verifies a password\nre-entry and refuses staff-class actions. The two endpoints share\nthe action enum + targetId-format table from\n`app/auth/confirm_token.py`.","operationId":"staff_reconfirm_api_v1_platform_auth_reconfirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffReconfirmRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffReconfirmResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/customers/{org_id}/purge":{"post":{"tags":["platform"],"summary":"Request Purge Endpoint","description":"Stage 1 — request a GDPR hard-delete.\n\nBody `orgNameConfirmation` MUST match the META row's `name` field\n(case-sensitive whitespace-trimmed). `scope` reserved literal\n`\"full\"`.\n\nReturns 202 with `requestId` + `scheduledAt` (now+72h). Cancel\navailable any time before scheduledAt via Stage 3.\n\nSide effects:\n- PurgeRequest row written: PK=PURGE#{orgId}, SK=REQUEST#{requestId},\n  status=PENDING.\n- Org META row gets `purgePending = requestId` denorm — locks\n  tenant + staff writes (423) for the duration of the open purge.\n- Pre-fire baseline (memberHash, assessmentHash, counts) frozen on\n  the PurgeRequest row for forensic comparison at fire time.","operationId":"request_purge_endpoint_api_v1_platform_customers__org_id__purge_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurgeRequestCreate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurgeRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/customers/{org_id}/purge/{request_id}/approve":{"post":{"tags":["platform"],"summary":"Approve Purge Endpoint","description":"Stage 2 — second-staff approval.\n\n`staff.sub` MUST differ from `requestedBy` (spec line 500). Same\nstaff trying to approve their own request → 403\nSAME_STAFF_APPROVAL_FORBIDDEN.\n\nConditional state transition PENDING → APPROVED. The 72h cancel\nwindow (set at Stage 1's `scheduledAt`) is unaffected by approval\ntiming — fire-Lambda only claims rows that are BOTH `APPROVED`\nAND `scheduledAt <= now`.\n\nThe JWT `jti` of the approving staff is recorded as\n`secondApproverJti` on the PurgeRequest row — combined with\n`requestedBy.jti` (Stage 1) gives full session attribution for\neach approval link in the audit chain.","operationId":"approve_purge_endpoint_api_v1_platform_customers__org_id__purge__request_id__approve_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Org Id"}},{"name":"request_id","in":"path","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurgeRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/customers/{org_id}/purge/{request_id}":{"delete":{"tags":["platform"],"summary":"Cancel Purge Endpoint","description":"Stage 3 — cancel a PENDING or APPROVED purge.\n\nAuthorised cancellers (spec line 509): original requester, the\napprover, or the break-glass STAFF account. NOT \"any STAFF\" — the\ncancel-as-suppression-vector concern is real (review pass 2 finding\nS2). 403 otherwise.\n\nAlways emits an immutable cancel audit row regardless of caller —\nspec line 512. CloudWatch trail is the interim record until the\nObject-Lock bucket lands in Commit 3.\n\nConditional state transition: row must be PENDING or APPROVED.\nCancelling a CANCELLED / FIRING / COMPLETED row → 409\nPURGE_NOT_CANCELLABLE.","operationId":"cancel_purge_endpoint_api_v1_platform_customers__org_id__purge__request_id__delete","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Org Id"}},{"name":"request_id","in":"path","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurgeRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/customers/{org_id}/purge/{request_id}/clear-lock":{"post":{"tags":["platform"],"summary":"Clear Purge Lock Endpoint","description":"B5.4g operator escape hatch — clear `Org.purgePending` after a\nPARTIAL or FAILED terminal state.\n\nPARTIAL/FAILED leave the lock in place by design (operator must\ninvestigate before re-arming). After investigation + recovery,\nthis endpoint clears the lock.\n\nRestricted to break-glass STAFF (`settings.break_glass_staff_sub`)\n— defence-in-depth on top of `RequireStaff` + the\n`customer.purge_clear_lock` confirm-token gate. The operator-side\nCLI (`scripts/clear_purge_pending.py`) is the same primitive\ninvoked directly via boto3 + IAM; the API endpoint is for the\ncommon case where the staff console UI is the entry point.\n\nRefused with 409 `PURGE_NOT_TERMINAL` if the row is still in\nPENDING / APPROVED / FIRING — the state machine is legitimately\ndriving the lock and an operator clear would race the fire-Lambda.\nRefused with 409 `LOCK_REFERENCES_DIFFERENT_REQUEST` if a newer\nStage-1 has already replaced the lock.","operationId":"clear_purge_lock_endpoint_api_v1_platform_customers__org_id__purge__request_id__clear_lock_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Org Id"}},{"name":"request_id","in":"path","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurgeRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/customers/{org_id}/assessments/{assessment_id}":{"get":{"tags":["platform"],"summary":"Get Customer Assessment","description":"STAFF cross-tenant read — single assessment.","operationId":"get_customer_assessment_api_v1_platform_customers__org_id__assessments__assessment_id__get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Org Id"}},{"name":"assessment_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Assessment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentFull"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/pricing-tiers":{"get":{"tags":["billing"],"summary":"Get Pricing Tiers","operationId":"get_pricing_tiers_api_v1_platform_pricing_tiers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingTierConfigResponse"}}}}}},"put":{"tags":["billing"],"summary":"Put Pricing Tiers","description":"Creates a new immutable version. Orgs already subscribed keep\ntheir pinned version until their own renewal re-pins them — see\napp.billing.reprice / the webhook handler (Task 10).","operationId":"put_pricing_tiers_api_v1_platform_pricing_tiers_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingTierConfigPatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingTierConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/customers/{org_id}/billing":{"get":{"tags":["billing"],"summary":"Get Org Billing","description":"Task 11: staff-only mirror of an org's live billing state.\n\n404s `ORG_NOT_ON_PER_SEAT_BILLING` for both a missing Org META row\nand a legacy (flat-limit) org that has never onboarded onto\n`per_seat_v1` — `dynamo.get_org_billing_fields` already collapses\nthose two cases (see its docstring), so this handler does not\ndistinguish them either; a staff user gets the same signal either\nway (\"nothing to show here\"), and the 404 doesn't leak whether the\norgId itself exists.\n\nAudit is emitted on attempt, BEFORE the 404 check — same invariant\nas every other cross-tenant staff read on the platform surface\n(`app.platform.service.get_customer_detail` / `get_activity_feed`):\nan org-id enumeration probe against this commercial-data endpoint\nleaves a trail regardless of whether the org exists or is on\n`per_seat_v1`.","operationId":"get_org_billing_api_v1_platform_customers__org_id__billing_get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgBillingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/revenue":{"get":{"tags":["billing"],"summary":"Get Revenue","description":"Task 12: staff-only platform-wide MRR/ARR aggregate. Live\n(on-demand) computation over the current `per_seat_v1` org\npopulation — see `app.billing.metrics.current_revenue_summary`'s\ndocstring for why this does NOT write a snapshot row on every call\n(that's the scheduled Lambda's job, `metrics.snapshot_daily_metrics`).\nNot audited — same as `get_pricing_tiers`, this is an aggregate\nread with no single org's data exposed, unlike `get_org_billing`.","operationId":"get_revenue_api_v1_platform_revenue_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueSummaryResponse"}}}}}}},"/api/v1/webhooks/stripe":{"post":{"tags":["webhooks"],"summary":"Stripe Webhook","operationId":"stripe_webhook_api_v1_webhooks_stripe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Stripe Webhook Api V1 Webhooks Stripe Post"}}}}}}},"/api/v1/assessments/{assessment_id}/shares":{"post":{"tags":["shares"],"summary":"Create Share","operationId":"create_share_api_v1_assessments__assessment_id__shares_post","parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","title":"Assessment Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["shares"],"summary":"List Shares","operationId":"list_shares_api_v1_assessments__assessment_id__shares_get","parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","title":"Assessment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/{assessment_id}/shares/{share_id}":{"delete":{"tags":["shares"],"summary":"Revoke Share","operationId":"revoke_share_api_v1_assessments__assessment_id__shares__share_id__delete","parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","title":"Assessment Id"}},{"name":"share_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","title":"Share Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/results/{result_id}/renew":{"post":{"tags":["shares"],"summary":"Renew Result","operationId":"renew_result_api_v1_results__result_id__renew_post","parameters":[{"name":"result_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","title":"Result Id"}},{"name":"assessment_id","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","title":"Assessment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Renew Result Api V1 Results  Result Id  Renew Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/shares/{token}":{"get":{"tags":["shares-public"],"summary":"Resolve Share","operationId":"resolve_share_api_v1_shares__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_\\-.]{1,2048}$","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/shares/{token}/intake":{"put":{"tags":["shares-public"],"summary":"Save Intake","operationId":"save_intake_api_v1_shares__token__intake_put","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakePayload"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/shares/{token}/answers":{"put":{"tags":["shares-public"],"summary":"Save Answers","operationId":"save_answers_api_v1_shares__token__answers_put","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswersPayload"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/shares/{token}/submit":{"post":{"tags":["shares-public"],"summary":"Submit","operationId":"submit_api_v1_shares__token__submit_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/results/{resultToken}":{"get":{"tags":["results-public"],"summary":"Resolve Result","operationId":"resolve_result_api_v1_results__resultToken__get","parameters":[{"name":"resultToken","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_\\-.]{1,2048}$","title":"Resulttoken"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/results/{resultToken}/pdf":{"post":{"tags":["results-public"],"summary":"Enqueue Pdf","operationId":"enqueue_pdf_api_v1_results__resultToken__pdf_post","parameters":[{"name":"resultToken","in":"path","required":true,"schema":{"type":"string","title":"Resulttoken"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Enqueue Pdf Api V1 Results  Resulttoken  Pdf Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/results/{resultToken}/pdf/{pdfId}/status":{"get":{"tags":["results-public"],"summary":"Pdf Status","operationId":"pdf_status_api_v1_results__resultToken__pdf__pdfId__status_get","parameters":[{"name":"pdfId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","title":"Pdfid"}},{"name":"resultToken","in":"path","required":true,"schema":{"type":"string","title":"Resulttoken"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Pdf Status Api V1 Results  Resulttoken  Pdf  Pdfid  Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/results/{resultToken}/pdf/{pdfId}/download":{"get":{"tags":["results-public"],"summary":"Pdf Download","operationId":"pdf_download_api_v1_results__resultToken__pdf__pdfId__download_get","parameters":[{"name":"pdfId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","title":"Pdfid"}},{"name":"resultToken","in":"path","required":true,"schema":{"type":"string","title":"Resulttoken"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/results/{resultToken}/email-receipt":{"post":{"tags":["results-public"],"summary":"Resend Email Receipt","operationId":"resend_email_receipt_api_v1_results__resultToken__email_receipt_post","parameters":[{"name":"resultToken","in":"path","required":true,"schema":{"type":"string","title":"Resulttoken"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/udira/leads":{"post":{"tags":["udira"],"summary":"Create Lead","description":"Create a lead. Idempotent: re-POSTing an existing id returns 200\n(not 201) without clobbering a prior completion — see `UdiraStore.create_lead`.","operationId":"create_lead_api_v1_udira_leads_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Create Lead Api V1 Udira Leads Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/udira/leads/{id}":{"put":{"tags":["udira"],"summary":"Complete","operationId":"complete_api_v1_udira_leads__id__put","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Completion"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Complete Api V1 Udira Leads  Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/captcha/verify-intake":{"post":{"tags":["captcha"],"summary":"Verify Intake","description":"Gate on entering the assessment from the public intake page.","operationId":"verify_intake_api_v1_captcha_verify_intake_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyIntakeRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health":{"get":{"summary":"Health","operationId":"health_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Api V1 Health Get"}}}}}}}},"components":{"schemas":{"AcceptInviteRequest":{"properties":{"token":{"type":"string","maxLength":2048,"minLength":1,"title":"Token"},"password":{"type":"string","maxLength":128,"minLength":12,"title":"Password"},"displayName":{"type":"string","maxLength":128,"minLength":1,"title":"Displayname"},"jobTitle":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Jobtitle"}},"additionalProperties":false,"type":"object","required":["token","password","displayName"],"title":"AcceptInviteRequest","description":"Body for `POST /api/v1/auth/accept-invite`. Token + new password.\n\nPassword constraints mirror the existing `SignupRequest` policy\nso the invite-accept user-experience matches the (now-deprecated)\nsignup flow."},"ActivityActor":{"properties":{"type":{"type":"string","enum":["TENANT","STAFF","SYSTEM"],"title":"Type"},"sub":{"type":"string","title":"Sub"},"label":{"type":"string","title":"Label"}},"additionalProperties":false,"type":"object","required":["type","sub","label"],"title":"ActivityActor"},"ActivityEvent":{"properties":{"id":{"type":"string","title":"Id"},"ts":{"type":"integer","title":"Ts"},"kind":{"anyOf":[{"type":"string","enum":["member.invited","member.accepted","member.role_changed","member.removed","assessment.created","assessment.updated","assessment.submitted","assessment.deleted","share.created","share.revoked","result.viewed","branding.updated"]},{"type":"string","enum":["limits.patched","purge.requested","purge.completed","member.login","member.role_changed","orgs.analytics.query","orgs.analytics.summary","orgs.analytics.assessment_read","orgs.analytics.answers","orgs.analytics.export","orgs.analytics.trends"]}],"title":"Kind"},"actor":{"$ref":"#/components/schemas/ActivityActor"},"target":{"$ref":"#/components/schemas/ActivityTarget"},"summary":{"type":"string","title":"Summary"}},"additionalProperties":false,"type":"object","required":["id","ts","kind","actor","target","summary"],"title":"ActivityEvent"},"ActivityFeedResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/ActivityEvent"},"type":"array","title":"Events"},"degraded":{"type":"boolean","title":"Degraded","default":false},"failedSources":{"items":{"type":"string"},"type":"array","title":"Failedsources","default":[]},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"}},"additionalProperties":false,"type":"object","required":["events"],"title":"ActivityFeedResponse"},"ActivityTarget":{"properties":{"kind":{"type":"string","title":"Kind"},"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"}},"additionalProperties":false,"type":"object","required":["kind","id","label"],"title":"ActivityTarget"},"AiActBumpDict":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"bump":{"type":"number","title":"Bump"},"explanation":{"type":"string","title":"Explanation"}},"additionalProperties":false,"type":"object","required":["key","label","bump","explanation"],"title":"AiActBumpDict"},"AnswerOptionCount":{"properties":{"optionIndex":{"type":"integer","title":"Optionindex"},"count":{"type":"integer","title":"Count"}},"additionalProperties":false,"type":"object","required":["optionIndex","count"],"title":"AnswerOptionCount","description":"Count of assessments (in the sampled set) that chose `optionIndex`\nfor a given question. Every declared option index is present, even at\ncount 0, so a 0-choice option renders explicitly."},"AnswerQuestion":{"properties":{"questionId":{"type":"integer","title":"Questionid"},"answerIndex":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Answerindex"},"score":{"type":"integer","title":"Score"},"skipped":{"type":"boolean","title":"Skipped"}},"additionalProperties":false,"type":"object","required":["questionId","score","skipped"],"title":"AnswerQuestion","description":"One question inside a section drill-down.\n\n`answerIndex` is the chosen option index (0-based) or `None` when the\nquestion is unanswered. `score` is the server-recomputed per-question\nrisk contribution (0 for unanswered, skipped, or display-only\nlikelihood questions). `skipped` is True when server-side skip logic\n(rebuilt from answers + active addendum lines + intake) removed the\nquestion from scoring. The question TEXT is NOT embedded — the\nfrontend renders it from its own static question table keyed by\n`questionId` (the same 192-question port the BE scores against)."},"AnswerSection":{"properties":{"sectionId":{"type":"integer","title":"Sectionid"},"label":{"type":"string","title":"Label"},"sectionScore":{"type":"integer","title":"Sectionscore"},"max":{"type":"integer","title":"Max"},"questions":{"items":{"$ref":"#/components/schemas/AnswerQuestion"},"type":"array","title":"Questions"}},"additionalProperties":false,"type":"object","required":["sectionId","label","sectionScore","max","questions"],"title":"AnswerSection","description":"One section group in the drill-down: the recomputed raw\n`sectionScore` (0..`max`) plus each of its questions."},"AnswersPayload":{"properties":{"answers":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"},{"type":"null"}]},"type":"object","title":"Answers"},"flagged":{"items":{"type":"string"},"type":"array","maxItems":500,"title":"Flagged"}},"additionalProperties":false,"type":"object","title":"AnswersPayload"},"AssessmentCreate":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"initial":{"anyOf":[{"$ref":"#/components/schemas/AssessmentDataPayload"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["title"],"title":"AssessmentCreate"},"AssessmentDataPayload":{"properties":{"intake":{"$ref":"#/components/schemas/IntakeData"},"answers":{"additionalProperties":{"type":"integer"},"type":"object","title":"Answers"},"notes":{"additionalProperties":{"type":"string"},"type":"object","title":"Notes"},"skipped":{"items":{"type":"integer"},"type":"array","maxItems":250,"title":"Skipped"},"activeAddendumLines":{"items":{"type":"string","enum":["cyber","techeo","do","ip","epl","profliab","products","media","mpl"]},"type":"array","title":"Activeaddendumlines"},"exposure":{"$ref":"#/components/schemas/ExposureData"},"claims":{"items":{"$ref":"#/components/schemas/ClaimRecord"},"type":"array","maxItems":500,"title":"Claims"},"claimsHistoryExists":{"type":"string","enum":["yes","no",""],"title":"Claimshistoryexists","default":""},"primaryUseCase":{"anyOf":[{"type":"string","enum":["generative_content","decision_support","product_embedded","predictive_analytics","nlp_search","autonomous_agents","foundation_model","ai_advisory","other"]},{"type":"string","const":""}],"title":"Primaryusecase","default":""},"flaggedQuestions":{"additionalProperties":{"$ref":"#/components/schemas/FlaggedQuestion"},"type":"object","title":"Flaggedquestions"}},"additionalProperties":false,"type":"object","required":["intake"],"title":"AssessmentDataPayload"},"AssessmentFull":{"properties":{"metadata":{"$ref":"#/components/schemas/AssessmentMetadata"},"data":{"$ref":"#/components/schemas/AssessmentDataPayload"}},"additionalProperties":false,"type":"object","required":["metadata","data"],"title":"AssessmentFull"},"AssessmentListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AssessmentMetadata"},"type":"array","title":"Items"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"}},"additionalProperties":false,"type":"object","required":["items"],"title":"AssessmentListResponse"},"AssessmentMetadata":{"properties":{"id":{"type":"string","title":"Id"},"orgId":{"type":"string","title":"Orgid"},"title":{"type":"string","title":"Title"},"status":{"type":"string","enum":["draft","in_progress","submitted","deleted"],"title":"Status"},"createdAt":{"type":"integer","title":"Createdat"},"updatedAt":{"type":"integer","title":"Updatedat"},"createdBy":{"type":"string","title":"Createdby"},"version":{"type":"integer","title":"Version","default":1},"scores":{"anyOf":[{"$ref":"#/components/schemas/ScoreBundleSchema"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["id","orgId","title","status","createdAt","updatedAt","createdBy"],"title":"AssessmentMetadata"},"AssessmentUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Title"},"status":{"anyOf":[{"type":"string","enum":["draft","in_progress","submitted"]},{"type":"null"}],"title":"Status"}},"additionalProperties":false,"type":"object","title":"AssessmentUpdate"},"AuthMessageResponse":{"properties":{"message":{"type":"string","title":"Message"}},"additionalProperties":false,"type":"object","required":["message"],"title":"AuthMessageResponse"},"Branding":{"properties":{"accentColor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accentcolor"},"heroText":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Herotext"},"hasLogo":{"type":"boolean","title":"Haslogo","default":false}},"additionalProperties":false,"type":"object","title":"Branding","description":"Co-branding bundle. Logo S3 key is server-managed (never\naccepted from client PATCH); `accentColor` and `heroText` flow\nthrough `PATCH /api/v1/orgs/me/branding` in B5.2b.\n\nCross-reference: see `app.platform.schemas.BrandingStarter` for the\ncreate-time subset (no `hasLogo` — logos arrive post-onboarding\nvia the upload-finalize flow)."},"BrandingPatchRequest":{"properties":{"accentColor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accentcolor"},"heroText":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Herotext"}},"additionalProperties":false,"type":"object","title":"BrandingPatchRequest","description":"Body for `PATCH /api/v1/orgs/me/branding`. Theme / text only —\n`logoS3Key` is server-managed via the upload-finalize flow.\nPydantic `extra=\"forbid\"` rejects clients that try to send it."},"BrandingStarter":{"properties":{"accentColor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accentcolor"},"heroText":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Herotext"}},"additionalProperties":false,"type":"object","title":"BrandingStarter","description":"Optional starter branding bundle on customer creation.\n\n`logoS3Key` is intentionally absent — logos arrive via the post-\nonboarding `POST /orgs/me/branding/logo-upload` flow once the first\nadmin lands in the tenant. Accepting a logo at create time would\nrequire a presign / magic-bytes step on the staff side that doesn't\nexist; spec §\"Co-branding\" line 439 calls this out explicitly."},"ChallengeResponse":{"properties":{"challenge_name":{"type":"string","title":"Challenge Name"},"session":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"},"challenge_parameters":{"additionalProperties":{"type":"string"},"type":"object","title":"Challenge Parameters"}},"additionalProperties":false,"type":"object","required":["challenge_name","challenge_parameters"],"title":"ChallengeResponse"},"ClaimRecord":{"properties":{"id":{"type":"string","maxLength":128,"minLength":1,"title":"Id"},"resolutionYear":{"type":"string","maxLength":4,"title":"Resolutionyear","default":""},"category":{"anyOf":[{"type":"string","enum":["ai_algorithmic","data_breach","ip_licensing","privacy_regulatory","employment_eeoc","do_securities","general_other"]},{"type":"string","const":""}],"title":"Category","default":""},"status":{"anyOf":[{"type":"string","enum":["paid","closed","open","denied","resolved_no_action","resolved_with_payment","settled"]},{"type":"string","const":""}],"title":"Status","default":""},"indemnityPaid":{"anyOf":[{"type":"integer","maximum":1000000000000.0,"minimum":0.0},{"type":"null"}],"title":"Indemnitypaid"},"defenseCost":{"anyOf":[{"type":"integer","maximum":1000000000000.0,"minimum":0.0},{"type":"null"}],"title":"Defensecost"},"description":{"type":"string","maxLength":4000,"title":"Description","default":""},"line":{"anyOf":[{"type":"string","enum":["cyber","techeo","do","ip","epl","profliab","products","media","mpl","other"]},{"type":"string","const":""},{"type":"null"}],"title":"Line"},"allegedCause":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Allegedcause"},"claimantType":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Claimanttype"},"aiTrainingDataInvolved":{"anyOf":[{"type":"string","enum":["yes","no","unknown",""]},{"type":"null"}],"title":"Aitrainingdatainvolved"},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"}},"additionalProperties":false,"type":"object","required":["id"],"title":"ClaimRecord"},"Completion":{"properties":{"answers":{"additionalProperties":{"type":"integer"},"type":"object","title":"Answers"},"completedAt":{"type":"string","title":"Completedat"}},"additionalProperties":false,"type":"object","required":["answers","completedAt"],"title":"Completion"},"ConfirmRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"confirmation_code":{"type":"string","maxLength":6,"minLength":6,"title":"Confirmation Code"}},"additionalProperties":false,"type":"object","required":["email","confirmation_code"],"title":"ConfirmRequest"},"ContactsRow":{"properties":{"orgId":{"type":"string","title":"Orgid"},"name":{"type":"string","title":"Name"},"seatsUsed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seatsused"},"seatLimit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seatlimit"},"assessmentsUsed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assessmentsused"},"assessmentLimit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assessmentlimit"},"createdAt":{"type":"string","title":"Createdat"}},"additionalProperties":false,"type":"object","required":["orgId","name","createdAt"],"title":"ContactsRow","description":"Row projection for the `contacts` query surface (Org META rows).\n\nM2: the four seat/assessment counters are `int | None` (not required\n`int`) defensively — GSI2's INCLUDE projection carries them, but a\nlegacy Org META row predating one of them would otherwise 500 the\nwhole surface via the same missing-required-field path that C1/C2\nfix for `createdAt`/`assessmentId`."},"CreateCustomerRequest":{"properties":{"orgName":{"type":"string","maxLength":128,"minLength":1,"title":"Orgname"},"firstAdminEmail":{"type":"string","format":"email","title":"Firstadminemail"},"seatLimit":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":1.0},{"type":"null"}],"title":"Seatlimit"},"assessmentLimit":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":1.0},{"type":"null"}],"title":"Assessmentlimit"},"billingInterval":{"anyOf":[{"type":"string","enum":["monthly","annual"]},{"type":"null"}],"title":"Billinginterval"},"inviteDomains":{"anyOf":[{"items":{"type":"string","maxLength":253,"minLength":3},"type":"array"},{"type":"null"}],"title":"Invitedomains"},"shareLinkDefaultExpiryDays":{"anyOf":[{"type":"integer","maximum":90.0,"minimum":1.0},{"type":"null"}],"title":"Sharelinkdefaultexpirydays"},"branding":{"anyOf":[{"$ref":"#/components/schemas/BrandingStarter"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["orgName","firstAdminEmail"],"title":"CreateCustomerRequest","description":"Body for `POST /api/v1/platform/customers`.\n\nSpec §\"Onboarding payload\" line 416-441. Fields:\n- `orgName` — display name; 1-128 chars.\n- `firstAdminEmail` — invite recipient; normalised at handler time\n  (sub-addressing rejected at both invite-create and accept-time).\n- `seatLimit` / `assessmentLimit` — STAFF-set ceilings for the\n  LEGACY (flat-limit) onboarding path. Mutually exclusive with\n  `billingInterval` — see `_exactly_one_billing_model` below.\n- `billingInterval` — seat-based-pricing Task 8: presence selects\n  the `per_seat_v1` onboarding path (live Stripe customer +\n  subscription created at 1 seat, no seat/assessment cap). Mutually\n  exclusive with `seatLimit`/`assessmentLimit`.\n- `inviteDomains` — optional override; defaults to the first admin's\n  email domain at handler time. Comparison is byte-exact against\n  normalised domains.\n- `shareLinkDefaultExpiryDays` — defaults to 14 if omitted.\n- `branding` — optional starter `{accentColor, heroText}`."},"CreateCustomerResponse":{"properties":{"orgId":{"type":"string","title":"Orgid"},"inviteId":{"type":"string","title":"Inviteid"},"firstAdminEmail":{"type":"string","title":"Firstadminemail"},"orgName":{"type":"string","title":"Orgname"},"seatLimit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seatlimit"},"assessmentLimit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assessmentlimit"},"billingModel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billingmodel"},"billingInterval":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billinginterval"},"currentMonthlyCostCents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Currentmonthlycostcents"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"inviteExpiresAt":{"type":"string","format":"date-time","title":"Inviteexpiresat"}},"additionalProperties":false,"type":"object","required":["orgId","inviteId","firstAdminEmail","orgName","createdAt","inviteExpiresAt"],"title":"CreateCustomerResponse","description":"Returned 201. Mirrors the B5.2a invite response shape but with\nthe new `orgId` so the staff UI can deep-link straight to\n`/platform/customers/{orgId}` after create.\n\nSeat-based-pricing Task 8: `seatLimit`/`assessmentLimit` are\npopulated for the legacy path and `None` for `per_seat_v1` orgs;\n`billingModel`/`billingInterval`/`currentMonthlyCostCents` are the\ninverse (populated only for `per_seat_v1`, `None` for legacy)."},"DtiMetricsRow":{"properties":{"assessmentId":{"type":"string","title":"Assessmentid"},"orgId":{"type":"string","title":"Orgid"},"metricTier":{"type":"string","title":"Metrictier"},"metricAdjustedPct":{"type":"number","title":"Metricadjustedpct"},"metricCompositeScore":{"type":"integer","title":"Metriccompositescore"},"metricCompositeMax":{"type":"integer","title":"Metriccompositemax"},"metricSector":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metricsector"},"metricJurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metricjurisdiction"},"createdAt":{"type":"string","title":"Createdat"}},"additionalProperties":false,"type":"object","required":["assessmentId","orgId","metricTier","metricAdjustedPct","metricCompositeScore","metricCompositeMax","createdAt"],"title":"DtiMetricsRow","description":"Row projection for the `dti-metrics` query surface (assessment\nGSI4 metric-denorm rows — see `app.assessments.dynamo` header\ncomment for the `metricXxx` attribute set)."},"ExportRequest":{"properties":{"filters":{"additionalProperties":{"type":"string"},"type":"object","title":"Filters"},"format":{"type":"string","maxLength":16,"title":"Format","default":"csv"}},"additionalProperties":false,"type":"object","title":"ExportRequest","description":"Request body for `POST /api/v1/platform/export/{surface}` (T-073\nTask 8).\n\n`format` is a plain `str` (NOT a `Literal`) on purpose: an\nunsupported value must reach `run_export` and surface as the domain\n`UNSUPPORTED_FORMAT` (422) error code, not a generic pydantic\nvalidation 422. `filters` are the surface-specific filter fields,\nvalidated downstream against the surface's filter model."},"ExposureData":{"properties":{"modelsInProduction":{"type":"string","maxLength":64,"title":"Modelsinproduction","default":""},"aiRevenuePercent":{"type":"string","maxLength":64,"title":"Airevenuepercent","default":""},"trainingCorpusRecords":{"type":"string","maxLength":64,"title":"Trainingcorpusrecords","default":""},"regulatedSectors":{"items":{"type":"string"},"type":"array","maxItems":32,"title":"Regulatedsectors"},"customerCount":{"type":"string","maxLength":64,"title":"Customercount","default":""},"b2bOrB2c":{"type":"string","enum":["b2b","b2c","both",""],"title":"B2Borb2C","default":""},"employeesAffectedByAI":{"type":"string","maxLength":64,"title":"Employeesaffectedbyai","default":""},"professionalServiceClients":{"type":"string","maxLength":64,"title":"Professionalserviceclients","default":""},"aiEmbeddedProductLines":{"type":"string","maxLength":64,"title":"Aiembeddedproductlines","default":""},"aiContentPiecesPerMonth":{"type":"string","maxLength":64,"title":"Aicontentpiecespermonth","default":""},"aiAdvisoryClients":{"type":"string","maxLength":64,"title":"Aiadvisoryclients","default":""},"existingCoverageLines":{"items":{"type":"string"},"type":"array","maxItems":32,"title":"Existingcoveragelines"},"policyLimitsByLine":{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"null"}]},"type":"object","title":"Policylimitsbyline"}},"additionalProperties":false,"type":"object","title":"ExposureData"},"FlaggedQuestion":{"properties":{"questionId":{"type":"integer","maximum":192.0,"minimum":1.0,"title":"Questionid"},"assignedToEmail":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Assignedtoemail"},"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Note"},"flaggedAt":{"type":"string","maxLength":64,"title":"Flaggedat"}},"additionalProperties":false,"type":"object","required":["questionId","flaggedAt"],"title":"FlaggedQuestion"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"turnstile_token":{"type":"string","minLength":1,"title":"Turnstile Token"}},"additionalProperties":false,"type":"object","required":["email","turnstile_token"],"title":"ForgotPasswordRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InsuranceLineScoreSchema":{"properties":{"displayLabel":{"type":"string","title":"Displaylabel"},"name":{"type":"string","title":"Name"},"score":{"type":"number","title":"Score"},"severityKey":{"type":"string","enum":["low","moderate","elevated","high","critical"],"title":"Severitykey"}},"additionalProperties":false,"type":"object","required":["displayLabel","name","score","severityKey"],"title":"InsuranceLineScoreSchema"},"IntakeData":{"properties":{"org":{"type":"string","maxLength":256,"title":"Org","default":""},"respondent":{"type":"string","maxLength":256,"title":"Respondent","default":""},"title":{"type":"string","maxLength":256,"title":"Title","default":""},"industry":{"type":"string","maxLength":128,"title":"Industry","default":""},"size":{"type":"string","maxLength":64,"title":"Size","default":""},"revenue":{"type":"string","maxLength":64,"title":"Revenue","default":""},"website":{"type":"string","maxLength":512,"title":"Website","default":""},"publiclyTraded":{"type":"string","enum":["yes","no",""],"title":"Publiclytraded","default":""},"jurisdictions":{"items":{"type":"string"},"type":"array","maxItems":64,"title":"Jurisdictions"},"reviewedByName":{"type":"string","maxLength":256,"title":"Reviewedbyname","default":""},"reviewedByTitle":{"anyOf":[{"type":"string","enum":["Chief Executive Officer","General Counsel","Chief Information Officer","Chief Information Security Officer","Chief Data Officer","Chief Technology Officer"]},{"type":"string","const":""}],"title":"Reviewedbytitle","default":""},"reviewedChecked":{"type":"boolean","title":"Reviewedchecked","default":false},"reviewDate":{"type":"string","maxLength":10,"title":"Reviewdate","default":""}},"additionalProperties":false,"type":"object","title":"IntakeData"},"IntakePayload":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"contactName":{"type":"string","maxLength":120,"minLength":1,"title":"Contactname"},"companyName":{"type":"string","maxLength":200,"minLength":1,"title":"Companyname"}},"additionalProperties":false,"type":"object","required":["email","contactName","companyName"],"title":"IntakePayload"},"InviteCreateRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"$ref":"#/components/schemas/TenantRole"}},"additionalProperties":false,"type":"object","required":["email","role"],"title":"InviteCreateRequest"},"InviteListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InviteResponse"},"type":"array","title":"Items"}},"additionalProperties":false,"type":"object","required":["items"],"title":"InviteListResponse"},"InviteResponse":{"properties":{"inviteId":{"type":"string","title":"Inviteid"},"email":{"type":"string","title":"Email"},"role":{"$ref":"#/components/schemas/TenantRole"},"expiresAt":{"type":"string","format":"date-time","title":"Expiresat"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"createdBy":{"type":"string","title":"Createdby"},"deliveryStatus":{"type":"string","enum":["PENDING","DELIVERED","BOUNCED","COMPLAINT","REJECTED"],"title":"Deliverystatus","default":"PENDING"},"deliveryStatusUpdatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deliverystatusupdatedat"},"deliveryDetail":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Deliverydetail"}},"additionalProperties":false,"type":"object","required":["inviteId","email","role","expiresAt","createdAt","createdBy"],"title":"InviteResponse"},"InviteResponseMirror":{"properties":{"inviteId":{"type":"string","title":"Inviteid"},"email":{"type":"string","title":"Email"},"role":{"type":"string","enum":["ADMIN","EDITOR","VIEWER"],"title":"Role"},"expiresAt":{"type":"string","format":"date-time","title":"Expiresat"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"createdBy":{"type":"string","title":"Createdby"},"deliveryStatus":{"type":"string","enum":["PENDING","DELIVERED","BOUNCED","COMPLAINT","REJECTED"],"title":"Deliverystatus","default":"PENDING"},"deliveryStatusUpdatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deliverystatusupdatedat"},"deliveryDetail":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Deliverydetail"}},"additionalProperties":false,"type":"object","required":["inviteId","email","role","expiresAt","createdAt","createdBy"],"title":"InviteResponseMirror","description":"T-055: staff-side mirror of `app.orgs.schemas.InviteResponse`.\n\nIdentical wire shape; defined here to keep the platform schema\nmodule self-contained for the staff customer-detail surface. If the\ntenant-side shape evolves, update both sites in lockstep — drift is\na contract violation visible to platform UI tests."},"LeadCreate":{"properties":{"id":{"type":"string","title":"Id"},"institution":{"type":"string","title":"Institution"},"name":{"type":"string","title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"region":{"$ref":"#/components/schemas/Region"},"role":{"$ref":"#/components/schemas/Role"},"consent":{"type":"boolean","title":"Consent"},"consentVersion":{"type":"string","title":"Consentversion"}},"additionalProperties":false,"type":"object","required":["id","institution","name","email","region","role","consent","consentVersion"],"title":"LeadCreate"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"srp_a":{"type":"string","minLength":1,"title":"Srp A"},"turnstile_token":{"type":"string","minLength":1,"title":"Turnstile Token"}},"additionalProperties":false,"type":"object","required":["email","srp_a","turnstile_token"],"title":"LoginRequest"},"LogoFinalizeRequest":{"properties":{"uploadId":{"type":"string","pattern":"^[a-f0-9]{32}$","title":"Uploadid"}},"additionalProperties":false,"type":"object","required":["uploadId"],"title":"LogoFinalizeRequest"},"LogoFinalizeResponse":{"properties":{"hasLogo":{"type":"boolean","title":"Haslogo"}},"additionalProperties":false,"type":"object","required":["hasLogo"],"title":"LogoFinalizeResponse"},"LogoUploadRequest":{"properties":{"mime":{"type":"string","enum":["image/png","image/jpeg"],"title":"Mime"},"size":{"type":"integer","maximum":2097152.0,"minimum":1.0,"title":"Size"}},"additionalProperties":false,"type":"object","required":["mime","size"],"title":"LogoUploadRequest","description":"Body for `POST /api/v1/orgs/me/branding/logo-upload`. Server\nchooses the S3 key — client only declares mime + size so the\npresigning policy can pin both into the signature."},"LogoUploadResponse":{"properties":{"uploadUrl":{"type":"string","title":"Uploadurl"},"uploadId":{"type":"string","title":"Uploadid"},"requiredHeaders":{"additionalProperties":{"type":"string"},"type":"object","title":"Requiredheaders"},"expiresIn":{"type":"integer","title":"Expiresin"}},"additionalProperties":false,"type":"object","required":["uploadUrl","uploadId","requiredHeaders","expiresIn"],"title":"LogoUploadResponse"},"LogoUrlResponse":{"properties":{"url":{"type":"string","title":"Url"},"expiresIn":{"type":"integer","title":"Expiresin"}},"additionalProperties":false,"type":"object","required":["url","expiresIn"],"title":"LogoUrlResponse"},"LogoutRequest":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"}},"additionalProperties":false,"type":"object","required":["refresh_token"],"title":"LogoutRequest","description":"ISS-043: revoke a refresh token server-side as part of signOut so a\ncaptured token can't be used to mint access tokens for the remaining\nrefresh-token TTL window."},"MemberListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MemberResponse"},"type":"array","title":"Items"}},"additionalProperties":false,"type":"object","required":["items"],"title":"MemberListResponse"},"MemberPatchRequest":{"properties":{"role":{"$ref":"#/components/schemas/TenantRole"}},"additionalProperties":false,"type":"object","required":["role"],"title":"MemberPatchRequest","description":"Body for `PATCH /api/v1/orgs/me/members/{userId}` — change role."},"MemberResponse":{"properties":{"userId":{"type":"string","title":"Userid"},"email":{"type":"string","title":"Email"},"role":{"$ref":"#/components/schemas/TenantRole"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Displayname"},"jobTitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jobtitle"}},"additionalProperties":false,"type":"object","required":["userId","email","role","createdAt"],"title":"MemberResponse"},"ModuleId":{"type":"string","enum":["insurance-lines-v1","reinsurance-v1","insurance-rating-v1","grc-consultant-v1","grc-artifact-hierarchy-v1"],"title":"ModuleId","description":"Module identifiers."},"OrgAnalyticsExportRequest":{"properties":{"filters":{"additionalProperties":{"type":"string"},"type":"object","title":"Filters"},"format":{"type":"string","maxLength":16,"title":"Format","default":"csv"}},"additionalProperties":false,"type":"object","title":"OrgAnalyticsExportRequest","description":"Body for `POST /api/v1/orgs/me/analytics/export`.\n\nTenant-scoped mirror of `app.platform.schemas.ExportRequest`. `format`\nis a plain `str` (NOT a `Literal`) on purpose: an unsupported value\nmust reach the service and surface as the domain `UNSUPPORTED_FORMAT`\n(422), not a generic pydantic 422. `filters` mirrors the P1 list\nfilter shape (which pins only `cursor`/`limit` and carries no content\nfilters today); it is accepted for forward-compat + FE parity and\nhashed into the audit trail, but no server-side filter beyond the\nbuilt-in soft-delete exclusion is applied in P2."},"OrgAnalyticsListResponse":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/OrgAssessmentRow"},"type":"array","title":"Rows"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"},"ceilingReached":{"type":"boolean","title":"Ceilingreached","default":false}},"additionalProperties":false,"type":"object","required":["rows"],"title":"OrgAnalyticsListResponse","description":"`GET /api/v1/orgs/me/analytics/assessments` response.\n\n`nextCursor` is the opaque `orgs-analytics-v1` signed cursor for the\nnext page (None at end-of-set OR when the session read-ceiling was\nhit). `ceilingReached` is True only when the cumulative row ceiling\n(reused `QUERY_SESSION_ROW_CEILING`) stopped the pagination chain."},"OrgAnalyticsSummary":{"properties":{"statusCounts":{"$ref":"#/components/schemas/StatusCounts"},"tierDistribution":{"$ref":"#/components/schemas/TierDistribution"},"compositeAvg":{"type":"number","title":"Compositeavg"},"sectionAverages":{"items":{"$ref":"#/components/schemas/SectionAverage"},"type":"array","title":"Sectionaverages"}},"additionalProperties":false,"type":"object","required":["statusCounts","tierDistribution","compositeAvg","sectionAverages"],"title":"OrgAnalyticsSummary","description":"`GET /api/v1/orgs/me/analytics/summary` response — aggregates over\nthe org's GSI5 partition (bounded; see `reader.summarize_org_metrics`).\n\n`compositeAvg` is the mean `metricAdjustedPct` (the 0–100 headline\npercentage) across the aggregated assessments, rounded to 2dp.\n\n`sectionAverages` is a BOUNDED-SAMPLE ESTIMATE: it is recomputed over\nonly the most-recent `reader.SECTION_AVG_SAMPLE_CAP` scored assessments\n(each needs a GetItem + scoring recompute), unlike statusCounts /\ntierDistribution / compositeAvg which cover the full partition off the\ncheap projected attrs."},"OrgAnalyticsTrends":{"properties":{"granularity":{"type":"string","title":"Granularity"},"from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"},"to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"},"sampled":{"type":"boolean","title":"Sampled","default":false},"scoreOverTime":{"items":{"$ref":"#/components/schemas/ScorePoint"},"type":"array","title":"Scoreovertime"},"volumeAndCompletion":{"items":{"$ref":"#/components/schemas/VolumePoint"},"type":"array","title":"Volumeandcompletion"},"tierDistributionOverTime":{"items":{"$ref":"#/components/schemas/TierPoint"},"type":"array","title":"Tierdistributionovertime"},"sectionBenchmark":{"items":{"$ref":"#/components/schemas/SectionBenchmark"},"type":"array","title":"Sectionbenchmark"}},"additionalProperties":false,"type":"object","required":["granularity","scoreOverTime","volumeAndCompletion","tierDistributionOverTime","sectionBenchmark"],"title":"OrgAnalyticsTrends","description":"`GET /api/v1/orgs/me/analytics/trends` response — a tenant-scoped\ntime-series aggregate over the org's assessments.\n\nFour dimensions: `scoreOverTime` / `volumeAndCompletion` /\n`tierDistributionOverTime` are TIME-BUCKETED at `granularity`\n(day/week/month) and CONTIGUOUS + zero-filled across the covered range\n(no missing-bucket gaps that would break a chart x-axis);\n`sectionBenchmark` is a current-state (not time-bucketed) benchmark.\n\n`from_`/`to` echo the requested ISO date bounds (None = open bound).\n`sampled` is True when the aggregate is a bounded-sample estimate — the\ncheap time-scan hit `reader.TREND_SCAN_ROW_CAP`, the section benchmark\nsample was capped, or the bucket count was clamped to\n`reader.TREND_MAX_BUCKETS`.\n\nNOTE (ISS-132): jurisdiction is deliberately NOT a dimension here —\njurisdiction bucketing/segmentation semantics are unresolved. Time +\ntier + section only."},"OrgAnswerDistribution":{"properties":{"assessmentCount":{"type":"integer","title":"Assessmentcount"},"sampled":{"type":"boolean","title":"Sampled"},"questions":{"items":{"$ref":"#/components/schemas/QuestionDistribution"},"type":"array","title":"Questions"},"sections":{"items":{"$ref":"#/components/schemas/SectionDistributionRollup"},"type":"array","title":"Sections"}},"additionalProperties":false,"type":"object","required":["assessmentCount","sampled","questions","sections"],"title":"OrgAnswerDistribution","description":"`GET /api/v1/orgs/me/analytics/answers` response — the org-wide\nanswer distribution by question and by section.\n\nAggregated over the most-recent `assessmentCount` non-deleted\nassessments (bounded — see `reader.ANSWER_DIST_SAMPLE_CAP`). `sampled`\nis True when the org has at least as many assessments as the cap, i.e.\nthe distribution is a bounded-sample estimate rather than a full\ncensus."},"OrgAssessmentDetail":{"properties":{"assessmentId":{"type":"string","title":"Assessmentid"},"ownerSub":{"type":"string","title":"Ownersub"},"status":{"type":"string","title":"Status"},"createdAt":{"type":"string","title":"Createdat"},"tier":{"type":"string","title":"Tier","default":""},"adjustedPct":{"type":"number","title":"Adjustedpct","default":0.0},"compositeScore":{"type":"integer","title":"Compositescore","default":0},"compositeMax":{"type":"integer","title":"Compositemax","default":0},"sections":{"items":{"$ref":"#/components/schemas/AnswerSection"},"type":"array","title":"Sections"}},"additionalProperties":false,"type":"object","required":["assessmentId","ownerSub","status","createdAt","sections"],"title":"OrgAssessmentDetail","description":"`GET /api/v1/orgs/me/analytics/assessments/{id}` response — a full\nper-section / per-question answer drill-down for ANY assessment in the\ncaller's org (BOLA-guarded: the id must resolve under the JWT org's\npartition or the route 404s).\n\nHeadline fields (`tier`/`adjustedPct`/`compositeScore`/`compositeMax`)\ncome from the stored ScoreBundle; they default (`\"\"`/`0`) when the\nassessment has no scores yet (never-scored draft). `createdAt` is an\nISO-8601 UTC string (numeric-epoch normalized at the boundary, L-060).\n`ownerSub` attributes the assessment to its creating user."},"OrgAssessmentRow":{"properties":{"assessmentId":{"type":"string","title":"Assessmentid"},"ownerSub":{"type":"string","title":"Ownersub"},"ownerDisplayName":{"type":"string","title":"Ownerdisplayname"},"ownerEmail":{"type":"string","title":"Owneremail"},"status":{"type":"string","title":"Status"},"createdAt":{"type":"string","title":"Createdat"},"percentComplete":{"type":"number","title":"Percentcomplete"},"metricTier":{"type":"string","title":"Metrictier"},"metricAdjustedPct":{"type":"number","title":"Metricadjustedpct"},"metricCompositeScore":{"type":"integer","title":"Metriccompositescore"},"metricCompositeMax":{"type":"integer","title":"Metriccompositemax"},"metricSector":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metricsector"},"metricJurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metricjurisdiction"}},"additionalProperties":false,"type":"object","required":["assessmentId","ownerSub","ownerDisplayName","ownerEmail","status","createdAt","percentComplete","metricTier","metricAdjustedPct","metricCompositeScore","metricCompositeMax"],"title":"OrgAssessmentRow","description":"One assessment row in the tenant analytics list.\n\nProjected from the GSI5 metric-denorm row + a bounded owner join (see\n`app.orgs.analytics.reader`). `createdAt` is an ISO-8601 UTC string —\nthe reader normalizes the stored numeric-epoch `createdAt` (DynamoDB\n`Decimal`) to ISO at the boundary (L-060 trap). `percentComplete` is\n0.0–1.0. `ownerDisplayName` / `ownerEmail` fall back to \"\" when the\nowner's User row is missing or GDPR-tombstoned.\n\nA submit timestamp is a P3 dependency: the metadata write path never\nstamps `submittedAt` (only the SHARE row carries it), so surfacing one\nhere first requires a metadata-side `submittedAt` denorm."},"OrgBillingResponse":{"properties":{"orgId":{"type":"string","title":"Orgid"},"billingModel":{"type":"string","title":"Billingmodel"},"billingInterval":{"type":"string","title":"Billinginterval"},"seatsUsed":{"type":"integer","title":"Seatsused"},"currentTier":{"$ref":"#/components/schemas/TierBand"},"currentMonthlyCostCents":{"type":"integer","title":"Currentmonthlycostcents"},"pricingConfigVersion":{"type":"integer","title":"Pricingconfigversion"},"stripeSyncPending":{"type":"boolean","title":"Stripesyncpending"}},"additionalProperties":false,"type":"object","required":["orgId","billingModel","billingInterval","seatsUsed","currentTier","currentMonthlyCostCents","pricingConfigVersion","stripeSyncPending"],"title":"OrgBillingResponse"},"OrgPatchRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Name"},"shareLinkDefaultExpiryDays":{"anyOf":[{"type":"integer","maximum":90.0,"minimum":1.0},{"type":"null"}],"title":"Sharelinkdefaultexpirydays"}},"additionalProperties":false,"type":"object","title":"OrgPatchRequest","description":"Body for `PATCH /api/v1/orgs/me` — fields ADMIN may mutate.\n\nIntentionally does NOT include:\n  - `seatLimit` / `assessmentLimit` / `seatsUsed` /\n    `assessmentsUsed` — STAFF-only via the (B5.4-pending)\n    `/api/v1/platform/customers/{orgId}/limits` endpoint.\n  - `logoS3Key` — server-managed via the B5.2b upload-finalize\n    flow; client never supplies a logo S3 key.\n  - `inviteDomains` — spec invariant requires second-ADMIN\n    confirmation for mutations (homograph / lookalike-domain\n    privilege escalation guard). The destructive-confirm token\n    primitive lands in B5.3; until then `inviteDomains` is\n    immutable post-tenant-creation. ADMINs who need a different\n    domain set must contact VERIDATAI_STAFF.\n\nPydantic `extra=\"forbid\"` rejects with 422 if a client tries to\nsend any of the excluded fields."},"OrgResponse":{"properties":{"orgId":{"type":"string","title":"Orgid"},"name":{"type":"string","title":"Name"},"inviteDomains":{"items":{"type":"string"},"type":"array","title":"Invitedomains"},"shareLinkDefaultExpiryDays":{"type":"integer","title":"Sharelinkdefaultexpirydays"},"resultTtlDays":{"type":"integer","title":"Resultttldays","default":30},"allowEditorGenerate":{"type":"boolean","title":"Alloweditorgenerate","default":true},"seatsUsed":{"type":"integer","title":"Seatsused"},"seatLimit":{"type":"integer","title":"Seatlimit"},"assessmentsUsed":{"type":"integer","title":"Assessmentsused"},"assessmentLimit":{"type":"integer","title":"Assessmentlimit"},"branding":{"$ref":"#/components/schemas/Branding"}},"additionalProperties":false,"type":"object","required":["orgId","name","inviteDomains","shareLinkDefaultExpiryDays","seatsUsed","seatLimit","assessmentsUsed","assessmentLimit","branding"],"title":"OrgResponse","description":"Returned by `GET /api/v1/orgs/me`."},"OverLimitItem":{"properties":{"orgId":{"type":"string","title":"Orgid"},"orgName":{"type":"string","title":"Orgname"},"seatsUsed":{"type":"integer","title":"Seatsused"},"seatLimit":{"type":"integer","title":"Seatlimit"},"assessmentsUsed":{"type":"integer","title":"Assessmentsused"},"assessmentLimit":{"type":"integer","title":"Assessmentlimit"},"seatUsagePct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Seatusagepct"},"assessmentUsagePct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Assessmentusagepct"}},"additionalProperties":false,"type":"object","required":["orgId","orgName","seatsUsed","seatLimit","assessmentsUsed","assessmentLimit"],"title":"OverLimitItem","description":"An org at or over a seat/assessment cap (pct >= 1.0 on either axis)."},"PaymentFailedItem":{"properties":{"orgId":{"type":"string","title":"Orgid"},"orgName":{"type":"string","title":"Orgname"},"lastPaymentFailedAt":{"type":"integer","title":"Lastpaymentfailedat"}},"additionalProperties":false,"type":"object","required":["orgId","orgName","lastPaymentFailedAt"],"title":"PaymentFailedItem","description":"An org with an unresolved Stripe payment failure (Finding 1 fix\n— `lastPaymentFailedAt` present on the org META row). Cleared by\n`app.billing.dynamo.mark_invoice_paid` on the next successful\npayment, so presence alone (no recency window) means \"currently\nunresolved\" — see that function's docstring."},"PdfCreateRequest":{"properties":{"moduleIds":{"items":{"type":"string"},"type":"array","maxItems":5,"minItems":1,"title":"Moduleids"}},"additionalProperties":false,"type":"object","required":["moduleIds"],"title":"PdfCreateRequest"},"PdfCreateResponse":{"properties":{"pdfId":{"type":"string","pattern":"^[a-f0-9]{32}$","title":"Pdfid"},"status":{"type":"string","enum":["queued","ready"],"title":"Status"}},"additionalProperties":false,"type":"object","required":["pdfId","status"],"title":"PdfCreateResponse"},"PdfListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PdfRecord"},"type":"array","title":"Items"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"}},"additionalProperties":false,"type":"object","required":["items"],"title":"PdfListResponse"},"PdfRecord":{"properties":{"pdfId":{"type":"string","title":"Pdfid"},"snapId":{"type":"string","title":"Snapid"},"orgId":{"type":"string","title":"Orgid"},"moduleIds":{"items":{"$ref":"#/components/schemas/ModuleId"},"type":"array","title":"Moduleids"},"kind":{"$ref":"#/components/schemas/ReportKind"},"status":{"type":"string","enum":["queued","rendering","ready","failed"],"title":"Status"},"pdfS3Key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdfs3Key"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"pageCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pagecount"},"byteSize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bytesize"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completedat"}},"additionalProperties":false,"type":"object","required":["pdfId","snapId","orgId","moduleIds","kind","status","createdAt"],"title":"PdfRecord"},"PdfStatusResponse":{"properties":{"pdfId":{"type":"string","title":"Pdfid"},"status":{"type":"string","enum":["queued","rendering","ready","failed"],"title":"Status"},"pageCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pagecount"},"byteSize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bytesize"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completedat"}},"additionalProperties":false,"type":"object","required":["pdfId","status"],"title":"PdfStatusResponse"},"PlatformAttentionResponse":{"properties":{"pendingApprovals":{"items":{"$ref":"#/components/schemas/PurgeApprovalItem"},"type":"array","title":"Pendingapprovals"},"overLimit":{"items":{"$ref":"#/components/schemas/OverLimitItem"},"type":"array","title":"Overlimit"},"paymentFailed":{"items":{"$ref":"#/components/schemas/PaymentFailedItem"},"type":"array","title":"Paymentfailed"}},"additionalProperties":false,"type":"object","required":["pendingApprovals","overLimit","paymentFailed"],"title":"PlatformAttentionResponse","description":"`GET /api/v1/platform/attention` — cross-org staff work queue."},"PlatformBrandingMirror":{"properties":{"accentColor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accentcolor"},"heroText":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Herotext"},"hasLogo":{"type":"boolean","title":"Haslogo","default":false}},"additionalProperties":false,"type":"object","title":"PlatformBrandingMirror","description":"Mirror of `app.orgs.schemas.Branding` — the PATCH response +\nprojection shape. `hasLogo` is derived server-side from the presence\nof `logoS3Key` on the Org row (the raw key never crosses the API\nboundary)."},"PlatformBrandingPatchRequestMirror":{"properties":{"accentColor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accentcolor"},"heroText":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Herotext"}},"additionalProperties":false,"type":"object","title":"PlatformBrandingPatchRequestMirror","description":"Body for `PATCH /platform/customers/{org_id}/branding`.\n\nMirror of `app.orgs.schemas.BrandingPatchRequest` — theme / text\nonly; `logoS3Key` is server-managed via the upload-finalize flow and\n`extra=\"forbid\"` rejects it.\n\nIntentional divergence (documented, not drift): a model_validator\nrequires AT LEAST ONE of `accentColor` / `heroText`, 422-ing an empty\n`{}` body. The tenant `BrandingPatchRequest` no-ops an empty patch;\nthe staff endpoint is deliberately STRICTER (an empty staff PATCH is\nalmost certainly a UI bug, not an intentional no-op)."},"PlatformCustomerDetail":{"properties":{"orgId":{"type":"string","title":"Orgid"},"name":{"type":"string","title":"Name"},"plan":{"type":"string","title":"Plan"},"seatsUsed":{"type":"integer","title":"Seatsused"},"seatLimit":{"type":"integer","title":"Seatlimit"},"assessmentsUsed":{"type":"integer","title":"Assessmentsused"},"assessmentLimit":{"type":"integer","title":"Assessmentlimit"},"seatUsagePct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Seatusagepct"},"assessmentUsagePct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Assessmentusagepct"},"inviteDomains":{"items":{"type":"string"},"type":"array","title":"Invitedomains"},"shareLinkDefaultExpiryDays":{"type":"integer","title":"Sharelinkdefaultexpirydays"},"createdAt":{"type":"integer","title":"Createdat"},"updatedAt":{"type":"integer","title":"Updatedat"},"branding":{"anyOf":[{"$ref":"#/components/schemas/BrandingStarter"},{"type":"null"}]},"purgeStatus":{"anyOf":[{"$ref":"#/components/schemas/PurgeStatus"},{"type":"null"}]},"invites":{"items":{"$ref":"#/components/schemas/InviteResponseMirror"},"type":"array","title":"Invites","default":[]},"billingModel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billingmodel"},"currentTier":{"anyOf":[{"$ref":"#/components/schemas/TierBand"},{"type":"null"}]},"currentMonthlyCostCents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Currentmonthlycostcents"}},"additionalProperties":false,"type":"object","required":["orgId","name","plan","seatsUsed","seatLimit","assessmentsUsed","assessmentLimit","inviteDomains","shareLinkDefaultExpiryDays","createdAt","updatedAt"],"title":"PlatformCustomerDetail","description":"Returned by `GET /api/v1/platform/customers/{orgId}`. Full Org\nMETA projection — branding sub-fields, invite domains, share-link\nexpiry default. Mirrors `OrgResponse` from the customer side but\ncross-tenant accessible."},"PlatformCustomerListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PlatformCustomerSummary"},"type":"array","title":"Items"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"}},"additionalProperties":false,"type":"object","required":["items"],"title":"PlatformCustomerListResponse"},"PlatformCustomerSummary":{"properties":{"orgId":{"type":"string","title":"Orgid"},"name":{"type":"string","title":"Name"},"seatsUsed":{"type":"integer","title":"Seatsused"},"seatLimit":{"type":"integer","title":"Seatlimit"},"assessmentsUsed":{"type":"integer","title":"Assessmentsused"},"assessmentLimit":{"type":"integer","title":"Assessmentlimit"},"seatUsagePct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Seatusagepct"},"assessmentUsagePct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Assessmentusagepct"},"createdAt":{"type":"integer","title":"Createdat"},"status":{"type":"string","enum":["ACTIVE","PURGE_PENDING"],"title":"Status","default":"ACTIVE"},"lastActivityAt":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lastactivityat"},"billingModel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billingmodel"},"currentTier":{"anyOf":[{"$ref":"#/components/schemas/TierBand"},{"type":"null"}]},"currentMonthlyCostCents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Currentmonthlycostcents"}},"additionalProperties":false,"type":"object","required":["orgId","name","seatsUsed","seatLimit","assessmentsUsed","assessmentLimit","createdAt"],"title":"PlatformCustomerSummary","description":"Row in `GET /api/v1/platform/customers` list response. Lean\nshape — staff dashboard renders a table with usage at a glance."},"PlatformInviteCreateRequest":{"properties":{"email":{"type":"string","title":"Email"},"role":{"type":"string","enum":["ADMIN","EDITOR","VIEWER"],"title":"Role"}},"additionalProperties":false,"type":"object","required":["email","role"],"title":"PlatformInviteCreateRequest","description":"T-065: body for `POST /api/v1/platform/customers/{org_id}/invites`.\n\nSame wire shape as the tenant-side `InviteCreateRequest`. `email`\nis a plain `str` (not `EmailStr`) — authoritative validation\nhappens in the shared invite flow (`normalize_email`) so staff and\ntenant get the identical 400 `INVALID_EMAIL` contract for the same\ninputs rather than a schema-layer 422."},"PlatformLimitsPatchRequest":{"properties":{"seatLimit":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":1.0},{"type":"null"}],"title":"Seatlimit"},"assessmentLimit":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":1.0},{"type":"null"}],"title":"Assessmentlimit"}},"additionalProperties":false,"type":"object","title":"PlatformLimitsPatchRequest","description":"Body for `PATCH /api/v1/platform/customers/{orgId}/limits`.\nBoth fields optional — at least one MUST be present (model\nvalidator catches empty bodies). Lowering below current usage is\nallowed: existing usage stays; new invites / creations begin\nrejecting at 409 once the new ceiling is reached (spec line 159)."},"PlatformLimitsPatchResponse":{"properties":{"orgId":{"type":"string","title":"Orgid"},"seatLimit":{"type":"integer","title":"Seatlimit"},"assessmentLimit":{"type":"integer","title":"Assessmentlimit"},"seatsUsed":{"type":"integer","title":"Seatsused"},"assessmentsUsed":{"type":"integer","title":"Assessmentsused"}},"additionalProperties":false,"type":"object","required":["orgId","seatLimit","assessmentLimit","seatsUsed","assessmentsUsed"],"title":"PlatformLimitsPatchResponse"},"PlatformLogoFinalizeRequestMirror":{"properties":{"uploadId":{"type":"string","pattern":"^[a-f0-9]{32}$","title":"Uploadid"}},"additionalProperties":false,"type":"object","required":["uploadId"],"title":"PlatformLogoFinalizeRequestMirror","description":"Mirror of `app.orgs.schemas.LogoFinalizeRequest`."},"PlatformLogoUploadRequestMirror":{"properties":{"mime":{"type":"string","enum":["image/png","image/jpeg"],"title":"Mime"},"size":{"type":"integer","maximum":2097152.0,"minimum":1.0,"title":"Size"}},"additionalProperties":false,"type":"object","required":["mime","size"],"title":"PlatformLogoUploadRequestMirror","description":"Body for `POST /platform/customers/{org_id}/branding/logo-upload`.\n\nMirror of `app.orgs.schemas.LogoUploadRequest`. Server chooses the\nS3 key — the client only declares mime + size so the presign policy\ncan pin both into the sigv4 signature. `size` bound is imported from\n`app.orgs.branding.MAX_LOGO_BYTES` (single source, not re-typed)."},"PlatformLogoUploadResponseMirror":{"properties":{"uploadUrl":{"type":"string","title":"Uploadurl"},"uploadId":{"type":"string","title":"Uploadid"},"requiredHeaders":{"additionalProperties":{"type":"string"},"type":"object","title":"Requiredheaders"}},"additionalProperties":false,"type":"object","required":["uploadUrl","uploadId","requiredHeaders"],"title":"PlatformLogoUploadResponseMirror","description":"Mirror of `app.orgs.schemas.LogoUploadResponse`, MINUS\n`expiresIn`.\n\nIntentional divergence (documented, not drift): the staff FE\npresigns and PUTs immediately, so it never surfaces the TTL. Dropping\n`expiresIn` keeps the staff wire lean without changing the tenant\ncontract.\n\n`requiredHeaders` is NOT a divergence — it mirrors the tenant shape.\nThe staff FE must replay the sigv4-signed headers on the S3 PUT\nexactly as the tenant FE does, or the upload 403s (ISS-129)."},"PlatformLogoUrlResponse":{"properties":{"url":{"type":"string","title":"Url"}},"additionalProperties":false,"type":"object","required":["url"],"title":"PlatformLogoUrlResponse","description":"Mirror of `app.orgs.schemas.LogoUrlResponse`, MINUS `expiresIn`\n(same rationale as `PlatformLogoUploadResponseMirror`)."},"PlatformMemberActive":{"properties":{"kind":{"type":"string","const":"active","title":"Kind","default":"active"},"userId":{"type":"string","title":"Userid"},"email":{"type":"string","title":"Email"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Displayname"},"jobTitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jobtitle"},"role":{"type":"string","enum":["ADMIN","EDITOR","VIEWER"],"title":"Role"},"joinedAt":{"type":"string","format":"date-time","title":"Joinedat"},"lastLoginAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Lastloginat"}},"additionalProperties":false,"type":"object","required":["userId","email","role","joinedAt"],"title":"PlatformMemberActive","description":"Live member row in `GET /platform/customers/{orgId}/members`.\n\n`lastLoginAt` is stamped by the Cognito post-auth Lambda (ISS-125)\n— may be absent for users who haven't logged in since rollout."},"PlatformMemberInvited":{"properties":{"kind":{"type":"string","const":"invited","title":"Kind","default":"invited"},"inviteId":{"type":"string","title":"Inviteid"},"email":{"type":"string","title":"Email"},"role":{"type":"string","enum":["ADMIN","EDITOR","VIEWER"],"title":"Role"},"invitedAt":{"type":"string","format":"date-time","title":"Invitedat"},"expiresAt":{"type":"string","format":"date-time","title":"Expiresat"},"deliveryStatus":{"type":"string","enum":["PENDING","DELIVERED","BOUNCED","COMPLAINT","REJECTED"],"title":"Deliverystatus","default":"PENDING"},"deliveryStatusUpdatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deliverystatusupdatedat"}},"additionalProperties":false,"type":"object","required":["inviteId","email","role","invitedAt","expiresAt"],"title":"PlatformMemberInvited","description":"Pending-invite row. Delivery fields reuse the T-055 projection\nalready stored on INVITE rows (`deliveryStatus` /\n`deliveryStatusUpdatedAt`)."},"PlatformMemberList":{"properties":{"members":{"items":{"oneOf":[{"$ref":"#/components/schemas/PlatformMemberActive"},{"$ref":"#/components/schemas/PlatformMemberInvited"},{"$ref":"#/components/schemas/PlatformMemberRemoved"}],"discriminator":{"propertyName":"kind","mapping":{"active":"#/components/schemas/PlatformMemberActive","invited":"#/components/schemas/PlatformMemberInvited","removed":"#/components/schemas/PlatformMemberRemoved"}}},"type":"array","title":"Members"},"truncated":{"type":"boolean","title":"Truncated"},"totalCount":{"type":"integer","title":"Totalcount"}},"additionalProperties":false,"type":"object","required":["members","truncated","totalCount"],"title":"PlatformMemberList","description":"Returned by `GET /api/v1/platform/customers/{orgId}/members`.\n\nBounded, not paginated — the service hard-caps the kind-sorted list\nat `service.MEMBERS_RESPONSE_CAP` rows and signals the cut via\n`truncated` + `totalCount` (full pre-cap count)."},"PlatformMemberRemoved":{"properties":{"kind":{"type":"string","const":"removed","title":"Kind","default":"removed"},"userId":{"type":"string","title":"Userid"},"role":{"type":"string","enum":["ADMIN","EDITOR","VIEWER","UNKNOWN"],"title":"Role"},"removedAt":{"type":"string","format":"date-time","title":"Removedat"}},"additionalProperties":false,"type":"object","required":["userId","role","removedAt"],"title":"PlatformMemberRemoved","description":"Tombstoned (soft-removed) member row.\n\nT-059 GDPR redaction already stripped `email` / `displayName` /\n`jobTitle` from the DDB tombstone; this model makes the redaction\nSTRUCTURAL — no such fields are declared at all, so PII\nre-hydration is impossible even if a future join reintroduces\nthose attributes. `role` carries the `removedRole` snapshot\n(`UNKNOWN` when the pre-image had no role)."},"PlatformQueryResponse":{"properties":{"surface":{"type":"string","title":"Surface"},"rows":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContactsRow"},"type":"array"},{"items":{"$ref":"#/components/schemas/UdiraLeadRow"},"type":"array"},{"items":{"$ref":"#/components/schemas/DtiMetricsRow"},"type":"array"}],"title":"Rows"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"},"ceilingReached":{"type":"boolean","title":"Ceilingreached","default":false}},"additionalProperties":false,"type":"object","required":["surface","rows"],"title":"PlatformQueryResponse","description":"Response for `GET /api/v1/platform/query/{surface}` (T-073 Task 6).\n\n`rows` is a discriminated-by-surface list of typed row models (R1-C)\n— never a bag of raw dicts — so the projected columns are validated\nagainst the surface's `row_model` before they cross the wire.\n`nextCursor` is the opaque `platform-query-v1` signed cursor for the\nnext page (None at end-of-set OR when the session read-ceiling was\nhit). `ceilingReached` is True only when the cumulative row ceiling\n(`QUERY_SESSION_ROW_CEILING`) stopped the pagination chain."},"PlatformSearchResponse":{"properties":{"results":{"items":{"anyOf":[{"$ref":"#/components/schemas/PlatformSearchResultOrg"},{"$ref":"#/components/schemas/PlatformSearchResultMember"},{"$ref":"#/components/schemas/PlatformSearchResultAssessment"}]},"type":"array","title":"Results"},"truncated":{"type":"boolean","title":"Truncated"},"partial":{"type":"boolean","title":"Partial","default":false},"failedOrgCount":{"type":"integer","title":"Failedorgcount","default":0}},"additionalProperties":false,"type":"object","required":["results","truncated"],"title":"PlatformSearchResponse","description":"T-057 cross-tenant search response.\n\n`truncated` and `partial` are intentionally distinct:\n- `truncated`: a per-type result cap was hit.\n- `partial`: one or more orgs were skipped (fanout deadline timeout,\n  per-org Query failure, or org-scan page cap reached).\n\n`failedOrgCount` quantifies the partial signal so the FE can render\na meaningful warning."},"PlatformSearchResultAssessment":{"properties":{"type":{"type":"string","const":"assessment","title":"Type","default":"assessment"},"orgId":{"type":"string","title":"Orgid"},"orgName":{"type":"string","title":"Orgname"},"assessmentId":{"type":"string","title":"Assessmentid"},"title":{"type":"string","title":"Title"},"status":{"type":"string","title":"Status"},"updatedAt":{"type":"integer","title":"Updatedat"}},"additionalProperties":false,"type":"object","required":["orgId","orgName","assessmentId","title","status","updatedAt"],"title":"PlatformSearchResultAssessment"},"PlatformSearchResultMember":{"properties":{"type":{"type":"string","const":"member","title":"Type","default":"member"},"orgId":{"type":"string","title":"Orgid"},"orgName":{"type":"string","title":"Orgname"},"userId":{"type":"string","title":"Userid"},"email":{"type":"string","title":"Email"},"role":{"type":"string","enum":["ADMIN","EDITOR","VIEWER"],"title":"Role"}},"additionalProperties":false,"type":"object","required":["orgId","orgName","userId","email","role"],"title":"PlatformSearchResultMember"},"PlatformSearchResultOrg":{"properties":{"type":{"type":"string","const":"org","title":"Type","default":"org"},"orgId":{"type":"string","title":"Orgid"},"name":{"type":"string","title":"Name"},"plan":{"type":"string","title":"Plan"},"memberCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Membercount"}},"additionalProperties":false,"type":"object","required":["orgId","name","plan"],"title":"PlatformSearchResultOrg"},"PricingTierConfigPatchRequest":{"properties":{"tiers":{"items":{"$ref":"#/components/schemas/TierBand"},"type":"array","minItems":1,"title":"Tiers"},"annualPrepayDiscountPct":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Annualprepaydiscountpct"}},"additionalProperties":false,"type":"object","required":["tiers","annualPrepayDiscountPct"],"title":"PricingTierConfigPatchRequest"},"PricingTierConfigResponse":{"properties":{"version":{"type":"integer","title":"Version"},"tiers":{"items":{"$ref":"#/components/schemas/TierBand"},"type":"array","title":"Tiers"},"annualPrepayDiscountPct":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Annualprepaydiscountpct"},"createdAt":{"type":"integer","title":"Createdat"},"createdBy":{"type":"string","title":"Createdby"}},"additionalProperties":false,"type":"object","required":["version","tiers","annualPrepayDiscountPct","createdAt","createdBy"],"title":"PricingTierConfigResponse"},"ProfilePatchRequest":{"properties":{"displayName":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Displayname"},"jobTitle":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Jobtitle"}},"additionalProperties":false,"type":"object","title":"ProfilePatchRequest","description":"Body for `PATCH /api/v1/orgs/me/profile`. Both fields optional —\nPATCH semantics. Empty body (both None) returns 422 EMPTY_PATCH."},"PurgeApprovalItem":{"properties":{"orgId":{"type":"string","title":"Orgid"},"orgName":{"type":"string","title":"Orgname"},"requestId":{"type":"string","title":"Requestid"},"requestedBy":{"type":"string","title":"Requestedby"},"requestedAt":{"type":"integer","title":"Requestedat"},"scheduledAt":{"type":"integer","title":"Scheduledat"}},"additionalProperties":false,"type":"object","required":["orgId","orgName","requestId","requestedBy","requestedAt","scheduledAt"],"title":"PurgeApprovalItem","description":"A purge PENDING the calling staff's approval (requester != caller)."},"PurgeRequestCreate":{"properties":{"orgNameConfirmation":{"type":"string","maxLength":128,"minLength":1,"title":"Orgnameconfirmation"},"scope":{"type":"string","const":"full","title":"Scope","default":"full"}},"additionalProperties":false,"type":"object","required":["orgNameConfirmation"],"title":"PurgeRequestCreate","description":"Body for `POST /api/v1/platform/customers/{orgId}/purge` (Stage 1).\n\n`orgNameConfirmation` echoes the org's display name (typed by STAFF\nin the UI) — server-side compares case-sensitively against the\n`name` field on the Org META row. Belt-and-suspenders gate against\noperating on the wrong tenant when a STAFF user has multiple\ncustomer dashboards open.\n\n`scope` is reserved for B5.4f+ extensions (e.g. `assessments_only`).\nToday only `\"full\"` is accepted; the field exists so wire format\ndoesn't churn when scopes are added."},"PurgeRequestResponse":{"properties":{"orgId":{"type":"string","title":"Orgid"},"requestId":{"type":"string","title":"Requestid"},"requestedBy":{"type":"string","title":"Requestedby"},"status":{"type":"string","enum":["PENDING","APPROVED","CANCELLED"],"title":"Status"},"requestedAt":{"type":"integer","title":"Requestedat"},"scheduledAt":{"type":"integer","title":"Scheduledat"}},"additionalProperties":false,"type":"object","required":["orgId","requestId","requestedBy","status","requestedAt","scheduledAt"],"title":"PurgeRequestResponse","description":"Returned 202 from Stage 1. `scheduledAt` is the unix timestamp\nafter which the fire-Lambda may claim and execute the purge.\nCancellation is allowed any time before `scheduledAt`."},"PurgeStatus":{"properties":{"requestId":{"type":"string","title":"Requestid"},"status":{"type":"string","enum":["PENDING","APPROVED"],"title":"Status"},"requestedBy":{"type":"string","title":"Requestedby"},"requestedAt":{"type":"integer","title":"Requestedat"},"scheduledAt":{"type":"integer","title":"Scheduledat"}},"additionalProperties":false,"type":"object","required":["requestId","status","requestedBy","requestedAt","scheduledAt"],"title":"PurgeStatus","description":"Embedded in `PlatformCustomerDetail` when the org has an active purge.\nOnly present when Org META `purgePending` is set (PENDING or APPROVED states)."},"QuestionDistribution":{"properties":{"questionId":{"type":"integer","title":"Questionid"},"sectionId":{"type":"integer","title":"Sectionid"},"totalAnswered":{"type":"integer","title":"Totalanswered"},"options":{"items":{"$ref":"#/components/schemas/AnswerOptionCount"},"type":"array","title":"Options"}},"additionalProperties":false,"type":"object","required":["questionId","sectionId","totalAnswered","options"],"title":"QuestionDistribution","description":"Per-question option-choice histogram across the org's sampled\nassessments. `totalAnswered` is the number of sampled assessments that\nanswered this question (excludes skipped). Questions never answered by\nany sampled assessment are omitted from the response."},"ReconfirmRequest":{"properties":{"action":{"type":"string","maxLength":64,"minLength":1,"title":"Action"},"targetId":{"type":"string","maxLength":256,"minLength":1,"title":"Targetid"},"password":{"type":"string","maxLength":256,"minLength":1,"title":"Password"}},"additionalProperties":false,"type":"object","required":["action","targetId","password"],"title":"ReconfirmRequest","description":"Body for `POST /api/v1/auth/me/reconfirm`.\n\n`action` and `targetId` are echoed back into the issued\nconfirmation token. The destructive endpoint rebuilds the\nexpected `targetId` from its own path params and rejects a\nmismatch — caller-supplied values are NOT trusted to identify\nthe resource, only to bind the token to a specific intent."},"ReconfirmResponse":{"properties":{"confirmationToken":{"type":"string","title":"Confirmationtoken"},"expiresIn":{"type":"integer","title":"Expiresin"}},"additionalProperties":false,"type":"object","required":["confirmationToken","expiresIn"],"title":"ReconfirmResponse"},"RefreshRequest":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"},"access_token":{"type":"string","title":"Access Token","default":""},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"}},"additionalProperties":false,"type":"object","required":["refresh_token"],"title":"RefreshRequest"},"Region":{"type":"string","enum":["US","CA","UK","EU","OTHER"],"title":"Region"},"ReportKind":{"type":"string","enum":["insurance","grc"],"title":"ReportKind","description":"Report kinds."},"ResetPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"confirmation_code":{"type":"string","maxLength":6,"minLength":6,"title":"Confirmation Code"},"new_password":{"type":"string","maxLength":256,"minLength":12,"title":"New Password"}},"additionalProperties":false,"type":"object","required":["email","confirmation_code","new_password"],"title":"ResetPasswordRequest"},"RespondChallengeRequest":{"properties":{"challenge_name":{"type":"string","title":"Challenge Name"},"session":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"},"challenge_responses":{"additionalProperties":{"type":"string"},"type":"object","title":"Challenge Responses"}},"additionalProperties":false,"type":"object","required":["challenge_name","challenge_responses"],"title":"RespondChallengeRequest"},"ResultResolveResponse":{"properties":{"resultId":{"type":"string","title":"Resultid"},"expiresAt":{"type":"integer","title":"Expiresat"},"renewalCount":{"type":"integer","title":"Renewalcount"},"pdfRenderCount":{"type":"integer","title":"Pdfrendercount"},"emailReceiptCount":{"type":"integer","title":"Emailreceiptcount"},"branding":{"$ref":"#/components/schemas/ShareResolveBranding"},"snapshot":{"additionalProperties":true,"type":"object","title":"Snapshot"}},"additionalProperties":false,"type":"object","required":["resultId","expiresAt","renewalCount","pdfRenderCount","emailReceiptCount","branding","snapshot"],"title":"ResultResolveResponse"},"RevenueSummaryResponse":{"properties":{"mrrCents":{"type":"integer","title":"Mrrcents"},"arrCents":{"type":"integer","title":"Arrcents"},"orgCount":{"type":"integer","title":"Orgcount"},"seatsTotal":{"type":"integer","title":"Seatstotal"},"tierDistribution":{"additionalProperties":{"type":"integer"},"type":"object","title":"Tierdistribution"},"monthlyCount":{"type":"integer","title":"Monthlycount"},"annualCount":{"type":"integer","title":"Annualcount"},"trend":{"items":{"$ref":"#/components/schemas/RevenueTrendPoint"},"type":"array","title":"Trend"}},"additionalProperties":false,"type":"object","required":["mrrCents","arrCents","orgCount","seatsTotal","tierDistribution","monthlyCount","annualCount","trend"],"title":"RevenueSummaryResponse"},"RevenueTrendPoint":{"properties":{"date":{"type":"string","title":"Date"},"mrrCents":{"type":"integer","title":"Mrrcents"},"arrCents":{"type":"integer","title":"Arrcents"},"orgCount":{"type":"integer","title":"Orgcount"},"seatsTotal":{"type":"integer","title":"Seatstotal"}},"additionalProperties":false,"type":"object","required":["date","mrrCents","arrCents","orgCount","seatsTotal"],"title":"RevenueTrendPoint"},"Role":{"type":"string","enum":["research","counsel","it","compliance","tech-transfer","other"],"title":"Role"},"ScoreBundleSchema":{"properties":{"compositeScore":{"type":"integer","title":"Compositescore"},"compositeMax":{"type":"integer","title":"Compositemax"},"rawPct":{"type":"number","title":"Rawpct"},"modifier":{"type":"number","title":"Modifier"},"aiActBumpTotalPct":{"type":"number","title":"Aiactbumptotalpct"},"adjustedPct":{"type":"number","title":"Adjustedpct"},"tier":{"type":"string","title":"Tier"},"grade":{"type":"string","title":"Grade"},"stratificationRationale":{"type":"string","title":"Stratificationrationale"},"aiActBumps":{"items":{"$ref":"#/components/schemas/AiActBumpDict"},"type":"array","title":"Aiactbumps"},"insuranceLineScores":{"additionalProperties":{"$ref":"#/components/schemas/InsuranceLineScoreSchema"},"type":"object","title":"Insurancelinescores"},"effectiveAnsweredCount":{"type":"integer","title":"Effectiveansweredcount"},"effectiveQuestionTotal":{"type":"integer","title":"Effectivequestiontotal"}},"additionalProperties":false,"type":"object","required":["compositeScore","compositeMax","rawPct","modifier","aiActBumpTotalPct","adjustedPct","tier","grade","stratificationRationale","aiActBumps","insuranceLineScores","effectiveAnsweredCount","effectiveQuestionTotal"],"title":"ScoreBundleSchema"},"ScorePoint":{"properties":{"bucketStart":{"type":"string","title":"Bucketstart"},"avgAdjustedPct":{"type":"number","title":"Avgadjustedpct"},"avgCompositeScore":{"type":"number","title":"Avgcompositescore"},"avgCompositeMax":{"type":"number","title":"Avgcompositemax"},"sampleCount":{"type":"integer","title":"Samplecount"}},"additionalProperties":false,"type":"object","required":["bucketStart","avgAdjustedPct","avgCompositeScore","avgCompositeMax","sampleCount"],"title":"ScorePoint","description":"One time bucket in `scoreOverTime`: the mean composite headline\nnumbers across the assessments CREATED in this bucket. `avgAdjustedPct`\nis the mean `metricAdjustedPct` (0–100 headline), `avgCompositeScore` /\n`avgCompositeMax` the mean raw composite/out-of, all rounded 2dp. All\ncome off the cheap projected GSI5 attrs — no per-row GetItem.\n`sampleCount` is the number of assessments in the bucket (0 for a\nzero-filled empty bucket, where every avg is 0.0)."},"SectionAverage":{"properties":{"sectionId":{"type":"integer","title":"Sectionid"},"label":{"type":"string","title":"Label"},"avg":{"type":"number","title":"Avg"},"max":{"type":"integer","title":"Max"}},"additionalProperties":false,"type":"object","required":["sectionId","label","avg","max"],"title":"SectionAverage","description":"Mean raw section score across the sampled assessments, plus the\nsection's declared max (for a 0..max gauge). `avg` is rounded to 2dp."},"SectionBenchmark":{"properties":{"sectionId":{"type":"integer","title":"Sectionid"},"label":{"type":"string","title":"Label"},"avg":{"type":"number","title":"Avg"},"max":{"type":"integer","title":"Max"},"sampleCount":{"type":"integer","title":"Samplecount"}},"additionalProperties":false,"type":"object","required":["sectionId","label","avg","max","sampleCount"],"title":"SectionBenchmark","description":"One section in `sectionBenchmark` — a benchmark (NOT time-bucketed)\nover the assessments in the requested `from`/`to` window (all-time when\nunbounded), capped to the most-recent `reader.TREND_SECTION_SAMPLE_CAP`\nof them: the mean raw section score plus the section's declared `max`\n(for a 0..max gauge). `avg` is rounded 2dp; `sampleCount` is how many\nsampled assessments contributed."},"SectionDistributionRollup":{"properties":{"sectionId":{"type":"integer","title":"Sectionid"},"label":{"type":"string","title":"Label"},"max":{"type":"integer","title":"Max"},"avgScore":{"type":"number","title":"Avgscore"},"assessmentCount":{"type":"integer","title":"Assessmentcount"}},"additionalProperties":false,"type":"object","required":["sectionId","label","max","avgScore","assessmentCount"],"title":"SectionDistributionRollup","description":"Section-level rollup across the sampled assessments: mean raw\nsection score (`avgScore`, rounded 2dp) over the `assessmentCount`\nsampled assessments, plus the section's declared `max`."},"ShareCreateResponse":{"properties":{"shareId":{"type":"string","title":"Shareid"},"shareUrl":{"type":"string","title":"Shareurl"},"expiresAt":{"type":"integer","title":"Expiresat"}},"additionalProperties":false,"type":"object","required":["shareId","shareUrl","expiresAt"],"title":"ShareCreateResponse"},"ShareDefaultsPatch":{"properties":{"shareLinkDefaultExpiryDays":{"anyOf":[{"type":"integer","maximum":90.0,"minimum":1.0},{"type":"null"}],"title":"Sharelinkdefaultexpirydays"},"resultTtlDays":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":1.0},{"type":"null"}],"title":"Resultttldays"},"allowEditorGenerate":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Alloweditorgenerate"}},"additionalProperties":false,"type":"object","title":"ShareDefaultsPatch"},"ShareDefaultsResponse":{"properties":{"shareLinkDefaultExpiryDays":{"type":"integer","title":"Sharelinkdefaultexpirydays"},"resultTtlDays":{"type":"integer","title":"Resultttldays"},"allowEditorGenerate":{"type":"boolean","title":"Alloweditorgenerate"}},"additionalProperties":false,"type":"object","required":["shareLinkDefaultExpiryDays","resultTtlDays","allowEditorGenerate"],"title":"ShareDefaultsResponse"},"ShareListResponse":{"properties":{"shares":{"items":{"$ref":"#/components/schemas/ShareSummary"},"type":"array","title":"Shares"}},"additionalProperties":false,"type":"object","required":["shares"],"title":"ShareListResponse"},"ShareResolveBranding":{"properties":{"orgName":{"type":"string","title":"Orgname"},"accentColor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accentcolor"},"heroText":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Herotext"},"logoUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logourl"}},"additionalProperties":false,"type":"object","required":["orgName"],"title":"ShareResolveBranding"},"ShareResolveResponse":{"properties":{"shareId":{"type":"string","title":"Shareid"},"assessmentShell":{"additionalProperties":true,"type":"object","title":"Assessmentshell"},"branding":{"$ref":"#/components/schemas/ShareResolveBranding"},"intakeRequired":{"type":"boolean","title":"Intakerequired"},"answers":{"additionalProperties":true,"type":"object","title":"Answers"},"flagged":{"items":{"type":"string"},"type":"array","title":"Flagged"}},"additionalProperties":false,"type":"object","required":["shareId","assessmentShell","branding","intakeRequired","answers","flagged"],"title":"ShareResolveResponse"},"ShareSummary":{"properties":{"shareId":{"type":"string","title":"Shareid"},"status":{"type":"string","enum":["PENDING","OPENED","SUBMITTED","REVOKED"],"title":"Status"},"createdAt":{"type":"integer","title":"Createdat"},"expiresAt":{"type":"integer","title":"Expiresat"},"firstOpenedAt":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Firstopenedat"},"submittedAt":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Submittedat"},"revokedAt":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Revokedat"},"respondentEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Respondentemail"},"resultId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resultid"}},"additionalProperties":false,"type":"object","required":["shareId","status","createdAt","expiresAt"],"title":"ShareSummary"},"SignupRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":256,"minLength":12,"title":"Password"},"org_name":{"type":"string","maxLength":128,"minLength":1,"title":"Org Name"}},"additionalProperties":false,"type":"object","required":["email","password","org_name"],"title":"SignupRequest"},"StaffReconfirmRequest":{"properties":{"action":{"type":"string","maxLength":64,"minLength":1,"title":"Action"},"targetId":{"type":"string","maxLength":256,"minLength":1,"title":"Targetid"}},"additionalProperties":false,"type":"object","required":["action","targetId"],"title":"StaffReconfirmRequest","description":"Body for `POST /api/v1/platform/auth/reconfirm`.\n\nThe staff pool is JumpCloud-SAML-only; no password is sent. The\nre-auth signal is the JWT `auth_time` claim — by spec line 604, a\nstaff destructive action requires a fresh JumpCloud session\n(ForceAuthn=true). We approximate that without a SAML round-trip by\nrequiring `auth_time` ≤ 5 min old; if stale the UI must re-redirect\nto JumpCloud (which it will do because the SAML session re-issues a\nnew ID token with a fresh `auth_time`)."},"StaffReconfirmResponse":{"properties":{"confirmationToken":{"type":"string","title":"Confirmationtoken"},"expiresIn":{"type":"integer","title":"Expiresin"}},"additionalProperties":false,"type":"object","required":["confirmationToken","expiresIn"],"title":"StaffReconfirmResponse"},"StatusCounts":{"properties":{"new":{"type":"integer","title":"New","default":0},"inProgress":{"type":"integer","title":"Inprogress","default":0},"complete":{"type":"integer","title":"Complete","default":0}},"additionalProperties":false,"type":"object","title":"StatusCounts","description":"Assessment lifecycle rollup. `draft` -> new, `in_progress` ->\ninProgress, `submitted` -> complete; `deleted` rows are excluded\nupstream and never counted."},"SubmitResponse":{"properties":{"resultId":{"type":"string","title":"Resultid"},"resultUrl":{"type":"string","title":"Resulturl"},"resultToken":{"type":"string","title":"Resulttoken"},"expiresAt":{"type":"integer","title":"Expiresat"}},"additionalProperties":false,"type":"object","required":["resultId","resultUrl","resultToken","expiresAt"],"title":"SubmitResponse"},"TenantRole":{"type":"string","enum":["ADMIN","EDITOR","VIEWER"],"title":"TenantRole","description":"Roles within a tenancy. STAFF is intentionally NOT in this enum —\nit's a separate principal type."},"TierBand":{"properties":{"minSeats":{"type":"integer","minimum":1.0,"title":"Minseats"},"maxSeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Maxseats"},"ratePerSeatCents":{"type":"integer","minimum":0.0,"title":"Rateperseatcents"}},"additionalProperties":false,"type":"object","required":["minSeats","maxSeats","ratePerSeatCents"],"title":"TierBand"},"TierDistribution":{"properties":{"Low":{"type":"integer","title":"Low","default":0},"Moderate":{"type":"integer","title":"Moderate","default":0},"Elevated":{"type":"integer","title":"Elevated","default":0},"High":{"type":"integer","title":"High","default":0},"Critical":{"type":"integer","title":"Critical","default":0}},"additionalProperties":false,"type":"object","title":"TierDistribution","description":"Count of assessments in each of the five DTI risk tiers."},"TierPoint":{"properties":{"bucketStart":{"type":"string","title":"Bucketstart"},"Low":{"type":"integer","title":"Low","default":0},"Moderate":{"type":"integer","title":"Moderate","default":0},"Elevated":{"type":"integer","title":"Elevated","default":0},"High":{"type":"integer","title":"High","default":0},"Critical":{"type":"integer","title":"Critical","default":0}},"additionalProperties":false,"type":"object","required":["bucketStart"],"title":"TierPoint","description":"One time bucket in `tierDistributionOverTime`: count of assessments\ncreated in the bucket per DTI risk tier (off the projected\n`metricTier`). Empty buckets are present with all tiers 0."},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"expires_in":{"type":"integer","title":"Expires In"},"token_type":{"type":"string","title":"Token Type","default":"Bearer"}},"additionalProperties":false,"type":"object","required":["access_token","expires_in"],"title":"TokenResponse"},"UdiraLeadRow":{"properties":{"id":{"type":"string","title":"Id"},"institution":{"type":"string","title":"Institution"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"region":{"type":"string","title":"Region"},"role":{"type":"string","title":"Role"},"consent":{"type":"boolean","title":"Consent"},"status":{"type":"string","title":"Status"},"createdAt":{"type":"string","title":"Createdat"}},"additionalProperties":false,"type":"object","required":["id","institution","name","email","region","role","consent","status","createdAt"],"title":"UdiraLeadRow","description":"Row projection for the `udira-leads` query surface (UDIRA lead\nrows — see `app.udira.schemas.LeadCreate` / `app.udira.store`)."},"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"},"VerifyIntakeRequest":{"properties":{"turnstile_token":{"type":"string","title":"Turnstile Token"}},"additionalProperties":false,"type":"object","required":["turnstile_token"],"title":"VerifyIntakeRequest"},"VolumePoint":{"properties":{"bucketStart":{"type":"string","title":"Bucketstart"},"count":{"type":"integer","title":"Count"},"avgPercentComplete":{"type":"number","title":"Avgpercentcomplete"}},"additionalProperties":false,"type":"object","required":["bucketStart","count","avgPercentComplete"],"title":"VolumePoint","description":"One time bucket in `volumeAndCompletion`: `count` of assessments\ncreated in the bucket + `avgPercentComplete` (mean 0.0–1.0 completion\nacross them, rounded 4dp). Empty buckets are present with count 0 /\navgPercentComplete 0.0."}}}}