{"openapi":"3.1.0","info":{"title":"Fidera API","description":"Public, tenant-scoped APIs for Applicants, immutable Checks, actionable Alerts, automation, and verification Flows. The operator dashboard uses these same /v1 contracts.","contact":{"name":"Fidera support","email":"support@fideralabs.com"},"version":"0.1.0"},"servers":[{"url":"https://api.fideralabs.com","description":"Production"},{"url":"http://localhost:8000","description":"Local development"}],"paths":{"/livez":{"get":{"tags":["health"],"summary":"Livez","operationId":"livez_livez_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Livez Livez Get"}}}}}}},"/readyz":{"get":{"tags":["health"],"summary":"Readyz","description":"Confirms DB connectivity before declaring readiness.","operationId":"readyz_readyz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Readyz Readyz Get"}}}}}}},"/admin/tenants":{"post":{"tags":["admin"],"summary":"Create Tenant","operationId":"create_tenant_admin_tenants_post","parameters":[{"name":"X-Admin-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantCreateIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantCreatedOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/fatf_listings":{"get":{"tags":["admin"],"summary":"Get Fatf Listings","operationId":"get_fatf_listings_admin_fatf_listings_get","parameters":[{"name":"X-Admin-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Get Fatf Listings Admin Fatf Listings Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin"],"summary":"Update Fatf Listings","operationId":"update_fatf_listings_admin_fatf_listings_put","parameters":[{"name":"X-Admin-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FatfUpdateIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Update Fatf Listings Admin Fatf Listings Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/dataset_versions":{"post":{"tags":["admin","AML data"],"summary":"Create Dataset Version","operationId":"create_dataset_version_admin_dataset_versions_post","parameters":[{"name":"X-Admin-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetVersionCreateIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Dataset Version Admin Dataset Versions Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["admin","AML data"],"summary":"List Dataset Versions","operationId":"list_dataset_versions_admin_dataset_versions_get","parameters":[{"name":"X-Admin-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","additionalProperties":true}},"title":"Response List Dataset Versions Admin Dataset Versions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/dataset_versions/{version_id}/promote":{"post":{"tags":["admin","AML data"],"summary":"Promote Dataset Version","operationId":"promote_dataset_version_admin_dataset_versions__version_id__promote_post","parameters":[{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}},{"name":"X-Admin-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Promote Dataset Version Admin Dataset Versions  Version Id  Promote Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/flows":{"post":{"tags":["flows"],"summary":"Create Verification","description":"Create a flow.\n\nTwo independent axes:\n\n- **Transport / auth** — a secret ``tnk_`` Bearer (server-to-server,\n  full power), an operator session cookie (the dashboard's manual\n  \"New flow\" path, same power as a secret key), or a\n  publishable ``pk_`` key (browser gate: Origin-checked, rate-limited,\n  redacted response).\n- **Execution mode** (``payload.mode``) — ``async`` (default) creates\n  the flow PENDING and returns it; the caller uploads\n  documents and calls ``/process`` to run the checks on the worker.\n  ``sync`` runs the flow's checks inline in-request and returns the\n  decided flow with its results.\n\nCaptures the originating IP / User-Agent / iOS device headers and\nenriches with ipapi.co geo. Stored on ``flow.client_metadata``;\nsurfaces as a \"Device & location\" panel on the dashboard.","operationId":"create_verification_v1_flows_post","parameters":[{"name":"origin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowCreateIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FlowChecksPublicOut"},{"$ref":"#/components/schemas/FlowOut"}],"title":"Response Create Verification V1 Flows Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}]},"get":{"tags":["flows"],"summary":"List Verifications","operationId":"list_verifications_v1_flows_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/FlowStatus"},{"type":"null"}],"title":"Status"}},{"name":"decision","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/FlowDecision"},{"type":"null"}],"title":"Decision"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/FlowType"},{"type":"null"}],"title":"Type"}},{"name":"exclude_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/FlowType"},{"type":"null"}],"title":"Exclude Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"List Verifications"}},"/v1/flows/{flow_id}":{"get":{"tags":["flows"],"summary":"Get Verification","operationId":"get_verification_v1_flows__flow_id__get","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Flow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Get Verification"}},"/v1/flows/{flow_id}/process":{"post":{"tags":["flows"],"summary":"Trigger Processing","description":"SDK-driven — kicks the worker. Bearer-only.","operationId":"trigger_processing_v1_flows__flow_id__process_post","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Flow Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Trigger Processing V1 Flows  Flow Id  Process Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}]}},"/v1/flows/{flow_id}/decide":{"post":{"tags":["flows"],"summary":"Decide","description":"Operator override of the rules engine.\n\nAllowed only when the flow is in ``NEEDS_REVIEW`` — that's the\nstate the rules engine routes manual-review cases into. Decisions on\nalready-terminal records aren't supported in Slice 2 (no legitimate\nworkflow for it yet).","operationId":"decide_v1_flows__flow_id__decide_post","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Flow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowDecideIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}]}},"/v1/flows/{flow_id}/checks/aml_screen/rerun":{"post":{"tags":["flows"],"summary":"Rerun Aml Screen","description":"Re-run the sanctions/PEP check against OpenSanctions and record a new\nCheck. If the flow is non-terminal, re-evaluates rules with\nthe updated check set and may transition the flow's status.\n\nOperators use this when a previous AML check failed (provider 5xx,\ntimeout, or stale data).","operationId":"rerun_aml_screen_v1_flows__flow_id__checks_aml_screen_rerun_post","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Flow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}]}},"/v1/flows/{flow_id}/documents":{"post":{"tags":["documents"],"summary":"Request Upload","operationId":"request_upload_v1_flows__flow_id__documents_post","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Flow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequestIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Request Upload"}},"/v1/flows/{flow_id}/documents/{document_id}/preview":{"get":{"tags":["documents"],"summary":"Preview Url","description":"Short-lived presigned GET URL for the dashboard's image / video tags.\n\nTenant-scoped — ``TenantActorDep`` accepts either a Bearer key (SDK)\nor an operator session cookie. The S3 URL itself is signed against\nthe *public* endpoint so the operator's browser can fetch it directly.","operationId":"preview_url_v1_flows__flow_id__documents__document_id__preview_get","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Flow Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPreviewOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}]}},"/v1/flows/{flow_id}/documents/{document_id}/complete":{"post":{"tags":["documents"],"summary":"Complete Upload","operationId":"complete_upload_v1_flows__flow_id__documents__document_id__complete_post","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Flow Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Complete Upload V1 Flows  Flow Id  Documents  Document Id  Complete Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Complete Upload"}},"/v1/applicants":{"get":{"tags":["applicants"],"summary":"List Applicants","description":"List applicants for the tenant, newest first.\n\n- ``status`` filters by ``internal_status``.\n- ``q`` substring-matches ``external_id``, ``email_hash``, or\n  ``legal_name_*`` (case-insensitive on names).\n- ``after`` is the opaque cursor returned by the previous call.","operationId":"list_applicants_v1_applicants_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ApplicantInternalStatus"},{"type":"null"}],"title":"Status"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicantListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}]}},"/v1/applicants/{applicant_id}":{"get":{"tags":["applicants"],"summary":"Get Applicant","operationId":"get_applicant_v1_applicants__applicant_id__get","parameters":[{"name":"applicant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Applicant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicantOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Get Applicant"},"patch":{"tags":["applicants"],"summary":"Patch Applicant","description":"Update applicant fields. ``internal_status`` and ``risk_tier`` require\nadmin (Bearer or operator with ``role=ADMIN``); other fields don't.","operationId":"patch_applicant_v1_applicants__applicant_id__patch","parameters":[{"name":"applicant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Applicant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicantPatchIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicantOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}]},"delete":{"tags":["applicants"],"summary":"Request Erasure","description":"Schedule data-subject erasure (GDPR art. 17 / CCPA deletion).\n\nAdmin-only: Bearer keys are full-power within the tenant; operators\nneed ``role=ADMIN``. Refuses with 409 while any flow is still\nopen (PENDING / AWAITING_INPUT / PROCESSING / NEEDS_REVIEW) —\nreviewers must disposition open cases before the evidence is\ndestroyed.\n\nThe applicant disappears from list/get immediately (``erased_at``);\nthe arq ``erase_applicant`` job then deletes the S3 documents and the\napplicant's DB rows. ``audit_log`` rows are deliberately retained\n(legal-obligation basis, GDPR art. 17(3)(b)) — they carry hashes and\nids, not PII, and the job writes a hashes-only ``applicant.erased``\ntombstone as the durable record that erasure happened.","operationId":"request_erasure_v1_applicants__applicant_id__delete","parameters":[{"name":"applicant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Applicant Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Request Erasure V1 Applicants  Applicant Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}]}},"/v1/applicants/{applicant_id}/notes":{"post":{"tags":["applicants"],"summary":"Create Note","operationId":"create_note_v1_applicants__applicant_id__notes_post","parameters":[{"name":"applicant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Applicant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicantNoteIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicantNoteOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Create Note"}},"/v1/applicants/{applicant_id}/checks":{"get":{"tags":["applicants"],"summary":"List Checks","operationId":"list_checks_v1_applicants__applicant_id__checks_get","parameters":[{"name":"applicant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Applicant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CheckOut"},"title":"Response List Checks V1 Applicants  Applicant Id  Checks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"List Checks"}},"/v1/applicants/{applicant_id}/checks/recheck":{"post":{"tags":["applicants"],"summary":"Record Recheck","description":"Record a re-run of a check on this applicant.\n\nTwo cases:\n- ``flow_id`` set, flow non-terminal → group the new check\n  under it AND re-evaluate the flow's decision via the rules engine.\n- Otherwise → the check lands on the applicant's timeline only; no\n  flow is affected. Operators use ``/v1/flows/{id}/decide``\n  if they want to update an existing flow's decision separately.","operationId":"record_recheck_v1_applicants__applicant_id__checks_recheck_post","parameters":[{"name":"applicant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Applicant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecheckIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}]}},"/v1/checks":{"get":{"tags":["checks"],"summary":"List Checks","description":"Newest-first, cursor-paginated. RLS scopes rows to the caller's\ntenant; filters compose.","operationId":"list_checks_v1_checks_get","parameters":[{"name":"check_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CheckType"},{"type":"null"}],"title":"Check Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CheckStatus"},{"type":"null"}],"title":"Status"}},{"name":"result","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CheckResult"},{"type":"null"}],"title":"Result"}},{"name":"applicant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Applicant Id"}},{"name":"flow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Flow Id"}},{"name":"use_case","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CheckUseCase"},{"type":"null"}],"title":"Use Case"}},{"name":"decision","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"}},{"name":"dataset","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset"}},{"name":"reference","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference"}},{"name":"input_ref","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Ref"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Search"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}]},"post":{"tags":["checks"],"summary":"Create Check","description":"Run a single AML check inline and return the graded row —\nthe atomic 'one API call' unit, creatable from the dashboard or a\nsecret key.","operationId":"create_check_v1_checks_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckCreateIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}]}},"/v1/checks/source_datasets":{"get":{"tags":["checks"],"summary":"List Source Datasets","description":"Slug → human title for OpenSanctions source datasets, so the\ndashboard renders \"Ukraine War and Sanctions\" instead of\n``ua_war_sanctions``. Cached 24h; proxied so the provider key stays\nserver-side. NOTE: declared before ``/{check_id}`` — route order is\nload-bearing.","operationId":"list_source_datasets_v1_checks_source_datasets_get","parameters":[],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response List Source Datasets V1 Checks Source Datasets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}]}},"/v1/checks/{check_id}":{"get":{"tags":["checks"],"summary":"Get Check","operationId":"get_check_v1_checks__check_id__get","parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Check Id"}},{"name":"accept","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Response representation. Use text/markdown for the human-readable Check; JSON is the default.","title":"Accept"},"description":"Response representation. Use text/markdown for the human-readable Check; JSON is the default."}],"responses":{"200":{"description":"The Check as JSON, or as Markdown when the request sends Accept: text/markdown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckOut"}},"text/markdown":{"schema":{"type":"string","description":"Human-readable rendering of the Check evidence."}}},"headers":{"Vary":{"description":"The representation varies by the Accept header.","schema":{"type":"string","example":"Accept"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Get Check"}},"/v1/checks/{check_id}/entities/{entity_id}":{"get":{"tags":["checks"],"summary":"Get Check Entity","description":"The full nested OpenSanctions record for one of this check's hits\n— sanction designations, relationships, provenance. Proxied (the\nbrowser never sees the provider key) and scoped: only entity ids\nthat appear on the check's stored hits may be fetched. Cached 24h.","operationId":"get_check_entity_v1_checks__check_id__entities__entity_id__get","parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Check Id"}},{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Check Entity V1 Checks  Check Id  Entities  Entity Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}]}},"/v1/alerts":{"get":{"tags":["AML check alerts"],"summary":"List Alerts","operationId":"list_alerts_v1_alerts_get","parameters":[{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/AlertState"}},{"type":"null"}],"title":"State"}},{"name":"assignee","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assignee"}},{"name":"assigned_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To"}},{"name":"unassigned","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Unassigned"}},{"name":"check","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Check"}},{"name":"applicant","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Applicant"}},{"name":"use_case","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Use Case"}},{"name":"overdue","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Overdue"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Search"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"List Alerts"}},"/v1/alerts/summary":{"get":{"tags":["AML check alerts"],"summary":"Summarize Alerts","operationId":"summarize_alerts_v1_alerts_summary_get","parameters":[],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertSummaryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Summarize Alerts"}},"/v1/alerts/{alert_id}":{"get":{"tags":["AML check alerts"],"summary":"Get Alert","operationId":"get_alert_v1_alerts__alert_id__get","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Alert Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Get Alert"},"patch":{"tags":["AML check alerts"],"summary":"Patch Alert","operationId":"patch_alert_v1_alerts__alert_id__patch","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Alert Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertPatchIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Patch Alert"}},"/v1/alerts/{alert_id}/events":{"get":{"tags":["AML check alerts"],"summary":"Get Alert Events","operationId":"get_alert_events_v1_alerts__alert_id__events_get","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Alert Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertEventOut"},"title":"Response Get Alert Events V1 Alerts  Alert Id  Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Get Alert Events"}},"/v1/checks/{check_id}/export":{"get":{"tags":["checks"],"summary":"Export Check","operationId":"export_check_v1_checks__check_id__export_get","parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Check Id"}},{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ExportFormat","default":"json"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Export Check"}},"/v1/check_policy":{"get":{"tags":["check policy"],"summary":"Get Check Policy","operationId":"get_check_policy_v1_check_policy_get","parameters":[],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckPolicyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Get Check Policy"},"put":{"tags":["check policy"],"summary":"Update Check Policy","operationId":"update_check_policy_v1_check_policy_put","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckPolicyWriteIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckPolicyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Update Check Policy"}},"/v1/check_policy/history":{"get":{"tags":["check policy"],"summary":"Get Check Policy History","operationId":"get_check_policy_history_v1_check_policy_history_get","parameters":[],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckPolicyHistoryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Get Check Policy History"}},"/v1/check_batches":{"post":{"tags":["check batches"],"summary":"Create Batch","operationId":"create_batch_v1_check_batches_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckBatchCreateIn"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckBatchOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Create Batch"},"get":{"tags":["check batches"],"summary":"List Batches","operationId":"list_batches_v1_check_batches_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/BatchStatus"},{"type":"null"}],"title":"Status"}},{"name":"use_case","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Use Case"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Search"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckBatchListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"List Batches"}},"/v1/check_batches/{batch_id}":{"get":{"tags":["check batches"],"summary":"Get Batch","operationId":"get_batch_v1_check_batches__batch_id__get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckBatchDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Get Batch"}},"/v1/check_batches/{batch_id}/download":{"get":{"tags":["check batches"],"summary":"Download Batch","operationId":"download_batch_v1_check_batches__batch_id__download_get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(json|csv)$","default":"json","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Download Batch"}},"/v1/monitors":{"post":{"tags":["check monitors"],"summary":"Create Monitor","operationId":"create_monitor_v1_monitors_post","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorCreateIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Create Monitor"},"get":{"tags":["check monitors"],"summary":"List Monitors","operationId":"list_monitors_v1_monitors_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/MonitorStatus"},{"type":"null"}],"title":"Status"}},{"name":"applicant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Applicant Id"}},{"name":"use_case","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Use Case"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Search"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"List Monitors"}},"/v1/monitors/{monitor_id}":{"get":{"tags":["check monitors"],"summary":"Get Monitor","operationId":"get_monitor_v1_monitors__monitor_id__get","parameters":[{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Monitor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Get Monitor"},"patch":{"tags":["check monitors"],"summary":"Patch Monitor Status","operationId":"patch_monitor_status_v1_monitors__monitor_id__patch","parameters":[{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Monitor Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorStatusIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Patch Monitor Status"}},"/v1/monitors/{monitor_id}/subjects":{"put":{"tags":["check monitors"],"summary":"Replace Monitor Subjects","operationId":"replace_monitor_subjects_v1_monitors__monitor_id__subjects_put","parameters":[{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Monitor Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorSubjectsIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Replace Monitor Subjects"}},"/v1/monitors/{monitor_id}/run":{"post":{"tags":["check monitors"],"summary":"Run Monitor","operationId":"run_monitor_v1_monitors__monitor_id__run_post","parameters":[{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Monitor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Run Monitor"}},"/v1/operators":{"get":{"tags":["operators"],"summary":"List Operators","description":"Active tenant operators available to assignment controls.","operationId":"list_operators_v1_operators_get","parameters":[],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}]}},"/v1/webhook_endpoints":{"post":{"tags":["webhooks"],"summary":"Create Endpoint","operationId":"create_endpoint_v1_webhook_endpoints_post","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreateIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Create Endpoint"},"get":{"tags":["webhooks"],"summary":"List Endpoints","operationId":"list_endpoints_v1_webhook_endpoints_get","parameters":[],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"List Endpoints"}},"/v1/webhook_endpoints/{endpoint_id}":{"get":{"tags":["webhooks"],"summary":"Get Endpoint","operationId":"get_endpoint_v1_webhook_endpoints__endpoint_id__get","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Get Endpoint"},"patch":{"tags":["webhooks"],"summary":"Update Endpoint","operationId":"update_endpoint_v1_webhook_endpoints__endpoint_id__patch","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointPatchIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Update Endpoint"},"delete":{"tags":["webhooks"],"summary":"Delete Endpoint","operationId":"delete_endpoint_v1_webhook_endpoints__endpoint_id__delete","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Delete Endpoint"}},"/v1/webhook_endpoints/{endpoint_id}/rotate_secret":{"post":{"tags":["webhooks"],"summary":"Rotate Endpoint Secret","operationId":"rotate_endpoint_secret_v1_webhook_endpoints__endpoint_id__rotate_secret_post","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Rotate Endpoint Secret"}},"/v1/webhook_deliveries":{"get":{"tags":["webhooks"],"summary":"List Deliveries","operationId":"list_deliveries_v1_webhook_deliveries_get","parameters":[{"name":"endpoint_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Endpoint Id"}},{"name":"event_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Event Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/WebhookDeliveryStatus"},{"type":"null"}],"title":"Status"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"List Deliveries"}},"/v1/webhook_deliveries/{delivery_id}/retry":{"post":{"tags":["webhooks"],"summary":"Retry Delivery","operationId":"retry_delivery_v1_webhook_deliveries__delivery_id__retry_post","parameters":[{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Delivery Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Retry Delivery"}},"/v1/rules":{"get":{"tags":["rules"],"summary":"List Rules","operationId":"list_rules_v1_rules_get","parameters":[],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TenantRuleOut"},"title":"Response List Rules V1 Rules Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"List Rules"},"post":{"tags":["rules"],"summary":"Create Rule","operationId":"create_rule_v1_rules_post","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantRuleIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantRuleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Create Rule"}},"/v1/rules/{rule_id}":{"put":{"tags":["rules"],"summary":"Update Rule","operationId":"update_rule_v1_rules__rule_id__put","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantRuleIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantRuleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Update Rule"},"delete":{"tags":["rules"],"summary":"Delete Rule","description":"Soft-delete by toggling ``enabled = false``. Hard-delete avoided so\naudit references stay intact and accidental disables are reversible.","operationId":"delete_rule_v1_rules__rule_id__delete","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}]}},"/v1/rules/{rule_id}/test":{"post":{"tags":["rules"],"summary":"Test Rule","description":"Dry-run a rule against a real flow. Useful for the rule editor:\n'show me whether this would have matched flow X'.","operationId":"test_rule_v1_rules__rule_id__test_post","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantRuleTestIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantRuleTestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}]}},"/v1/flow_templates":{"get":{"tags":["flows"],"summary":"List Flows","description":"List flows for the caller's tenant. Admin-visible (rule details\naren't here yet, but the metadata is operator-only).","operationId":"list_flows_v1_flow_templates_get","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FlowTemplateOut"},"title":"Response List Flows V1 Flow Templates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}]},"post":{"tags":["flows"],"summary":"Create Flow","operationId":"create_flow_v1_flow_templates_post","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowTemplateCreateIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowTemplateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Create Flow"}},"/v1/flow_templates/{slug_or_id}":{"get":{"tags":["flows"],"summary":"Get Flow","operationId":"get_flow_v1_flow_templates__slug_or_id__get","parameters":[{"name":"slug_or_id","in":"path","required":true,"schema":{"type":"string","title":"Slug Or Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowTemplateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Get Flow"}},"/v1/flow_templates/{flow_template_id}":{"patch":{"tags":["flows"],"summary":"Patch Flow","operationId":"patch_flow_v1_flow_templates__flow_template_id__patch","parameters":[{"name":"flow_template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Flow Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowTemplatePatchIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowTemplateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}],"description":"Patch Flow"}},"/v1/flow_templates/{slug}/spec":{"get":{"tags":["flows"],"summary":"Get Flow Spec","description":"Sanitized contract for the SDK. Tenant API key only.\n\nReturns the flow's check list plus the derived document requirements,\nso the iOS app knows which screens to render. No rule details or\naudit metadata leak through this path.","operationId":"get_flow_spec_v1_flow_templates__slug__spec_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowSpecOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"TenantBearer":[]}]}},"/dashboard/login":{"post":{"tags":["dashboard-auth"],"summary":"Login","description":"Authenticate by email + password. Operator first, then Staff.\n\nEmail is globally unique on operators (Slice 2 W7 migration), so we\ndon't need a tenant slug — the operator's tenant is derived from the\nmatched row. Always uses the owner engine so the pre-auth lookup\nignores RLS; the session cookie binds RLS for subsequent requests.\n\nMFA-enabled accounts get ``{mfa_required, mfa_token}`` instead of a\nsession — step 2 is ``POST /dashboard/auth/mfa/verify``.","operationId":"login_dashboard_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MeOperatorOut"},{"$ref":"#/components/schemas/MeStaffOut"},{"$ref":"#/components/schemas/MfaRequiredOut"}],"title":"Response Login Dashboard Login Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/auth/mfa/verify":{"post":{"tags":["dashboard-auth"],"summary":"Mfa Verify","description":"Trade a step-1 ``mfa_token`` plus a TOTP (or one-shot recovery) code\nfor the real session cookie.\n\nEnrollment management (enroll/activate/disable) lives in\n``app.api.dashboard.mfa`` — this endpoint is part of the login flow.","operationId":"mfa_verify_dashboard_auth_mfa_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaVerifyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MeOperatorOut"},{"$ref":"#/components/schemas/MeStaffOut"}],"title":"Response Mfa Verify Dashboard Auth Mfa Verify Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/logout":{"post":{"tags":["dashboard-auth"],"summary":"Logout","description":"Clear the session cookie. Idempotent — fine to call when not logged in.\n\nA valid session cookie gets an ``auth.logout`` audit row attributed to\nthe principal; an absent/invalid cookie just clears (nothing to record).","operationId":"logout_dashboard_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoutOut"}}}}}}},"/dashboard/me":{"get":{"tags":["dashboard-auth"],"summary":"Whoami","description":"Return the current operator or staff principal — or 401.\n\nImplemented as a single endpoint that branches on the cookie's ``kind``\nso the dashboard can call ``/dashboard/me`` regardless of who's logged in.","operationId":"whoami_dashboard_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MeOperatorOut"},{"$ref":"#/components/schemas/MeStaffOut"}],"title":"Response Whoami Dashboard Me Get"}}}}}}},"/dashboard/auth/mfa/enroll":{"post":{"tags":["dashboard-mfa"],"summary":"Enroll","description":"Start TOTP enrollment: mint a secret, store it encrypted.\n\n``mfa_enabled`` stays false until ``/activate`` proves the\nauthenticator actually produces valid codes. Re-POSTing before\nactivation simply rotates the pending secret.","operationId":"enroll_dashboard_auth_mfa_enroll_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaEnrollOut"}}}}}}},"/dashboard/auth/mfa/activate":{"post":{"tags":["dashboard-mfa"],"summary":"Activate","description":"Prove the enrolled authenticator works; flip ``mfa_enabled`` on and\nhand out the one-time recovery codes.","operationId":"activate_dashboard_auth_mfa_activate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaCodeIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaActivateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/auth/mfa/disable":{"post":{"tags":["dashboard-mfa"],"summary":"Disable","description":"Turn MFA off. Requires a valid *current* TOTP code — a hijacked\nsession alone must not be able to strip the second factor.","operationId":"disable_dashboard_auth_mfa_disable_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaCodeIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaDisableOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/account/password":{"post":{"tags":["dashboard-account"],"summary":"Change Password","operationId":"change_password_dashboard_account_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/api_keys/rotate":{"post":{"tags":["dashboard-settings"],"summary":"Rotate Api Key","description":"Generate a new tenant API key, replacing the existing one immediately.\n\nSingle-key model — there is no grace period. If you need to rotate\nwithout breaking in-flight clients, deploy them with the new key first\n*and then* call this. Future migration: a second ``tenant_api_keys``\nrow + revoke-on-confirm flow.","operationId":"rotate_api_key_dashboard_api_keys_rotate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRotatedOut"}}}}}}},"/dashboard/api_keys/publishable/rotate":{"post":{"tags":["dashboard-settings"],"summary":"Rotate Publishable Key","description":"Generate a new browser-safe ``pk_`` key, replacing the existing one\nimmediately.\n\nSame single-key model as the secret-key rotation above — the old key\n401s on its next checks call. Browsers cache the customer's bundle,\nso expect stragglers: rotate during a deploy window, not mid-traffic.","operationId":"rotate_publishable_key_dashboard_api_keys_publishable_rotate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishableKeyRotatedOut"}}}}}}},"/dashboard/checks_policy":{"get":{"tags":["dashboard-settings"],"summary":"Get Checks Policy","description":"The tenant's *effective* checks policy — platform defaults fill\nany keys the tenant never set, so the dashboard always shows exactly\nwhat the graders will use.","operationId":"get_checks_policy_dashboard_checks_policy_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecksPolicyOut"}}}}}},"put":{"tags":["dashboard-settings"],"summary":"Update Checks Policy","description":"Replace the tenant's checks policy wholesale (PUT semantics —\nthe dashboard card submits the complete form, so there is no merge).","operationId":"update_checks_policy_dashboard_checks_policy_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecksPolicyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecksPolicyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AddressKind":{"type":"string","enum":["current","mailing","prior"],"title":"AddressKind"},"AlertApplicantSummaryOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},"type":"object","required":["id","name","external_id"],"title":"AlertApplicantSummaryOut"},"AlertCheckSummaryOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"applicant_id":{"type":"string","format":"uuid","title":"Applicant Id"},"input_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Ref"},"use_case":{"$ref":"#/components/schemas/CheckUseCase"},"mode":{"$ref":"#/components/schemas/CheckMode"},"decision":{"anyOf":[{"$ref":"#/components/schemas/CheckDecision"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/CheckStatus"},"latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency Ms"}},"type":"object","required":["id","applicant_id","input_ref","use_case","mode","decision","status","latency_ms"],"title":"AlertCheckSummaryOut"},"AlertEventOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"alert_id":{"type":"string","format":"uuid","title":"Alert Id"},"actor_type":{"type":"string","title":"Actor Type"},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Id"},"event":{"type":"string","title":"Event"},"from_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From State"},"to_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To State"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","alert_id","actor_type","actor_id","event","from_state","to_state","payload","created_at"],"title":"AlertEventOut"},"AlertListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AlertOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"AlertListOut"},"AlertOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"check_id":{"type":"string","format":"uuid","title":"Check Id"},"subject_ref":{"type":"string","title":"Subject Ref"},"source_entity_id":{"type":"string","title":"Source Entity Id"},"state":{"$ref":"#/components/schemas/AlertState"},"assigned_to":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To"},"four_eyes_required":{"type":"boolean","title":"Four Eyes Required"},"evidence":{"additionalProperties":true,"type":"object","title":"Evidence"},"disposition_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disposition Reason"},"disposition_evidence":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Disposition Evidence"},"queue_sla_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Queue Sla At"},"escalated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Escalated At"},"disposed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Disposed At"},"disposed_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Disposed By"},"reviewed_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Reviewed By"},"assignee":{"anyOf":[{"$ref":"#/components/schemas/OperatorSummaryOut"},{"type":"null"}]},"check":{"anyOf":[{"$ref":"#/components/schemas/AlertCheckSummaryOut"},{"type":"null"}]},"applicant":{"anyOf":[{"$ref":"#/components/schemas/AlertApplicantSummaryOut"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","check_id","subject_ref","source_entity_id","state","assigned_to","four_eyes_required","evidence","disposition_reason","disposition_evidence","queue_sla_at","escalated_at","disposed_at","disposed_by","reviewed_by","created_at","updated_at"],"title":"AlertOut"},"AlertPatchIn":{"properties":{"state":{"anyOf":[{"$ref":"#/components/schemas/AlertState"},{"type":"null"}]},"assigned_to":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To"},"disposition_reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Disposition Reason"},"disposition_evidence":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":50},{"type":"null"}],"title":"Disposition Evidence"}},"additionalProperties":false,"type":"object","title":"AlertPatchIn"},"AlertState":{"type":"string","enum":["new","investigating","escalated","cleared_false_positive","confirmed_match","closed"],"title":"AlertState"},"AlertSummaryOut":{"properties":{"new":{"type":"integer","title":"New"},"mine":{"type":"integer","title":"Mine"},"unassigned":{"type":"integer","title":"Unassigned"},"escalated":{"type":"integer","title":"Escalated"},"overdue":{"type":"integer","title":"Overdue"},"disposed":{"type":"integer","title":"Disposed"},"active":{"type":"integer","title":"Active"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["new","mine","unassigned","escalated","overdue","disposed","active","total"],"title":"AlertSummaryOut"},"AmlDataset":{"type":"string","enum":["sanctions","pep","pep_rca","wanted","debarment","soe","export_controls","regulatory_enforcement","forced_labor","maritime_risk","investment_restrictions","enhanced_due_diligence","crypto_wallets"],"title":"AmlDataset"},"AmlMatchPolicy":{"properties":{"review_threshold":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Review Threshold","default":0.6},"fail_threshold":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Fail Threshold","default":0.85},"algorithm":{"type":"string","enum":["logic-v2","ofac","best"],"title":"Algorithm","default":"logic-v2"},"feature_weights":{"additionalProperties":{"type":"number"},"type":"object","title":"Feature Weights"},"include_sources":{"items":{"type":"string"},"type":"array","title":"Include Sources"},"exclude_sources":{"items":{"type":"string"},"type":"array","title":"Exclude Sources"},"include_weak_aliases":{"type":"boolean","title":"Include Weak Aliases","default":false},"dataset_thresholds":{"additionalProperties":{"$ref":"#/components/schemas/AmlThresholds"},"type":"object","title":"Dataset Thresholds"},"use_case_thresholds":{"additionalProperties":{"$ref":"#/components/schemas/AmlThresholds"},"type":"object","title":"Use Case Thresholds"}},"additionalProperties":false,"type":"object","title":"AmlMatchPolicy"},"AmlThresholds":{"properties":{"review_threshold":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Review Threshold","default":0.6},"fail_threshold":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Fail Threshold","default":0.85}},"additionalProperties":false,"type":"object","title":"AmlThresholds"},"ApiKeyRotatedOut":{"properties":{"api_key":{"type":"string","title":"Api Key","description":"Plaintext API key — shown ONCE. Save it now; we cannot recover it."},"rotated_at":{"type":"string","format":"date-time","title":"Rotated At"},"note":{"type":"string","title":"Note","default":"The previous key is invalid as of now. Update any clients that depend on it before they make their next request."}},"type":"object","required":["api_key","rotated_at"],"title":"ApiKeyRotatedOut"},"ApplicantAddressOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kind":{"$ref":"#/components/schemas/AddressKind"},"line1":{"type":"string","title":"Line1"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line2"},"city":{"type":"string","title":"City"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"country":{"type":"string","title":"Country"},"verified":{"type":"boolean","title":"Verified"}},"type":"object","required":["id","kind","line1","city","country","verified"],"title":"ApplicantAddressOut"},"ApplicantEntityType":{"type":"string","enum":["individual","business"],"title":"ApplicantEntityType","description":"Who is being verified: a natural person (KYC) or a legal entity\n(KYB). Business applicants screen their ``business_name`` against the\nwatchlist datasets via the provider's Company schema; the person-ID\nfields (names, dob, gender, nationality) stay empty."},"ApplicantGender":{"type":"string","enum":["male","female","other"],"title":"ApplicantGender"},"ApplicantIn":{"properties":{"external_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"External Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"entity_type":{"$ref":"#/components/schemas/ApplicantEntityType","description":"``individual`` (KYC, the default) or ``business`` (KYB). Business applicants screen ``business_name`` against the watchlist datasets; person-ID fields don't apply.","default":"individual"},"business_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Business Name"},"legal_name_first":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Legal Name First"},"legal_name_middle":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Legal Name Middle"},"legal_name_last":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Legal Name Last"},"dob":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Dob"},"nationality":{"anyOf":[{"type":"string","maxLength":3,"minLength":2},{"type":"null"}],"title":"Nationality"},"gender":{"anyOf":[{"$ref":"#/components/schemas/ApplicantGender"},{"type":"null"}]},"address_line1":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Address Line2"},"address_city":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Address City"},"address_region":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Address Region"},"address_postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Address Postal Code"},"address_country":{"anyOf":[{"type":"string","maxLength":3,"minLength":2},{"type":"null"}],"title":"Address Country"},"extracted_source":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Extracted Source","description":"Where the SDK got the ID data from: 'chip' (passport NFC), 'mrz' (passport visual zone), 'barcode' (AAMVA PDF417). Surfaces in the flow's evidence check so operators can tell at a glance how authoritative the data is."},"custom_attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Attributes","description":"Free-form bag for fields without a first-class column — license number, document expiration, eye/hair/height/weight, etc. Merged into ``Applicant.custom_attributes`` on creation. Use snake_case keys. Existing applicants keep their data."},"consent":{"anyOf":[{"$ref":"#/components/schemas/ConsentIn"},{"type":"null"}],"description":"End-user consent captured by the client at applicant creation. Required (with biometric=true) before FACE_MATCH / LIVENESS checks will run. For an existing applicant this only fills a missing record — use PATCH /v1/applicants/{id} to re-consent."}},"type":"object","title":"ApplicantIn","description":"Applicant identifier + any client-extracted ID fields the SDK\nhas on hand (chip > MRZ > barcode).\n\nThe server applies these fields when *creating* a new applicant; for\nan applicant that already exists (matched by ``external_id``), the\nexisting data wins. This is the channel that bridges client-side\nextraction (NFC/MRZ/barcode parsing on the phone) and the\nserver-side worker pipeline (OCR + face match), which doesn't\nre-parse the chip data."},"ApplicantInternalStatus":{"type":"string","enum":["new","in_review","cleared","rejected"],"title":"ApplicantInternalStatus","description":"Where this applicant sits in the tenant's review queue.\n\nDistinct from a flow's status — an applicant can have many\nflows over time and an internal status tracking the\noperator-facing case state across them."},"ApplicantListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ApplicantSummary"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"ApplicantListOut"},"ApplicantNoteIn":{"properties":{"body":{"type":"string","maxLength":10000,"minLength":1,"title":"Body"}},"type":"object","required":["body"],"title":"ApplicantNoteIn"},"ApplicantNoteOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"author_type":{"$ref":"#/components/schemas/NoteAuthorType"},"author_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author Id"},"body":{"type":"string","title":"Body"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","author_type","author_id","body","created_at"],"title":"ApplicantNoteOut"},"ApplicantOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"entity_type":{"$ref":"#/components/schemas/ApplicantEntityType"},"business_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Name"},"legal_name_first":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name First"},"legal_name_last":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name Last"},"nationality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nationality"},"internal_status":{"$ref":"#/components/schemas/ApplicantInternalStatus"},"risk_tier":{"$ref":"#/components/schemas/ApplicantRiskTier"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"legal_name_middle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name Middle"},"dob":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Dob"},"gender":{"anyOf":[{"$ref":"#/components/schemas/ApplicantGender"},{"type":"null"}]},"email_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Hash"},"phone_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Hash"},"custom_attributes":{"additionalProperties":true,"type":"object","title":"Custom Attributes"},"consent":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Consent"},"addresses":{"items":{"$ref":"#/components/schemas/ApplicantAddressOut"},"type":"array","title":"Addresses"},"notes":{"items":{"$ref":"#/components/schemas/ApplicantNoteOut"},"type":"array","title":"Notes"},"checks":{"items":{"$ref":"#/components/schemas/CheckOut"},"type":"array","title":"Checks"},"flows":{"items":{"$ref":"#/components/schemas/FlowSummary"},"type":"array","title":"Flows"}},"type":"object","required":["id","external_id","entity_type","business_name","legal_name_first","legal_name_last","nationality","internal_status","risk_tier","created_at","updated_at","legal_name_middle","dob","gender","email_hash","phone_hash","custom_attributes"],"title":"ApplicantOut","description":"Full applicant — embeds children and recent flows."},"ApplicantPatchIn":{"properties":{"legal_name_first":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Legal Name First"},"legal_name_middle":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Legal Name Middle"},"legal_name_last":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Legal Name Last"},"dob":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Dob"},"nationality":{"anyOf":[{"type":"string","maxLength":3,"minLength":2},{"type":"null"}],"title":"Nationality"},"gender":{"anyOf":[{"$ref":"#/components/schemas/ApplicantGender"},{"type":"null"}]},"custom_attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Attributes"},"consent":{"anyOf":[{"$ref":"#/components/schemas/ConsentIn"},{"type":"null"}]},"internal_status":{"anyOf":[{"$ref":"#/components/schemas/ApplicantInternalStatus"},{"type":"null"}]},"risk_tier":{"anyOf":[{"$ref":"#/components/schemas/ApplicantRiskTier"},{"type":"null"}]}},"type":"object","title":"ApplicantPatchIn","description":"All fields optional. ``internal_status`` and ``risk_tier`` are admin-only\n(enforced in the handler)."},"ApplicantRiskTier":{"type":"string","enum":["low","medium","high"],"title":"ApplicantRiskTier"},"ApplicantSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"entity_type":{"$ref":"#/components/schemas/ApplicantEntityType"},"business_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Name"},"legal_name_first":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name First"},"legal_name_last":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name Last"},"nationality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nationality"},"internal_status":{"$ref":"#/components/schemas/ApplicantInternalStatus"},"risk_tier":{"$ref":"#/components/schemas/ApplicantRiskTier"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","external_id","entity_type","business_name","legal_name_first","legal_name_last","nationality","internal_status","risk_tier","created_at","updated_at"],"title":"ApplicantSummary","description":"Compact view for the listing endpoint."},"BatchRecordIn":{"properties":{"external_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"External Id"},"applicant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Applicant Id"},"subjects":{"items":{"$ref":"#/components/schemas/CheckSubjectIn"},"type":"array","maxItems":100,"minItems":1,"title":"Subjects"}},"type":"object","required":["subjects"],"title":"BatchRecordIn"},"BatchStatus":{"type":"string","enum":["queued","running","complete","failed"],"title":"BatchStatus"},"ChangePasswordIn":{"properties":{"current_password":{"type":"string","maxLength":512,"minLength":1,"title":"Current Password"},"new_password":{"type":"string","maxLength":512,"minLength":1,"title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePasswordIn"},"ChangePasswordOut":{"properties":{"status":{"type":"string","const":"ok","title":"Status","default":"ok"}},"type":"object","title":"ChangePasswordOut"},"CheckBatchCreateIn":{"properties":{"mode":{"$ref":"#/components/schemas/CheckMode","default":"async"},"use_case":{"$ref":"#/components/schemas/CheckUseCase","default":"lookback"},"datasets":{"anyOf":[{"items":{"$ref":"#/components/schemas/AmlDataset"},"type":"array","minItems":1},{"type":"null"}],"title":"Datasets"},"records":{"items":{"$ref":"#/components/schemas/BatchRecordIn"},"type":"array","maxItems":1000,"minItems":1,"title":"Records"}},"type":"object","required":["records"],"title":"CheckBatchCreateIn"},"CheckBatchDetailOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"$ref":"#/components/schemas/BatchStatus"},"use_case":{"$ref":"#/components/schemas/CheckUseCase"},"datasets":{"items":{"type":"string"},"type":"array","title":"Datasets"},"subject_count":{"type":"integer","title":"Subject Count"},"completed_count":{"type":"integer","title":"Completed Count"},"error_count":{"type":"integer","title":"Error Count"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"records":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Records"},"results":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Results"}},"type":"object","required":["id","status","use_case","datasets","subject_count","completed_count","error_count","error","completed_at","created_at","updated_at","records","results"],"title":"CheckBatchDetailOut"},"CheckBatchListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CheckBatchOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"CheckBatchListOut"},"CheckBatchOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"$ref":"#/components/schemas/BatchStatus"},"use_case":{"$ref":"#/components/schemas/CheckUseCase"},"datasets":{"items":{"type":"string"},"type":"array","title":"Datasets"},"subject_count":{"type":"integer","title":"Subject Count"},"completed_count":{"type":"integer","title":"Completed Count"},"error_count":{"type":"integer","title":"Error Count"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","status","use_case","datasets","subject_count","completed_count","error_count","error","completed_at","created_at","updated_at"],"title":"CheckBatchOut"},"CheckCreateIn":{"properties":{"type":{"$ref":"#/components/schemas/CheckType","default":"aml_screen"},"use_case":{"$ref":"#/components/schemas/CheckUseCase","default":"ad_hoc"},"mode":{"$ref":"#/components/schemas/CheckMode","default":"sync"},"reference_id":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Reference Id"},"subjects":{"anyOf":[{"items":{"$ref":"#/components/schemas/CheckSubjectIn"},"type":"array","maxItems":100,"minItems":1},{"type":"null"}],"title":"Subjects"},"datasets":{"anyOf":[{"items":{"$ref":"#/components/schemas/AmlDataset"},"type":"array","minItems":1},{"type":"null"}],"title":"Datasets"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array","minItems":1},{"type":"null"}],"title":"Categories","description":"adverse_media only: which news categories to grade (violent_crime, terrorism, regulatory, financial_crime, organized_crime). Unset grades all adverse categories; 'political' is always informational."},"applicant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Applicant Id","description":"Screen an existing applicant by Fidera id (their stored identity fields feed the query). Mutually exclusive with ``applicant`` — when set, the inline payload is ignored. ``applicant.external_id`` offers the same linkage by your own identifier."},"applicant":{"$ref":"#/components/schemas/ApplicantIn"}},"type":"object","title":"CheckCreateIn","description":"Standalone check — one provider call, no flow, graded inline.\n\nv1 supports ``aml_screen``, ``adverse_media``, ``email_intel``, and\n``country_risk`` (the remaining runner-backed checks need\nrequest-context signals a manual dashboard run doesn't have)."},"CheckDecision":{"type":"string","enum":["clear","review","hold","error"],"title":"CheckDecision","description":"Customer action derived from a check result and its use case."},"CheckListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CheckOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"CheckListOut"},"CheckMode":{"type":"string","enum":["sync","async"],"title":"CheckMode"},"CheckOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"check_type":{"$ref":"#/components/schemas/CheckType"},"status":{"$ref":"#/components/schemas/CheckStatus"},"result":{"$ref":"#/components/schemas/CheckResult"},"decision":{"anyOf":[{"$ref":"#/components/schemas/CheckDecision"},{"type":"null"}]},"use_case":{"$ref":"#/components/schemas/CheckUseCase","default":"ad_hoc"},"mode":{"$ref":"#/components/schemas/CheckMode","default":"sync"},"reason_codes":{"items":{"type":"string"},"type":"array","title":"Reason Codes"},"output":{"additionalProperties":true,"type":"object","title":"Output"},"input_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Ref"},"policy_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Version"},"policy_snapshot":{"additionalProperties":true,"type":"object","title":"Policy Snapshot"},"dataset_versions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Dataset Versions"},"source_versions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Source Versions"},"normalized_query":{"additionalProperties":true,"type":"object","title":"Normalized Query"},"evidence":{"additionalProperties":true,"type":"object","title":"Evidence"},"latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency Ms"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"applicant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Applicant Id"},"submission_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Submission Id"},"applicant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Applicant Name"},"flow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Flow Id"},"datasets":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Datasets"},"alert_count":{"type":"integer","title":"Alert Count","default":0}},"type":"object","required":["id","check_type","status","result","reason_codes","output","error","created_at"],"title":"CheckOut"},"CheckPolicyHistoryOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CheckPolicyVersionOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"CheckPolicyHistoryOut"},"CheckPolicyOut":{"properties":{"policy_version":{"type":"string","title":"Policy Version"},"blocked_countries":{"items":{"type":"string"},"type":"array","title":"Blocked Countries"},"vpn_policy":{"type":"string","enum":["allow","review","block"],"title":"Vpn Policy"},"device_velocity_threshold":{"type":"integer","title":"Device Velocity Threshold"},"fatf_grey_handling":{"type":"string","enum":["ignore","flag"],"title":"Fatf Grey Handling"},"fatf_black_handling":{"type":"string","enum":["flag","block"],"title":"Fatf Black Handling"},"four_eyes_required":{"type":"boolean","title":"Four Eyes Required"},"aml_match_policy":{"$ref":"#/components/schemas/AmlMatchPolicy"},"default_datasets":{"items":{"type":"string"},"type":"array","title":"Default Datasets"}},"type":"object","required":["policy_version","blocked_countries","vpn_policy","device_velocity_threshold","fatf_grey_handling","fatf_black_handling","four_eyes_required","aml_match_policy","default_datasets"],"title":"CheckPolicyOut"},"CheckPolicyVersionOut":{"properties":{"version":{"type":"string","title":"Version"},"policy":{"additionalProperties":true,"type":"object","title":"Policy"},"activated_at":{"type":"string","format":"date-time","title":"Activated At"},"retired_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Retired At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["version","policy","activated_at","retired_at","created_at"],"title":"CheckPolicyVersionOut"},"CheckPolicyWriteIn":{"properties":{"blocked_countries":{"items":{"type":"string"},"type":"array","maxItems":250,"title":"Blocked Countries"},"vpn_policy":{"type":"string","enum":["allow","review","block"],"title":"Vpn Policy","default":"review"},"device_velocity_threshold":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Device Velocity Threshold","default":3},"fatf_grey_handling":{"type":"string","enum":["ignore","flag"],"title":"Fatf Grey Handling","default":"ignore"},"fatf_black_handling":{"type":"string","enum":["flag","block"],"title":"Fatf Black Handling","default":"flag"},"four_eyes_required":{"type":"boolean","title":"Four Eyes Required","default":false},"aml_match_policy":{"$ref":"#/components/schemas/AmlMatchPolicy"},"default_datasets":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Default Datasets"}},"additionalProperties":false,"type":"object","required":["default_datasets"],"title":"CheckPolicyWriteIn"},"CheckResult":{"type":"string","enum":["clear","flag","error","skipped"],"title":"CheckResult","description":"The outcome the rules engine consumes.\n\n- ``CLEAR`` — evaluated, nothing found\n- ``FLAG`` — a finding that needs human eyes (severity lives in the\n  check's confidence, not in extra states); never a decision —\n  decisions belong to the flow\n- ``ERROR`` — the check could not be evaluated (provider outage,\n  parse failure); fail-closed to review at the flow level\n- ``SKIPPED`` — nothing to evaluate (also the default before a\n  verdict exists)"},"CheckStatus":{"type":"string","enum":["pending","running","complete"],"title":"CheckStatus","description":"Lifecycle only: did the run finish. What it found lives on\n``CheckResult`` — including ERROR, so a provider outage is an outcome,\nnever a lifecycle state."},"CheckSubjectIn":{"properties":{"reference_id":{"anyOf":[{"type":"string","maxLength":160,"minLength":1},{"type":"null"}],"title":"Reference Id"},"type":{"$ref":"#/components/schemas/CheckSubjectType"},"role":{"$ref":"#/components/schemas/SubjectRole","default":"customer"},"name":{"anyOf":[{"type":"string","maxLength":384,"minLength":1},{"type":"null"}],"title":"Name"},"aliases":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Aliases"},"weak_aliases":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Weak Aliases"},"date_of_birth":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Of Birth"},"nationality":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Nationality"},"country":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Country"},"identifiers":{"additionalProperties":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"type":"object","title":"Identifiers"},"wallet_address":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Wallet Address"},"imo_number":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Imo Number"},"mmsi":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Mmsi"},"registration_number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Registration Number"}},"additionalProperties":false,"type":"object","required":["type"],"title":"CheckSubjectIn"},"CheckSubjectType":{"type":"string","enum":["person","company","wallet","vessel","aircraft"],"title":"CheckSubjectType","description":"Fidera input kinds mapped to canonical FtM schemata by Check service."},"CheckType":{"type":"string","enum":["document_ocr","document_authenticity","face_match","liveness","aml_screen","ip_intel","email_intel","device_fingerprint","adverse_media","country_risk"],"title":"CheckType"},"CheckUseCase":{"type":"string","enum":["onboarding","ongoing","transaction","lookback","trade","ad_hoc"],"title":"CheckUseCase","description":"Why an AML check is being run.\n\nThis is execution context on ``Check`` rather than a second resource.\nThe same AML evaluation has different operational semantics\nfor onboarding and pre-release transaction checks."},"ChecksPolicyIn":{"properties":{"blocked_countries":{"items":{"type":"string"},"type":"array","maxItems":250,"title":"Blocked Countries"},"vpn_policy":{"type":"string","enum":["allow","review","block"],"title":"Vpn Policy"},"device_velocity_threshold":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Device Velocity Threshold"},"fatf_grey_handling":{"type":"string","enum":["ignore","flag"],"title":"Fatf Grey Handling","default":"ignore"},"fatf_black_handling":{"type":"string","enum":["flag","block"],"title":"Fatf Black Handling","default":"flag"},"four_eyes_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Four Eyes Required"},"aml_match_policy":{"anyOf":[{"$ref":"#/components/schemas/AmlMatchPolicy"},{"type":"null"}]},"default_datasets":{"items":{"$ref":"#/components/schemas/AmlDataset"},"type":"array","maxItems":13,"minItems":1,"title":"Default Datasets"},"allowed_origins":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Allowed Origins"}},"type":"object","required":["blocked_countries","vpn_policy","device_velocity_threshold","default_datasets","allowed_origins"],"title":"ChecksPolicyIn","description":"Pydantic-validated view over ``tenants.allowed_origins`` +\n``tenants.check_config``. Graders read the latter through\n``app.domain.check.policy.ChecksPolicy``; this schema is\ndeliberately the stricter of the two (write-side validation)."},"ChecksPolicyOut":{"properties":{"blocked_countries":{"items":{"type":"string"},"type":"array","title":"Blocked Countries"},"vpn_policy":{"type":"string","enum":["allow","review","block"],"title":"Vpn Policy"},"device_velocity_threshold":{"type":"integer","title":"Device Velocity Threshold"},"fatf_grey_handling":{"type":"string","enum":["ignore","flag"],"title":"Fatf Grey Handling"},"fatf_black_handling":{"type":"string","enum":["flag","block"],"title":"Fatf Black Handling"},"four_eyes_required":{"type":"boolean","title":"Four Eyes Required"},"aml_match_policy":{"$ref":"#/components/schemas/AmlMatchPolicy"},"default_datasets":{"items":{"type":"string"},"type":"array","title":"Default Datasets"},"allowed_origins":{"items":{"type":"string"},"type":"array","title":"Allowed Origins"}},"type":"object","required":["blocked_countries","vpn_policy","device_velocity_threshold","fatf_grey_handling","fatf_black_handling","four_eyes_required","aml_match_policy","default_datasets","allowed_origins"],"title":"ChecksPolicyOut","description":"Unconstrained mirror of ``ChecksPolicyIn`` — reads must render\nwhatever is stored (or defaulted), even values an older bound would\nnow reject."},"ConsentIn":{"properties":{"biometric":{"type":"boolean","title":"Biometric"},"policy_version":{"type":"string","maxLength":64,"minLength":1,"title":"Policy Version"}},"type":"object","required":["biometric","policy_version"],"title":"ConsentIn","description":"End-user consent capture (currently: biometric processing).\n\nCollected by the client (SDK / hosted flow) at the point the end-user\naccepts the tenant's consent language; ``policy_version`` pins which\ntext they saw. ``captured_at`` is stamped *server-side* (see\n``to_record``) so clients can't backdate a grant. The worker refuses\nto run FACE_MATCH / LIVENESS without ``biometric=true`` — the\nflow parks with reason ``missing_consent:biometric``."},"DatasetVersionCreateIn":{"properties":{"dataset_key":{"type":"string","maxLength":100,"minLength":1,"title":"Dataset Key"},"version":{"type":"string","maxLength":160,"minLength":1,"title":"Version"},"source_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Source Url"},"issuer_timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Issuer Timestamp"},"fetched_at":{"type":"string","format":"date-time","title":"Fetched At"},"checksum":{"type":"string","maxLength":128,"minLength":32,"title":"Checksum"},"parser_version":{"type":"string","maxLength":100,"minLength":1,"title":"Parser Version"},"entity_count":{"type":"integer","minimum":0.0,"title":"Entity Count"},"validation_result":{"$ref":"#/components/schemas/ValidationResult","default":"pending"},"validation_details":{"additionalProperties":true,"type":"object","title":"Validation Details"},"active_index_identifier":{"type":"string","maxLength":300,"minLength":1,"title":"Active Index Identifier"},"sources":{"items":{"$ref":"#/components/schemas/SourceVersionCreateIn"},"type":"array","maxItems":1000,"title":"Sources"}},"additionalProperties":false,"type":"object","required":["dataset_key","version","source_url","fetched_at","checksum","parser_version","entity_count","active_index_identifier"],"title":"DatasetVersionCreateIn"},"DocumentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"doc_type":{"$ref":"#/components/schemas/DocumentType"},"side":{"$ref":"#/components/schemas/DocumentSide"},"upload_status":{"$ref":"#/components/schemas/UploadStatus"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","doc_type","side","upload_status","created_at"],"title":"DocumentOut"},"DocumentPreviewOut":{"properties":{"url":{"type":"string","title":"Url"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime Type"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["url","mime_type","expires_in"],"title":"DocumentPreviewOut","description":"Short-lived signed GET URL the dashboard hands to ``<img>``/``<video>``."},"DocumentRequestIn":{"properties":{"doc_type":{"$ref":"#/components/schemas/DocumentType"},"side":{"$ref":"#/components/schemas/DocumentSide","default":"single"},"mime_type":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Mime Type","default":"image/jpeg"}},"type":"object","required":["doc_type"],"title":"DocumentRequestIn"},"DocumentRequestOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"doc_type":{"$ref":"#/components/schemas/DocumentType"},"side":{"$ref":"#/components/schemas/DocumentSide"},"upload_status":{"$ref":"#/components/schemas/UploadStatus"},"upload":{"$ref":"#/components/schemas/PresignedUploadOut"}},"type":"object","required":["id","doc_type","side","upload_status","upload"],"title":"DocumentRequestOut"},"DocumentSide":{"type":"string","enum":["front","back","single"],"title":"DocumentSide"},"DocumentType":{"type":"string","enum":["drivers_license","passport","national_id","residence_permit","selfie","liveness_video","other"],"title":"DocumentType"},"ExecutionMode":{"type":"string","enum":["async","sync"],"title":"ExecutionMode","description":"How a flow's checks were invoked. Independent of transport\n(``tnk_`` / ``pk_`` / SDK) — the caller picks the mode per request via\n``mode`` on ``POST /v1/flows``. Recorded so the dashboard can\nshow whether a row ran inline (sync) or via the worker (async)."},"ExportFormat":{"type":"string","enum":["json","csv","markdown","pdf"],"title":"ExportFormat"},"FatfListingIn":{"properties":{"country_code":{"type":"string","title":"Country Code"},"tier":{"$ref":"#/components/schemas/FatfTier"}},"type":"object","required":["country_code","tier"],"title":"FatfListingIn"},"FatfTier":{"type":"string","enum":["black","grey"],"title":"FatfTier"},"FatfUpdateIn":{"properties":{"effective_from":{"type":"string","format":"date","title":"Effective From"},"plenary_label":{"type":"string","title":"Plenary Label"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"listings":{"items":{"$ref":"#/components/schemas/FatfListingIn"},"type":"array","title":"Listings"}},"type":"object","required":["effective_from","plenary_label","listings"],"title":"FatfUpdateIn","description":"Replace the in-force FATF lists after a plenary. Countries absent\nfrom the payload are closed out (effective_to = effective_from of\nthe new state); unchanged countries keep their original\neffective_from."},"FlowChecksPublicOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"result":{"type":"string","enum":["approved","review","denied","pending"],"title":"Result"},"reason_codes":{"items":{"type":"string"},"type":"array","title":"Reason Codes"}},"type":"object","required":["id","result"],"title":"FlowChecksPublicOut","description":"Redacted response for publishable-key (browser) callers on the sync\ncreate path: the id, the result, and the decision reason codes.\n\nPer-check detail — sanctions hit names above all — stays server-side:\nrevealing \"you matched a sanctions list\" to the person being screened\nis a tipping-off risk. Reason codes are policy verdicts (e.g.\n``ip_country_blocked:IR``), not PII, so they are safe to surface.\nSecret-key (``tnk_``) and operator callers get the full\n``FlowOut`` instead."},"FlowCreateIn":{"properties":{"type":{"$ref":"#/components/schemas/FlowType","default":"id_document"},"applicant":{"$ref":"#/components/schemas/ApplicantIn"},"datasets":{"anyOf":[{"items":{"$ref":"#/components/schemas/AmlDataset"},"type":"array","maxItems":13,"minItems":1},{"type":"null"}],"title":"Datasets","description":"AML datasets for the ``aml_screen`` check (sanctions, pep, pep_rca, wanted, debarment, soe, crypto_wallets). Unset → the tenant's checks-policy default. An empty list is a 422 — omit the field to get defaults."},"template_slug":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Template Slug","description":"Slug of the flow this flow runs under. When unset, the tenant's ``default`` flow is used. The flow controls which checks run and which decision applies when no rule matches."},"mode":{"type":"string","enum":["sync","async"],"title":"Mode","description":"``async`` (default) creates the flow and returns it PENDING — the caller uploads documents and calls /process to run the checks on the worker. ``sync`` runs the flow's checks inline in-request and returns the decided flow with its results. ``sync`` is only valid for checks-only flows (no document/biometric checks) — any other flow is a 422.","default":"async"},"device":{"anyOf":[{"$ref":"#/components/schemas/FlowDeviceIn"},{"type":"null"}],"description":"FingerprintJS evidence for the device-velocity signal. Only consulted in ``mode=sync`` when the flow runs the ``device_fingerprint`` check."}},"type":"object","title":"FlowCreateIn"},"FlowDecideIn":{"properties":{"decision":{"$ref":"#/components/schemas/FlowDecision","description":"Must be one of AUTO_APPROVED, MANUAL_REVIEW, REJECTED."},"reason_codes":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Reason Codes"}},"type":"object","required":["decision"],"title":"FlowDecideIn","description":"Operator override of the rules engine. Bypasses re-evaluation; the\naudit trail records who and why."},"FlowDecision":{"type":"string","enum":["pending","auto_approved","manual_review","rejected"],"title":"FlowDecision","description":"Outcome of the rules engine. Mapped onto ``FlowStatus`` by the\nworker — see ``app.workers.flow_processor`` for the mapping. This\nenum is the *audit* of why we landed on a status; the status itself stays\nthe FSM-driven transition target."},"FlowDeviceIn":{"properties":{"visitor_id":{"type":"string","maxLength":128,"minLength":1,"title":"Visitor Id"},"confidence":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Confidence"}},"type":"object","required":["visitor_id"],"title":"FlowDeviceIn","description":"FingerprintJS v5 evidence forwarded by the caller's frontend for\nthe device-velocity signal.\n\nClient-asserted — it can nudge a flow toward review (device\nvelocity) but never upgrades assurance; the recorded check output is\nlabeled ``assurance_level: \"low\"``. Only consulted when the resolved\nflow runs the ``device_fingerprint`` check."},"FlowDocumentRequirementOut":{"properties":{"types":{"items":{"$ref":"#/components/schemas/DocumentType"},"type":"array","title":"Types"},"min":{"type":"integer","title":"Min","default":1},"side":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Side"}},"type":"object","required":["types"],"title":"FlowDocumentRequirementOut","description":"Derived from the flow's check list. The SDK renders one screen per\nrequirement. ``min`` defaults to 1; ``side`` is non-null only for\nbarcode-back-of-DL style requirements."},"FlowListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FlowSummary"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"FlowListOut"},"FlowOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"applicant_id":{"type":"string","format":"uuid","title":"Applicant Id"},"flow_template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Flow Template Id"},"template_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Slug"},"type":{"$ref":"#/components/schemas/FlowType"},"execution_mode":{"$ref":"#/components/schemas/ExecutionMode"},"datasets":{"items":{"type":"string"},"type":"array","title":"Datasets"},"result":{"type":"string","enum":["approved","review","denied","pending"],"title":"Result","default":"pending"},"status":{"$ref":"#/components/schemas/FlowStatus"},"decision":{"$ref":"#/components/schemas/FlowDecision"},"decision_reason_codes":{"items":{"type":"string"},"type":"array","title":"Decision Reason Codes"},"extracted_fields":{"additionalProperties":true,"type":"object","title":"Extracted Fields"},"client_metadata":{"additionalProperties":true,"type":"object","title":"Client Metadata"},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"checks":{"items":{"$ref":"#/components/schemas/CheckOut"},"type":"array","title":"Checks"},"documents":{"items":{"$ref":"#/components/schemas/DocumentOut"},"type":"array","title":"Documents"}},"type":"object","required":["id","applicant_id","type","execution_mode","status","decision","decision_reason_codes","extracted_fields","failure_reason","created_at","completed_at"],"title":"FlowOut"},"FlowSpecOut":{"properties":{"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"required_checks":{"items":{"$ref":"#/components/schemas/CheckType"},"type":"array","title":"Required Checks"},"required_documents":{"items":{"$ref":"#/components/schemas/FlowDocumentRequirementOut"},"type":"array","title":"Required Documents"}},"type":"object","required":["slug","name","description","required_checks","required_documents"],"title":"FlowSpecOut","description":"Public, sanitized flow contract returned to the SDK. No rule\ndetails; just what to collect and the names of the checks that will\nrun."},"FlowStatus":{"type":"string","enum":["pending","awaiting_input","processing","completed","needs_review","failed"],"title":"FlowStatus"},"FlowSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"$ref":"#/components/schemas/FlowType"},"execution_mode":{"$ref":"#/components/schemas/ExecutionMode"},"datasets":{"items":{"type":"string"},"type":"array","title":"Datasets"},"result":{"type":"string","enum":["approved","review","denied","pending"],"title":"Result","default":"pending"},"status":{"$ref":"#/components/schemas/FlowStatus"},"decision":{"$ref":"#/components/schemas/FlowDecision"},"decision_reason_codes":{"items":{"type":"string"},"type":"array","title":"Decision Reason Codes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["id","type","execution_mode","status","decision","decision_reason_codes","created_at","completed_at"],"title":"FlowSummary","description":"Compact flow view embedded under an applicant."},"FlowTemplateCreateIn":{"properties":{"slug":{"type":"string","maxLength":80,"minLength":1,"pattern":"^[a-z0-9][a-z0-9-]*$","title":"Slug"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"required_checks":{"items":{"$ref":"#/components/schemas/CheckType"},"type":"array","title":"Required Checks"},"default_decision":{"$ref":"#/components/schemas/FlowDecision","default":"manual_review"}},"type":"object","required":["slug","name"],"title":"FlowTemplateCreateIn"},"FlowTemplateOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"required_checks":{"items":{"$ref":"#/components/schemas/CheckType"},"type":"array","title":"Required Checks"},"default_decision":{"$ref":"#/components/schemas/FlowDecision"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"required_documents":{"items":{"$ref":"#/components/schemas/FlowDocumentRequirementOut"},"type":"array","title":"Required Documents"}},"type":"object","required":["id","slug","name","description","required_checks","default_decision","archived_at","created_at","updated_at"],"title":"FlowTemplateOut","description":"Admin view of a flow — full check + decision policy."},"FlowTemplatePatchIn":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"required_checks":{"anyOf":[{"items":{"$ref":"#/components/schemas/CheckType"},"type":"array"},{"type":"null"}],"title":"Required Checks"},"default_decision":{"anyOf":[{"$ref":"#/components/schemas/FlowDecision"},{"type":"null"}]},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived"}},"type":"object","title":"FlowTemplatePatchIn"},"FlowType":{"type":"string","enum":["id_document","id_and_selfie","enhanced","checks"],"title":"FlowType"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LoginIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":512,"minLength":1,"title":"Password"}},"type":"object","required":["email","password"],"title":"LoginIn"},"LogoutOut":{"properties":{"status":{"type":"string","const":"ok","title":"Status","default":"ok"}},"type":"object","title":"LogoutOut"},"MeOperatorOut":{"properties":{"kind":{"type":"string","const":"operator","title":"Kind","default":"operator"},"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"tenant_id":{"type":"string","title":"Tenant Id"},"tenant_slug":{"type":"string","title":"Tenant Slug"},"mfa_enabled":{"type":"boolean","title":"Mfa Enabled","default":false},"mfa_enrollment_required":{"type":"boolean","title":"Mfa Enrollment Required","default":false}},"type":"object","required":["id","email","name","role","tenant_id","tenant_slug"],"title":"MeOperatorOut"},"MeStaffOut":{"properties":{"kind":{"type":"string","const":"staff","title":"Kind","default":"staff"},"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"mfa_enabled":{"type":"boolean","title":"Mfa Enabled","default":false},"mfa_enrollment_required":{"type":"boolean","title":"Mfa Enrollment Required","default":false}},"type":"object","required":["id","email","name","role"],"title":"MeStaffOut"},"MfaActivateOut":{"properties":{"recovery_codes":{"items":{"type":"string"},"type":"array","title":"Recovery Codes","description":"One-shot recovery codes — shown ONCE. We store only hashes; they cannot be recovered later."}},"type":"object","required":["recovery_codes"],"title":"MfaActivateOut"},"MfaCodeIn":{"properties":{"code":{"type":"string","maxLength":64,"minLength":1,"title":"Code"}},"type":"object","required":["code"],"title":"MfaCodeIn"},"MfaDisableOut":{"properties":{"status":{"type":"string","const":"ok","title":"Status","default":"ok"}},"type":"object","title":"MfaDisableOut"},"MfaEnrollOut":{"properties":{"otpauth_uri":{"type":"string","title":"Otpauth Uri","description":"otpauth:// URI for the authenticator-app QR code."},"secret":{"type":"string","title":"Secret","description":"Base32 TOTP secret for manual entry — shown once, stored only encrypted."}},"type":"object","required":["otpauth_uri","secret"],"title":"MfaEnrollOut"},"MfaRequiredOut":{"properties":{"mfa_required":{"type":"boolean","const":true,"title":"Mfa Required","default":true},"mfa_token":{"type":"string","title":"Mfa Token"}},"type":"object","required":["mfa_token"],"title":"MfaRequiredOut","description":"Step-1 login result for MFA-enabled accounts. No session cookie is\nissued yet — trade ``mfa_token`` + a TOTP/recovery code for one at\n``POST /dashboard/auth/mfa/verify``."},"MfaVerifyIn":{"properties":{"mfa_token":{"type":"string","maxLength":2048,"minLength":1,"title":"Mfa Token"},"code":{"type":"string","maxLength":64,"minLength":1,"title":"Code"}},"type":"object","required":["mfa_token","code"],"title":"MfaVerifyIn"},"MonitorCreateIn":{"properties":{"applicant_id":{"type":"string","format":"uuid","title":"Applicant Id"},"external_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"External Id"},"subjects":{"items":{"$ref":"#/components/schemas/CheckSubjectIn"},"type":"array","maxItems":100,"minItems":1,"title":"Subjects"},"datasets":{"anyOf":[{"items":{"$ref":"#/components/schemas/AmlDataset"},"type":"array","minItems":1},{"type":"null"}],"title":"Datasets"},"run_immediately":{"type":"boolean","title":"Run Immediately","default":true}},"type":"object","required":["applicant_id","subjects"],"title":"MonitorCreateIn"},"MonitorListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MonitorOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"MonitorListOut"},"MonitorOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"applicant_id":{"type":"string","format":"uuid","title":"Applicant Id"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"status":{"$ref":"#/components/schemas/MonitorStatus"},"use_case":{"$ref":"#/components/schemas/CheckUseCase"},"subjects":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Subjects"},"datasets":{"items":{"type":"string"},"type":"array","title":"Datasets"},"policy_version":{"type":"string","title":"Policy Version"},"last_dataset_partition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Dataset Partition"},"last_check_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Last Check Id"},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked At"},"next_due_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Due At"},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","applicant_id","external_id","status","use_case","subjects","datasets","policy_version","last_dataset_partition","last_check_id","last_checked_at","next_due_at","failure_reason","created_at","updated_at"],"title":"MonitorOut"},"MonitorStatus":{"type":"string","enum":["active","paused","error"],"title":"MonitorStatus"},"MonitorStatusIn":{"properties":{"status":{"type":"string","enum":["active","paused"],"title":"Status"}},"type":"object","required":["status"],"title":"MonitorStatusIn"},"MonitorSubjectsIn":{"properties":{"subjects":{"items":{"$ref":"#/components/schemas/CheckSubjectIn"},"type":"array","maxItems":100,"minItems":1,"title":"Subjects"}},"type":"object","required":["subjects"],"title":"MonitorSubjectsIn"},"NoteAuthorType":{"type":"string","enum":["operator","staff","system"],"title":"NoteAuthorType"},"OperatorListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OperatorOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"OperatorListOut"},"OperatorOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"}},"type":"object","required":["id","name","role"],"title":"OperatorOut"},"OperatorSummaryOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"}},"type":"object","required":["id","name","role"],"title":"OperatorSummaryOut"},"PresignedUploadOut":{"properties":{"url":{"type":"string","title":"Url"},"method":{"type":"string","title":"Method"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["url","method","headers","expires_in"],"title":"PresignedUploadOut"},"PublishableKeyRotatedOut":{"properties":{"publishable_key":{"type":"string","title":"Publishable Key","description":"Plaintext publishable key — shown ONCE. Save it now; we cannot recover it."},"rotated_at":{"type":"string","format":"date-time","title":"Rotated At"},"note":{"type":"string","title":"Note","default":"The previous publishable key is invalid as of now. Redeploy any frontend bundles that embed it before users hit the checks gate."}},"type":"object","required":["publishable_key","rotated_at"],"title":"PublishableKeyRotatedOut"},"RecheckIn":{"properties":{"check_type":{"$ref":"#/components/schemas/CheckType"},"result":{"$ref":"#/components/schemas/CheckResult"},"output":{"additionalProperties":true,"type":"object","title":"Output"},"reason_codes":{"items":{"type":"string"},"type":"array","title":"Reason Codes"},"flow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Flow Id"}},"type":"object","required":["check_type","result"],"title":"RecheckIn","description":"Record a re-run of a check.\n\nSlice 2 model: the operator (or an external integration) supplies the\n*result* directly. There's no Slice 2 worker for re-running providers\n— that's deferred until rule-driven re-checks (Phase 7+). When\n``flow_id`` is set and the flow isn't terminal, the\nrules engine re-evaluates that flow with the new check in scope."},"SourceVersionCreateIn":{"properties":{"source_key":{"type":"string","maxLength":160,"minLength":1,"title":"Source Key"},"version":{"type":"string","maxLength":160,"minLength":1,"title":"Version"},"source_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Source Url"},"issuer_timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Issuer Timestamp"},"fetched_at":{"type":"string","format":"date-time","title":"Fetched At"},"checksum":{"type":"string","maxLength":128,"minLength":32,"title":"Checksum"},"parser_version":{"type":"string","maxLength":100,"minLength":1,"title":"Parser Version"},"entity_count":{"type":"integer","minimum":0.0,"title":"Entity Count"},"validation_result":{"$ref":"#/components/schemas/ValidationResult","default":"pending"},"validation_details":{"additionalProperties":true,"type":"object","title":"Validation Details"}},"additionalProperties":false,"type":"object","required":["source_key","version","source_url","fetched_at","checksum","parser_version","entity_count"],"title":"SourceVersionCreateIn"},"SubjectRole":{"type":"string","enum":["customer","sender","receiver","intermediary","beneficial_owner","supplier","freight_forwarder","vessel","aircraft","other"],"title":"SubjectRole"},"TenantCreateIn":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"slug":{"type":"string","maxLength":80,"minLength":1,"pattern":"^[a-z0-9][a-z0-9-]*$","title":"Slug"}},"type":"object","required":["name","slug"],"title":"TenantCreateIn"},"TenantCreatedOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"status":{"type":"string","title":"Status"},"api_key":{"type":"string","title":"Api Key"}},"type":"object","required":["id","name","slug","status","api_key"],"title":"TenantCreatedOut"},"TenantRuleIn":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"priority":{"type":"integer","maximum":100000.0,"minimum":0.0,"title":"Priority","default":100},"enabled":{"type":"boolean","title":"Enabled","default":true},"predicate":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"boolean"}],"title":"Predicate"},"action":{"additionalProperties":true,"type":"object","title":"Action"}},"type":"object","required":["name","predicate","action"],"title":"TenantRuleIn","description":"Create/update payload. Predicate and action are jsonlogic-shaped JSON;\nthe API does not validate semantics — that's the rules engine's job at\neval time. Use ``POST /v1/rules/{id}/test`` to dry-run."},"TenantRuleOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"priority":{"type":"integer","title":"Priority"},"enabled":{"type":"boolean","title":"Enabled"},"predicate":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"boolean"}],"title":"Predicate"},"action":{"additionalProperties":true,"type":"object","title":"Action"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","description","priority","enabled","predicate","action","created_at","updated_at"],"title":"TenantRuleOut"},"TenantRuleTestIn":{"properties":{"flow_id":{"type":"string","format":"uuid","title":"Flow Id"}},"type":"object","required":["flow_id"],"title":"TenantRuleTestIn","description":"Dry-run a predicate against a real flow's context."},"TenantRuleTestOut":{"properties":{"matched":{"type":"boolean","title":"Matched"},"decision_if_matched":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision If Matched"},"reason_codes_if_matched":{"items":{"type":"string"},"type":"array","title":"Reason Codes If Matched"},"context":{"additionalProperties":true,"type":"object","title":"Context"}},"type":"object","required":["matched","decision_if_matched","reason_codes_if_matched","context"],"title":"TenantRuleTestOut"},"UploadStatus":{"type":"string","enum":["requested","uploaded","processed","failed"],"title":"UploadStatus"},"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"},"ValidationResult":{"type":"string","enum":["pending","passed","failed"],"title":"ValidationResult"},"WebhookDeliveryListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WebhookDeliveryOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"WebhookDeliveryListOut"},"WebhookDeliveryOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"endpoint_id":{"type":"string","format":"uuid","title":"Endpoint Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"},"event_type":{"type":"string","title":"Event Type"},"status":{"$ref":"#/components/schemas/WebhookDeliveryStatus"},"attempt_count":{"type":"integer","title":"Attempt Count"},"response_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Code"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"next_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Attempt At"},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivered At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","endpoint_id","event_id","event_type","status","attempt_count","response_code","last_error","next_attempt_at","delivered_at","created_at"],"title":"WebhookDeliveryOut"},"WebhookDeliveryStatus":{"type":"string","enum":["pending","delivered","retrying","exhausted"],"title":"WebhookDeliveryStatus"},"WebhookEndpointCreateIn":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"events":{"items":{"$ref":"#/components/schemas/WebhookEvent"},"type":"array","maxItems":5,"minItems":1,"title":"Events"}},"type":"object","required":["url","events"],"title":"WebhookEndpointCreateIn"},"WebhookEndpointListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WebhookEndpointOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"WebhookEndpointListOut"},"WebhookEndpointOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"enabled":{"type":"boolean","title":"Enabled"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"signing_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signing Secret"}},"type":"object","required":["id","url","events","enabled","created_at","updated_at"],"title":"WebhookEndpointOut"},"WebhookEndpointPatchIn":{"properties":{"url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Url"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/WebhookEvent"},"type":"array","maxItems":5,"minItems":1},{"type":"null"}],"title":"Events"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"additionalProperties":false,"type":"object","title":"WebhookEndpointPatchIn"},"WebhookEvent":{"type":"string","enum":["alert.created","alert.changed","disposition.created","batch.completed","monitor.failed"],"title":"WebhookEvent"}},"securitySchemes":{"TenantBearer":{"type":"http","scheme":"bearer","bearerFormat":"tnk_… or pk_… where supported","description":"Tenant secret key. POST /v1/flows also accepts a restricted publishable key for eligible synchronous flows."}}},"tags":[{"name":"applicants","description":"Tenant customer records that own Checks."},{"name":"checks","description":"Immutable evaluations, decisions, and evidence."},{"name":"AML check alerts","description":"Actionable matches with assignment, disposition, SLA, and audit history."},{"name":"operators","description":"Tenant operators available for Alert assignment."},{"name":"check batches","description":"Bulk, Applicant-owned Check execution and result downloads."},{"name":"check monitors","description":"Recurring Checks for an Applicant and stable subject set."},{"name":"check policy","description":"Versioned tenant controls used to grade Checks."},{"name":"webhooks","description":"Signed endpoint configuration, delivery history, and retries."},{"name":"flows","description":"Configured document, biometric, and checks-only verification journeys."},{"name":"documents","description":"Document uploads and previews attached to Flows."},{"name":"rules","description":"Tenant decision-rule configuration and tests."}]}