REST API endpoints for deployment statuses

Use the REST API to manage deployment statuses.

About deployment statuses

Deployment statuses allow external services to mark deployments with an error, failure, inactive, in_progress, queued, pending, or success state. Systems listening to deployment_status events can consume and respond to these statuses. A deployment status can also include an optional description and log_url.

A deployment can accumulate multiple statuses over time as it progresses, for example from pending to in_progress to success. GitHub tracks the most recent status for each deployment and uses it to display the deployment's current state.

Data retention

GitHub retains records of previous deployment statuses for 90 days. Previous statuses older than 90 days are automatically deleted and are no longer returned by the REST API or GraphQL API.

This retention policy applies to all deployment status endpoints, including List deployment statuses and Get a deployment status. The current status of a deployment is not affected, because it is stored on the deployment itself and remains available regardless of the deployment's age.

Note

Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.

List deployment statuses

GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses

Users with pull access can view deployment statuses for a deployment:

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/repos/OWNER/REPO/deployments/DEPLOYMENT_ID/statuses

Response schema (Status: 200):

Array of Deployment Status:

Create a deployment status

POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses

Users with push access can create deployment statuses for a given deployment.
OAuth app tokens and personal access tokens (classic) need the repo_deployment scope to use this endpoint.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X POST \
  https://api.github.com/repos/OWNER/REPO/deployments/DEPLOYMENT_ID/statuses \
  -d '{
  "environment": "production",
  "state": "success",
  "log_url": "https://example.com/deployment/42/output",
  "description": "Deployment finished successfully."
}'

Response schema (Status: 201):

Get a deployment status

GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}

Users with pull access can view a deployment status for a deployment:

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/repos/OWNER/REPO/deployments/DEPLOYMENT_ID/statuses/STATUS_ID

Response schema (Status: 200):

Same response schema as Create a deployment status.