Skip to content

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.

MethodPathScopes
DELETE/api/orgs/{org}/artifacts/{artifact}projects:write
GET/api/orgs/{org}/artifacts/{artifact}projects:read
GET/api/orgs/{org}/deployments/{deployment}/comparisonissues:read
GET/api/orgs/{org}/ingestion-policyprojects:read
GET/api/orgs/{org}/issuesissues:read
GET/api/orgs/{org}/issues/{issue}issues:read
PATCH/api/orgs/{org}/issues/{issue}issues:triage
GET/api/orgs/{org}/issues/{issue}/contextissues:read, logs:read
GET/api/orgs/{org}/issues/{issue}/eventsissues:read
GET/api/orgs/{org}/issues/{issue}/events/{event}issues:read
GET/api/orgs/{org}/issues/{issue}/recurrenceissues:read
GET/api/orgs/{org}/logslogs:read
GET/api/orgs/{org}/logs/storagelogs:read
GET/api/orgs/{org}/projectsprojects:read
POST/api/orgs/{org}/projectsprojects:write
GET/api/orgs/{org}/projects/{project}/artifactsprojects:read
POST/api/orgs/{org}/projects/{project}/artifactsprojects:write
GET/api/orgs/{org}/projects/{project}/deploymentsprojects:read
POST/api/orgs/{org}/projects/{project}/deploymentsdeployments:write
GET/api/orgs/{org}/projects/{project}/releasesprojects:read
GET/api/orgs/{org}/projects/{project}/sourcesprojects:read
POST/api/orgs/{org}/projects/{project}/sourcesprojects:write
POST/api/orgs/{org}/sources/{source}/keysprojects:write
DELETE/api/orgs/{org}/sources/{source}/keys/{key}projects:write
GET/api/orgs/{org}/usageprojects:read

With a browser session only

The dashboard calls these endpoints. A bearer token gets 401 or 403.

MethodPath
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}