HTTP API reference
Minimal catalog derived from app/api route handlers. For request/response schemas, read the source or Open your deployment in an API client against https://zentro.run.
Health
Liveness for load balancers; no auth.
- GET
/api/healthJSON ok, service name, and uptime seconds.
- HEAD
/api/healthSame as GET without body.
Incidents
- GET
/api/incidents/{id}/exportDownload incident as Markdown (authenticated Supabase user).
Auth: Session cookie
- GET
/api/incidents/{id}/evidenceDownload incident evidence pack JSON (timeline, dry-run, audit-linked events).
Auth: Session cookie
- GET
/api/incidents/{id}/reviewDownload post-incident review Markdown (narrative, timeline, execution evidence, audit snapshot).
Auth: Session cookie
- POST
/api/incidents/{id}/rca/runGenerate and persist an incident RCA hypothesis with confidence and evidence references.
Auth: Session cookie
- GET
/api/incidents/{id}/rca/latestFetch latest persisted RCA run for an incident.
Auth: Session cookie
- GET
/api/services/{id}/sloFetch service SLO profile plus latest error budget windows (7d/30d).
Auth: Session cookie
- GET
/api/overview/error-budget-summaryFetch SLO error budget overview across services (critical/warning burn and average used budget).
Auth: Session cookie
Integrations
- POST
/api/integrations/alertsCreate or dedupe incident from monitoring (Bearer alert ingest token).
Auth: Bearer ingest token
Paid-gated per deployment; validates token server-side. Supports normalized Zentro payload, Datadog, Prometheus/Grafana Alertmanager, PagerDuty, and New Relic payloads (vendor-specific dedupe keys). Optional HMAC signature check via ZENTRO_ALERT_WEBHOOK_SIGNING_SECRET.
- POST
/api/integrations/vulnerabilitiesUpsert Qualys/Tenable finding; auto-open incident for high/critical (Bearer ingest token).
Auth: Bearer ingest token
Same token as alert ingest. Optional X-Zentro-Vuln-Source header. Supports Qualys (QID/HOST), Tenable (plugin/asset), or generic finding_id payloads.
- GET
/api/health/dbPostgres readiness via zentro_db_health() RPC (requires migration #15).
Auth: None
- GET
/api/connectors/statusProbe configured reasoning/automation connector URLs.
Auth: Session cookie when Supabase auth is enabled
- POST
/api/integrations/slack/approvalsReceive signed Slack action payloads and decide pending approvals.
Auth: Slack request signature (X-Slack-Signature)
- POST
/api/approvals/policy-suggestions/promotePromote a decision-intelligence policy suggestion into policy review and log audit evidence.
Auth: Session cookie (or session mode fallback)
- GET
/api/deployment/profileActive organization deployment tier, data region, and boundary (FedRAMP-oriented).
Auth: Session cookie
- GET
/api/deployment/retentionEffective org retention policy for audit_log and closed incidents (tier defaults + overrides).
Auth: Session cookie
- GET
/api/governance/compliance/summarySOC 2 / ISO 27001 control coverage from audit_log and accepted policies (30d window).
Auth: Session cookie
- GET
/api/governance/compliance/programCompliance program dashboard — weighted readiness, SOC 2 / ISO gaps, attestation and vendor rollups.
Auth: Session cookie
- GET
/api/governance/compliance/gap-remediationsGap-to-runbook remediation queue from live assessment exceptions plus org tracking rows.
Auth: Session cookie
- GET
/api/governance/compliance/risk-heatmapCompliance risk heatmap — framework concentration, vendor tier matrix, and top hotspots from live org data.
Auth: Session cookie
- GET
/api/governance/compliance/executive-summaryBoard-ready GRC executive summary — program readiness, frameworks, hotspots, and leadership actions (JSON, Markdown, HTML, CSV).
Auth: Session cookie
- GET
/api/governance/compliance/calendarGRC compliance calendar — attestations, vendor reviews, bundles, audit season checkpoints (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/benchmarkingControl benchmarking — org readiness percentiles vs industry reference cohorts (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/policy-driftPolicy drift — accepted automation guardrails vs live assessment gaps (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/control-graphControl dependency graph — crosswalk, thematic, shared audit, and shared policy edges (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/regulatory-impactRegulatory change impact — scenario readiness deltas vs live baseline (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/evidence-lineageEvidence lineage — audit and policy sources through bundles to assessor workbook (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/testing-evidence-linkerControl testing evidence linker — dry-run outputs mapped to controls and evidence bundles (JSON or CSV).
Auth: Session cookie
- POST
/api/governance/compliance/testing-evidence-linkerRecord test-to-bundle links in audit log for assessor export trail.
Auth: Session cookie
- GET
/api/governance/compliance/testing-schedulesControl testing schedules — recurring evidence windows from attestations, checkpoints, and freshness (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/scope-boundaryScope boundary mapper — in-scope systems, data flows, and framework control mappings (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/kpi-trendsCompliance KPI trends — weekly remediation velocity, attestation closure, framework readiness (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/posture-scoreUnified compliance posture score — blended readiness, attestations, vendors, gaps, risk (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/control-ownershipGRC control ownership matrix — RACI per control linked to scope and attestations (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/exception-registerCompliance exception register — assessment gaps, policy drift, compensating remediations (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/evidence-requestsAssessor evidence request workflow — open document requests with due dates and control linkage (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/evidence-request-slaEvidence request SLA dashboard — overdue queue, at-risk window, fulfillment metrics (JSON or CSV).
Auth: Session cookie
- POST
/api/governance/compliance/evidence-request-slaDeliver auditor evidence request SLA digest (email + optional webhook).
Auth: Session cookie
- POST
/api/governance/compliance/evidence-request-sla/scheduledCron SLA digest delivery (Bearer ZENTRO_EVIDENCE_REQUEST_SLA_CRON_SECRET).
Auth: Bearer cron secret
- GET
/api/governance/compliance/obligation-icsCompliance obligation ICS — iCalendar feed of attestations, vendors, bundles, checkpoints (text/calendar).
Auth: Session cookie
- GET
/api/governance/compliance/mapping-digestPreview regulatory mapping change digest vs last org snapshot.
Auth: Session cookie
- POST
/api/governance/compliance/mapping-digestRun mapping change digest — webhook/email when catalog or crosswalk changes.
Auth: Session cookie
- POST
/api/governance/compliance/mapping-digest/scheduledCron mapping digest (Bearer ZENTRO_MAPPING_DIGEST_CRON_SECRET).
Auth: Bearer cron secret
- GET
/api/governance/compliance/inherited-control-gapsInherited control coverage gaps — vendors missing evidence on tier-inherited controls (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/control-health-scorecardLeadership control health scorecard — posture, vendor inherited controls, and gap closure (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/obligation-heatmapRegulatory obligation heatmap — open obligations by framework, vendor tier, and testing schedule (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/obligation-crossoverMulti-framework obligation crossover — shared due windows and crosswalk-linked evidence reuse clusters (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/obligation-consolidationObligation consolidation playbook — six-step workflows per crossover cluster with tracked play status (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/obligation-forecastBoard obligation forecast — weekly forward-looking obligation density and committee milestones (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/obligation-whatifBoard obligation what-if — stress-test forecast density with week shifts or framework descope (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/committee-capacity-budgetCommittee obligation capacity budget — weekly owner-hours vs forecast peaks with shortfall flags (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/obligation-load-balancingObligation owner load balancing — peak-week RACI load slices and rebalance suggestions (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/peak-week-staffing-digestPeak-week staffing digest — capacity shortfall + load imbalance coincidence preview (JSON or CSV).
Auth: Session cookie
- POST
/api/governance/compliance/peak-week-staffing-digestDeliver peak-week staffing digest (email, Slack, optional webhook).
Auth: Session cookie (owner/admin)
- POST
/api/governance/compliance/peak-week-staffing-digest/scheduledCron peak-week staffing digest (Bearer ZENTRO_PEAK_WEEK_STAFFING_DIGEST_CRON_SECRET).
Auth: Bearer cron secret
- GET
/api/governance/compliance/staffing-actionsObligation staffing action tracker — proposed and tracked load-balance and capacity relief actions (JSON, CSV, or HTML completion report).
Auth: Session cookie
- GET
/api/governance/compliance/staffing-action-remindersStaffing action overdue reminders — open actions past peak week preview (JSON or CSV).
Auth: Session cookie
- POST
/api/governance/compliance/staffing-action-remindersSend staffing action overdue reminders (email and Slack).
Auth: Session cookie (owner/admin)
- POST
/api/governance/compliance/staffing-action-reminders/scheduledCron staffing overdue reminders (Bearer ZENTRO_STAFFING_OVERDUE_REMINDER_CRON_SECRET).
Auth: Bearer cron secret
- GET
/api/governance/compliance/staffing-completion-rollupStaffing completion rollup — tracked vs open vs completed archive (JSON, CSV, or printable HTML).
Auth: Session cookie
- POST
/api/governance/compliance/staffing-completion-rollupEmail weekly staffing completion rollup to owners and admins.
Auth: Session cookie (owner/admin)
- POST
/api/governance/compliance/staffing-completion-rollup/scheduledCron staffing completion rollup (Bearer ZENTRO_STAFFING_COMPLETION_ROLLUP_CRON_SECRET).
Auth: Bearer cron secret
- GET
/api/governance/compliance/staffing-sla-breach-digestStaffing SLA breach digest — open actions past committee completion SLA after peak week (JSON or CSV).
Auth: Session cookie
- POST
/api/governance/compliance/staffing-sla-breach-digestDeliver staffing SLA breach digest (email and Slack).
Auth: Session cookie (owner/admin)
- POST
/api/governance/compliance/staffing-sla-breach-digest/scheduledCron staffing SLA breach digest (Bearer ZENTRO_STAFFING_SLA_BREACH_DIGEST_CRON_SECRET).
Auth: Bearer cron secret
- GET
/api/governance/compliance/cross-staffing-committee-escalationCross-staffing committee escalation — SLA breaches still open after completion rollup email (JSON or CSV).
Auth: Session cookie
- POST
/api/governance/compliance/cross-staffing-committee-escalationDeliver cross-staffing committee escalation (email and Slack).
Auth: Session cookie (owner/admin)
- POST
/api/governance/compliance/cross-staffing-committee-escalation/scheduledCron cross-staffing committee escalation (Bearer ZENTRO_CROSS_STAFFING_COMMITTEE_ESCALATION_CRON_SECRET).
Auth: Bearer cron secret
- POST
/api/governance/compliance/staffing-digest-auto-chain/scheduledCron staffing digest auto-chain — rollup, SLA digest, escalation in one run (Bearer ZENTRO_STAFFING_DIGEST_AUTO_CHAIN_CRON_SECRET).
Auth: Bearer cron secret
- GET
/api/governance/compliance/committee-digestQuarterly obligation committee digest — forecast, crossover, and SLA rollup preview (JSON or CSV).
Auth: Session cookie
- POST
/api/governance/compliance/committee-digestDeliver quarterly obligation committee digest (email + optional webhook).
Auth: Session cookie (owner/admin)
- POST
/api/governance/compliance/committee-digest/scheduledCron quarterly digest delivery (Bearer ZENTRO_OBLIGATION_COMMITTEE_DIGEST_CRON_SECRET).
Auth: Bearer cron secret
- GET
/api/governance/compliance/obligation-rollupObligation executive rollup — printable HTML (print to PDF), JSON, or CSV for board packets.
Auth: Session cookie
- GET
/api/governance/compliance/obligation-density-alertsObligation density alerting — forecast breach preview against org thresholds (JSON or CSV).
Auth: Session cookie
- POST
/api/governance/compliance/obligation-density-alertsSend obligation density Slack and email alerts for active breaches.
Auth: Session cookie (owner/admin)
- POST
/api/governance/compliance/obligation-density-alerts/scheduledCron obligation density alerts (Bearer ZENTRO_OBLIGATION_DENSITY_ALERT_CRON_SECRET).
Auth: Bearer cron secret
- GET
/api/governance/compliance/obligation-density-trend-historyObligation density trend history — trailing-quarter weekly density and alert deliveries (JSON or CSV).
Auth: Session cookie
- GET
/api/governance/compliance/committee-meeting-packCommittee meeting pack ZIP — printable HTML summary, scorecard, posture, exceptions, and open gaps.
Auth: Session cookie
- GET
/api/governance/compliance/attestation-renewalAttestation renewal calendar — renewal waves by due window with framework rollup (JSON or CSV).
Auth: Session cookie
- POST
/api/governance/compliance/attestation-renewalEmail control owners for current renewal waves (org admins).
Auth: Session cookie
- POST
/api/governance/compliance/attestation-renewal/scheduledCron owner renewal nudges (Bearer ZENTRO_ATTESTATION_RENEWAL_CRON_SECRET).
Auth: Bearer cron secret
- GET
/api/governance/legal-holdsActive legal holds on incidents and count of audit rows flagged (org-scoped).
Auth: Session cookie
- GET
/api/governance/compliance/bundlesList persisted assessor evidence bundles for the active organization.
Auth: Session cookie
- POST
/api/governance/compliance/bundlesCreate tamper-evident evidence bundle; optional webhook delivery to org URL.
Auth: Session cookie (owner/admin)
- POST
/api/governance/compliance/bundles/scheduledCron entrypoint to generate bundle (Bearer ZENTRO_BUNDLE_CRON_SECRET, body: orgId, window).
Auth: Bearer cron secret
- GET
/api/governance/compliance/bundles/{id}Fetch persisted evidence bundle metadata and manifest verification for the active org.
Auth: Session cookie
- GET
/api/governance/compliance/bundles/{id}/downloadDownload evidence bundle ZIP archive by bundle id.
Auth: Session cookie
- GET
/api/governance/compliance/crosswalkSOC 2 / ISO 27001 crosswalk — mapping matrix with optional periodDays and format=csv|json; evidence overlay per control.
Auth: Session cookie
- GET
/api/governance/compliance/workbookUnified assessor workbook ZIP — evidence pack, crosswalk, framework assessments, README, and tamper-evident manifest.
Auth: Session cookie
- POST
/api/governance/compliance/digestCompliance program digest — readiness deltas vs prior snapshot, overdue attestations; optional HTTPS webhook delivery.
Auth: Session cookie (owner/admin)
- POST
/api/governance/compliance/digest/scheduledCron digest delivery — Bearer ZENTRO_DIGEST_CRON_SECRET; body { orgId, periodDays? }.
Auth: Bearer ZENTRO_DIGEST_CRON_SECRET
- GET
/api/governance/compliance/sla-remindersPreview SLA reminder candidates (due soon, overdue, regressed) and org settings.
Auth: Session cookie
- POST
/api/governance/compliance/sla-remindersSend compliance SLA reminders via Slack and optional Resend email (owner/admin).
Auth: Session cookie (owner/admin)
- POST
/api/governance/compliance/sla-reminders/scheduledCron SLA reminders — Bearer ZENTRO_SLA_CRON_SECRET; body { orgId }.
Auth: Bearer ZENTRO_SLA_CRON_SECRET
- GET
/api/governance/compliance/fedramp-poamFedRAMP POA&M export — NIST 800-53 rows from continuous assessment gaps; periodDays and format=csv|json.
Auth: Session cookie
- GET
/api/governance/compliance/evidence-freshnessEvidence freshness dashboard — per-control last evidence timestamps, stale queue; format=csv|json.
Auth: Session cookie
- GET
/api/governance/compliance/baseline-comparisonMulti-framework baseline comparison — live readiness and prior-period deltas for all framework packs; format=csv|json.
Auth: Session cookie
- GET
/api/governance/compliance/assessor-tokensList org assessor API tokens and allowed export resource paths.
Auth: Session cookie
- POST
/api/governance/compliance/assessor-tokensCreate org assessor API token (zentro_ca_*); returns plaintext key once.
Auth: Session cookie (owner/admin)
- DELETE
/api/governance/compliance/assessor-tokens/{id}Revoke assessor API token.
Auth: Session cookie (owner/admin)
- GET
/api/governance/compliance/assessor/{id}Assessor read-only export — evidence-export, workbook, crosswalk, obligation-ics, baseline-comparison, risk-heatmap, executive-summary, framework reports; Bearer zentro_ca_* token.
Auth: Bearer assessor token
- GET
/api/governance/compliance/exportCompliance evidence pack — audit events + accepted policies with control tags (CSV or JSON).
Auth: Session cookie
- GET
/api/governance/compliance/type-iiSOC 2 Type II continuous monitoring report — control trends, exceptions, evidence bundle and legal-hold counts.
Auth: Session cookie
- GET
/api/governance/compliance/iso-assessmentISO 27001 Annex A continuous assessment — domain readiness, control trends, and gap analysis.
Auth: Session cookie
- GET
/api/governance/compliance/pci-dssPCI DSS v4 control pack — requirement readiness, trends, and gap analysis from shared audit evidence.
Auth: Session cookie
- GET
/api/governance/compliance/hipaaHIPAA Security Rule safeguards — readiness, trends, gap analysis, and BAA vendor control inheritance.
Auth: Session cookie
- GET
/api/governance/compliance/nist-csfNIST CSF 2.0 alignment — function maturity tiers, control trends, and gap analysis from shared audit evidence.
Auth: Session cookie
- GET
/api/governance/compliance/cis-v8CIS Controls v8 safeguard pack — Implementation Group readiness, control trends, and gap analysis.
Auth: Session cookie
- GET
/api/governance/compliance/cmmc-l2CMMC 2.0 Level 2 overlay — 800-171 practice readiness, SPRS-style score, and gap analysis.
Auth: Session cookie
- GET
/api/governance/compliance/gdpr-art32GDPR Article 32 technical measures — domain readiness, DPA bands, and gap analysis.
Auth: Session cookie
- GET
/api/governance/compliance/attestationsControl attestation board — owners, due dates, status, linked audit evidence counts per SOC 2 / ISO control.
Auth: Session cookie
- GET
/api/governance/third-party/vendorsThird-party risk register — vendors with inherited controls, attestation status, and reused audit evidence counts.
Auth: Session cookie
- POST
/api/governance/third-party/vendorsAdd vendor; inherit SOC 2 / ISO controls from risk tier and category (owner/admin).
Auth: Session cookie (owner/admin)
- GET
/api/governance/policy-blocks/summaryReturn policy-block analytics summary for current user (window=7d|30d, includes prior-window delta and reason distribution).
Auth: Session cookie
Automations
- POST
/api/automations/dry-runRun playbook dry-run; may persist and append audit when configured.
Auth: Session cookie
- POST
/api/automations/executeRecord guarded execution after successful dry-run with approval note and rollback plan.
Auth: Session cookie
- POST
/api/automations/remediateRun guarded remediation with dry-run freshness and accepted policy checks.
Auth: Session cookie
- GET
/api/attack-paths/simulateSimulate ranked attack paths from vuln entry points through dependency graph to production targets.
Auth: Session cookie
Optional query: targetServiceId, maxDepth.
- GET
/api/services/dependency-graphFetch service dependency graph (nodes and directed edges).
Auth: Session cookie
Copilot
- POST
/api/copilot/chatStreaming or JSON chat completion (OpenAI → reasoning URL → guided offline).
Auth: Session cookie when OPENAI_API_KEY and Supabase auth are set; otherwise IP rate limit
- GET
/api/copilot/threadsList conversation threads.
Auth: Session cookie
- POST
/api/copilot/threadsCreate thread.
Auth: Session cookie
- GET
/api/copilot/threads/{id}/messagesList messages in a thread.
Auth: Session cookie
- POST
/api/copilot/threads/{id}/messagesAppend user message and run assistant turn.
Auth: Session cookie
User-scoped keys
- GET
/api/user/api-keysList API keys (metadata).
Auth: Session cookie
- POST
/api/user/api-keysCreate API key (returns plaintext once).
Auth: Session cookie
- DELETE
/api/user/api-keys/{id}Revoke key.
Auth: Session cookie
- GET
/api/user/alert-ingest-tokensList alert ingest tokens.
Auth: Session cookie
- POST
/api/user/alert-ingest-tokensCreate ingest token (returns secret once).
Auth: Session cookie
- DELETE
/api/user/alert-ingest-tokens/{id}Revoke ingest token.
Auth: Session cookie
Connector proxies
Forward to ZENTRO_REASONING_API_URL and ZENTRO_ROBOT_API_URL when set.
- GET|POST|PUT|PATCH|DELETE
/api/reasoning/*Proxy to reasoning backend.
Auth: Session cookie
- GET|POST|PUT|PATCH|DELETE
/api/robot/*Proxy to automation robot backend.
Auth: Session cookie
Audit
- GET
/api/audit/exportDownload all audit_log rows for the signed-in user as CSV (optional window=24h|7d|30d|all).
Auth: Session cookie
- GET
/api/audit/slack-events/exportDownload Slack delivery audit rows as CSV (optional window=24h|7d|30d|all).
Auth: Session cookie
Billing
- POST
/api/webhooks/lemonsqueezyLemon Squeezy subscription webhook.
Auth: Webhook signature (Lemon)
OpenAPI sketch
Partial YAML for tooling; paths are abbreviated — expand in-repo before publishing a full spec.
openapi: 3.0.3
info:
title: Zentro API
version: "0.1.0"
servers:
- url: https://zentro.run
paths:
/api/health:
get:
summary: Liveness and uptime
/api/integrations/alerts:
post:
summary: Alert ingest (Bearer token)
/api/automations/dry-run:
post:
summary: Playbook dry-run
/api/copilot/chat:
post:
summary: Copilot chat
/api/user/api-keys:
get:
summary: List API keys
post:
summary: Create API key