HTTP API
The HTTP API returns the same issues, logs, deployments and usage that the MCP server returns. Every request is for one organization.
Authentication
Send an API key or an OAuth access token as a bearer token. The key's scopes decide which endpoints answer.
curl -H "Authorization: Bearer $POSTDEPLOY_API_KEY" \
https://postdeploy.dev/api/orgs/ORG_ID/issues
Some endpoints, such as creating and revoking API keys, need a signed-in browser session. The endpoint lists show which. See API keys.
Record a deployment
Call this from CI with a key that has deployments:write. That scope records deployments only.
curl -X POST "https://postdeploy.dev/api/orgs/ORG_ID/projects/PROJECT_ID/deployments" \
-H "Authorization: Bearer $POSTDEPLOY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"version": "[email protected]", "environment": "production", "commit_sha": "COMMIT_SHA"}'
Sending the same version, environment and deployed_at again returns the stored deployment. Without deployed_at, PostDeploy uses the time it receives the request.
Lists and pages
Project and source lists return 25 items by default and 100 at most. Pass limit to change it, and pass the returned next as after for the next page. Issue, log and deployment lists return next for before.
Errors and limits
Errors are JSON, for example {"error": "invalid_pagination"}. Log searches and error context share one query budget per organization. Over it, the API answers 429 rate_limited with Retry-After.
Endpoints
These lists come from the server's route table and its access rules.
With an API key or OAuth token
The token needs every scope listed for the endpoint.
| Method | Path | Scopes |
|---|---|---|
| DELETE | /api/orgs/{org}/artifacts/{artifact} | projects:write |
| GET | /api/orgs/{org}/artifacts/{artifact} | projects:read |
| GET | /api/orgs/{org}/deployments/{deployment}/comparison | issues:read |
| GET | /api/orgs/{org}/ingestion-policy | projects:read |
| GET | /api/orgs/{org}/issues | issues:read |
| GET | /api/orgs/{org}/issues/{issue} | issues:read |
| PATCH | /api/orgs/{org}/issues/{issue} | issues:triage |
| GET | /api/orgs/{org}/issues/{issue}/context | issues:read, logs:read |
| GET | /api/orgs/{org}/issues/{issue}/events | issues:read |
| GET | /api/orgs/{org}/issues/{issue}/events/{event} | issues:read |
| GET | /api/orgs/{org}/issues/{issue}/recurrence | issues:read |
| GET | /api/orgs/{org}/logs | logs:read |
| GET | /api/orgs/{org}/logs/storage | logs:read |
| GET | /api/orgs/{org}/projects | projects:read |
| POST | /api/orgs/{org}/projects | projects:write |
| GET | /api/orgs/{org}/projects/{project}/artifacts | projects:read |
| POST | /api/orgs/{org}/projects/{project}/artifacts | projects:write |
| GET | /api/orgs/{org}/projects/{project}/deployments | projects:read |
| POST | /api/orgs/{org}/projects/{project}/deployments | deployments:write |
| GET | /api/orgs/{org}/projects/{project}/releases | projects:read |
| GET | /api/orgs/{org}/projects/{project}/sources | projects:read |
| POST | /api/orgs/{org}/projects/{project}/sources | projects:write |
| POST | /api/orgs/{org}/sources/{source}/keys | projects:write |
| DELETE | /api/orgs/{org}/sources/{source}/keys/{key} | projects:write |
| GET | /api/orgs/{org}/usage | projects:read |
With a browser session only
The dashboard calls these endpoints. A bearer token gets 401 or 403.
| Method | Path |
|---|---|
| GET | /api/orgs |
| POST | /api/orgs |
| GET | /api/orgs/{org} |
| GET | /api/orgs/{org}/api-keys |
| POST | /api/orgs/{org}/api-keys |
| DELETE | /api/orgs/{org}/api-keys/{key} |
| GET | /api/orgs/{org}/api-keys/{key} |
| GET | /api/orgs/{org}/billing |
| POST | /api/orgs/{org}/billing/checkout |
| POST | /api/orgs/{org}/billing/portal |
| POST | /api/orgs/{org}/billing/refresh |
| PUT | /api/orgs/{org}/ingestion-policy |
| GET | /api/orgs/{org}/logs/tail |
| GET | /api/orgs/{org}/members |
| POST | /api/orgs/{org}/members |
| DELETE | /api/orgs/{org}/members/{user} |