Public REST API (v1)
Read pipeline runs, deployments, security alerts and compliance results with an organization API key, and approve deployments from automation.
The v1 API gives scripts, dashboards and CI jobs read access to your organization's data, plus deployment approval. It uses organization API keys, not user sessions.
The machine-readable spec is at (OpenAPI 3.1). Import it into Postman, Insomnia or a code generator.
Authentication
Create a key in Admin Console > API keys (admin role required). The full key is shown once, at creation. Send it as a bearer token:
Authorization: Bearer plk_live_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxProduction keys start with ; development keys start with . A key issued for one environment is rejected by the other. Every key carries a fixed set of scopes, granted when it was created:
| Scope | Grants |
|---|---|
| , | |
| , | |
| , , , | |
| , | |
| , , |
Revoking a key from Settings takes effect within about 60 seconds.
Availability
The API requires a plan with API access. A key created under a plan without it, or a plan that later drops it, gets on every request. Requests the gateway itself rejects, before a key is ever checked against a plan, get the gateway's own body instead of the envelope:
- No header:
- Malformed, revoked, expired, wrong-environment, or wrong-scope key:
Every other error responds with the envelope described below.
Pagination and time windows
List endpoints take (default 50, max 100), , and . Responses carry ( on the last page) and a block:
{
"data": [ /* … */ ],
"next_cursor": "eyJwayI6Ik9SRyMxMjMi...",
"meta": {
"since": "2026-08-01T00:00:00Z",
"until": "2026-09-27T00:00:00Z",
"retention_clamped": false
}
}Reuse the same and when following . If predates your plan's data retention window, the server moves it forward and sets to rather than erroring.
Errors
Every non-gateway error uses the same envelope:
{
"error": {
"code": "not_found",
"message": "No run with that id.",
"details": {}
}
}| HTTP status | Meaning | |
|---|---|---|
| 400 | A query parameter failed validation. | |
| 400 | is malformed, expired, or does not match /. | |
| 401 | No key, or a key the gateway could not accept. | |
| 402 | The organization's plan does not include API access. | |
| 403 | The key lacks the required scope, or the gateway rejected the key. | |
| 403 | The key is valid but missing the scope the route needs. | |
| 404 | No such item in your organization within your plan's data retention. | |
| 409 | The request conflicts with the resource's current state. | |
| 400 | An API key answered Prodgator's protection rule without a of 10-500 characters. | |
| 409 | The deployment waits for GitHub required reviewers. API keys cannot act as a GitHub user. | |
| 429 | Too many requests; retry with backoff. | |
| 500 | The request failed on the server. |
Approving deployments
and take a JSON body with a and an optional . An API key with can answer only Prodgator's own protection rule, and must give a of 10-500 characters (the same rule as an admin override in the app); without one the request fails with . Prodgator audits the answer as the key, records it on the deployment with principal , and posts a comment on the provider such as "Approved via Prodgator API key CI deploy (reason: Hotfix for the checkout outage)".
A deployment gated by GitHub's own required reviewers can only be approved by a reviewer's own GitHub account, in the app or on GitHub. API keys cannot act as a GitHub user, and Prodgator never falls back to the organization's token, so a key gets . When a deployment has both gates, the key answers Prodgator's rule first; the response's stays until a reviewer answers the GitHub gate, and a further key request returns .
curl -s -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"reason": "Hotfix for the checkout outage"}' \
https://api.prodgator.io/v1/deployments/$DEPLOYMENT_ID/approveSecurity findings
returns scan results paged with . Requires scope.
returns unique findings with (scan results in the finding) and (number of sources). Requires scope and Business plan or higher.
Uploading reports: see Upload a report for the , and routes. Requires scope.
Example
curl -s \
-H "Authorization: Bearer $API_KEY" \
"https://api.prodgator.io/v1/runs?status=failure&limit=25"