{"openapi":"3.1.0","info":{"title":"Stratogenic Catalyst API","description":"Stratogenic Catalyst is an execution-level governance kernel for organisational workflows.\n\nIt sits beneath automation platforms and business systems to:\n- normalise and deduplicate work\n- enforce proposal-based mutation\n- preserve immutable execution history\n- provide audit-grade traceability\n\nCatalyst does not replace tools or make decisions.\nIt governs how work is allowed to execute.\n\nDesigned to run quietly, deterministically, and indefinitely.","version":"1.0"},"paths":{"/tenants/signup":{"post":{"tags":["tenants"],"summary":"Create a new Catalyst tenant","description":"Creates a new organisation (tenant) in Catalyst and returns an API key.\n\nThe API key grants administrative access to the tenant and should be stored securely. This key is required for all subsequent API calls and Zapier integrations.","operationId":"signup_tenants_signup_post","security":[{"CatalystOperatorKey":[]}],"parameters":[{"name":"company","in":"query","required":true,"schema":{"type":"string","title":"Company"}},{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}},{"name":"plan","in":"query","required":false,"schema":{"type":"string","default":"TASTER","title":"Plan"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tenants/{tenant_id}/plan":{"post":{"tags":["tenants"],"summary":"Set tenant plan (operator)","description":"Upgrade or downgrade an existing tenant's plan. Requires operator key.","operationId":"set_tenant_plan_tenants__tenant_id__plan_post","security":[{"CatalystOperatorKey":[]}],"parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"plan","in":"query","required":true,"schema":{"type":"string","title":"Plan"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tenants/auth/verify":{"post":{"tags":["tenants"],"summary":"Verify API key (Zapier connection test)","description":"Validates an API key and returns basic tenant information.\n\nThis endpoint is primarily intended for Zapier and other automation tools to verify connectivity and display a connection label.","operationId":"auth_verify_tenants_auth_verify_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tenants/setup":{"post":{"tags":["tenants"],"summary":"Initial tenant configuration","description":"Applies high-level configuration for the tenant, including:\n- work domains\n- staff structure\n- routing and normalisation rules\n\nThis endpoint patches the tenant's rule configuration and is safe to call multiple times.","operationId":"setup_tenant_tenants_setup_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/tenants/sync":{"post":{"tags":["tenants"],"summary":"Update tenant rules","description":"Applies a partial update to the tenant's rule configuration.\n\nCommonly used by dashboards or automation tools to keep organisational rules in sync.","operationId":"sync_rules_tenants_sync_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Patch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/tenants/rules/current":{"get":{"tags":["tenants"],"summary":"Get effective rules for tenant (debug)","description":"Returns the merged rule configuration currently in effect for the tenant.\n\nIncludes industry packs and tenant-specific overrides.\n\nIntended for debugging and inspection purposes.","operationId":"current_rules_tenants_rules_current_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"industry","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tenants/staff/sync":{"post":{"tags":["tenants"],"summary":"Sync Staff Directory","description":"Upsert staff records for this tenant.\n\nExpected payload:\n{\n  \"people\": [\n    {\n      \"email\": \"alice@acme.io\",\n      \"name\": \"Alice Smith\",\n      \"role\": \"CEO\",\n      \"department\": \"Executive\",\n      \"manager_email\": \"chair@acme.io\",\n      \"active\": true\n    }\n  ]\n}","operationId":"sync_staff_directory_tenants_staff_sync_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/tenants/usage":{"get":{"tags":["tenants"],"summary":"Get tenant usage and limits","description":"Returns current usage, plan limits, and projected run-out information for the tenant.\n\nUseful for dashboards, billing views, and automation alerts.","operationId":"get_usage_tenants_usage_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tenants/rate-limit":{"get":{"tags":["tenants"],"summary":"Get tenant rate-limit usage","description":"Returns the current tenant ingest rate-limit counters without ingesting new work. Counters are rolling Redis windows and reset automatically.","operationId":"get_rate_limit_tenants_rate_limit_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/tenants/webhooks/health":{"get":{"tags":["tenants"],"summary":"Get tenant webhook delivery health","description":"Returns tenant-scoped webhook delivery health: active subscriptions, delivered and failed events in the last 24 hours, DLQ depth, and recent DLQ items with destinations and attempt counts.","operationId":"tenant_webhook_health_tenants_webhooks_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/tenants/webhooks/dlq/retry":{"post":{"tags":["tenants"],"summary":"Retry tenant webhook dead-letter queue","description":"Re-enqueues all retryable DLQ webhook items for the authenticated tenant and removes those items from the DLQ. The webhook worker will deliver the requeued events asynchronously.","operationId":"retry_tenant_webhook_dlq_endpoint_tenants_webhooks_dlq_retry_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/tenants/rotate-key":{"post":{"tags":["tenants"],"summary":"Rotate current tenant API key","description":"Rotates the authenticated tenant's API key. The current key is invalidated immediately, and the new key is returned once. Update all integrations before discarding the response.","operationId":"rotate_current_tenant_key_tenants_rotate_key_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tenants/graph":{"get":{"tags":["tenants"],"summary":"Get organisation execution graph","description":"Returns the organisation-level execution graph derived from all ingested work.\n\nThis view shows how tasks flow through the organisation and is used to power governance and execution analytics.","operationId":"get_org_graph_tenants_graph_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/tenants/graph/views":{"get":{"tags":["tenants"],"summary":"Get governance graph views","description":"Returns derived governance views for the organisation, including:\n- execution flow\n- ownership map\n- compliance relationships\n- risk heatmap\n- client influence\n\nThese views are read-only and derived from the execution graph.","operationId":"get_org_graph_views_tenants_graph_views_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/tenants/dashboard":{"get":{"tags":["tenants"],"summary":"Get governance dashboard data","description":"Returns a consolidated governance dashboard snapshot for the tenant.\n\nBy default, returns a lightweight payload containing tenant metadata and execution metrics.\nOptionally include specific governance views (execution flow, ownership, compliance, risk, clients)\nfor dashboards and reporting tools such as Zapier, Slack, Google Sheets, and Notion.\n\nPerformance & safety:\n- Views are optional and can be selectively included via query params.\n- Nested collections are capped to prevent oversized responses.","operationId":"get_org_dashboard_tenants_dashboard_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"include_views","in":"query","required":false,"schema":{"type":"boolean","description":"If true, include governance views. Defaults to false (metrics-only).","default":false,"title":"Include Views"},"description":"If true, include governance views. Defaults to false (metrics-only)."},{"name":"views","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Optional list of views to include. If omitted and include_views=true, all views are included.\nAllowed: execution_flow, ownership_map, compliance_web, risk_heatmap, client_influence","title":"Views"},"description":"Optional list of views to include. If omitted and include_views=true, all views are included.\nAllowed: execution_flow, ownership_map, compliance_web, risk_heatmap, client_influence"},{"name":"risk_limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":0,"description":"Max number of items to include in risk_heatmap.items (0 disables items).","default":10,"title":"Risk Limit"},"description":"Max number of items to include in risk_heatmap.items (0 disables items)."},{"name":"client_limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":0,"description":"Max number of clients to include in client_influence (0 disables clients).","default":10,"title":"Client Limit"},"description":"Max number of clients to include in client_influence (0 disables clients)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tenants/health":{"get":{"tags":["tenants"],"summary":"Get tenant health (tenant-scoped)","description":"Returns a tenant-scoped operational health snapshot.\n\nIncludes:\n- current UTC timestamp\n- DB connectivity check\n- webhook queue stats scoped to this tenant\n- lightweight execution state counts (no sensitive payloads)\n\nIntended for tenant self-diagnostics and automation tools.","operationId":"tenant_health_tenants_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/tenants/industries":{"post":{"tags":["tenants"],"summary":"Set Industries","operationId":"set_industries_tenants_industries_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/tenants/industries/packs":{"get":{"tags":["tenants"],"summary":"List available industry packs","description":"Lists predefined industry rule packs that can be applied to a tenant.\n\nIndustry packs provide baseline normalisation and governance rules for common sectors.","operationId":"list_industry_packs_tenants_industries_packs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/tasks/ingest":{"post":{"tags":["tasks"],"summary":"Ingest external tasks into Catalyst","description":"Ingest one or more tasks into Catalyst.\n\n• Per-tenant rate limited using Redis (global across all API replicas)\n• Idempotent via X-Request-Id / X-Catalyst-Request-ID headers\n• Tolerant of partial or low-quality input (flagged for review, not rejected)\n• Deterministic normalization, deduplication, and compliance enforcement\n• All changes are recorded in an append-only audit ledger\n\nThis endpoint is safe for retries and concurrent callers.","operationId":"ingest_tasks_tasks_ingest_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"debug","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Debug"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}},{"name":"X-User-TZ","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Tz"}},{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"Either {items:[...], domain?} or legacy list of items","title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"402":{"description":"Plan limit reached — ingestion quota exhausted for this billing period."},"429":{"description":"Rate limit exceeded. Retry after the interval in the Retry-After response header."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tasks/{task_id}":{"patch":{"tags":["tasks"],"summary":"Update a task","description":"Updates a single task in the tenant’s execution state.\n\nOnly whitelisted fields are applied (e.g. title, owner, priority, stage, domain, tags).\nThe update is recorded in the execution ledger and emits a task.updated event for automation.\n\nThis endpoint is designed for human edits and external automation tools such as Zapier.","operationId":"update_task_tasks__task_id__patch","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}},{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Patch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tasks/bulk-update":{"post":{"tags":["tasks"],"summary":"Bulk update tasks","description":"Applies a set of updates to all tasks matching the provided filter.\n\nBehaviour:\n- Operates only within the calling tenant.\n- Matches tasks across active flow and pending proposals.\n- Applies canonical normalisation for domain, priority, and stage.\n- Adds a '#bulk-updated' tag for provenance.\n\nAvailability:\n- Restricted to Growth and Enterprise plans.","operationId":"bulk_update_tasks_tasks_bulk_update_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}},{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tasks/search":{"get":{"tags":["tasks"],"summary":"Search tasks","description":"Searches normalised Catalyst tasks within the current tenant.\n\nThis endpoint provides a lightweight, deterministic search intended for dashboards and automation tools such as Zapier, rather than full-text search.\n\nSearch behaviour:\n- Performs a case-insensitive substring match over task title and details.\n- Supports optional filtering by canonical domain and priority.\n- Automatically excludes internal system-derived tasks.\n\nPagination:\n- Results are paginated using `limit` and `offset` query parameters.\n- The `count` field in the response represents the total number of matched tasks, not just the number returned in the current page.\n\nTypical Zapier usage:\n- Find an existing task before updating it.\n- Locate tasks for bulk updates or notifications.\n- Pair with 'Send Task to Catalyst' when no matching task is found.","operationId":"search_tasks_tasks_search_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","description":"Free text search over title/details (case-insensitive substring)","default":"","title":"Q"},"description":"Free text search over title/details (case-insensitive substring)"},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by canonical domain (e.g. security, product, infra)","title":"Domain"},"description":"Filter by canonical domain (e.g. security, product, infra)"},{"name":"priority","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by priority (e.g. \"Low\" | \"Medium\" | \"High\" | \"Critical\")","title":"Priority"},"description":"Filter by priority (e.g. \"Low\" | \"Medium\" | \"High\" | \"Critical\")"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Max tasks to return","default":25,"title":"Limit"},"description":"Max tasks to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Pagination offset","default":0,"title":"Offset"},"description":"Pagination offset"},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchTasksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tasks/upload":{"post":{"tags":["tasks"],"summary":"Upload a document and ingest its content as a Catalyst task","description":"Accepts a document file (PDF, DOCX, CSV, TXT) and extracts its content as a normalised Catalyst task proposal.\n\nThe file is processed via the compliance document bridge and the extracted text is also stored in the tenant compliance context for future scanning.\n\nReturns the same shape as POST /tasks/ingest.","operationId":"upload_document_tasks_upload_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}},{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_document_tasks_upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tasks/sla-scan":{"post":{"tags":["tasks"],"summary":"Trigger SLA breach scan","description":"Manually triggers an SLA breach scan for the current tenant.\n\nPrimarily intended for testing and validating SLA-based automations such as Zapier triggers.\n\nDetected breaches emit SLA breach events but do not modify task state.","operationId":"manual_sla_scan_tasks_sla_scan_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/groups/{group_id}/close-children":{"post":{"tags":["groups"],"summary":"Close all child tasks in a group","description":"Marks all child tasks in the specified group as Done.\n\nThis is an explicit closure operation used when a group is ready to be completed. The change is recorded in the tenant’s execution state and a webhook event is emitted.\n\nEmits: group.close_children","operationId":"close_children_groups__group_id__close_children_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}},{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/groups/{group_id}/close-parent":{"post":{"tags":["groups"],"summary":"Close the org-level parent task for a group","description":"Marks the org-level parent task for the specified group as Done.\n\nOnly tasks tagged with '#org-level' are affected. The change is recorded in the tenant’s execution state and a webhook event is emitted.\n\nEmits: group.close_parent","operationId":"close_parent_groups__group_id__close_parent_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}},{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/groups/{group_id}/summary":{"get":{"tags":["groups"],"summary":"Get group summary","description":"Returns a compact summary for the specified group.\n\nIncludes child task totals, number completed, and the group’s parent task id (if present). Used by dashboards and automation tools to determine whether a group is ready to close.","operationId":"group_summary_groups__group_id__summary_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/proposals":{"get":{"tags":["proposals"],"summary":"List proposals","description":"Lists the current proposal items awaiting acceptance or decline.\n\nRead-only â€” used by review UIs or automation tools to decide which proposals to accept.","operationId":"list_proposals_proposals_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/proposals/pending-review":{"get":{"tags":["proposals"],"summary":"List proposals blocked by AI governance review","description":"Returns proposals tagged #review-required that cannot be accepted until a reviewer approves or rejects them via POST /proposals/review.","operationId":"pending_review_proposals_pending_review_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"402":{"description":"Feature not available on current plan."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/proposals/review":{"post":{"tags":["proposals"],"summary":"Approve or reject a review-required proposal","description":"Records a human reviewer decision on a proposal tagged #review-required.\n\n- approve: removes the #review-required block; proposal can now be accepted.\n- reject: marks the proposal #review-rejected and records in ledger.","operationId":"review_proposal_proposals_review_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}},{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalReviewPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Proposal not found in the tenant's proposal queue."},"422":{"description":"Invalid decision value â€” must be 'approve' or 'reject'."}}}},"/proposals/accept":{"post":{"tags":["proposals"],"summary":"Accept proposals","description":"Accepts one or more proposal ids and applies them into the live flow_cycle.\n\nProposals tagged #review-required must be reviewed first via POST /proposals/review.","operationId":"accept_proposals_accept_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"debug","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Debug"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}},{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Accept payload (ids required).","title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"402":{"description":"Feature not available on current plan."},"409":{"description":"One or more proposals are tagged #review-required â€” approve or reject them first."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/proposals/decline":{"post":{"tags":["proposals"],"summary":"Decline proposals","description":"Declines one or more proposal ids without applying them to the live flow_cycle.\n\nDeclines are recorded for auditability and emit proposal.declined for outbound automation.","operationId":"decline_proposals_decline_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}},{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"description":"Idempotency keys to decline","title":"Ids"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ledger":{"get":{"tags":["ledger"],"summary":"Export tenant ledger","description":"Exports the tenant's append-only change ledger (audit trail).\n\nQueries Postgres as the primary durable store, falling back to the Redis\nworking set if Postgres is unavailable.\n\n- format=json (default)\n- format=csv (file download)\n- since=<ISO timestamp> (optional filter)\n\nRead-only. Intended for audit, governance reporting, and operational debugging.","operationId":"export_ledger_ledger_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"json","title":"Format"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compliance/sources":{"get":{"tags":["compliance"],"summary":"List compliance sources","description":"Lists all compliance sources associated with the current tenant.\n\nSources may include uploaded files or linked URLs that have been ingested into the compliance document context.\n\nPrimarily used by dashboards and automation tools (e.g. Zapier) to confirm which documents are available for compliance scanning.","operationId":"list_sources_compliance_sources_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compliance/source":{"post":{"tags":["compliance"],"summary":"Add a compliance source (file or URL)","description":"Adds a new compliance source to the tenant.\n\nThe source may be provided as either:\n- a file upload, or\n- a publicly accessible URL.\n\nThe content is ingested into the compliance document context and becomes available for compliance scanning and analysis.\n\nRequires a plan that allows document uploads.","operationId":"add_compliance_source_compliance_source_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}},{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_add_compliance_source_compliance_source_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["compliance"],"summary":"Remove a compliance source","description":"Removes a compliance source from the tenant by key.\n\nThe key may be a file_id, URL, or label previously returned by the list sources endpoint.\n\nThis operation updates the tenant profile but does not retroactively remove historical compliance findings.","operationId":"remove_compliance_source_compliance_source_delete","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}},{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_remove_compliance_source_compliance_source_delete"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compliance/mode":{"post":{"tags":["compliance"],"summary":"Set compliance enforcement mode","description":"Sets the organisation-level compliance mode.\n\nSupported modes:\n- advisory: findings are reported but not enforced\n- enforce: compliance rules are actively enforced (plan-gated)\n- off: compliance checks are disabled\n\nEnforcement mode may require a higher plan tier or active override.","operationId":"set_mode_compliance_mode_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}},{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_set_mode_compliance_mode_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compliance/scan":{"post":{"tags":["compliance"],"summary":"Run compliance scan","description":"Runs a compliance scan using all ingested compliance sources.\n\nThe scan detects compliance signals, generates findings, and compares results against previous scans to identify new issues.\n\nResults are stored for retrieval and may trigger events for automation and alerting.\n\nRequires scan entitlement.","operationId":"scan_compliance_scan_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}},{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compliance/findings":{"get":{"tags":["compliance"],"summary":"Get compliance findings","description":"Returns the latest compliance findings for the tenant.\n\nFindings are grouped into categories such as conflicts, gaps, and confirmed compliant items.\n\nThis endpoint does not trigger a scan; it returns the most recent results.","operationId":"get_findings_compliance_findings_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compliance/findings/create-tasks":{"post":{"tags":["compliance"],"summary":"Create tasks from compliance findings","description":"Creates Catalyst tasks from selected classes of compliance findings.\n\nThis allows compliance issues (e.g. missing controls or prohibited actions) to be converted into actionable work items.\n\nClass names are matched in a case-insensitive and whitespace-tolerant manner for compatibility with automation tools.","operationId":"create_tasks_from_findings_compliance_findings_create_tasks_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}},{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_create_tasks_from_findings_compliance_findings_create_tasks_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compliance/rules":{"patch":{"tags":["compliance"],"summary":"Upsert custom compliance rules","description":"Creates or updates tenant-specific compliance rules.\n\nCustom rules extend or override baseline compliance behaviour and are evaluated during compliance scans.\n\nEach rule is identified by a stable rule ID and may define patterns, rule type, and remediation guidance.","operationId":"patch_custom_rules_compliance_rules_patch","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}},{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"object","additionalProperties":true},"title":"Custom Rules"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["compliance"],"summary":"List active compliance rules","description":"Returns all compliance rules currently in effect for the tenant.\n\nIncludes rules extracted from uploaded documents, custom rules added via PATCH /compliance/rules, and rules contributed by any activated framework packs (GDPR, SOC 2, ISO 27001, HIPAA, PCI-DSS, EU AI Act, etc.).","operationId":"list_rules_compliance_rules_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compliance/frameworks":{"get":{"tags":["compliance"],"summary":"List available compliance framework packs","description":"Returns all pre-built compliance framework packs available to activate.\n\nEach pack contains curated DENY/REQUIRE/ADVISE rules for a recognised standard (GDPR, SOC 2, ISO 27001, HIPAA, PCI-DSS, EU AI Act, Bribery Act, AML/KYC).\n\nThe `active` field indicates whether the pack is currently enabled for this tenant.","operationId":"list_framework_packs_compliance_frameworks_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compliance/frameworks/{framework_name}":{"post":{"tags":["compliance"],"summary":"Activate a compliance framework pack","description":"Activates a pre-built compliance framework pack for this tenant.\n\nOnce activated, the pack's rules are included in all subsequent compliance scans without requiring document uploads. The next call to POST /compliance/scan will apply these rules against the tenant's tasks.\n\nAvailable framework keys: gdpr, soc2, iso27001, hipaa, pci_dss, eu_ai_act, bribery_act, aml_kyc.","operationId":"activate_framework_pack_compliance_frameworks__framework_name__post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"framework_name","in":"path","required":true,"schema":{"type":"string","title":"Framework Name"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}},{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["compliance"],"summary":"Deactivate a compliance framework pack","description":"Removes a pre-built framework pack from this tenant's active set.\n\nThe pack's rules will no longer be applied in subsequent compliance scans. Rules extracted from uploaded documents are unaffected.","operationId":"deactivate_framework_pack_compliance_frameworks__framework_name__delete","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"framework_name","in":"path","required":true,"schema":{"type":"string","title":"Framework Name"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}},{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compliance/scan/schedule":{"post":{"tags":["compliance"],"summary":"Schedule recurring compliance scans","description":"Schedules automatic compliance scans to run at a configurable interval.\n\nThe schedule is persisted in Redis and picked up by the background worker on the next loop tick.\n\nSet interval_hours=0 to disable the schedule.","operationId":"schedule_scan_compliance_scan_schedule_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_schedule_scan_compliance_scan_schedule_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["compliance"],"summary":"Get current compliance scan schedule","description":"Returns the current scheduled scan configuration for this tenant, if any.","operationId":"get_scan_schedule_compliance_scan_schedule_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compliance/reports/ai-governance":{"get":{"tags":["compliance"],"summary":"AI-governed automation report (evidence pack)","description":"Builds an evidence-style report for AI-governed automation.\n\nIncludes:\n- AI workflow inventory (only workflows opted into built_to_ai_standards)\n- Ledger events linked to those workflows\n- Approval/rejection decisions (where present)\n\nThis report is designed for audit and assurance workflows.\nIt does not assess models; it reports execution controls and traceability.","operationId":"ai_governance_report_compliance_reports_ai_governance_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compliance/ai-conformance-statement":{"get":{"tags":["compliance"],"summary":"AI governance conformance statement","description":"Returns a machine-readable conformance record suitable for regulatory submissions (EU AI Act, ISO 42001, NIST AI RMF).\n\nIncludes: registered workflows, risk levels, model identity, human oversight status, enforcement mode, and audit period.\n\nGated on `can_export_ai_evidence` (Enterprise).","operationId":"ai_conformance_statement_compliance_ai_conformance_statement_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"402":{"description":"AI evidence export not included in this plan."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/subscriptions/checkout":{"post":{"tags":["billing"],"summary":"Create Stripe Checkout session for a subscription plan (no API key required)","description":"Creates a Stripe Checkout Session for a subscription plan.\n\nThis endpoint is intended for your marketing site / purchase flow.\nIt does NOT require an API key.\n\nThe success_url will include ?session_id={CHECKOUT_SESSION_ID} so the site can call /billing/key/reveal and display the API key exactly once.","operationId":"create_subscription_checkout_billing_subscriptions_checkout_post","parameters":[{"name":"plan_id","in":"query","required":true,"schema":{"type":"string","title":"Plan Id"}},{"name":"email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/key/reveal":{"get":{"tags":["billing"],"summary":"Reveal API key once after Stripe purchase (success page flow)","description":"Given a Stripe Checkout session_id, verifies payment completion and reveals a newly-issued API key exactly once.\n\nThis is designed for a headless marketing site:\nStripe success page -> calls this endpoint -> shows 'write this down' API key screen.\n\nSecurity model:\n- No plaintext API key is stored long-term.\n- We store only the hashed key on the tenant.\n- If a key already exists, we refuse to reveal a new one here (use admin rotate later).","operationId":"reveal_api_key_once_billing_key_reveal_get","parameters":[{"name":"session_id","in":"query","required":true,"schema":{"type":"string","description":"Stripe Checkout Session ID (cs_...)","title":"Session Id"},"description":"Stripe Checkout Session ID (cs_...)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/bolt-ons/checkout":{"post":{"tags":["billing"],"summary":"Create Stripe Checkout session for a PAYG bolt-on","description":"Creates a Stripe Checkout session URL for a pay-as-you-go (PAYG) bolt-on purchase.\n\nAuth:\n- Requires X-API-Key for the tenant.\n\nBehaviour:\n- Resolves the tenant from entitlements.\n- Ensures the tenant has a Stripe customer (creates one if missing).\n- Creates a one-time payment Checkout session for the requested bolt-on.\n\nInputs:\n- bolt_key: The bolt-on identifier (must exist in the configured bolt-on price map).\n- quantity: Number of units (clamped to 1–100).\n\nResponse:\n- checkout_url: A Stripe-hosted Checkout URL the caller can redirect the user to.","operationId":"create_bolt_on_checkout_billing_bolt_ons_checkout_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"bolt_key","in":"query","required":true,"schema":{"type":"string","title":"Bolt Key"}},{"name":"quantity","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Quantity"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/customer-portal":{"post":{"tags":["billing"],"summary":"Create Stripe Customer Portal session","description":"Returns a Stripe-hosted Customer Portal URL where the tenant can self-serve upgrade, downgrade, or cancel their subscription.\n\nWhen the user makes a plan change in the portal, Stripe fires a `customer.subscription.updated` webhook and Catalyst updates the tenant's plan automatically.\n\nRequires X-API-Key.","operationId":"create_customer_portal_session_billing_customer_portal_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"return_url","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/graph/summary/org":{"get":{"tags":["graph"],"summary":"Get organisation execution summary (safe AI)","description":"Returns a safe, system-level narrative summary of the tenant's current execution state.\n\nOptionally filtered by owner_group to show team-specific metrics.\n\nThe summary is derived exclusively from Catalyst's normalised and aggregated data (execution graph, metrics, velocity, and governance views). No raw inbox content or personal attribution is included.\n\nKey characteristics:\n- Read-only\n- Plan-gated (requires graph/dashboard entitlement)\n- Uses a safety-constrained AI prompt\n- Focuses on structure, workload, flow, and risk – not individuals\n\nThis endpoint is well-suited for dashboards, executive reporting, and automation tools such as Zapier or Make.","operationId":"get_org_summary_graph_summary_org_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"owner_group","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional filter: team/department name (e.g. 'Finance', 'Production', 'Sales'). If provided, returns summary for that group only. If None, returns org-wide summary.","title":"Owner Group"},"description":"Optional filter: team/department name (e.g. 'Finance', 'Production', 'Sales'). If provided, returns summary for that group only. If None, returns org-wide summary."},{"name":"time_window","in":"query","required":false,"schema":{"type":"string","description":"Logical reporting window for the summary (e.g. last_7_days, last_30_days).","default":"last_7_days","title":"Time Window"},"description":"Logical reporting window for the summary (e.g. last_7_days, last_30_days)."},{"name":"extra_query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional guidance to bias the summary focus (e.g. compliance, delivery risk).","title":"Extra Query"},"description":"Optional guidance to bias the summary focus (e.g. compliance, delivery risk)."},{"name":"debug","in":"query","required":false,"schema":{"type":"boolean","description":"Include raw structured snapshot data for debugging (off by default).","default":false,"title":"Debug"},"description":"Include raw structured snapshot data for debugging (off by default)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/events":{"get":{"tags":["webhooks"],"summary":"List available webhook events","description":"Returns the list of webhook events this tenant is allowed to subscribe to.\n\nThe returned events are filtered based on:\n- The tenant’s plan features (must include outbound webhooks)\n- Governance entitlements (for graph, SLA, and risk events)\n- Compliance entitlements (for compliance-related events)\n\nEach event includes a human-readable label, category, description, and (when available) a sample payload for automation tools such as Zapier or Make.","operationId":"list_allowed_events_webhooks_events_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WebhookEventMeta"},"type":"array","title":"Response List Allowed Events Webhooks Events Get"}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/webhooks":{"get":{"tags":["webhooks"],"summary":"List webhook subscriptions","description":"Lists all active and inactive webhook subscriptions for the current tenant.\n\nEach subscription represents a registered callback URL that will receive outbound webhook events when the corresponding event occurs.\n\nThis endpoint is used by dashboards and automation tools to display current webhook configuration.","operationId":"list_subscriptions_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WebhookSubscriptionOut"},"type":"array","title":"Response List Subscriptions Webhooks Get"}}}}},"security":[{"CatalystTenantApiKey":[]}]},"post":{"tags":["webhooks"],"summary":"Create webhook subscription","description":"Creates a new outbound webhook subscription for the current tenant.\n\nSafety and gating:\n- The tenant must have the webhooks feature enabled in their plan.\n- The requested event must be allowed for the tenant’s entitlements.\n- The callback URL is validated to prevent SSRF and internal access.\n\nEach subscription is assigned a per-tenant secret used to sign outbound webhook requests. `platform` is optional and is used to label the downstream integration target. If omitted, Catalyst treats the subscription as `generic`.","operationId":"create_subscription_webhooks_post","responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionOut"}}}},"402":{"description":"Webhooks not included in current plan — upgrade to enable outbound webhook delivery."},"409":{"description":"A subscription for this event and callback URL already exists for this tenant."},"422":{"description":"Invalid callback URL (must be HTTPS) or unrecognised event name."}},"security":[{"CatalystTenantApiKey":[]}]}},"/webhooks/{sub_id}":{"delete":{"tags":["webhooks"],"summary":"Deactivate webhook subscription","description":"Deactivates an existing webhook subscription for the current tenant.\n\nThe subscription record is retained for auditability, but no further outbound webhook events will be delivered to the callback URL.\n\nThis operation is reversible by creating a new subscription for the same event.","operationId":"deactivate_subscription_webhooks__sub_id__delete","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"sub_id","in":"path","required":true,"schema":{"type":"string","title":"Sub Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Subscription not found or does not belong to the authenticated tenant."},"402":{"description":"Webhooks not included in current plan."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/digest/subscribe":{"post":{"tags":["webhooks"],"summary":"Subscribe to scheduled digest webhooks","description":"Creates a scheduled digest subscription. Catalyst will call your callback_url on the requested schedule (daily or weekly) with a summary of recent activity.\n\nBacked by Redis. No database row is created.","operationId":"create_digest_subscription_webhooks_digest_subscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigestSubscribeRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/webhooks/digest/{sub_id}":{"delete":{"tags":["webhooks"],"summary":"Cancel a digest subscription","description":"Removes a scheduled digest webhook subscription by ID.","operationId":"delete_digest_subscription_webhooks_digest__sub_id__delete","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"sub_id","in":"path","required":true,"schema":{"type":"string","title":"Sub Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pro-insights/org":{"get":{"tags":["pro_ai"],"summary":"Get organisation-level Pro AI insights","description":"Returns an AI-generated narrative summary of the organisation’s execution and governance state.\n\nThe summary is derived exclusively from Catalyst’s normalised, structured execution data (tasks, flow cycles, governance signals) and does not invent or mutate source data.\n\nQuery options allow the caller to control the logical time window and optionally bias the narrative toward a specific concern (e.g. compliance, delivery risk, or operational bottlenecks).\n\nThis endpoint is read-only and requires a plan that includes the Pro AI feature.","operationId":"get_org_pro_ai_insights_pro_insights_org_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"time_window","in":"query","required":false,"schema":{"type":"string","description":"Logical reporting window (e.g. 'last_7_days', 'last_30_days').","default":"last_7_days","title":"Time Window"},"description":"Logical reporting window (e.g. 'last_7_days', 'last_30_days')."},{"name":"extra_query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional guidance to bias the narrative focus.","title":"Extra Query"},"description":"Optional guidance to bias the narrative focus."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pro-insights/client/{client_id}":{"get":{"tags":["pro_ai"],"summary":"Get client-level Pro AI insights","description":"Returns an AI-generated narrative for a specific client's workload, health, and operational risk exposure.\n\nDerived from client_influence and risk_heatmap governance views. Framed as system-level analysis — never individual attribution.\n\nRequires Enterprise Pro plan.","operationId":"get_client_pro_ai_insights_pro_insights_client__client_id__get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"time_window","in":"query","required":false,"schema":{"type":"string","description":"Reporting window.","default":"last_30_days","title":"Time Window"},"description":"Reporting window."},{"name":"extra_query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional narrative focus.","title":"Extra Query"},"description":"Optional narrative focus."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pro-insights/owner/{owner}":{"get":{"tags":["pro_ai"],"summary":"Get owner workload Pro AI insights","description":"Returns an AI-generated narrative for a specific owner's workload profile.\n\nCovers task mix, domain distribution, and risk exposure — framed as system support analysis, never as individual evaluation. MASC-L3 compliant.\n\nRequires Enterprise Pro plan.","operationId":"get_owner_pro_ai_insights_pro_insights_owner__owner__get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","title":"Owner"}},{"name":"time_window","in":"query","required":false,"schema":{"type":"string","description":"Reporting window.","default":"last_14_days","title":"Time Window"},"description":"Reporting window."},{"name":"extra_query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional narrative focus.","title":"Extra Query"},"description":"Optional narrative focus."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pro-insights/risk":{"get":{"tags":["pro_ai"],"summary":"Get risk and compliance Pro AI insights","description":"Returns an AI-generated risk and compliance narrative across the organisation.\n\nSynthesises the risk_heatmap and compliance_web governance views. Highlights hotspots, domain-level patterns, and process mitigations.\n\nRequires Enterprise Pro plan.","operationId":"get_risk_pro_ai_insights_pro_insights_risk_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"time_window","in":"query","required":false,"schema":{"type":"string","description":"Reporting window.","default":"last_30_days","title":"Time Window"},"description":"Reporting window."},{"name":"extra_query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional narrative focus.","title":"Extra Query"},"description":"Optional narrative focus."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pro-insights/thread/{thread_id}":{"get":{"tags":["pro_ai"],"summary":"Get project thread Pro AI insights","description":"Returns an AI-generated status summary for a specific workflow cluster or project thread.\n\nCovers completed work, remaining tasks, risks, and suggested next actions. thread_id is a group_id or source_thread identifier.\n\nRequires Enterprise Pro plan.","operationId":"get_thread_pro_ai_insights_pro_insights_thread__thread_id__get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"extra_query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional narrative focus.","title":"Extra Query"},"description":"Optional narrative focus."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/zapier/samples/findings":{"get":{"tags":["zapier"],"summary":"Sample Findings","operationId":"sample_findings_zapier_samples_findings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/zapier/samples/events":{"get":{"tags":["zapier"],"summary":"Zapier: Sample event payloads","description":"Returns sample event payloads for Zapier trigger setup (performList fallback). Attempts to return real events from the tenant's ledger; falls back to typed synthetic samples.","operationId":"sample_events_zapier_samples_events_get","responses":{"200":{"description":"Always returns data — real ledger events plus typed synthetic fallbacks. Never 404.","content":{"application/json":{"schema":{}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/zapier/samples/sla":{"get":{"tags":["zapier"],"summary":"Sample Sla","operationId":"sample_sla_zapier_samples_sla_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/zapier/samples/risk":{"get":{"tags":["zapier"],"summary":"Sample Risk","operationId":"sample_risk_zapier_samples_risk_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/zapier/samples/rules":{"get":{"tags":["zapier"],"summary":"Sample Rules","operationId":"sample_rules_zapier_samples_rules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/zapier/samples/bottleneck":{"get":{"tags":["zapier"],"summary":"Sample Bottleneck","operationId":"sample_bottleneck_zapier_samples_bottleneck_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/zapier/ingest/tasks":{"post":{"tags":["zapier"],"summary":"Zapier: Send Task to Catalyst (ingest)","description":"Zapier wrapper around the canonical ingest engine.\nForces touched_by.app='zapier' and returns a Zapier-friendly response.\nAlso surfaces a best-effort concrete task object for downstream steps.","operationId":"zapier_ingest_tasks_zapier_ingest_tasks_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"debug","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Debug"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}},{"name":"X-User-TZ","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Tz"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"Either {items:[...], domain?} or legacy list of items","title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/zapier/tasks/{task_id}":{"patch":{"tags":["zapier"],"summary":"Zapier: Update Task","description":"Zapier wrapper over canonical PATCH /tasks/{task_id}, with Zapier-shaped output + timestamps.","operationId":"zapier_update_task_zapier_tasks__task_id__patch","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","description":"Catalyst task id","title":"Task Id"},"description":"Catalyst task id"},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Fields to update (title, details, owner, due_at, priority, domain, stage, status, tags, etc.)","title":"Patch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/zapier/tasks/bulk-update":{"post":{"tags":["zapier"],"summary":"Zapier: Bulk Update Tasks","description":"Zapier wrapper over canonical POST /tasks/bulk-update (maps field names to Zapier samples).","operationId":"zapier_bulk_update_tasks_zapier_tasks_bulk_update_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"BulkUpdateRequest shape: {filter:{...}, patch:{...}}","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/zapier/tasks/search":{"get":{"tags":["zapier"],"summary":"Zapier: Search Tasks","description":"Zapier wrapper over canonical GET /tasks/search (enriches with full state where possible).","operationId":"zapier_search_tasks_zapier_tasks_search_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","description":"Keyword query","title":"Q"},"description":"Keyword query"},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"}},{"name":"priority","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"}},{"name":"stage","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage"}},{"name":"owner","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/zapier/groups/close-children":{"post":{"tags":["zapier"],"summary":"Zapier: Close Group Children","description":"Marks all tasks with group_id as done (excluding a parent task if provided).","operationId":"zapier_close_group_children_zapier_groups_close_children_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}},{"name":"X-User-TZ","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Tz"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"{group_id:'...', parent_task_id?:'...'}","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/zapier/groups/close-parent":{"post":{"tags":["zapier"],"summary":"Zapier: Close Group Parent","description":"Marks the parent task as done (parent_task_id required).","operationId":"zapier_close_group_parent_zapier_groups_close_parent_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"{group_id:'...', parent_task_id:'...'}","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/zapier/compliance/source":{"post":{"tags":["zapier"],"summary":"Zapier: Add Compliance Document","operationId":"zapier_add_compliance_document_zapier_compliance_source_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Canonical body: {url: 'https://...', label?: '...'}","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["zapier"],"summary":"Zapier: Remove Compliance Document","operationId":"zapier_remove_compliance_document_zapier_compliance_source_delete","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Canonical body: {key: '<file_id>'}","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/zapier/compliance/mode":{"post":{"tags":["zapier"],"summary":"Zapier: Set Compliance Mode","operationId":"zapier_set_compliance_mode_zapier_compliance_mode_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Canonical body: {mode: 'off'|'advisory'|'enforce'}","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/zapier/compliance/scan":{"post":{"tags":["zapier"],"summary":"Zapier: Run Compliance Scan","operationId":"zapier_run_compliance_scan_zapier_compliance_scan_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/zapier/compliance/findings":{"get":{"tags":["zapier"],"summary":"Zapier: Get Compliance Findings","description":"Leaves canonical /compliance/findings untouched. This endpoint flattens findings for Zapier.","operationId":"zapier_get_compliance_findings_zapier_compliance_findings_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/zapier/compliance/findings/create-tasks":{"post":{"tags":["zapier"],"summary":"Zapier: Create Compliance Tasks From Findings","operationId":"zapier_create_compliance_tasks_from_findings_zapier_compliance_findings_create_tasks_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/zapier/compliance/frameworks":{"get":{"tags":["zapier"],"summary":"Zapier: List Compliance Framework Packs","operationId":"zapier_list_compliance_frameworks_zapier_compliance_frameworks_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/zapier/compliance/frameworks/{framework_name}":{"post":{"tags":["zapier"],"summary":"Zapier: Activate Compliance Framework Pack","operationId":"zapier_activate_compliance_framework_zapier_compliance_frameworks__framework_name__post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"framework_name","in":"path","required":true,"schema":{"type":"string","title":"Framework Name"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["zapier"],"summary":"Zapier: Deactivate Compliance Framework Pack","operationId":"zapier_deactivate_compliance_framework_zapier_compliance_frameworks__framework_name__delete","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"framework_name","in":"path","required":true,"schema":{"type":"string","title":"Framework Name"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/zapier/compliance/rules":{"get":{"tags":["zapier"],"summary":"Zapier: List Active Compliance Rules","operationId":"zapier_list_compliance_rules_zapier_compliance_rules_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/zapier/org/summary":{"get":{"tags":["zapier"],"summary":"Zapier: Get AI-Safe Org Summary","description":"Returns a governed org summary shaped for Zapier. Always returns deterministic highlights. If Pro AI is enabled for the tenant, also returns an optional AI-assisted narrative.","operationId":"zapier_get_org_summary_zapier_org_summary_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"time_window","in":"query","required":false,"schema":{"type":"string","description":"Optional reporting window (e.g. 'last_7_days', 'last_30_days').","default":"last_7_days","title":"Time Window"},"description":"Optional reporting window (e.g. 'last_7_days', 'last_30_days')."},{"name":"extra_query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional guidance to bias the narrative focus (Pro AI only).","title":"Extra Query"},"description":"Optional guidance to bias the narrative focus (Pro AI only)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/zapier/ledger/export":{"get":{"tags":["zapier"],"summary":"Zapier: Export Ledger","operationId":"zapier_export_ledger_zapier_ledger_export_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(json|csv)$","default":"json","title":"Format"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO timestamp filter (inclusive)","title":"Since"},"description":"ISO timestamp filter (inclusive)"},{"name":"ai_standards_only","in":"query","required":false,"schema":{"type":"boolean","description":"If true, include only AI-involved entries for workflows opted into AI standards.","default":false,"title":"Ai Standards Only"},"description":"If true, include only AI-involved entries for workflows opted into AI standards."},{"name":"include_ai_standards_summary","in":"query","required":false,"schema":{"type":"boolean","description":"If true, include AI standards evidence summary (only for opted-in workflows).","default":false,"title":"Include Ai Standards Summary"},"description":"If true, include AI standards evidence summary (only for opted-in workflows)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/zapier/tenant/industry":{"post":{"tags":["zapier"],"summary":"Zapier: Set Industry","operationId":"zapier_set_industry_zapier_tenant_industry_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body","description":"Canonical body: {industry:'...'} or {industries:[...]}"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/zapier/workflow/governance":{"post":{"tags":["zapier"],"summary":"Zapier: Configure Workflow Governance","description":"Configure governance policy for a specific workflow_id (Zap, automation, integration flow). This writes to tenant.rules.ai_workflows[workflow_id] and is evaluated at execution time.","operationId":"zapier_configure_workflow_governance_zapier_workflow_governance_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body","description":"{workflow_id, ai_standards, risk_level?, mode?, model_id?, ...}"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/zapier/ai-conformance-statement":{"get":{"tags":["zapier"],"summary":"Zapier: Get AI Conformance Statement","description":"Machine-readable AI governance conformance record for regulatory submissions. Enterprise only.","operationId":"zapier_get_ai_conformance_statement_zapier_ai_conformance_statement_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/zapier/tenant/setup":{"post":{"tags":["zapier"],"summary":"Zapier: Initialise Catalyst Tenant","operationId":"zapier_setup_tenant_zapier_tenant_setup_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/zapier/tenant/staff/sync":{"post":{"tags":["zapier"],"summary":"Zapier: Sync Staff Directory","operationId":"zapier_sync_staff_zapier_tenant_staff_sync_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/zapier/tenant/dashboard":{"get":{"tags":["zapier"],"summary":"Zapier: Get Governance Dashboard","operationId":"zapier_get_governance_dashboard_zapier_tenant_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/zapier/tenant/usage":{"get":{"tags":["zapier"],"summary":"Zapier: Get Usage & Plan Limits","description":"Returns current ingest usage, monthly cap, and remaining quota for the authenticated tenant.\n\nAlso surfaces the active plan and current dedupe/compliance modes.\n\nUseful in Zapier actions that show the user their current usage or trigger upgrade workflows.","operationId":"zapier_get_usage_zapier_tenant_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"402":{"description":"Usage data not available on the current plan."}},"security":[{"CatalystTenantApiKey":[]}]}},"/agents.md":{"get":{"tags":["agents"],"summary":"Get tenant-specific AGENTS.md (AI agent manifest)","description":"Returns a dynamically generated AGENTS.md document for this tenant.\n\nThe document describes the tenant’s current capabilities, entitlements, and operational constraints in a format designed for AI agents and automation tools.\n\nThis endpoint is read-only, supports ETag-based caching, and can be scoped to specific functional areas (tasks, compliance, webhooks).\n\nCommon consumers include AI assistants (Claude, Cursor), agent runtimes, and governance-aware automation systems.","operationId":"get_agents_md_agents_md_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"scope","in":"query","required":false,"schema":{"type":"string","description":"Filter sections: org | tasks | compliance | webhooks","default":"org","title":"Scope"},"description":"Filter sections: org | tasks | compliance | webhooks"},{"name":"mode","in":"query","required":false,"schema":{"type":"string","description":"Permission level: safe (redacted) | standard | power","default":"standard","title":"Mode"},"description":"Permission level: safe (redacted) | standard | power"}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/agent.md":{"get":{"tags":["agents"],"summary":"Well-known AGENTS.md endpoint (AI tool discovery)","description":"Alias for /agents.md using the .well-known convention.\n\nSome AI tools probe this path automatically for agent capability discovery. Returns the organisation scope in standard mode.","operationId":"get_agent_md_wellknown__well_known_agent_md_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/lite/workflows/governance":{"post":{"tags":["lite"],"summary":"Lite: Register or update workflow governance (alias)","operationId":"lite_workflow_governance_lite_workflows_governance_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/lite/workflows/register":{"post":{"tags":["lite"],"summary":"Lite: Register or update workflow governance","operationId":"lite_workflow_governance_lite_workflows_register_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/lite/workflows":{"get":{"tags":["lite"],"summary":"Lite: List registered workflows","operationId":"lite_list_workflows_lite_workflows_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/lite/events":{"post":{"tags":["lite"],"summary":"Lite: Append governance envelope event","operationId":"lite_events_lite_events_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lite/audit/export":{"get":{"tags":["lite"],"summary":"Lite: Export workflow audit slice (alias)","operationId":"lite_audit_export_lite_audit_export_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"workflow_id","in":"query","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(json|csv)$","default":"json","title":"Format"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}},{"name":"ai_standards_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Ai Standards Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lite/workflows/{workflow_id}/audit":{"get":{"tags":["lite"],"summary":"Lite: Export workflow audit slice","operationId":"lite_audit_export_lite_workflows__workflow_id__audit_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(json|csv)$","default":"json","title":"Format"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}},{"name":"ai_standards_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Ai Standards Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lite/trust/workflow/{workflow_id}":{"get":{"tags":["lite"],"summary":"Lite: Workflow trust summary (alias)","operationId":"lite_trust_workflow_lite_trust_workflow__workflow_id__get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Window Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lite/workflows/{workflow_id}/trust":{"get":{"tags":["lite"],"summary":"Lite: Workflow trust summary","operationId":"lite_trust_workflow_lite_workflows__workflow_id__trust_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Window Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lite/public/workflows/{workflow_id}":{"get":{"tags":["lite"],"summary":"Lite: Public trust page payload","operationId":"lite_public_workflow_trust_lite_public_workflows__workflow_id__get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Window Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lite/public/workflows/{workflow_id}/badge":{"get":{"tags":["lite"],"summary":"Lite: Public trust badge payload","operationId":"lite_public_workflow_badge_lite_public_workflows__workflow_id__badge_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Window Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lite/ops/metrics":{"get":{"tags":["lite"],"summary":"Lite: In-memory observability snapshot","operationId":"lite_ops_metrics_lite_ops_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/lite/adapters/openclaw/health":{"get":{"tags":["lite"],"summary":"Lite: OpenClaw adapter capability descriptor","operationId":"lite_openclaw_adapter_health_lite_adapters_openclaw_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/stripe/webhook":{"post":{"tags":["stripe"],"summary":"Stripe webhook receiver","description":"Receives Stripe webhook events and updates tenant billing state.\n\nSecurity:\n- Verifies Stripe signature using the configured webhook secret.\n- Requires the raw request body and the 'stripe-signature' header.\n\nBehaviour:\n- Enforces idempotency by recording each Stripe event id once.\n- Dispatches supported event types into internal billing handlers.\n\nNotes:\n- This endpoint is called by Stripe (not by users).\n- Configure STRIPE_WEBHOOK_SECRET and STRIPE_SECRET_KEY in the environment.","operationId":"stripe_webhook_stripe_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/metrics/global":{"post":{"tags":["metrics"],"summary":"Get global operational metrics","description":"Returns high-level, cross-tenant operational aggregates.\n\nThis endpoint is intended for internal monitoring, diagnostics, and platform-level visibility rather than tenant dashboards.\n\nMetrics may include totals, averages, and system-wide counts derived from all tenants.\n\nNote: This endpoint may be restricted to admin credentials in the future.","operationId":"get_global_metrics_metrics_global_post","parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/health":{"get":{"tags":["admin"],"summary":"Admin health check","description":"Verifies admin authentication and returns a basic service health response.\n\nRequires a valid admin JWT (Authorization: Bearer <token>) and may enforce an IP allow-list if ALLOWED_ADMIN_IPS is configured.","operationId":"admin_health_admin_health_get","parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/auth/issue":{"post":{"tags":["admin"],"summary":"Issue admin JWT (founder bootstrap)","description":"Issues a short-lived admin JWT for operator access.\n\nSecurity:\n- Requires X-Admin-Bootstrap header matching ADMIN_BOOTSTRAP_SECRET\n- Returns a JWT usable with Authorization: Bearer <token>\n\nThis is intended for founder/operator bootstrapping until a full admin user system exists.","operationId":"issue_admin_token_admin_auth_issue_post","parameters":[{"name":"X-Admin-Bootstrap","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Bootstrap"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueAdminTokenRequest","default":{"sub":"founder"}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Issue Admin Token Admin Auth Issue Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tenants":{"get":{"tags":["admin"],"summary":"List tenants (admin)","description":"Returns a paginated-style summary list of all tenants in the system.\n\nIncludes tenant metadata such as company name, admin email, industry, created_at, rules size, and whether an API key is configured.\n\nAdmin-only endpoint.","operationId":"list_tenants_admin_tenants_get","parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Tenants Admin Tenants Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tenants/{tenant_id}":{"get":{"tags":["admin"],"summary":"Get tenant details (admin)","description":"Returns full tenant record details for a specific tenant_id.\n\nSensitive fields are not returned in plaintext (e.g., API key is not exposed).\n\nAdmin-only endpoint.","operationId":"get_tenant_admin_tenants__tenant_id__get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Tenant Admin Tenants  Tenant Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tenants/{tenant_id}/rules":{"post":{"tags":["admin"],"summary":"Patch tenant rules (admin)","description":"Applies a partial update (patch) to a tenant's rules configuration.\n\nUse this to update tenant-specific routing, normalisation, and governance rules.\n\nAdmin-only endpoint.","operationId":"patch_rules_admin_tenants__tenant_id__rules_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Patch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tenants/{tenant_id}/set-industry":{"post":{"tags":["admin"],"summary":"Set tenant industry (admin)","description":"Sets the tenant's industry classification.\n\nIndustry is used to determine default rule pack behaviour and merged rule outputs.\n\nAdmin-only endpoint.","operationId":"set_industry_admin_tenants__tenant_id__set_industry_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tenants/{tenant_id}/rules/merged":{"get":{"tags":["admin"],"summary":"Get merged effective rules (admin)","description":"Returns the effective rule configuration currently in force for a tenant.\n\nThis includes industry pack rules plus tenant-specific overrides, returned as a single merged view.\n\nAdmin-only endpoint.","operationId":"merged_rules_admin_tenants__tenant_id__rules_merged_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tenants/{tenant_id}/rules/raw":{"get":{"tags":["admin"],"summary":"Get raw tenant rules (admin)","description":"Returns the tenant's raw stored rules configuration (tenant overrides only).\n\nDoes not include industry pack merging. Useful for debugging tenant configuration.\n\nAdmin-only endpoint.","operationId":"raw_rules_admin_tenants__tenant_id__rules_raw_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tenants/{tenant_id}/rotate-key":{"post":{"tags":["admin"],"summary":"Rotate tenant API key (admin, sensitive)","description":"Rotates a tenant's API key.\n\nThe new API key is returned ONCE and must be stored securely. Existing integrations using the old key will stop working until updated.\n\nAdmin-only endpoint.","operationId":"rotate_key_admin_tenants__tenant_id__rotate_key_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/webhooks/stats":{"get":{"tags":["admin"],"summary":"Get webhook delivery stats (admin)","description":"Returns webhook queue and delivery statistics.\n\nAlways returns global stats across all tenants. If tenant_id is provided, also returns tenant-scoped stats.\n\nAdmin-only endpoint.","operationId":"admin_webhook_stats_admin_webhooks_stats_get","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Webhook Stats Admin Webhooks Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/webhooks/dlq":{"get":{"tags":["admin"],"summary":"List webhook DLQ entries (admin)","description":"Lists recent Dead Letter Queue (DLQ) entries for webhook deliveries.\n\nUse tenant_id to filter results to a single tenant. limit defaults to 50 and is capped at 200.\n\nAdmin-only endpoint.","operationId":"admin_webhook_dlq_admin_webhooks_dlq_get","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Webhook Dlq Admin Webhooks Dlq Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tenants/{tenant_id}/snapshots":{"get":{"tags":["admin"],"summary":"List tenant snapshots (admin)","description":"Lists available state snapshots for a tenant.\n\nSnapshots allow controlled rollback of the tenant execution state for recovery and audit.\n\nAdmin-only endpoint.","operationId":"list_tenant_snapshots_admin_tenants__tenant_id__snapshots_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tenants/{tenant_id}/snapshots/restore":{"post":{"tags":["admin"],"summary":"Restore tenant snapshot (admin, sensitive)","description":"Restores a tenant to a previous snapshot.\n\nA safety snapshot of the current state is created automatically before restore, so rollback-of-rollback is possible.\n\nThis operation is locked for the full restore sequence to prevent concurrent writes.\n\nAdmin-only endpoint.","operationId":"admin_restore_snapshot_admin_tenants__tenant_id__snapshots_restore_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreSnapshotRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tasks/{task_id}/correct":{"post":{"tags":["learning"],"summary":"Submit a task correction (active learning)","description":"Captures a user correction to a normalised task and updates the tenant’s learned rule base.\n\nFlow:\n1) Loads the current task state\n2) Applies the submitted field corrections\n3) Learns rules from the before/after diff\n4) Persists the updated execution state\n5) Returns learning stats and rules generated\n\nDesigned for feedback loops where humans correct classification (owner, domain, stage, priority).","operationId":"correct_task_api_tasks__task_id__correct_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCorrectionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learning/stats":{"get":{"tags":["learning"],"summary":"Get learning statistics","description":"Returns learning statistics for the current tenant.\n\nIncludes counts of corrections, learned rules, confidence metrics, and estimated accuracy.\n\nRead-only endpoint; does not modify learning state.","operationId":"get_stats_api_learning_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LearningStatsResponse"}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/api/learning/rules":{"get":{"tags":["learning"],"summary":"List learned tenant rules","description":"Returns learned tenant-specific rules derived from prior task corrections.\n\nQuery filters:\n- rule_type: Filter by rule type (e.g. owner, priority, domain, stage)\n- min_confidence: Only include rules above this confidence threshold\n\nReturned rules are sanitised for API usage and include pattern, value, confidence, and correction counts.","operationId":"get_rules_api_learning_rules_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"rule_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Type"}},{"name":"min_confidence","in":"query","required":false,"schema":{"type":"number","default":0.0,"title":"Min Confidence"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learning/rules/summary":{"get":{"tags":["learning"],"summary":"Plain-English rule summary","description":"Returns a list of plain-English sentences describing the tenant's learned rules.\n\nUseful for audit dashboards and Zapier actions that surface 'what Catalyst has learned'.\n\nOnly includes active rules (not quarantined) above a minimum confidence floor.","operationId":"get_rules_summary_api_learning_rules_summary_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"min_confidence","in":"query","required":false,"schema":{"type":"number","default":0.5,"title":"Min Confidence"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Rules Summary Api Learning Rules Summary Get"}}}},"402":{"description":"Active learning not available on the current plan."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learning/promote":{"post":{"tags":["learning"],"summary":"Promote learned rules to an industry pack candidate set","description":"Promotes high-confidence learned tenant rules into an industry promotion candidate set.\n\nPromotion criteria are configurable via query parameters, including minimum confidence and minimum correction count. Some rule types require multi-tenant confirmation.\n\nIf rules are promoted, emits a rule.promotion event for automation workflows.\n\nNote: This promotes candidates for shared use; it does not automatically overwrite other tenants.","operationId":"promote_rules_api_learning_promote_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"industry","in":"query","required":false,"schema":{"type":"string","default":"generic","title":"Industry"}},{"name":"min_confidence","in":"query","required":false,"schema":{"type":"number","default":0.95,"title":"Min Confidence"}},{"name":"min_correction_count","in":"query","required":false,"schema":{"type":"integer","default":3,"title":"Min Correction Count"}},{"name":"min_tenants_for_owner_rules","in":"query","required":false,"schema":{"type":"integer","default":3,"title":"Min Tenants For Owner Rules"}},{"name":"short_pattern_char_limit","in":"query","required":false,"schema":{"type":"integer","default":18,"title":"Short Pattern Char Limit"}},{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learning/rules/{rule_hash}":{"delete":{"tags":["learning"],"summary":"Delete a learned rule","description":"Deletes a learned rule from the tenant rule base using its rule_hash.\n\nUsed to remove false-positive rules or manually curate the learned rule set.\n\nRecords the deletion in the tenant ledger for auditability.","operationId":"delete_rule_api_learning_rules__rule_hash__delete","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"rule_hash","in":"path","required":true,"schema":{"type":"string","title":"Rule Hash"}},{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learning/rules/{rule_hash}/approve":{"post":{"tags":["learning"],"summary":"Approve a learned rule for active use","description":"Marks a learned tenant rule as approved, promoting it from candidate to active.\n\nApproved rules are applied during task normalisation on subsequent ingests.\nThe decision is recorded in the tenant ledger.","operationId":"approve_rule_api_learning_rules__rule_hash__approve_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"rule_hash","in":"path","required":true,"schema":{"type":"string","title":"Rule Hash"}},{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learning/rules/{rule_hash}/reject":{"post":{"tags":["learning"],"summary":"Reject a learned rule (quarantine)","description":"Marks a learned tenant rule as rejected and quarantined.\n\nRejected rules are excluded from normalisation. If the rule has accumulated false-positive signals it will remain quarantined until manually cleared.","operationId":"reject_rule_api_learning_rules__rule_hash__reject_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"rule_hash","in":"path","required":true,"schema":{"type":"string","title":"Rule Hash"}},{"name":"reason","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learning/jargon/proposals":{"post":{"tags":["learning"],"summary":"Build tenant jargon proposals","description":"Builds TENANT_JARGON proposal items from recent learning ledger entries.\n\nTypical usage:\n- Run periodically (daily cron, Zapier schedule, or admin click)\n- Review proposals via /proposals\n- Accept/decline to curate tenant-specific language normalisation\n\nThis endpoint is deterministic and limited per run to avoid proposal flooding.","operationId":"build_jargon_proposals_endpoint_api_learning_jargon_proposals_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-Source-App","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-App"}},{"name":"X-Touched-By-Tool","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Tool"}},{"name":"X-Touched-By-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-User"}},{"name":"X-Touched-By-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Touched-By-Agent"}},{"name":"X-External-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-External-User-Id"}},{"name":"X-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Run-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildJargonProposalsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/weekly-summary":{"get":{"tags":["analytics"],"summary":"Weekly activity summary","description":"Returns a 7-day rollup of tenant activity derived from the execution ledger.\n\nIncludes: total ingests, accepted/declined proposals, domain breakdown, priority breakdown, and average risk score. No LLM calls — fully deterministic.","operationId":"weekly_summary_analytics_weekly_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Weekly Summary Analytics Weekly Summary Get"}}}},"402":{"description":"Analytics not available on the current plan."}},"security":[{"CatalystTenantApiKey":[]}]}},"/ops/health":{"get":{"tags":["ops"],"summary":"Operational health check (operator)","description":"Operator-only health signals: Redis availability, DLQ depth, DB-backed webhook queue stats, and worker heartbeat status.","operationId":"ops_health_ops_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CatalystOperatorKey":[]}]}},"/ops/self-heal-status":{"get":{"tags":["ops"],"summary":"Self-heal status (operator)","description":"Webhook queue health signals for manual recovery decisions.","operationId":"ops_self_heal_status_ops_self_heal_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CatalystOperatorKey":[]}]}},"/ops/recover-webhooks":{"post":{"tags":["ops"],"summary":"Force reschedule stuck/overdue failed webhooks (operator)","description":"Moves scheduled_at to now for overdue failed webhook events.","operationId":"ops_recover_webhooks_ops_recover_webhooks_post","security":[{"CatalystOperatorKey":[]}],"parameters":[{"name":"hours","in":"query","required":false,"schema":{"type":"integer","maximum":168,"minimum":1,"default":24,"title":"Hours"}},{"name":"max_items","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"default":200,"title":"Max Items"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ops/webhook-metrics":{"get":{"tags":["ops"],"summary":"Webhook delivery metrics (operator)","description":"Process-local webhook delivery counts/latencies plus current DB queue depth. Note: process-local metrics reset on restart.","operationId":"ops_webhook_metrics_ops_webhook_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CatalystOperatorKey":[]}]}},"/agents/register":{"post":{"tags":["agents"],"summary":"Register a machine actor","description":"Register an AI agent, Zapier Zap, n8n workflow, or other automated actor that will take actions on behalf of a tenant.\n\nEvery actor that touches Catalyst state should be registered here. The `machine_actor_id` links ledger entries and proposals to the responsible actor, making the audit trail queryable by actor.\n\nGated on `can_configure_ai_workflows`.","operationId":"register_actor_agents_register_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActorRegistration"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"403":{"description":"Plan does not allow registering machine actors."},"409":{"description":"An actor with this ID is already registered for this tenant."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents":{"get":{"tags":["agents"],"summary":"List registered machine actors","description":"Returns all registered machine actors for this tenant.","operationId":"list_actors_agents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/agents/{actor_id}":{"get":{"tags":["agents"],"summary":"Get a registered machine actor","operationId":"get_actor_agents__actor_id__get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"actor_id","in":"path","required":true,"schema":{"type":"string","title":"Actor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Actor not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["agents"],"summary":"Update a registered machine actor","operationId":"update_actor_agents__actor_id__patch","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"actor_id","in":"path","required":true,"schema":{"type":"string","title":"Actor Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActorPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Actor not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/action-proposals":{"post":{"tags":["agents"],"summary":"Evaluate whether an actor may take an action","description":"Deterministic policy decision endpoint for AI agent actions.\n\nReturns `allow`, `proposal_required`, or `deny` based on:\n- Whether the actor is registered and active\n- Whether the capability is in the actor's declared capabilities\n- The actor's `governance_mode` and `risk_class`\n\nSame input always produces the same decision. No randomness. Use this before any agent takes a real-world action.","operationId":"evaluate_action_proposal_agents_action_proposals_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionProposal"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/gdpr/prune":{"post":{"tags":["gdpr"],"summary":"Prune expired proposals (GDPR data minimisation)","description":"Prunes expired proposal records from the tenant execution state.\n\nSupports GDPR data minimisation obligations. Operates at tenant scope.","operationId":"gdpr_prune_gdpr_prune_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CatalystTenantApiKey":[]}]}},"/gdpr/delete":{"post":{"tags":["gdpr"],"summary":"Delete tenant execution state (GDPR right to erasure)","description":"Deletes (resets) the stored tenant execution state: flow_cycle, proposals, and ledger.\n\nDestructive and irreversible. Requires the header:\n\n  X-Confirm-Delete: DELETE-ALL-DATA\n\nA pre-delete snapshot is automatically taken before erasure so operators can recover data within the retention window if the deletion was accidental.\n\nIntended for GDPR right-to-erasure requests.","operationId":"gdpr_delete_gdpr_delete_post","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-Confirm-Delete","in":"header","required":false,"schema":{"type":"string","title":"X-Confirm-Delete"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/whoami":{"get":{"tags":["utility"],"summary":"Identify caller","operationId":"whoami_whoami_get","security":[{"CatalystTenantApiKey":[]}],"parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ActionProposal":{"properties":{"machine_actor_id":{"type":"string","title":"Machine Actor Id","description":"Registered actor making the proposal"},"capability":{"type":"string","title":"Capability","description":"The capability being exercised, e.g. 'send_email', 'update_crm'"},"target_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target System","description":"System the action will affect, e.g. 'hubspot', 'shopify'"},"action_description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Action Description","description":"Human-readable description of the proposed action"},"dry_run":{"type":"boolean","title":"Dry Run","description":"If true, evaluate policy but do not record a commitment","default":false}},"type":"object","required":["machine_actor_id","capability"],"title":"ActionProposal"},"ActorPatch":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Display Name"},"runtime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Runtime Type"},"owner_group":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Owner Group"},"capabilities":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Capabilities"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"risk_class":{"anyOf":[{"type":"string","enum":["low","standard","high"]},{"type":"null"}],"title":"Risk Class"},"governance_mode":{"anyOf":[{"type":"string","enum":["observe","advisory","proposal","strict"]},{"type":"null"}],"title":"Governance Mode"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Notes"}},"type":"object","title":"ActorPatch"},"ActorRegistration":{"properties":{"machine_actor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Machine Actor Id","description":"Caller-supplied ID; auto-generated if omitted"},"display_name":{"type":"string","maxLength":200,"minLength":1,"title":"Display Name"},"runtime_type":{"type":"string","title":"Runtime Type","description":"One of: claude_agent, custom_agent, internal_worker, make_scenario, n8n_workflow, openai_assistant, unknown, zapier_zap","default":"unknown"},"owner_group":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Owner Group"},"capabilities":{"items":{"type":"string"},"type":"array","title":"Capabilities","description":"Declared capabilities this actor may exercise"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes","description":"API scopes permitted"},"risk_class":{"type":"string","enum":["low","standard","high"],"title":"Risk Class","default":"standard"},"governance_mode":{"type":"string","enum":["observe","advisory","proposal","strict"],"title":"Governance Mode","default":"proposal"},"notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Notes"}},"type":"object","required":["display_name"],"title":"ActorRegistration"},"Body_add_compliance_source_compliance_source_post":{"properties":{"label":{"type":"string","title":"Label"},"kind":{"type":"string","title":"Kind","default":"org"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"file":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"File"}},"type":"object","required":["label"],"title":"Body_add_compliance_source_compliance_source_post"},"Body_create_tasks_from_findings_compliance_findings_create_tasks_post":{"properties":{"classes":{"items":{"type":"string"},"type":"array","title":"Classes","default":["MISSING_CONTROL","PROHIBITED_ACTION"]}},"type":"object","title":"Body_create_tasks_from_findings_compliance_findings_create_tasks_post"},"Body_remove_compliance_source_compliance_source_delete":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"Body_remove_compliance_source_compliance_source_delete"},"Body_schedule_scan_compliance_scan_schedule_post":{"properties":{"interval_hours":{"type":"integer","maximum":8760.0,"minimum":0.0,"title":"Interval Hours","default":24}},"type":"object","title":"Body_schedule_scan_compliance_scan_schedule_post"},"Body_set_mode_compliance_mode_post":{"properties":{"org":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org"}},"type":"object","required":["org"],"title":"Body_set_mode_compliance_mode_post"},"Body_upload_document_tasks_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"domain":{"type":"string","title":"Domain","default":"operations"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"}},"type":"object","required":["file"],"title":"Body_upload_document_tasks_upload_post"},"BuildJargonProposalsResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"},"created":{"type":"integer","title":"Created"},"proposals":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Proposals"}},"type":"object","required":["ok","created","proposals"],"title":"BuildJargonProposalsResponse"},"BulkTaskFilter":{"properties":{"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority","description":"Canonical priority, e.g. \"Low\" | \"Medium\" | \"High\" | \"Critical\""},"stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage","description":"Canonical stage, e.g. \"backlog\" | \"in_progress\" | \"blocked\" | \"done\""},"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner"},"tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag","description":"Match tasks that include this tag in their tags list"},"group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Id","description":"Correlation / project / group id if present on the task"}},"type":"object","title":"BulkTaskFilter"},"BulkTaskUpdates":{"properties":{"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority","description":"Canonical priority, e.g. \"Low\" | \"Medium\" | \"High\" | \"Critical\""},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage"},"tags_add":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags Add","description":"Tags to add (if not already present)"},"tags_remove":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags Remove","description":"Tags to remove (if present)"}},"type":"object","title":"BulkTaskUpdates"},"BulkUpdateRequest":{"properties":{"filter":{"$ref":"#/components/schemas/BulkTaskFilter"},"updates":{"$ref":"#/components/schemas/BulkTaskUpdates"},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key","description":"Client-supplied idempotency key. If provided and a result for this key already exists, the cached result is returned immediately without re-processing."}},"type":"object","required":["filter","updates"],"title":"BulkUpdateRequest"},"BulkUpdateResponse":{"properties":{"matched":{"type":"integer","title":"Matched"},"updated":{"type":"integer","title":"Updated"},"task_ids":{"items":{"type":"string"},"type":"array","title":"Task Ids"},"summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Summary"}},"type":"object","required":["matched","updated","task_ids"],"title":"BulkUpdateResponse"},"DigestSubscribeRequest":{"properties":{"callback_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Callback Url"},"schedule":{"type":"string","title":"Schedule","default":"weekly"}},"type":"object","required":["callback_url"],"title":"DigestSubscribeRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IssueAdminTokenRequest":{"properties":{"sub":{"type":"string","title":"Sub","default":"founder"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"IssueAdminTokenRequest"},"LearningStatsResponse":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"total_corrections":{"type":"integer","title":"Total Corrections"},"total_rules":{"type":"integer","title":"Total Rules"},"rules_by_type":{"additionalProperties":{"type":"integer"},"type":"object","title":"Rules By Type"},"estimated_accuracy":{"type":"number","title":"Estimated Accuracy"},"high_confidence_rules":{"type":"integer","title":"High Confidence Rules"},"avg_confidence":{"type":"number","title":"Avg Confidence"}},"type":"object","required":["tenant_id","total_corrections","total_rules","rules_by_type","estimated_accuracy","high_confidence_rules","avg_confidence"],"title":"LearningStatsResponse","description":"Learning statistics for tenant."},"ProposalReviewPayload":{"properties":{"proposal_id":{"type":"string","title":"Proposal Id"},"decision":{"type":"string","title":"Decision"},"reviewer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Id"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["proposal_id","decision"],"title":"ProposalReviewPayload"},"RestoreSnapshotRequest":{"properties":{"snap_id":{"type":"string","title":"Snap Id"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["snap_id"],"title":"RestoreSnapshotRequest"},"SearchTasksResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/TaskSummary"},"type":"array","title":"Results"},"count":{"type":"integer","title":"Count"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["results","count","limit","offset"],"title":"SearchTasksResponse"},"TaskCorrectionRequest":{"properties":{"corrections":{"additionalProperties":true,"type":"object","title":"Corrections"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["corrections"],"title":"TaskCorrectionRequest","description":"User's corrections to a task."},"TaskSummary":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner"},"due_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Due At"}},"type":"object","required":["id","title"],"title":"TaskSummary"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WebhookEventMeta":{"properties":{"event":{"type":"string","title":"Event"},"label":{"type":"string","title":"Label"},"category":{"type":"string","title":"Category"},"requires":{"items":{"type":"string"},"type":"array","title":"Requires"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"sample_payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sample Payload"}},"type":"object","required":["event","label","category","requires"],"title":"WebhookEventMeta"},"WebhookSubscriptionOut":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"integer"}],"title":"Id"},"event":{"type":"string","title":"Event"},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"active":{"type":"boolean","title":"Active"},"platform":{"type":"string","title":"Platform"}},"type":"object","required":["id","event","url","active","platform"],"title":"WebhookSubscriptionOut"}},"securitySchemes":{"CatalystOperatorKey":{"type":"apiKey","description":"Platform operator key for tenant signup and operational endpoints.","in":"header","name":"X-Operator-Key"},"CatalystTenantApiKey":{"type":"apiKey","description":"Catalyst tenant API key returned during signup, billing key reveal, or admin key rotation.","in":"header","name":"X-API-Key"}}},"tags":[{"name":"tenants","description":"Tenant identity, rules, governance configuration, and entitlements."},{"name":"tasks","description":"Task ingestion, normalisation, proposal creation, and execution flow."},{"name":"groups","description":"Deduplication, grouping, and merge semantics for related work items."},{"name":"compliance","description":"Evidence exports, governance views, and compliance-related operations."},{"name":"zapier","description":"Zapier integration surface for triggers, actions, and exports."},{"name":"metrics","description":"Operational metrics, health signals, and system observability."},{"name":"lite","description":"Catalyst Lite governance overlay endpoints for workflow registration, event envelopes, trust, and audit slices."},{"name":"admin","description":"Operator-only administrative and recovery operations."}]}