{"openapi":"3.1.0","info":{"title":"GRAFOMEM Cloud","description":"GMP-conformant governed agent memory platform.  Provides vector-backed memory stores, multi-agent orchestration, decision trail audit logging, erasure proof certificates, governance policy evaluation, regulatory reports, webhook alerts, SSO/OIDC, and real-time SSE streaming.","version":"1.9.0"},"paths":{"/v1/monitoring/stats":{"get":{"tags":["Cloud Admin"],"summary":"Monitoring Stats","description":"Full system stats for monitoring dashboard. Requires auth.","operationId":"monitoring_stats_v1_monitoring_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/stores":{"get":{"summary":"List Stores","operationId":"list_stores_v1_stores_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Create Store","operationId":"create_store_v1_stores_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/stores/{store_id}/capabilities":{"get":{"summary":"Get Capabilities","operationId":"get_capabilities_v1_stores__store_id__capabilities_get","parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","title":"Store Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stores/{store_id}/write":{"post":{"summary":"Write Memory","operationId":"write_memory_v1_stores__store_id__write_post","parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","title":"Store Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stores/{store_id}/write_batch":{"post":{"summary":"Write Batch","operationId":"write_batch_v1_stores__store_id__write_batch_post","parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","title":"Store Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteBatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stores/{store_id}/supersede":{"post":{"summary":"Supersede Memory","operationId":"supersede_memory_v1_stores__store_id__supersede_post","parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","title":"Store Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupersedeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stores/{store_id}/delete":{"post":{"summary":"Delete Memory","operationId":"delete_memory_v1_stores__store_id__delete_post","parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","title":"Store Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stores/{store_id}/retrieve":{"post":{"summary":"Retrieve Memories","operationId":"retrieve_memories_v1_stores__store_id__retrieve_post","parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","title":"Store Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrieveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stores/{store_id}/audit":{"get":{"summary":"Audit Memories","operationId":"audit_memories_v1_stores__store_id__audit_get","parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","title":"Store Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stores/{store_id}/flush":{"post":{"summary":"Flush Store","operationId":"flush_store_v1_stores__store_id__flush_post","parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","title":"Store Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stores/{store_id}/ingestion/stats":{"get":{"summary":"Ingestion Stats","operationId":"ingestion_stats_v1_stores__store_id__ingestion_stats_get","parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","title":"Store Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cloud/tenants":{"get":{"tags":["Cloud Management"],"summary":"List Tenants","description":"List all provisioned tenants. PLATFORM operators only. Responses carry NO api_key.","operationId":"list_tenants_v1_cloud_tenants_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TenantResponse"},"type":"array","title":"Response List Tenants V1 Cloud Tenants Get"}}}}}},"post":{"tags":["Cloud Management"],"summary":"Create Tenant","description":"Provision a new tenant with the specified plan. PLATFORM operators only.","operationId":"create_tenant_v1_cloud_tenants_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTenantRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantCreatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cloud/tenants/{tenant_id}":{"get":{"tags":["Cloud Management"],"summary":"Get Tenant","description":"Retrieve a single tenant by ID. PLATFORM operator, or the tenant itself. No api_key.","operationId":"get_tenant_v1_cloud_tenants__tenant_id__get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cloud/tenants/{tenant_id}/rotate-key":{"post":{"tags":["Cloud Management"],"summary":"Rotate Key","description":"Revoke the current API key and issue a new one. PLATFORM operator, or the tenant itself (keys:admin).","operationId":"rotate_key_v1_cloud_tenants__tenant_id__rotate_key_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cloud/tenants/{tenant_id}/usage":{"get":{"tags":["Cloud Management"],"summary":"Get Usage","description":"Retrieve aggregated usage for a tenant's billing period. PLATFORM operator, or the tenant itself.","operationId":"get_usage_v1_cloud_tenants__tenant_id__usage_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"current_month","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cloud/tenants/{tenant_id}/compliance":{"get":{"tags":["Cloud Management"],"summary":"Get Compliance","description":"Retrieve conformance audit history for a tenant. Own tenant, or platform.","operationId":"get_compliance_v1_cloud_tenants__tenant_id__compliance_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AuditRecordResponse"},"title":"Response Get Compliance V1 Cloud Tenants  Tenant Id  Compliance Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cloud/compliance/status":{"get":{"tags":["Cloud Management"],"summary":"Compliance Dashboard","description":"Global compliance dashboard — latest audit per tenant.","operationId":"compliance_dashboard_v1_cloud_compliance_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceDashboardResponse"}}}}}}},"/v1/cloud/billing/checkout":{"post":{"tags":["Cloud Management"],"summary":"Billing Checkout","description":"Create a Stripe Checkout Session and return the redirect URL. Own tenant, or platform.","operationId":"billing_checkout_v1_cloud_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cloud/billing/webhook":{"post":{"tags":["Cloud Management"],"summary":"Billing Webhook","description":"Stripe webhook receiver.\n\nThis endpoint is excluded from Bearer token auth — Stripe sends its own\nsignature in the ``Stripe-Signature`` header.","operationId":"billing_webhook_v1_cloud_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/cloud/billing/subscription/{tenant_id}":{"get":{"tags":["Cloud Management"],"summary":"Get Subscription","description":"Retrieve a tenant's current Stripe subscription. Own tenant, or platform.","operationId":"get_subscription_v1_cloud_billing_subscription__tenant_id__get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cloud/billing/cancel/{tenant_id}":{"post":{"tags":["Cloud Management"],"summary":"Cancel Subscription","description":"Cancel a tenant's Stripe subscription. Own tenant (keys:admin), or platform.","operationId":"cancel_subscription_v1_cloud_billing_cancel__tenant_id__post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cloud/compliance/badge/{tenant_id}.svg":{"get":{"tags":["Cloud Management"],"summary":"Compliance Badge Svg","description":"Return an embeddable SVG compliance badge (shields.io style).","operationId":"compliance_badge_svg_v1_cloud_compliance_badge__tenant_id__svg_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cloud/compliance/badge/{tenant_id}.json":{"get":{"tags":["Cloud Management"],"summary":"Compliance Badge Json","description":"Shields.io endpoint schema for dynamic badge generation.","operationId":"compliance_badge_json_v1_cloud_compliance_badge__tenant_id__json_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decisions/log":{"post":{"tags":["Decision Trail"],"summary":"Log Decision","description":"Log an AI inference decision with full provenance.\n\nRecords the query, retrieved facts, model used, output produced,\nand optionally Ed25519-signs the decision record.","operationId":"log_decision_v1_decisions_log_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogDecisionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decisions/stats":{"get":{"tags":["Decision Trail"],"summary":"Decision Stats","description":"Summary statistics for the tenant's decision trail.","operationId":"decision_stats_v1_decisions_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/decisions/export":{"get":{"tags":["Decision Trail"],"summary":"Export Decisions","description":"Bulk export all decisions as newline-delimited JSON (NDJSON).\n\nStreams the response for memory efficiency with large datasets.\nSuitable for feeding to auditors, compliance tools, or SIEM systems.","operationId":"export_decisions_v1_decisions_export_get","parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decisions/{decision_id}":{"get":{"tags":["Decision Trail"],"summary":"Get Decision","description":"Retrieve a single decision record by its ID.","operationId":"get_decision_v1_decisions__decision_id__get","parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","title":"Decision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decisions/{decision_id}/replay":{"get":{"tags":["Decision Trail"],"summary":"Replay Decision","description":"Replay a decision: show the decision, the memory state at that\ntime, which facts were used, and which have been deleted since.\n\nThis is the core auditability feature: reconstruct exactly what\nthe AI knew when it made a decision.","operationId":"replay_decision_v1_decisions__decision_id__replay_get","parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","title":"Decision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplayResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decisions/":{"get":{"tags":["Decision Trail"],"summary":"Query Decisions","description":"Query decisions with filters and pagination.","operationId":"query_decisions_v1_decisions__get","parameters":[{"name":"store_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Store Id"}},{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},{"name":"model_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decisions/scrub/{fact_ref}":{"delete":{"tags":["Decision Trail"],"summary":"Scrub Fact","description":"Scrub a deleted fact from all decision records (GDPR Article 17).\n\nWhen a fact is hard-deleted from memory, call this endpoint to\nreplace its content in all decision records with '[REDACTED]'.\nReturns the number of affected decisions.","operationId":"scrub_fact_v1_decisions_scrub__fact_ref__delete","parameters":[{"name":"fact_ref","in":"path","required":true,"schema":{"type":"integer","title":"Fact Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrubResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/usage/current":{"get":{"tags":["Usage"],"summary":"Current Usage","operationId":"current_usage_v1_usage_current_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/erasure/issue":{"post":{"tags":["Erasure Proof"],"summary":"Issue Certificate","description":"Issue a signed erasure certificate for a deleted fact.\n\nPerforms the full GDPR erasure workflow:\n1. Scrubs the fact from all decision trail records\n2. Computes a content hash (proof without retaining PII)\n3. Ed25519-signs the certificate\n4. Persists the certificate to the database\n\nReturns the signed erasure certificate.","operationId":"issue_certificate_v1_erasure_issue_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueErasureRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/erasure/stats":{"get":{"tags":["Erasure Proof"],"summary":"Erasure Stats","description":"Summary statistics for erasure certificates.","operationId":"erasure_stats_v1_erasure_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/erasure/{certificate_id}":{"get":{"tags":["Erasure Proof"],"summary":"Get Certificate","description":"Retrieve a single erasure certificate by its ID.","operationId":"get_certificate_v1_erasure__certificate_id__get","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"string","title":"Certificate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/erasure/{certificate_id}/verify":{"get":{"tags":["Erasure Proof"],"summary":"Verify Certificate","description":"Verify the Ed25519 signature on an erasure certificate.\n\nReturns whether the certificate is authentic and untampered.","operationId":"verify_certificate_v1_erasure__certificate_id__verify_get","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"string","title":"Certificate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/erasure/fact/{fact_ref}":{"get":{"tags":["Erasure Proof"],"summary":"Get By Fact","description":"Find the erasure certificate for a specific fact ref.","operationId":"get_by_fact_v1_erasure_fact__fact_ref__get","parameters":[{"name":"fact_ref","in":"path","required":true,"schema":{"type":"integer","title":"Fact Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/erasure/":{"get":{"tags":["Erasure Proof"],"summary":"List Certificates","description":"List all erasure certificates for the tenant.","operationId":"list_certificates_v1_erasure__get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/gcrumbs/public_key":{"get":{"tags":["gcrumbs"],"summary":"Get Public Key","operationId":"get_public_key_v1_gcrumbs_public_key_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/gcrumbs/roll":{"post":{"tags":["gcrumbs"],"summary":"Roll Epoch","operationId":"roll_epoch_v1_gcrumbs_roll_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/gcrumbs/breadcrumbs":{"get":{"tags":["gcrumbs"],"summary":"List Breadcrumbs","operationId":"list_breadcrumbs_v1_gcrumbs_breadcrumbs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/gcrumbs/epochs":{"get":{"tags":["gcrumbs"],"summary":"List Epochs","operationId":"list_epochs_v1_gcrumbs_epochs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/gcrumbs/epochs/{epoch_number}":{"get":{"tags":["gcrumbs"],"summary":"Get Epoch","operationId":"get_epoch_v1_gcrumbs_epochs__epoch_number__get","parameters":[{"name":"epoch_number","in":"path","required":true,"schema":{"type":"integer","title":"Epoch Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/gcrumbs/epochs/{epoch_number}/proof":{"get":{"tags":["gcrumbs"],"summary":"Inclusion Proof","operationId":"inclusion_proof_v1_gcrumbs_epochs__epoch_number__proof_get","parameters":[{"name":"epoch_number","in":"path","required":true,"schema":{"type":"integer","title":"Epoch Number"}},{"name":"seq","in":"query","required":true,"schema":{"type":"integer","description":"breadcrumb seq to prove","title":"Seq"},"description":"breadcrumb seq to prove"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/gcrumbs/verify":{"get":{"tags":["gcrumbs"],"summary":"Verify Chain","operationId":"verify_chain_v1_gcrumbs_verify_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Independent Verification"],"summary":"Verify","operationId":"verify_v1_gcrumbs_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/gcrumbs/stats":{"get":{"tags":["gcrumbs"],"summary":"Stats","operationId":"stats_v1_gcrumbs_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/landing/conformance":{"post":{"tags":["Landing"],"summary":"Run Conformance","operationId":"run_conformance_v1_landing_conformance_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConformanceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/landing/issue":{"post":{"tags":["Landing"],"summary":"Issue","operationId":"issue_v1_landing_issue_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/landing/stats":{"get":{"tags":["Landing"],"summary":"Stats","operationId":"stats_v1_landing_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/landing/{certificate_id}":{"get":{"tags":["Landing"],"summary":"Get One","operationId":"get_one_v1_landing__certificate_id__get","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"string","title":"Certificate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/landing/{certificate_id}/verify":{"get":{"tags":["Landing"],"summary":"Verify","operationId":"verify_v1_landing__certificate_id__verify_get","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"string","title":"Certificate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/landing":{"get":{"tags":["Landing"],"summary":"List All","operationId":"list_all_v1_landing_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/landing/{certificate_id}/approve":{"post":{"tags":["Landing"],"summary":"Approve","operationId":"approve_v1_landing__certificate_id__approve_post","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"string","title":"Certificate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/landing/{certificate_id}/reject":{"post":{"tags":["Landing"],"summary":"Reject","operationId":"reject_v1_landing__certificate_id__reject_post","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"string","title":"Certificate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/artifacts/register":{"post":{"tags":["Artifact Registry"],"summary":"Register","operationId":"register_v1_artifacts_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/artifacts/stats":{"get":{"tags":["Artifact Registry"],"summary":"Stats","operationId":"stats_v1_artifacts_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/artifacts/{artifact_id}":{"get":{"tags":["Artifact Registry"],"summary":"Get One","operationId":"get_one_v1_artifacts__artifact_id__get","parameters":[{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/artifacts/{artifact_id}/verify":{"get":{"tags":["Artifact Registry"],"summary":"Verify","operationId":"verify_v1_artifacts__artifact_id__verify_get","parameters":[{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/artifacts/{artifact_id}/integrity":{"post":{"tags":["Artifact Registry"],"summary":"Integrity","operationId":"integrity_v1_artifacts__artifact_id__integrity_post","parameters":[{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/artifacts/{artifact_id}/certify":{"post":{"tags":["Artifact Registry"],"summary":"Certify","operationId":"certify_v1_artifacts__artifact_id__certify_post","parameters":[{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/artifacts":{"get":{"tags":["Artifact Registry"],"summary":"List All","operationId":"list_all_v1_artifacts_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/artifacts/{artifact_id}/approve":{"post":{"tags":["Artifact Registry"],"summary":"Approve","operationId":"approve_v1_artifacts__artifact_id__approve_post","parameters":[{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/artifacts/{artifact_id}/reject":{"post":{"tags":["Artifact Registry"],"summary":"Reject","operationId":"reject_v1_artifacts__artifact_id__reject_post","parameters":[{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/world-model/types":{"post":{"tags":["World Model"],"summary":"Register Type","operationId":"register_type_v1_world_model_types_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterTypeRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["World Model"],"summary":"List Types","operationId":"list_types_v1_world_model_types_get","parameters":[{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/world-model/types/{type_id}":{"get":{"tags":["World Model"],"summary":"Get Type","operationId":"get_type_v1_world_model_types__type_id__get","parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"string","title":"Type Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/world-model/types/{type_id}/verify":{"get":{"tags":["World Model"],"summary":"Verify Type","operationId":"verify_type_v1_world_model_types__type_id__verify_get","parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"string","title":"Type Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/world-model/validate/object":{"post":{"tags":["World Model"],"summary":"Validate Object","operationId":"validate_object_v1_world_model_validate_object_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateObjectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/world-model/validate/link":{"post":{"tags":["World Model"],"summary":"Validate Link","operationId":"validate_link_v1_world_model_validate_link_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateLinkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/world-model/actions/invoke":{"post":{"tags":["World Model"],"summary":"Invoke","operationId":"invoke_v1_world_model_actions_invoke_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/world-model/actions":{"get":{"tags":["World Model"],"summary":"List All Actions","operationId":"list_all_actions_v1_world_model_actions_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/world-model/actions/stats":{"get":{"tags":["World Model"],"summary":"Stats","operationId":"stats_v1_world_model_actions_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/world-model/actions/{action_id}":{"get":{"tags":["World Model"],"summary":"Get Action","operationId":"get_action_v1_world_model_actions__action_id__get","parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","title":"Action Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/world-model/actions/{action_id}/verify":{"get":{"tags":["World Model"],"summary":"Verify Action","operationId":"verify_action_v1_world_model_actions__action_id__verify_get","parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","title":"Action Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/world-model/actions/{action_id}/approve":{"post":{"tags":["World Model"],"summary":"Approve","operationId":"approve_v1_world_model_actions__action_id__approve_post","parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","title":"Action Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/world-model/actions/{action_id}/reject":{"post":{"tags":["World Model"],"summary":"Reject","operationId":"reject_v1_world_model_actions__action_id__reject_post","parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","title":"Action Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/templates/":{"get":{"tags":["Templates"],"summary":"List Templates","description":"List all available canonical templates.","operationId":"list_templates_v1_templates__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/templates/install":{"post":{"tags":["Templates"],"summary":"Install Template","description":"Install a template into the CALLER'S World Model. tenant_id is derived from\nthe auth context (never a hardcoded/target value), so the governed install is\ntenant-scoped: a caller can only seed its own tenant.","operationId":"install_template_v1_templates_install_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallTemplateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manifold/export":{"get":{"summary":"Export Manifold","operationId":"export_manifold_v1_manifold_export_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/manifold/field":{"get":{"summary":"Manifold Field","description":"Redesigned manifold: PCA(decision_embeddings) → 2-D coords + kernel-Beta\nCGR-outcome field + agent overlay. Read-only, tenant-scoped. Independent of\n/export and /locate (which /live depends on).","operationId":"manifold_field_v1_manifold_field_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/manifold/locate/{step_id}":{"get":{"summary":"Locate Manifold Step","operationId":"locate_manifold_step_v1_manifold_locate__step_id__get","parameters":[{"name":"step_id","in":"path","required":true,"schema":{"type":"string","title":"Step Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/manifold/clear_cache":{"post":{"summary":"Clear Cache","operationId":"clear_cache_v1_manifold_clear_cache_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/provenance/corpora":{"post":{"tags":["Provenance Customs"],"summary":"Register Corpus","operationId":"register_corpus_v1_provenance_corpora_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterCorpusRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Provenance Customs"],"summary":"List Corpora","operationId":"list_corpora_v1_provenance_corpora_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/provenance/stats":{"get":{"tags":["Provenance Customs"],"summary":"Stats","operationId":"stats_v1_provenance_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/provenance/corpora/{corpus_id}":{"get":{"tags":["Provenance Customs"],"summary":"Get Corpus","operationId":"get_corpus_v1_provenance_corpora__corpus_id__get","parameters":[{"name":"corpus_id","in":"path","required":true,"schema":{"type":"string","title":"Corpus Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/provenance/corpora/{corpus_id}/verify":{"get":{"tags":["Provenance Customs"],"summary":"Verify","operationId":"verify_v1_provenance_corpora__corpus_id__verify_get","parameters":[{"name":"corpus_id","in":"path","required":true,"schema":{"type":"string","title":"Corpus Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/provenance/corpora/{corpus_id}/proof":{"get":{"tags":["Provenance Customs"],"summary":"Proof","operationId":"proof_v1_provenance_corpora__corpus_id__proof_get","parameters":[{"name":"corpus_id","in":"path","required":true,"schema":{"type":"string","title":"Corpus Id"}},{"name":"source_id","in":"query","required":true,"schema":{"type":"string","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/provenance/corpora/{corpus_id}/block":{"get":{"tags":["Provenance Customs"],"summary":"Block","description":"The data_provenance block for R3 landing.","operationId":"block_v1_provenance_corpora__corpus_id__block_get","parameters":[{"name":"corpus_id","in":"path","required":true,"schema":{"type":"string","title":"Corpus Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/compositions":{"post":{"tags":["Composition Governance"],"summary":"Compose","operationId":"compose_v1_compositions_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposeBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Composition Governance"],"summary":"List All","operationId":"list_all_v1_compositions_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/compositions/stats":{"get":{"tags":["Composition Governance"],"summary":"Stats","operationId":"stats_v1_compositions_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/compositions/{composition_id}":{"get":{"tags":["Composition Governance"],"summary":"Get One","operationId":"get_one_v1_compositions__composition_id__get","parameters":[{"name":"composition_id","in":"path","required":true,"schema":{"type":"string","title":"Composition Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/compositions/{composition_id}/verify":{"get":{"tags":["Composition Governance"],"summary":"Verify","operationId":"verify_v1_compositions__composition_id__verify_get","parameters":[{"name":"composition_id","in":"path","required":true,"schema":{"type":"string","title":"Composition Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/compositions/{composition_id}/artifact":{"get":{"tags":["Composition Governance"],"summary":"Composed Artifact","description":"Descriptor to register the composed result back in R1.","operationId":"composed_artifact_v1_compositions__composition_id__artifact_get","parameters":[{"name":"composition_id","in":"path","required":true,"schema":{"type":"string","title":"Composition Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/compositions/{composition_id}/approve":{"post":{"tags":["Composition Governance"],"summary":"Approve","operationId":"approve_v1_compositions__composition_id__approve_post","parameters":[{"name":"composition_id","in":"path","required":true,"schema":{"type":"string","title":"Composition Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/compositions/{composition_id}/reject":{"post":{"tags":["Composition Governance"],"summary":"Reject","operationId":"reject_v1_compositions__composition_id__reject_post","parameters":[{"name":"composition_id","in":"path","required":true,"schema":{"type":"string","title":"Composition Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/governance/stats":{"get":{"tags":["Governance Gateway"],"summary":"Governance Stats","description":"Summary statistics for governance policies and evaluations.","operationId":"governance_stats_v1_governance_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GovernanceStatsResponse"}}}}}}},"/v1/governance/policy-types":{"get":{"tags":["Governance Gateway"],"summary":"List Policy Types","description":"List available policy types and their expected config schemas.","operationId":"list_policy_types_v1_governance_policy_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/governance/policies":{"post":{"tags":["Governance Gateway"],"summary":"Create Policy","description":"Create a new governance policy.","operationId":"create_policy_v1_governance_policies_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePolicyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Governance Gateway"],"summary":"List Policies","description":"List all governance policies for the tenant.","operationId":"list_policies_v1_governance_policies_get","parameters":[{"name":"enabled_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Enabled Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/governance/policies/{policy_id}":{"get":{"tags":["Governance Gateway"],"summary":"Get Policy","description":"Get a single governance policy by ID.","operationId":"get_policy_v1_governance_policies__policy_id__get","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Governance Gateway"],"summary":"Update Policy","description":"Update an existing governance policy.","operationId":"update_policy_v1_governance_policies__policy_id__put","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePolicyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Governance Gateway"],"summary":"Delete Policy","description":"Delete a governance policy.","operationId":"delete_policy_v1_governance_policies__policy_id__delete","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/governance/evaluate":{"post":{"tags":["Governance Gateway"],"summary":"Evaluate Policies","description":"Evaluate all active policies against a request context.\n\nReturns the evaluation result for each policy and whether\nthe request is allowed overall.","operationId":"evaluate_policies_v1_governance_evaluate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/governance/seed-defaults":{"post":{"tags":["Governance Gateway"],"summary":"Seed Defaults","description":"Create default governance policies for the tenant.","operationId":"seed_defaults_v1_governance_seed_defaults_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/governance/logs":{"get":{"tags":["Governance Gateway"],"summary":"Get Evaluation Logs","description":"List policy evaluation logs.","operationId":"get_evaluation_logs_v1_governance_logs_get","parameters":[{"name":"policy_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Id"}},{"name":"result","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GovernanceLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/reports/stats":{"get":{"tags":["Regulatory Reports"],"summary":"Report Stats","description":"Summary statistics for regulatory reports.","operationId":"report_stats_v1_reports_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportStatsResponse"}}}}}}},"/v1/reports/frameworks":{"get":{"tags":["Regulatory Reports"],"summary":"List Frameworks","description":"List available regulatory frameworks.","operationId":"list_frameworks_v1_reports_frameworks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/reports/generate":{"post":{"tags":["Regulatory Reports"],"summary":"Generate Report","description":"Generate a new regulatory compliance report.","operationId":"generate_report_v1_reports_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateReportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/reports/":{"get":{"tags":["Regulatory Reports"],"summary":"List Reports","description":"List all regulatory reports for the tenant.","operationId":"list_reports_v1_reports__get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/reports/{report_id}":{"get":{"tags":["Regulatory Reports"],"summary":"Get Report","description":"Retrieve a full regulatory report.","operationId":"get_report_v1_reports__report_id__get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Regulatory Reports"],"summary":"Delete Report","description":"Delete a regulatory report.","operationId":"delete_report_v1_reports__report_id__delete","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/reports/{report_id}/download":{"get":{"tags":["Regulatory Reports"],"summary":"Download Report","description":"Download the full report as a JSON file.","operationId":"download_report_v1_reports__report_id__download_get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/reports/{report_id}/download/pdf":{"get":{"tags":["Regulatory Reports"],"summary":"Download Report Pdf","description":"Download the report as a styled PDF document.","operationId":"download_report_pdf_v1_reports__report_id__download_pdf_get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/llm/providers":{"get":{"tags":["LLM & Tools"],"summary":"List Providers","description":"List all registered LLM providers for your tenant.","operationId":"list_providers_v1_llm_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMProviderListResponse"}}}}}},"post":{"tags":["LLM & Tools"],"summary":"Register Provider","description":"Register or update an LLM provider for your tenant.","operationId":"register_provider_v1_llm_providers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterProviderRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/llm/providers/{model_id}":{"delete":{"tags":["LLM & Tools"],"summary":"Delete Provider","description":"Remove an LLM provider registration.","operationId":"delete_provider_v1_llm_providers__model_id__delete","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["LLM & Tools"],"summary":"Update Provider","description":"Update an existing LLM provider (API key, base URL, temperature, max tokens).","operationId":"update_provider_v1_llm_providers__model_id__patch","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/llm/tools":{"get":{"tags":["LLM & Tools"],"summary":"List Tools","description":"List all tools (built-in + custom) for your tenant.","operationId":"list_tools_v1_llm_tools_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolListResponse"}}}}}},"post":{"tags":["LLM & Tools"],"summary":"Register Tool","description":"Register a custom tool for your tenant.","operationId":"register_tool_v1_llm_tools_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterToolRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/llm/tools/{tool_name}":{"delete":{"tags":["LLM & Tools"],"summary":"Delete Tool","description":"Remove a custom tool (built-in tools cannot be deleted).","operationId":"delete_tool_v1_llm_tools__tool_name__delete","parameters":[{"name":"tool_name","in":"path","required":true,"schema":{"type":"string","title":"Tool Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/llm/tools/seed-builtins":{"post":{"tags":["LLM & Tools"],"summary":"Seed Builtins","description":"Seed built-in tools for your tenant (grafomem_retrieve, etc.).","operationId":"seed_builtins_v1_llm_tools_seed_builtins_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/orchestrator/stats":{"get":{"tags":["Agent Orchestrator"],"summary":"Get Stats","description":"Dashboard statistics for the orchestrator.","operationId":"get_stats_v1_orchestrator_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrchestratorStatsResponse"}}}}}}},"/v1/orchestrator/roles":{"get":{"tags":["Agent Orchestrator"],"summary":"List Roles","description":"List available agent roles.","operationId":"list_roles_v1_orchestrator_roles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/orchestrator/agents":{"post":{"tags":["Agent Orchestrator"],"summary":"Create Agent","description":"Create a new agent definition.","operationId":"create_agent_v1_orchestrator_agents_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Agent Orchestrator"],"summary":"List Agents","description":"List all agents for the tenant.","operationId":"list_agents_v1_orchestrator_agents_get","parameters":[{"name":"enabled_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Enabled Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orchestrator/agents/{agent_id}/propose":{"post":{"tags":["Agent Orchestrator"],"summary":"Propose Action","description":"PR-0 — record a CGR-attributed governed decision for a proposed tool action\n(no LLM run). The decision carries the agent's agent_key + invoice_ref so the agent\nbecomes CGR-scorable. Edge-gate/HITL enforcement arrives in later PRs.","operationId":"propose_action_v1_orchestrator_agents__agent_id__propose_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposeActionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orchestrator/agents/{agent_id}":{"get":{"tags":["Agent Orchestrator"],"summary":"Get Agent","description":"Get a single agent by ID.","operationId":"get_agent_v1_orchestrator_agents__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Agent Orchestrator"],"summary":"Update Agent","description":"Update an agent definition.","operationId":"update_agent_v1_orchestrator_agents__agent_id__put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Agent Orchestrator"],"summary":"Delete Agent","description":"Delete an agent definition.","operationId":"delete_agent_v1_orchestrator_agents__agent_id__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orchestrator/workflows":{"post":{"tags":["Agent Orchestrator"],"summary":"Create Workflow","description":"Create a new workflow.","operationId":"create_workflow_v1_orchestrator_workflows_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkflowRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Agent Orchestrator"],"summary":"List Workflows","description":"List workflows for the tenant.","operationId":"list_workflows_v1_orchestrator_workflows_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orchestrator/workflows/{workflow_id}":{"get":{"tags":["Agent Orchestrator"],"summary":"Get Workflow","description":"Get a workflow with all its steps.","operationId":"get_workflow_v1_orchestrator_workflows__workflow_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orchestrator/workflows/{workflow_id}/run":{"post":{"tags":["Agent Orchestrator"],"summary":"Run Workflow","description":"Start a workflow execution with the given input.","operationId":"run_workflow_v1_orchestrator_workflows__workflow_id__run_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunWorkflowRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orchestrator/workflows/{workflow_id}/stream":{"get":{"tags":["Agent Orchestrator"],"summary":"Stream Workflow","description":"Stream a workflow execution via Server-Sent Events.\n\nReturns a text/event-stream response with real-time events as\neach agent step progresses through:\ngovernance → memory → LLM → tools → complete.\n\nEvent types:\n    workflow.started, step.started, step.governance_pass,\n    step.governance_deny, step.memory_retrieve, step.llm_start,\n    step.llm_complete, step.tool_call, step.complete,\n    workflow.complete, workflow.error","operationId":"stream_workflow_v1_orchestrator_workflows__workflow_id__stream_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"input_text","in":"query","required":true,"schema":{"type":"string","description":"The initial input for the workflow","title":"Input Text"},"description":"The initial input for the workflow"},{"name":"timeout_seconds","in":"query","required":false,"schema":{"type":"number","description":"Timeout in seconds for the workflow","default":300.0,"title":"Timeout Seconds"},"description":"Timeout in seconds for the workflow"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orchestrator/workflows/{workflow_id}/resume":{"post":{"tags":["Agent Orchestrator"],"summary":"Resume Workflow","description":"Resume a workflow waiting for HITL approval.","operationId":"resume_workflow_v1_orchestrator_workflows__workflow_id__resume_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeWorkflowRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orchestrator/workflows/{workflow_id}/resume/stream":{"get":{"tags":["Agent Orchestrator"],"summary":"Resume Workflow Stream","description":"Resume a workflow waiting for HITL approval and stream the results.","operationId":"resume_workflow_stream_v1_orchestrator_workflows__workflow_id__resume_stream_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"approved","in":"query","required":true,"schema":{"type":"boolean","title":"Approved"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orchestrator/workflows/{workflow_id}/terminate":{"post":{"tags":["Agent Orchestrator"],"summary":"Terminate Workflow","description":"Force-terminate a running workflow.","operationId":"terminate_workflow_v1_orchestrator_workflows__workflow_id__terminate_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orchestrator/step":{"post":{"tags":["Agent Orchestrator"],"summary":"Execute Step","description":"Execute a single ad-hoc step (not part of a workflow).\n\nCreates a temporary workflow and executes one governed step.\nUseful for testing agents and one-shot queries.","operationId":"execute_step_v1_orchestrator_step_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteStepRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orchestrator/steps/{step_id}":{"get":{"tags":["Agent Orchestrator"],"summary":"Get Step","description":"Get a single step by ID.","operationId":"get_step_v1_orchestrator_steps__step_id__get","parameters":[{"name":"step_id","in":"path","required":true,"schema":{"type":"string","title":"Step Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orchestrator/workflows/{workflow_id}/receipts":{"get":{"tags":["Agent Orchestrator"],"summary":"Get Workflow Receipts","description":"Get all execution receipts for a workflow.","operationId":"get_workflow_receipts_v1_orchestrator_workflows__workflow_id__receipts_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orchestrator/workflows/{workflow_id}/verify-chain":{"get":{"tags":["Agent Orchestrator"],"summary":"Verify Receipt Chain","description":"Verify the hash chain integrity of a workflow's receipts.","operationId":"verify_receipt_chain_v1_orchestrator_workflows__workflow_id__verify_chain_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChainVerificationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orchestrator/receipts/{receipt_id}":{"get":{"tags":["Agent Orchestrator"],"summary":"Get Receipt","description":"Get a single execution receipt.","operationId":"get_receipt_v1_orchestrator_receipts__receipt_id__get","parameters":[{"name":"receipt_id","in":"path","required":true,"schema":{"type":"string","title":"Receipt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orchestrator/replay/{decision_id}":{"post":{"tags":["Agent Orchestrator"],"summary":"Replay Decision","description":"Re-execute a decision with frozen inputs and verify output.\n\nWARNING: This calls the LLM provider and incurs costs.","operationId":"replay_decision_v1_orchestrator_replay__decision_id__post","parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","title":"Decision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/hitl/requests":{"get":{"tags":["hitl"],"summary":"List Requests","operationId":"list_requests_v1_hitl_requests_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"pending","title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/hitl/requests/{request_id}":{"get":{"tags":["hitl"],"summary":"Get Request","operationId":"get_request_v1_hitl_requests__request_id__get","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/hitl/requests/{request_id}/attest":{"post":{"tags":["hitl"],"summary":"Attest Request","operationId":"attest_request_v1_hitl_requests__request_id__attest_post","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/hitl/approvers/{approver_id}/requests":{"get":{"tags":["hitl"],"summary":"List Approver Requests","operationId":"list_approver_requests_v1_hitl_approvers__approver_id__requests_get","parameters":[{"name":"approver_id","in":"path","required":true,"schema":{"type":"string","title":"Approver Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/hitl/requests/{request_id}/verify":{"get":{"tags":["hitl"],"summary":"Verify Request","operationId":"verify_request_v1_hitl_requests__request_id__verify_get","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/push/register":{"post":{"tags":["Push Notifications"],"summary":"Register Push Token","description":"Registers a device push token for an approver.\nAuthentication: X-GNS-Signature over 'grafomem.push.register.v1:{approver_id}:{timestamp}'.","operationId":"register_push_token_v1_push_register_post","parameters":[{"name":"x-gns-signature","in":"header","required":true,"schema":{"type":"string","title":"X-Gns-Signature"}},{"name":"x-gns-timestamp","in":"header","required":true,"schema":{"type":"string","title":"X-Gns-Timestamp"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushRegisterRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/governed/decisions":{"post":{"tags":["Governed Decisions"],"summary":"Governed Decision","operationId":"governed_decision_v1_governed_decisions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GovernedDecisionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/governed/verify-batch":{"post":{"tags":["Governed Decisions"],"summary":"Verify Batch","description":"Ingest a batch of invoices, run the configurable rules engine\nSERVER-SIDE, and record each result as a signed governed decision\n(verifiability_tag=\"rule\").","operationId":"verify_batch_v1_governed_verify_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyBatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/governed/outcomes":{"post":{"tags":["Governed Decisions"],"summary":"Post Outcome","operationId":"post_outcome_v1_governed_outcomes_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/governed/outcomes/bulk":{"post":{"tags":["Governed Decisions"],"summary":"Post Outcomes Bulk","operationId":"post_outcomes_bulk_v1_governed_outcomes_bulk_post","requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OutcomeEvent"},"type":"array","title":"Events"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/governed/reviews":{"post":{"tags":["Governed Decisions"],"summary":"Post Review","operationId":"post_review_v1_governed_reviews_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewRecord"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cgr/rotation":{"post":{"tags":["Governed Decisions"],"summary":"Post Rotation","description":"Capture an emitter-supplied key-rotation proof (Ticket #7). Stored raw,\nappend-only; the signature is verified at scoring time before keyA and keyB\nare folded into one identity.","operationId":"post_rotation_v1_cgr_rotation_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotationProofRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cgr/rotations":{"get":{"tags":["Governed Decisions"],"summary":"Get Rotations","description":"Serve the captured, self-certifying rotation proofs read-only (Ticket\n#10a) so a consumer (geiant) can INDEPENDENTLY verify anchor→current instead\nof trusting grafomem's re-issue. Each proof is served raw (byte-parity with\nwhat prev_key signed); the reader re-checks every signature — the server is\nuntrusted transport, never an authority on continuity.\n\nOptional ?anchor=<hex> / ?current=<hex> filter to one identity's chain,\nresolved server-side via resolve_identities (a convenience; the reader still\nre-verifies). Read-only, no write path touched.\n\nAuth: tenant-scoped (parity with the reviews/substrate reads) — a valid\ntenant context is required. Because the proofs are self-certifying, this\nroute COULD be made anonymous by adding \"/v1/cgr/rotations\" to auth.py's\n_SKIP_AUTH_PATHS (as /v1/cgr/issuer is); left tenant-scoped by default until\na concrete anonymous-verifier need lands.","operationId":"get_rotations_v1_cgr_rotations_get","parameters":[{"name":"anchor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anchor"}},{"name":"current","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/governed/reviews/bulk":{"post":{"tags":["Governed Decisions"],"summary":"Post Reviews Bulk","operationId":"post_reviews_bulk_v1_governed_reviews_bulk_post","requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ReviewRecord"},"type":"array","title":"Reviews"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dispositions":{"post":{"tags":["Dispositions"],"summary":"Post Disposition","operationId":"post_disposition_v1_dispositions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DispositionIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dispositions/issuer":{"get":{"tags":["Dispositions"],"summary":"Get Issuer","description":"GB3: the runtime issuer key (roadmap §9.2). Public — an exact entry in the auth skip list — so a\nverifier can fetch it with no access, like /v1/cgr/issuer. A CONVENIENCE: per GD2 the key and its\nfingerprint are delivered in the onboarding pack and confirmed out of band, and a verifier must never\ntrust this value on first fetch nor re-fetch it to check a record (decision 0011 §8.2). No separate\nsha256 fingerprint (operator decision): `key_id_grouped` is the read-aloud form of the key id.\n`key_history` is null until a key history exists (roadmap §9.4).","operationId":"get_issuer_v1_dispositions_issuer_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/dispositions/{record_id}":{"get":{"tags":["Dispositions"],"summary":"Get Disposition","operationId":"get_disposition_v1_dispositions__record_id__get","parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/gcrumbs/verify/key":{"get":{"tags":["Independent Verification"],"summary":"Verify Key","operationId":"verify_key_v1_gcrumbs_verify_key_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/cgr/substrate/export":{"get":{"tags":["CGR Substrate"],"summary":"Export Substrate","operationId":"export_substrate_v1_cgr_substrate_export_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":500,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cgr/scores":{"get":{"tags":["CGR Scores"],"summary":"List Scores","operationId":"list_scores_v1_cgr_scores_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":500,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cgr/scores/{agent_handle}":{"get":{"tags":["CGR Scores"],"summary":"Get Score","operationId":"get_score_v1_cgr_scores__agent_handle__get","parameters":[{"name":"agent_handle","in":"path","required":true,"schema":{"type":"string","title":"Agent Handle"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":500,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cgr/calibration/{agent_key}":{"put":{"tags":["CGR Issuance"],"summary":"Put Calibration","operationId":"put_calibration_v1_cgr_calibration__agent_key__put","parameters":[{"name":"agent_key","in":"path","required":true,"schema":{"type":"string","title":"Agent Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalibrationBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cgr/issuer":{"get":{"tags":["CGR Issuance"],"summary":"Get Issuer","operationId":"get_issuer_v1_cgr_issuer_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/cgr/attestations":{"get":{"tags":["CGR Issuance"],"summary":"List Attestations","operationId":"list_attestations_v1_cgr_attestations_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":500,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cgr/attestation/{agent_handle}":{"get":{"tags":["CGR Issuance"],"summary":"Get Attestation","operationId":"get_attestation_v1_cgr_attestation__agent_handle__get","parameters":[{"name":"agent_handle","in":"path","required":true,"schema":{"type":"string","title":"Agent Handle"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":500,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cgr/read/attestation":{"get":{"tags":["CGR Issuance"],"summary":"Read Attestation","operationId":"read_attestation_v1_cgr_read_attestation_get","parameters":[{"name":"subject","in":"query","required":false,"schema":{"type":"string","default":"","title":"Subject"}},{"name":"domain","in":"query","required":false,"schema":{"type":"string","default":"","title":"Domain"}},{"name":"key","in":"query","required":false,"schema":{"type":"string","default":"","title":"Key"}},{"name":"did","in":"query","required":false,"schema":{"type":"string","default":"","title":"Did"}},{"name":"handle","in":"query","required":false,"schema":{"type":"string","default":"","title":"Handle"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":500,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp":{"post":{"tags":["CGR Read MCP"],"summary":"Mcp Endpoint","operationId":"mcp_endpoint_mcp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/webhooks/":{"get":{"tags":["Webhooks"],"summary":"List Webhooks","description":"List all webhooks for the tenant.","operationId":"list_webhooks_v1_webhooks__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookListResponse"}}}}}},"post":{"tags":["Webhooks"],"summary":"Register Webhook","description":"Register a new webhook endpoint.\n\nReturns the webhook config **including the signing secret** (shown\nonly once at creation time).","operationId":"register_webhook_v1_webhooks__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterWebhookRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/{webhook_id}":{"get":{"tags":["Webhooks"],"summary":"Get Webhook","description":"Get a single webhook configuration.","operationId":"get_webhook_v1_webhooks__webhook_id__get","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Webhooks"],"summary":"Update Webhook","description":"Update webhook configuration.","operationId":"update_webhook_v1_webhooks__webhook_id__put","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete Webhook","description":"Delete a webhook configuration.","operationId":"delete_webhook_v1_webhooks__webhook_id__delete","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/{webhook_id}/deliveries":{"get":{"tags":["Webhooks"],"summary":"Get Deliveries","description":"Get delivery history for a webhook.","operationId":"get_deliveries_v1_webhooks__webhook_id__deliveries_get","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/{webhook_id}/test":{"post":{"tags":["Webhooks"],"summary":"Test Webhook","description":"Send a test event to a webhook endpoint.","operationId":"test_webhook_v1_webhooks__webhook_id__test_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/{webhook_id}/deliveries/{delivery_id}/retry":{"post":{"tags":["Webhooks"],"summary":"Retry Delivery","description":"Re-send a past delivery as a new attempt. Ownership is enforced in the\nservice (delivery ∈ webhook ∈ authenticated tenant) — a 404 covers both\n'not found' and 'not yours' so cross-tenant probing can't distinguish them.","operationId":"retry_delivery_v1_webhooks__webhook_id__deliveries__delivery_id__retry_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","title":"Delivery Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/events/types":{"get":{"tags":["Webhooks"],"summary":"List Event Types","description":"List all valid webhook event types.","operationId":"list_event_types_v1_webhooks_events_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEventTypesResponse"}}}}}}},"/v1/assurance/schedules":{"get":{"tags":["assurance"],"summary":"List Schedules","operationId":"list_schedules_v1_assurance_schedules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["assurance"],"summary":"Create Schedule","operationId":"create_schedule_v1_assurance_schedules_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScheduleRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/assurance/schedules/{schedule_id}":{"put":{"tags":["assurance"],"summary":"Update Schedule","operationId":"update_schedule_v1_assurance_schedules__schedule_id__put","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","title":"Schedule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScheduleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["assurance"],"summary":"Delete Schedule","operationId":"delete_schedule_v1_assurance_schedules__schedule_id__delete","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","title":"Schedule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/assurance/run":{"post":{"tags":["assurance"],"summary":"Trigger Run","operationId":"trigger_run_v1_assurance_run_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/assurance/runs":{"get":{"tags":["assurance"],"summary":"List Runs","operationId":"list_runs_v1_assurance_runs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/assurance/runs/{run_id}":{"get":{"tags":["assurance"],"summary":"Get Run","operationId":"get_run_v1_assurance_runs__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/assurance/baseline":{"get":{"tags":["assurance"],"summary":"Get Baseline","operationId":"get_baseline_v1_assurance_baseline_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["assurance"],"summary":"Capture Baseline","operationId":"capture_baseline_v1_assurance_baseline_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/assurance/drift":{"get":{"tags":["assurance"],"summary":"Get Drift Events","operationId":"get_drift_events_v1_assurance_drift_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/assurance/stats":{"get":{"tags":["assurance"],"summary":"Get Stats","operationId":"get_stats_v1_assurance_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/tenants":{"get":{"tags":["Tenant Admin"],"summary":"List Tenants","description":"List all tenants. Super-admin only in production;\ncurrently returns the authenticated user's tenant.","operationId":"list_tenants_v1_admin_tenants_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/tenants/{tenant_id}":{"get":{"tags":["Tenant Admin"],"summary":"Get Tenant","description":"Get detailed tenant information.","operationId":"get_tenant_v1_admin_tenants__tenant_id__get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Tenant Admin"],"summary":"Update Tenant","description":"Update tenant name or plan. Requires owner/admin role.","operationId":"update_tenant_v1_admin_tenants__tenant_id__put","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTenantRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/tenants/{tenant_id}/destroy-key":{"post":{"tags":["Tenant Admin"],"summary":"Destroy Tenant Key","description":"Crypto-erase a tenant by destroying its DEK. Irreversible.","operationId":"destroy_tenant_key_v1_admin_tenants__tenant_id__destroy_key_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestroyKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/tenants/{tenant_id}/members":{"post":{"tags":["Tenant Admin"],"summary":"Invite Member","description":"Invite a team member to the tenant.","operationId":"invite_member_v1_admin_tenants__tenant_id__members_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteMemberRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Tenant Admin"],"summary":"List Members","description":"List all members of a tenant.","operationId":"list_members_v1_admin_tenants__tenant_id__members_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/tenants/{tenant_id}/members/{member_id}":{"put":{"tags":["Tenant Admin"],"summary":"Update Member Role","description":"Update a team member's role.","operationId":"update_member_role_v1_admin_tenants__tenant_id__members__member_id__put","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"member_id","in":"path","required":true,"schema":{"type":"string","title":"Member Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Tenant Admin"],"summary":"Remove Member","description":"Remove a team member from the tenant.","operationId":"remove_member_v1_admin_tenants__tenant_id__members__member_id__delete","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"member_id","in":"path","required":true,"schema":{"type":"string","title":"Member Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/tenants/{tenant_id}/usage":{"get":{"tags":["Tenant Admin"],"summary":"Get Usage","description":"Get usage summary for a tenant.\n\nAggregates memory count, store count, decision count, and\nAPI request metrics from the metering service.","operationId":"get_usage_v1_admin_tenants__tenant_id__usage_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audit/export/decisions":{"get":{"tags":["Audit Export"],"summary":"Export Decisions","description":"Export all decisions for the tenant as CSV or JSON.\n\nResponse includes BLAKE2b-256 content hash in the\n``X-Content-Hash`` header for tamper detection.","operationId":"export_decisions_v1_audit_export_decisions_get","parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(json|csv)$","default":"json","title":"Format"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO datetime lower bound","title":"Date From"},"description":"ISO datetime lower bound"},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO datetime upper bound","title":"Date To"},"description":"ISO datetime upper bound"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audit/export/governance":{"get":{"tags":["Audit Export"],"summary":"Export Governance","description":"Export governance evaluation logs as CSV or JSON.","operationId":"export_governance_v1_audit_export_governance_get","parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(json|csv)$","default":"json","title":"Format"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audit/export/gcrumbs":{"get":{"tags":["Audit Export"],"summary":"Export Gcrumbs","description":"Export the gcrumbs breadcrumb chain + epoch summary as JSON.","operationId":"export_gcrumbs_v1_audit_export_gcrumbs_get","parameters":[{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audit/export/full":{"get":{"tags":["Audit Export"],"summary":"Export Full","description":"Export a full audit package as a ZIP file.\n\nContains decisions.json, governance.json, gcrumbs.json, and manifest.json\nwith per-file BLAKE2b content hashes.","operationId":"export_full_v1_audit_export_full_get","parameters":[{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audit/export/pdf":{"post":{"tags":["Audit Export"],"summary":"Export Pdf","description":"Generate a compliance audit PDF report.\n\nRenders the combined regulatory report (EU AI Act, GDPR, DORA)\nwith governance logs, decision trail summary, and gcrumbs chain status.","operationId":"export_pdf_v1_audit_export_pdf_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/memory/{store_id}/export":{"get":{"tags":["Memory Sync"],"summary":"Export Memory Graph","operationId":"export_memory_graph_v1_memory__store_id__export_get","parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","title":"Store Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/{store_id}/sync":{"post":{"tags":["Memory Sync"],"summary":"Sync Memory Graph","operationId":"sync_memory_graph_v1_memory__store_id__sync_post","parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","title":"Store Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/portal/signup":{"post":{"tags":["Portal"],"summary":"Signup","description":"Create a new tenant account with email/password credentials.","operationId":"signup_v1_portal_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/portal/login":{"post":{"tags":["Portal"],"summary":"Login","description":"Authenticate with email and password, receive JWT.","operationId":"login_v1_portal_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/portal/sync":{"post":{"tags":["Portal"],"summary":"Sync Tenant","description":"Auto-provision a tenant after Supabase login.\n\nCalled by the frontend after a successful Supabase auth (signup, OAuth,\nor email confirmation).  Verifies the Supabase JWT from the Authorization\nheader, then finds-or-creates the linked tenant.","operationId":"sync_tenant_v1_portal_sync_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/portal/me":{"get":{"tags":["Portal"],"summary":"Get Dashboard","description":"Fetch aggregated dashboard data for the authenticated tenant.","operationId":"get_dashboard_v1_portal_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardResponse"}}}}}}},"/v1/portal/api-keys":{"post":{"tags":["Portal"],"summary":"Create Api Key","description":"Mint a scoped API key for the signed-in tenant.\n\nTwo shapes:\n  * `{\"name\", \"role\"}` (no `scopes`) — today's behaviour: `admin` mints TENANT_ADMIN_SCOPES, `agent` and\n    `read_only` their bounded role defaults. `role` defaults to `admin`.\n  * `{\"name\", \"scopes\": [...]}` — a NARROW key carrying exactly the named scopes (e.g. the analyst's\n    submit key: `[\"disposition:write\", \"disposition:read\"]`). The list must be non-empty, in the\n    vocabulary, and a subset of TENANT_ADMIN_SCOPES; otherwise 400 naming the refused scopes and\n    nothing is minted. `role` defaults to `agent` (it only sets the key prefix; the stored scopes are\n    the explicit list, which the resolver never widens).\nThe response is unchanged: `{api_key (show-once), key_id, role, scopes, expires_at}`.","operationId":"create_api_key_v1_portal_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/portal/api-keys/{key_id}":{"delete":{"tags":["Portal"],"summary":"Revoke Api Key","description":"Revoke (delete) a SINGLE API key by key_id — tenant-scoped, non-destructive to other keys.\n\nThe per-key counterpart to /rotate-key (which deletes every key). Scoped by tenant_id, so a key_id\nbelonging to another tenant simply matches no row → 404 (never touches, never reveals it). Evicts\nthe auth cache so the revoked key stops resolving within the 60s TTL, not only in the DB.","operationId":"revoke_api_key_v1_portal_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/portal/profile":{"post":{"tags":["Portal"],"summary":"Update Profile","description":"Update the signed-in user's editable profile (display name). Auth: portal\nsession; acts only on the caller's tenant. Email/plan are read-only.","operationId":"update_profile_v1_portal_profile_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/portal/change-password":{"post":{"tags":["Portal"],"summary":"Change Password","description":"Change the signed-in user's password. Re-verifies the current password before\nsetting the new one. Auth: portal session (JWT); acts only on the caller's tenant.","operationId":"change_password_v1_portal_change_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/portal/rotate-key":{"post":{"tags":["Portal"],"summary":"Rotate Key","description":"Revoke the current API key and issue a new one.","operationId":"rotate_key_v1_portal_rotate_key_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/portal/audit":{"get":{"tags":["Portal"],"summary":"Get Audit Logs","description":"Retrieve immutable audit logs for the tenant.","operationId":"get_audit_logs_v1_portal_audit_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/portal/upgrade":{"post":{"tags":["Portal"],"summary":"Upgrade","description":"Initiate Stripe Checkout for a plan upgrade.","operationId":"upgrade_v1_portal_upgrade_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/portal/portal":{"post":{"tags":["Portal"],"summary":"Portal","description":"Initiate Stripe Customer Portal session.","operationId":"portal_v1_portal_portal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/portal/sso/providers":{"get":{"tags":["SSO"],"summary":"List Providers","description":"List available SSO providers.","operationId":"list_providers_v1_portal_sso_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SSOProviderListResponse"}}}}}}},"/v1/portal/sso/authorize":{"get":{"tags":["SSO"],"summary":"Authorize","description":"Initiate an OAuth2/OIDC authorization flow.\n\nRedirects the user to the identity provider's login page.","operationId":"authorize_v1_portal_sso_authorize_get","parameters":[{"name":"provider","in":"query","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/portal/sso/callback":{"get":{"tags":["SSO"],"summary":"Callback","description":"Handle the OAuth2 callback from the identity provider.\n\nExchanges the authorization code for tokens, resolves the user,\nand returns a GRAFOMEM JWT.  For browser flows, redirects to the\nportal with the token in query parameters.","operationId":"callback_v1_portal_sso_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/portal/sso/configure":{"post":{"tags":["SSO"],"summary":"Configure Provider","description":"Configure an SSO provider (admin operation).\n\nRequires authentication via Bearer JWT token. Stores the OAuth\nclient credentials for the specified provider.","operationId":"configure_provider_v1_portal_sso_configure_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigureProviderRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SSOConfiguredResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/portal/sso/saml/metadata":{"get":{"tags":["SSO"],"summary":"Saml Metadata","description":"Download SP metadata XML for SAML 2.0 configuration.\n\nThis endpoint returns the GRAFOMEM Service Provider metadata\nthat the enterprise IdP admin needs to import.","operationId":"saml_metadata_v1_portal_sso_saml_metadata_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/portal/sso/saml/configure":{"post":{"tags":["SSO"],"summary":"Configure Saml","description":"Configure a SAML 2.0 Identity Provider (admin operation).\n\nAccepts either ``metadata_url`` (auto-discovery) or\n``metadata_xml`` (raw XML paste).  Requires authentication.","operationId":"configure_saml_v1_portal_sso_saml_configure_post","parameters":[{"name":"metadata_url","in":"query","required":false,"schema":{"type":"string","default":"","title":"Metadata Url"}},{"name":"metadata_xml","in":"query","required":false,"schema":{"type":"string","default":"","title":"Metadata Xml"}},{"name":"sp_entity_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Sp Entity Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/portal/sso/saml/login":{"get":{"tags":["SSO"],"summary":"Saml Login","description":"Initiate a SAML 2.0 SP-initiated SSO flow.\n\nRedirects the user to the configured IdP login page.","operationId":"saml_login_v1_portal_sso_saml_login_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/portal/sso/saml/acs":{"post":{"tags":["SSO"],"summary":"Saml Acs","description":"SAML 2.0 Assertion Consumer Service (ACS).\n\nReceives the SAML Response via HTTP-POST binding from the IdP.\nExtracts the user identity and issues a GRAFOMEM JWT.","operationId":"saml_acs_v1_portal_sso_saml_acs_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"ApiKeyMeta":{"properties":{"key_id":{"type":"string","title":"Key Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["key_id"],"title":"ApiKeyMeta","description":"Non-secret metadata for one tenant_api_keys row — NEVER the key itself.\n014 step (a): the console lists keys by metadata; the full key is shown only at\nmint/rotate (the create/rotate response bodies), never on /me."},"AttestRequest":{"properties":{"decision":{"type":"string","title":"Decision"},"signer_id":{"type":"string","title":"Signer Id"},"signature":{"type":"string","title":"Signature"}},"type":"object","required":["decision","signer_id","signature"],"title":"AttestRequest"},"AuditRecordResponse":{"properties":{"id":{"type":"string","title":"Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"store_id":{"type":"string","title":"Store Id"},"conformance_rate":{"type":"number","title":"Conformance Rate"},"capabilities":{"items":{"type":"string"},"type":"array","title":"Capabilities"},"audited_at":{"type":"string","format":"date-time","title":"Audited At"},"report_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Json"}},"type":"object","required":["id","tenant_id","store_id","conformance_rate","audited_at"],"title":"AuditRecordResponse","description":"A single conformance audit result."},"BillingOut":{"properties":{"plan":{"type":"string","title":"Plan","default":"starter"},"status":{"type":"string","title":"Status","default":"active"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"}},"type":"object","title":"BillingOut","description":"Current billing / subscription status."},"CalibrationBody":{"properties":{"calibration_weight":{"type":"number","title":"Calibration Weight"},"n_observations":{"type":"integer","title":"N Observations","default":0},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"}},"type":"object","required":["calibration_weight"],"title":"CalibrationBody","description":"Body for PUT /v1/cgr/calibration/{agent_key} (module-level so FastAPI resolves it\nas the request body, not a query param)."},"CertificateResponse":{"properties":{"certificate_id":{"type":"string","title":"Certificate Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"fact_ref":{"type":"integer","title":"Fact Ref"},"fact_content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fact Content Hash"},"coverage":{"additionalProperties":{"type":"string"},"type":"object","title":"Coverage"},"scrubbed_decision_ids":{"items":{"type":"string"},"type":"array","title":"Scrubbed Decision Ids"},"erasure_requested_at":{"type":"string","title":"Erasure Requested At"},"erasure_completed_at":{"type":"string","title":"Erasure Completed At"},"legal_basis":{"type":"string","title":"Legal Basis"},"requested_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested By"},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature"},"public_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Key"},"verified":{"type":"boolean","title":"Verified","default":false},"verification_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verification Note"}},"type":"object","required":["certificate_id","tenant_id","fact_ref","coverage","erasure_requested_at","erasure_completed_at","legal_basis"],"title":"CertificateResponse","description":"Response model for an erasure certificate."},"CertifyRequest":{"properties":{"certificate_id":{"type":"string","title":"Certificate Id"}},"type":"object","required":["certificate_id"],"title":"CertifyRequest"},"ChainVerificationResponse":{"properties":{"status":{"type":"string","title":"Status"},"steps_verified":{"type":"integer","title":"Steps Verified","default":0},"tampered_at_step":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tampered At Step"}},"type":"object","required":["status"],"title":"ChainVerificationResponse"},"ChangePasswordRequest":{"properties":{"current_password":{"type":"string","title":"Current Password"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePasswordRequest","description":"Authenticated password change: current password re-verified, new one set."},"CheckoutRequest":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"plan":{"type":"string","title":"Plan","default":"pro"},"success_url":{"type":"string","title":"Success Url","default":"https://cloud.grafomem.com/settings?upgraded=true"},"cancel_url":{"type":"string","title":"Cancel Url","default":"https://cloud.grafomem.com/settings"}},"type":"object","required":["tenant_id"],"title":"CheckoutRequest","description":"Request body for creating a Stripe Checkout session."},"ComplianceDashboardResponse":{"properties":{"tenants":{"items":{"$ref":"#/components/schemas/AuditRecordResponse"},"type":"array","title":"Tenants"}},"type":"object","title":"ComplianceDashboardResponse","description":"Global compliance status across all tenants."},"ComplianceOut":{"properties":{"conformance_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Conformance Rate"},"capabilities":{"items":{"type":"string"},"type":"array","title":"Capabilities"},"audited_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Audited At"}},"type":"object","title":"ComplianceOut","description":"Latest conformance snapshot."},"ComposeBody":{"properties":{"composition_kind":{"type":"string","title":"Composition Kind"},"members":{"items":{},"type":"array","title":"Members"},"target_ref":{"type":"string","title":"Target Ref"},"authority":{"additionalProperties":true,"type":"object","title":"Authority","default":{}},"required_trust_tier":{"type":"string","title":"Required Trust Tier","default":"verified"}},"type":"object","required":["composition_kind","members","target_ref"],"title":"ComposeBody"},"ConfigureProviderRequest":{"properties":{"provider":{"type":"string","title":"Provider"},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"},"issuer_url":{"type":"string","title":"Issuer Url","default":""}},"type":"object","required":["provider","client_id","client_secret"],"title":"ConfigureProviderRequest"},"ConformanceRequest":{"properties":{"artifact_ref":{"type":"string","title":"Artifact Ref"},"layer_hashes":{"items":{},"type":"array","title":"Layer Hashes"},"data_provenance":{"additionalProperties":true,"type":"object","title":"Data Provenance"}},"type":"object","required":["artifact_ref","layer_hashes","data_provenance"],"title":"ConformanceRequest"},"CreateAgentRequest":{"properties":{"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role","default":"custom"},"description":{"type":"string","title":"Description","default":""},"model_id":{"type":"string","title":"Model Id"},"fallback_models":{"items":{"type":"string"},"type":"array","title":"Fallback Models"},"system_prompt":{"type":"string","title":"System Prompt"},"memory_stores":{"items":{"type":"string"},"type":"array","title":"Memory Stores"},"tools":{"items":{"type":"string"},"type":"array","title":"Tools"},"max_steps":{"type":"integer","title":"Max Steps","default":20},"max_tokens_per_step":{"type":"integer","title":"Max Tokens Per Step","default":4096},"temperature":{"type":"number","title":"Temperature","default":0.7},"enabled":{"type":"boolean","title":"Enabled","default":true},"agent_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Key"},"agent_handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Handle"}},"type":"object","required":["name","model_id","system_prompt"],"title":"CreateAgentRequest","description":"Request body for POST /v1/orchestrator/agents."},"CreateApiKeyRequest":{"properties":{"name":{"type":"string","title":"Name","default":"custom_key"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"expires_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires At"},"ip_allowlist":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ip Allowlist"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"}},"type":"object","title":"CreateApiKeyRequest"},"CreatePolicyRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"policy_type":{"type":"string","title":"Policy Type"},"action":{"type":"string","title":"Action","default":"deny"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"enabled":{"type":"boolean","title":"Enabled","default":true},"priority":{"type":"integer","title":"Priority","default":100}},"type":"object","required":["name","policy_type"],"title":"CreatePolicyRequest"},"CreateScheduleRequest":{"properties":{"interval_min":{"type":"integer","maximum":1440.0,"minimum":5.0,"title":"Interval Min","description":"Check interval in minutes","default":60},"checks":{"items":{"type":"string"},"type":"array","title":"Checks","default":["health","governance","chain_integrity","metrics"]},"alert_webhook":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alert Webhook"}},"type":"object","title":"CreateScheduleRequest"},"CreateTenantRequest":{"properties":{"name":{"type":"string","title":"Name"},"plan":{"type":"string","title":"Plan","default":"starter"}},"type":"object","required":["name"],"title":"CreateTenantRequest","description":"Request body for tenant provisioning."},"CreateWorkflowRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"agent_ids":{"items":{"type":"string"},"type":"array","title":"Agent Ids"},"mode":{"type":"string","title":"Mode","default":"sequential"},"supervisor_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supervisor Agent Id"},"max_total_steps":{"type":"integer","title":"Max Total Steps","default":100}},"type":"object","required":["name","agent_ids"],"title":"CreateWorkflowRequest","description":"Request body for POST /v1/orchestrator/workflows."},"DashboardResponse":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"keys":{"items":{"$ref":"#/components/schemas/ApiKeyMeta"},"type":"array","title":"Keys"},"plan":{"type":"string","title":"Plan"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"usage":{"$ref":"#/components/schemas/UsageSummaryOut"},"compliance":{"anyOf":[{"$ref":"#/components/schemas/ComplianceOut"},{"type":"null"}]},"billing":{"anyOf":[{"$ref":"#/components/schemas/BillingOut"},{"type":"null"}]}},"type":"object","required":["tenant_id","name","email","plan","usage"],"title":"DashboardResponse","description":"Aggregated dashboard data returned by ``GET /v1/portal/me``."},"DecisionResponse":{"properties":{"decision_id":{"type":"string","title":"Decision Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"store_id":{"type":"string","title":"Store Id"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"created_at":{"type":"string","title":"Created At"},"query":{"type":"string","title":"Query"},"retrieved_fact_refs":{"items":{"type":"integer"},"type":"array","title":"Retrieved Fact Refs"},"retrieved_contents":{"items":{"type":"string"},"type":"array","title":"Retrieved Contents"},"retrieval_scores":{"items":{"type":"number"},"type":"array","title":"Retrieval Scores"},"retrieval_options":{"additionalProperties":true,"type":"object","title":"Retrieval Options"},"model_id":{"type":"string","title":"Model Id"},"prompt_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Hash"},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters"},"raw_output":{"type":"string","title":"Raw Output"},"parsed_output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Parsed Output"},"output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Tokens"},"latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency Ms"},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature"},"public_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Key"},"parent_decision_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Decision Id"}},"type":"object","required":["decision_id","tenant_id","store_id","created_at","query","model_id","raw_output"],"title":"DecisionResponse","description":"Response model for a single decision record."},"DeleteRequest":{"properties":{"ref":{"title":"Ref"}},"type":"object","required":["ref"],"title":"DeleteRequest"},"DestroyKeyRequest":{"properties":{"confirmation":{"type":"string","title":"Confirmation"}},"type":"object","required":["confirmation"],"title":"DestroyKeyRequest"},"DispositionIn":{"properties":{"schema":{"type":"string","title":"Schema"},"profile":{"type":"string","title":"Profile"},"approval_mode":{"type":"string","title":"Approval Mode"},"content_body":{"additionalProperties":true,"type":"object","title":"Content Body"},"approval_assertion":{"additionalProperties":true,"type":"object","title":"Approval Assertion"},"approver_signature":{"type":"string","title":"Approver Signature"},"system_signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Signature"},"system_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"System Metadata"}},"type":"object","required":["schema","profile","approval_mode","content_body","approval_assertion","approver_signature"],"title":"DispositionIn","description":"The approver-signed inner (Layer 1+2+3a). No system layer — the runtime counter-signs."},"EvaluateRequest":{"properties":{"operation":{"type":"string","title":"Operation"},"context":{"additionalProperties":true,"type":"object","title":"Context"}},"type":"object","required":["operation"],"title":"EvaluateRequest","description":"Request body for POST /v1/governance/evaluate."},"ExecuteStepRequest":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"input_text":{"type":"string","title":"Input Text"},"timeout_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Timeout Seconds"}},"type":"object","required":["agent_id","input_text"],"title":"ExecuteStepRequest","description":"Request body for POST /v1/orchestrator/step."},"GenerateReportRequest":{"properties":{"report_type":{"type":"string","title":"Report Type","default":"full_audit"},"period_days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Period Days","default":30}},"type":"object","title":"GenerateReportRequest"},"GovernanceLogResponse":{"properties":{"logs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Logs","default":[]},"count":{"type":"integer","title":"Count","default":0}},"type":"object","title":"GovernanceLogResponse"},"GovernanceStatsResponse":{"properties":{"policies_total":{"type":"integer","title":"Policies Total","default":0},"policies_active":{"type":"integer","title":"Policies Active","default":0},"evaluations_total":{"type":"integer","title":"Evaluations Total","default":0},"denials_total":{"type":"integer","title":"Denials Total","default":0},"escalations_total":{"type":"integer","title":"Escalations Total","default":0},"evaluations_by_type":{"additionalProperties":{"type":"integer"},"type":"object","title":"Evaluations By Type","default":{}}},"type":"object","title":"GovernanceStatsResponse"},"GovernedDecisionRequest":{"properties":{"decision":{"type":"string","title":"Decision"},"reason":{"type":"string","title":"Reason","default":""},"invoice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Id"},"context":{"additionalProperties":true,"type":"object","title":"Context"},"model_id":{"type":"string","title":"Model Id","default":"kapwork-verify-agent-v1"},"agent_handle":{"type":"string","title":"Agent Handle","default":"invoice-certifier@kapwork-receivables"},"verifiability_tag":{"type":"string","title":"Verifiability Tag","default":"judgment"},"agent_tier":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Agent Tier"},"agent_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Key"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"}},"type":"object","required":["decision"],"title":"GovernedDecisionRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InstallTemplateRequest":{"properties":{"template_id":{"type":"string","title":"Template Id"}},"type":"object","required":["template_id"],"title":"InstallTemplateRequest"},"IntegrityRequest":{"properties":{"layer_hashes":{"items":{},"type":"array","title":"Layer Hashes"}},"type":"object","required":["layer_hashes"],"title":"IntegrityRequest"},"InviteMemberRequest":{"properties":{"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role","default":"member"}},"type":"object","required":["email"],"title":"InviteMemberRequest"},"InvokeRequest":{"properties":{"action_name":{"type":"string","title":"Action Name"},"subject_refs":{"items":{},"type":"array","title":"Subject Refs"},"params":{"additionalProperties":true,"type":"object","title":"Params","default":{}},"authority":{"additionalProperties":true,"type":"object","title":"Authority","default":{}}},"type":"object","required":["action_name","subject_refs"],"title":"InvokeRequest"},"IssueErasureRequest":{"properties":{"fact_ref":{"type":"integer","title":"Fact Ref"},"fact_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fact Content"},"memory_deleted":{"type":"boolean","title":"Memory Deleted","default":true},"legal_basis":{"type":"string","title":"Legal Basis","default":"GDPR Article 17 — Right to Erasure"},"requested_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested By","default":"data_subject"},"signing_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signing Key"},"declared_subsystems":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Declared Subsystems"}},"type":"object","required":["fact_ref"],"title":"IssueErasureRequest","description":"Request body for POST /v1/erasure/issue."},"IssueRequest":{"properties":{"artifact_ref":{"type":"string","title":"Artifact Ref"},"base_model_ref":{"type":"string","title":"Base Model Ref"},"layer_hashes":{"items":{},"type":"array","title":"Layer Hashes"},"data_provenance":{"additionalProperties":true,"type":"object","title":"Data Provenance"},"authority":{"additionalProperties":true,"type":"object","title":"Authority"},"conformance":{"additionalProperties":true,"type":"object","title":"Conformance"},"permitted_actions":{"items":{},"type":"array","title":"Permitted Actions"},"kind":{"type":"string","title":"Kind","default":"lora+rag"}},"type":"object","required":["artifact_ref","base_model_ref","layer_hashes","data_provenance","authority","conformance","permitted_actions"],"title":"IssueRequest"},"LLMProviderListResponse":{"properties":{"providers":{"items":{"$ref":"#/components/schemas/LLMProviderResponse"},"type":"array","title":"Providers","default":[]},"count":{"type":"integer","title":"Count","default":0}},"type":"object","title":"LLMProviderListResponse"},"LLMProviderResponse":{"properties":{"config_id":{"type":"string","title":"Config Id"},"provider":{"type":"string","title":"Provider"},"model_id":{"type":"string","title":"Model Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["config_id","provider","model_id"],"title":"LLMProviderResponse"},"LogDecisionRequest":{"properties":{"store_id":{"type":"string","title":"Store Id"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"query":{"type":"string","title":"Query"},"retrieved_fact_refs":{"items":{"type":"integer"},"type":"array","title":"Retrieved Fact Refs"},"retrieved_contents":{"items":{"type":"string"},"type":"array","title":"Retrieved Contents"},"retrieval_scores":{"items":{"type":"number"},"type":"array","title":"Retrieval Scores"},"retrieval_options":{"additionalProperties":true,"type":"object","title":"Retrieval Options"},"model_id":{"type":"string","title":"Model Id"},"prompt_template_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Template Hash"},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters"},"raw_output":{"type":"string","title":"Raw Output"},"parsed_output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Parsed Output"},"output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Tokens"},"latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency Ms"},"signing_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signing Key"},"parent_decision_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Decision Id"}},"type":"object","required":["store_id","query","model_id","raw_output"],"title":"LogDecisionRequest","description":"Request body for POST /v1/decisions/log."},"LoginRequest":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest","description":"Portal login payload."},"OrchestratorStatsResponse":{"properties":{"agents_total":{"type":"integer","title":"Agents Total","default":0},"workflows_total":{"type":"integer","title":"Workflows Total","default":0},"steps_total":{"type":"integer","title":"Steps Total","default":0},"tokens_total":{"type":"integer","title":"Tokens Total","default":0}},"type":"object","title":"OrchestratorStatsResponse"},"OutcomeEvent":{"properties":{"invoice_ref":{"type":"string","title":"Invoice Ref"},"outcome":{"type":"string","title":"Outcome"},"outcome_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome Date"},"amount_recovered":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount Recovered"},"source":{"type":"string","title":"Source","default":"manual"}},"type":"object","required":["invoice_ref","outcome"],"title":"OutcomeEvent"},"PolicyListResponse":{"properties":{"policies":{"items":{"$ref":"#/components/schemas/PolicyResponse"},"type":"array","title":"Policies","default":[]},"count":{"type":"integer","title":"Count","default":0}},"type":"object","title":"PolicyListResponse"},"PolicyResponse":{"properties":{"policy_id":{"type":"string","title":"Policy Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"policy_type":{"type":"string","title":"Policy Type"},"action":{"type":"string","title":"Action"},"config":{"additionalProperties":true,"type":"object","title":"Config","default":{}},"priority":{"type":"integer","title":"Priority","default":0},"enabled":{"type":"boolean","title":"Enabled","default":true},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["policy_id","name","policy_type","action"],"title":"PolicyResponse"},"ProposeActionRequest":{"properties":{"tool":{"type":"string","title":"Tool"},"args":{"additionalProperties":true,"type":"object","title":"Args"},"invoice_ref":{"type":"string","title":"Invoice Ref"},"reason":{"type":"string","title":"Reason","default":""},"agent_tier":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Agent Tier"}},"type":"object","required":["tool","invoice_ref"],"title":"ProposeActionRequest","description":"Request body for POST /v1/orchestrator/agents/{agent_id}/propose (Phase 2, PR-0)."},"PushRegisterRequest":{"properties":{"approver_id":{"type":"string","title":"Approver Id"},"platform":{"type":"string","title":"Platform"},"push_token":{"type":"string","title":"Push Token"}},"type":"object","required":["approver_id","platform","push_token"],"title":"PushRegisterRequest"},"RegisterCorpusRequest":{"properties":{"name":{"type":"string","title":"Name"},"sources":{"items":{},"type":"array","title":"Sources"},"attestations":{"additionalProperties":true,"type":"object","title":"Attestations","default":{}},"processing":{"items":{},"type":"array","title":"Processing","default":[]},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","default":{}}},"type":"object","required":["name","sources"],"title":"RegisterCorpusRequest"},"RegisterProviderRequest":{"properties":{"provider":{"type":"string","title":"Provider"},"model_id":{"type":"string","title":"Model Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url"},"default_temperature":{"type":"number","title":"Default Temperature","default":0.7},"max_tokens":{"type":"integer","title":"Max Tokens","default":4096},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["provider","model_id"],"title":"RegisterProviderRequest","description":"Request body for POST /v1/llm/providers."},"RegisterRequest":{"properties":{"artifact_ref":{"type":"string","title":"Artifact Ref"},"base_model_ref":{"type":"string","title":"Base Model Ref"},"layers":{"items":{},"type":"array","title":"Layers"},"kind":{"type":"string","title":"Kind","default":"lora+rag"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","default":{}}},"type":"object","required":["artifact_ref","base_model_ref","layers"],"title":"RegisterRequest"},"RegisterToolRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"tool_type":{"type":"string","title":"Tool Type"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"enabled":{"type":"boolean","title":"Enabled","default":true},"requires_governance":{"type":"boolean","title":"Requires Governance","default":true}},"type":"object","required":["name","description","tool_type"],"title":"RegisterToolRequest","description":"Request body for POST /v1/llm/tools."},"RegisterTypeRequest":{"properties":{"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"},"spec":{"additionalProperties":true,"type":"object","title":"Spec"}},"type":"object","required":["kind","name","spec"],"title":"RegisterTypeRequest"},"RegisterWebhookRequest":{"properties":{"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["url","events"],"title":"RegisterWebhookRequest"},"ReplayResponse":{"properties":{"decision":{"$ref":"#/components/schemas/DecisionResponse"},"memory_state_at_decision":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Memory State At Decision"},"facts_used":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Facts Used"},"facts_since_deleted":{"items":{"type":"integer"},"type":"array","title":"Facts Since Deleted"}},"type":"object","required":["decision"],"title":"ReplayResponse","description":"Response model for decision replay."},"ReportListResponse":{"properties":{"reports":{"items":{"$ref":"#/components/schemas/ReportSummaryResponse"},"type":"array","title":"Reports","default":[]},"count":{"type":"integer","title":"Count","default":0}},"type":"object","title":"ReportListResponse"},"ReportResponse":{"properties":{"report_id":{"type":"string","title":"Report Id"},"report_type":{"type":"string","title":"Report Type"},"framework":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Framework"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"},"sections":{"items":{"$ref":"#/components/schemas/ReportSectionResponse"},"type":"array","title":"Sections","default":[]},"overall_status":{"type":"string","title":"Overall Status","default":""},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["report_id","report_type"],"title":"ReportResponse"},"ReportSectionResponse":{"properties":{"title":{"type":"string","title":"Title"},"article":{"type":"string","title":"Article","default":""},"status":{"type":"string","title":"Status","default":""},"evidence":{"additionalProperties":true,"type":"object","title":"Evidence","default":{}},"narrative":{"type":"string","title":"Narrative","default":""}},"type":"object","required":["title"],"title":"ReportSectionResponse"},"ReportStatsResponse":{"properties":{"total_reports":{"type":"integer","title":"Total Reports","default":0},"frameworks_used":{"items":{"type":"string"},"type":"array","title":"Frameworks Used","default":[]}},"type":"object","title":"ReportStatsResponse"},"ReportSummaryResponse":{"properties":{"report_id":{"type":"string","title":"Report Id"},"report_type":{"type":"string","title":"Report Type"},"overall_status":{"type":"string","title":"Overall Status","default":""},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["report_id","report_type"],"title":"ReportSummaryResponse"},"ResumeBody":{"properties":{"approver":{"type":"string","title":"Approver"}},"type":"object","required":["approver"],"title":"ResumeBody"},"ResumeRequest":{"properties":{"approver":{"type":"string","title":"Approver"}},"type":"object","required":["approver"],"title":"ResumeRequest"},"ResumeWorkflowRequest":{"properties":{"approved":{"type":"boolean","title":"Approved"}},"type":"object","required":["approved"],"title":"ResumeWorkflowRequest","description":"Request body for POST /v1/orchestrator/workflows/{id}/resume."},"RetrieveOptionsModel":{"properties":{"budget_tokens":{"type":"integer","title":"Budget Tokens","default":512},"as_of":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"As Of"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"},"top_k":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top K"}},"type":"object","title":"RetrieveOptionsModel"},"RetrieveRequest":{"properties":{"query":{"type":"string","title":"Query"},"options":{"$ref":"#/components/schemas/RetrieveOptionsModel","default":{"budget_tokens":512}}},"type":"object","required":["query"],"title":"RetrieveRequest"},"ReviewRecord":{"properties":{"invoice_ref":{"type":"string","title":"Invoice Ref"},"reviewer_handle":{"type":"string","title":"Reviewer Handle"},"rating":{"type":"number","title":"Rating"},"agent_handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Handle"},"decision_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Id"},"review_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Date"},"source":{"type":"string","title":"Source","default":"manual"}},"type":"object","required":["invoice_ref","reviewer_handle","rating"],"title":"ReviewRecord","description":"A funder/analyst rating of a certification (Ticket #3). Enables the\n\"verify the reviewer\" bridge — calibrate a reviewer on verifiable outcomes,\nthen trust their ratings on unverifiable calls. Many-per-invoice: dedup key is\n(invoice_ref, reviewer_handle)."},"RotateKeyResponse":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"new_api_key":{"type":"string","title":"New Api Key"}},"type":"object","required":["tenant_id","new_api_key"],"title":"RotateKeyResponse","description":"Returned after a successful key rotation."},"RotationProofRequest":{"properties":{"prev_key":{"type":"string","title":"Prev Key"},"new_key":{"type":"string","title":"New Key"},"seq":{"type":"integer","title":"Seq","default":1},"not_before":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Not Before"},"sig":{"type":"string","title":"Sig"},"source":{"type":"string","title":"Source","default":"agent"}},"type":"object","required":["prev_key","new_key","sig"],"title":"RotationProofRequest","description":"A self-certifying key-rotation link (Ticket #7), EMITTER-supplied: the agent's\nOLD key signs {prev_key, new_key, seq, not_before}. Stored raw (append-only);\nthe signature is verified at aggregation time, never trusted on write."},"RunWorkflowRequest":{"properties":{"input_text":{"type":"string","title":"Input Text"},"timeout_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Timeout Seconds"}},"type":"object","required":["input_text"],"title":"RunWorkflowRequest","description":"Request body for POST /v1/orchestrator/workflows/{id}/run."},"SSOConfiguredResponse":{"properties":{"config_id":{"type":"string","title":"Config Id"},"provider":{"type":"string","title":"Provider"},"enabled":{"type":"boolean","title":"Enabled","default":true},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["config_id","provider"],"title":"SSOConfiguredResponse"},"SSOProviderInfo":{"properties":{"provider":{"type":"string","title":"Provider"},"name":{"type":"string","title":"Name","default":""},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["provider"],"title":"SSOProviderInfo"},"SSOProviderListResponse":{"properties":{"providers":{"items":{"$ref":"#/components/schemas/SSOProviderInfo"},"type":"array","title":"Providers","default":[]}},"type":"object","title":"SSOProviderListResponse"},"ScrubResponse":{"properties":{"fact_ref":{"type":"integer","title":"Fact Ref"},"decisions_affected":{"type":"integer","title":"Decisions Affected"}},"type":"object","required":["fact_ref","decisions_affected"],"title":"ScrubResponse","description":"Response for GDPR fact scrubbing."},"SignupRequest":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"},"plan":{"type":"string","title":"Plan","default":"starter"}},"type":"object","required":["name","email","password"],"title":"SignupRequest","description":"Portal signup payload."},"SubscriptionResponse":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"plan":{"type":"string","title":"Plan"},"status":{"type":"string","title":"Status"},"stripe_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Subscription Id"},"current_period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Period End"}},"type":"object","required":["tenant_id","plan","status"],"title":"SubscriptionResponse","description":"Current subscription status."},"SupersedeRequest":{"properties":{"old_ref":{"title":"Old Ref"},"content":{"type":"string","title":"Content"},"options":{"$ref":"#/components/schemas/WriteOptionsModel","default":{"metadata":{}}}},"type":"object","required":["old_ref","content"],"title":"SupersedeRequest"},"SyncPayload":{"properties":{"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["payload","metadata"],"title":"SyncPayload"},"SyncRequest":{"properties":{"name":{"type":"string","title":"Name","default":""},"plan":{"type":"string","title":"Plan","default":"starter"}},"type":"object","title":"SyncRequest","description":"Tenant sync payload — sent after first Supabase login."},"TenantCreatedResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"plan":{"type":"string","title":"Plan"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"limits":{"$ref":"#/components/schemas/TenantLimitsResponse"},"api_key":{"type":"string","title":"Api Key"}},"type":"object","required":["id","name","plan","created_at","limits","api_key"],"title":"TenantCreatedResponse","description":"Mint response only — carries the freshly generated `api_key` exactly once.\nThe caller must store it now; it is not retrievable from any list/get afterwards."},"TenantLimitsResponse":{"properties":{"max_memories":{"type":"integer","title":"Max Memories"},"max_stores":{"type":"integer","title":"Max Stores"},"max_requests_per_minute":{"type":"integer","title":"Max Requests Per Minute"}},"type":"object","required":["max_memories","max_stores","max_requests_per_minute"],"title":"TenantLimitsResponse","description":"Plan-level resource ceilings."},"TenantResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"plan":{"type":"string","title":"Plan"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"limits":{"$ref":"#/components/schemas/TenantLimitsResponse"}},"type":"object","required":["id","name","plan","created_at","limits"],"title":"TenantResponse","description":"Tenant representation for list/get. **Never carries `api_key`** — key material\nis show-once at mint/rotate only (a list/get that returned keys was the cross-tenant\nkey-disclosure). See TenantCreatedResponse for the mint response."},"TokenResponse":{"properties":{"token":{"type":"string","title":"Token"},"tenant_id":{"type":"string","title":"Tenant Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"},"plan":{"type":"string","title":"Plan"}},"type":"object","required":["token","tenant_id","name","email","plan"],"title":"TokenResponse","description":"Returned after successful signup or login.\n\n``api_key`` is present only on the show-once signup response. A login response carries no key\n(no plaintext is stored; hash-at-rest): the field is null and the client provisions one via\n/v1/portal/api-keys or /rotate-key."},"ToolDefinitionResponse":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters","default":{}},"builtin":{"type":"boolean","title":"Builtin","default":false}},"type":"object","required":["name"],"title":"ToolDefinitionResponse"},"ToolListResponse":{"properties":{"tools":{"items":{"$ref":"#/components/schemas/ToolDefinitionResponse"},"type":"array","title":"Tools","default":[]},"count":{"type":"integer","title":"Count","default":0}},"type":"object","title":"ToolListResponse"},"UpdateAgentRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"fallback_models":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Fallback Models"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt"},"memory_stores":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Memory Stores"},"tools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tools"},"max_steps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Steps"},"max_tokens_per_step":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens Per Step"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"type":"object","title":"UpdateAgentRequest","description":"Request body for PUT /v1/orchestrator/agents/{id}."},"UpdatePolicyRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority"}},"type":"object","title":"UpdatePolicyRequest"},"UpdateProfileRequest":{"properties":{"name":{"type":"string","title":"Name"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"}},"type":"object","required":["name"],"title":"UpdateProfileRequest","description":"Editable profile fields (display name + IANA timezone; email/plan read-only)."},"UpdateRoleRequest":{"properties":{"role":{"type":"string","title":"Role"}},"type":"object","required":["role"],"title":"UpdateRoleRequest"},"UpdateScheduleRequest":{"properties":{"interval_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval Min"},"checks":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Checks"},"alert_webhook":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alert Webhook"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"type":"object","title":"UpdateScheduleRequest"},"UpdateTenantRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"}},"type":"object","title":"UpdateTenantRequest"},"UpdateWebhookRequest":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"events":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Events"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"UpdateWebhookRequest"},"UpgradeRequest":{"properties":{"plan":{"type":"string","title":"Plan","default":"pro"}},"type":"object","title":"UpgradeRequest","description":"Plan upgrade payload."},"UsageSummaryOut":{"properties":{"writes":{"type":"integer","title":"Writes","default":0},"reads":{"type":"integer","title":"Reads","default":0},"deletes":{"type":"integer","title":"Deletes","default":0},"supersedes":{"type":"integer","title":"Supersedes","default":0},"total_bytes":{"type":"integer","title":"Total Bytes","default":0},"total_operations":{"type":"integer","title":"Total Operations","default":0}},"type":"object","title":"UsageSummaryOut","description":"Usage stats for the dashboard."},"UsageSummaryResponse":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"period":{"type":"string","title":"Period"},"writes":{"type":"integer","title":"Writes","default":0},"reads":{"type":"integer","title":"Reads","default":0},"deletes":{"type":"integer","title":"Deletes","default":0},"supersedes":{"type":"integer","title":"Supersedes","default":0},"total_bytes":{"type":"integer","title":"Total Bytes","default":0},"total_operations":{"type":"integer","title":"Total Operations","default":0}},"type":"object","required":["tenant_id","period"],"title":"UsageSummaryResponse","description":"Aggregated usage for a billing period."},"ValidateLinkRequest":{"properties":{"link_name":{"type":"string","title":"Link Name"},"from_type":{"type":"string","title":"From Type"},"to_type":{"type":"string","title":"To Type"}},"type":"object","required":["link_name","from_type","to_type"],"title":"ValidateLinkRequest"},"ValidateObjectRequest":{"properties":{"type_name":{"type":"string","title":"Type Name"},"instance":{"additionalProperties":true,"type":"object","title":"Instance"}},"type":"object","required":["type_name","instance"],"title":"ValidateObjectRequest"},"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"},"VerifyBatchRequest":{"properties":{"invoices":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Invoices"},"policy":{"additionalProperties":true,"type":"object","title":"Policy"},"model_id":{"type":"string","title":"Model Id","default":"kapwork-verify-agent-v1"},"agent_handle":{"type":"string","title":"Agent Handle","default":"invoice-rules-engine@kapwork-receivables"},"agent_tier":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Agent Tier"},"agent_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Key"}},"type":"object","required":["invoices"],"title":"VerifyBatchRequest"},"VerifyRequest":{"properties":{"receipts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Receipts"},"public_key_b64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Key B64"}},"type":"object","required":["receipts"],"title":"VerifyRequest"},"VerifyResponse":{"properties":{"valid":{"type":"boolean","title":"Valid"},"certificate_id":{"type":"string","title":"Certificate Id"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["valid","certificate_id","detail"],"title":"VerifyResponse","description":"Response model for certificate verification."},"WebhookConfigResponse":{"properties":{"webhook_id":{"type":"string","title":"Webhook Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events","default":[]},"enabled":{"type":"boolean","title":"Enabled","default":true},"description":{"type":"string","title":"Description","default":""},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["webhook_id","url"],"title":"WebhookConfigResponse"},"WebhookCreatedResponse":{"properties":{"webhook_id":{"type":"string","title":"Webhook Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events","default":[]},"enabled":{"type":"boolean","title":"Enabled","default":true},"description":{"type":"string","title":"Description","default":""},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"secret":{"type":"string","title":"Secret"}},"type":"object","required":["webhook_id","url","secret"],"title":"WebhookCreatedResponse","description":"Returned only on creation — includes the signing secret."},"WebhookEventTypesResponse":{"properties":{"event_types":{"items":{"type":"string"},"type":"array","title":"Event Types","default":[]}},"type":"object","title":"WebhookEventTypesResponse"},"WebhookListResponse":{"properties":{"webhooks":{"items":{"$ref":"#/components/schemas/WebhookConfigResponse"},"type":"array","title":"Webhooks","default":[]},"count":{"type":"integer","title":"Count","default":0}},"type":"object","title":"WebhookListResponse"},"WriteBatchRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WriteRequest"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"WriteBatchRequest"},"WriteOptionsModel":{"properties":{"valid_from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Valid From"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"},"signing_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signing Key"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","title":"WriteOptionsModel"},"WriteRequest":{"properties":{"content":{"type":"string","title":"Content"},"options":{"$ref":"#/components/schemas/WriteOptionsModel","default":{"metadata":{}}}},"type":"object","required":["content"],"title":"WriteRequest"}}},"tags":[{"name":"Memory Stores","description":"CRUD for vector-backed memory stores"},{"name":"Orchestrator","description":"Multi-agent workflow orchestration"},{"name":"Decision Trail","description":"Inference audit logging and replay"},{"name":"Governance","description":"Policy evaluation and enforcement"},{"name":"Erasure Proof","description":"GDPR erasure certificates"},{"name":"Regulatory Reports","description":"Compliance report generation"},{"name":"LLM & Tools","description":"LLM provider and tool management"},{"name":"Webhooks","description":"Event webhook management"},{"name":"Portal","description":"Tenant portal authentication"},{"name":"SSO","description":"OAuth2/OIDC single sign-on"},{"name":"Cloud Admin","description":"Tenant and billing management"}]}