API overview
REST v1 resources, response envelopes, and automation flows.
PreFlight API v1
The public API lets CI pipelines, deploy hooks, status pages, and AI agents read project health and trigger checks without opening the dashboard. Every route is account-scoped, rate-limited, and designed for automation.
pf_live_ and are shown once at creation. PreFlight stores only a SHA-256 hash plus a short prefix after that.
Base URL
https://getpreflight.dev/api/v1
Self-hosted or preview deployments can use your own origin. MCP and SDK clients accept PREFLIGHT_API_URL for the same purpose.
Authentication
All authenticated routes expect:
Authorization: Bearer pf_live_...
Content-Type: application/json
See API authentication for scope, idempotency, and rate-limit behavior.
Core resources
Typical automation flows
GET /deploy-gate in strict mode before promoting a Vercel deployment or merging to main.
POST /checks with an Idempotency-Key, then poll /checks/:runId until the run finishes.
/status and /uptime on a schedule; surface open incidents from /incidents.
Response shape
Successful check runs return a normalized envelope:
{
"runId": "uuid",
"status": "success",
"summary": "All connected providers passed.",
"counts": { "success": 12, "warning": 0, "failed": 0 },
"results": [
{
"integrationType": "stripe",
"probeKey": "stripe_webhook_signature",
"status": "success",
"message": "Signed test event accepted.",
"responseTimeMs": 142,
"fixSuggestion": null
}
]
}
status, counts, and per-probe rows. Those fields are always derived from stored probe results.
<RelatedLinks links={[ { href: "/docs/api/authentication", title: "Authentication", description: "Keys, scopes, idempotency, and rate limits." }, { href: "/docs/api/mcp-server", title: "MCP server", description: "Expose the same API to AI agents over Model Context Protocol." }, { href: "/docs/guides/deploy-gates", title: "Release Rules", description: "Turn API evidence into release blockers." }, { href: "/docs/api/status-and-incidents", title: "Status and incidents", description: "Read-only endpoints for public status surfaces." }, ]} />
