---
title: "Review pending deployments for a workflow run"
method: POST
path: "/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"
tags: ["actions"]
---

# Review pending deployments for a workflow run

`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`

Approve or reject pending deployments that are waiting on approval by a required reviewer.

Required reviewers with read access to the repository contents and deployments can use this endpoint.

OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

## Path parameters

- `owner` string, required
- `repo` string, required
- `run_id` integer, required

## Request body

- object
  - `environment_ids` integer[], required — The list of environment ids to approve or reject
  - `state` 'approved' | 'rejected', required — Whether to approve or reject deployment to the specified environments.
  - `comment` string, required — A comment to accompany the deployment review

## Response `200`

Response

- Deployment[]
  - `url` string, uri, required
  - `id` integer, required — Unique identifier of the deployment
  - `node_id` string, required
  - `sha` string, required
  - `ref` string, required — The ref to deploy. This can be a branch, tag, or sha.
  - `task` string, required — Parameter to specify a task to execute
  - `payload` union, required
    - object
    - string
  - `original_environment` string
  - `environment` string, required — Name for the target deployment environment.
  - `description` string, nullable, required
  - `creator` NullableSimpleUser, nullable, required — A GitHub user.
    - `name` string, nullable
    - `email` string, nullable
    - `login` string, required
    - `id` integer, required
    - `node_id` string, required
    - `avatar_url` string, uri, required
    - `gravatar_id` string, nullable, required
    - `url` string, uri, required
    - `html_url` string, uri, required
    - `followers_url` string, uri, required
    - `following_url` string, required
    - `gists_url` string, required
    - `starred_url` string, required
    - `subscriptions_url` string, uri, required
    - `organizations_url` string, uri, required
    - `repos_url` string, uri, required
    - `events_url` string, required
    - `received_events_url` string, uri, required
    - `type` string, required
    - `site_admin` boolean, required
    - `starred_at` string
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `statuses_url` string, uri, required
  - `repository_url` string, uri, required
  - `transient_environment` boolean — Specifies if the given environment is will no longer exist at some point in the future. Default: false.
  - `production_environment` boolean — Specifies if the given environment is one that end-users directly interact with. Default: false.
  - `performed_via_github_app` NullableIntegration, nullable — GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub.
    - `id` integer, required — Unique identifier of the GitHub app
    - `slug` string — The slug name of the GitHub app
    - `node_id` string, required
    - `owner` NullableSimpleUser, nullable, required — A GitHub user.
      - `name` string, nullable
      - `email` string, nullable
      - `login` string, required
      - `id` integer, required
      - `node_id` string, required
      - `avatar_url` string, uri, required
      - `gravatar_id` string, nullable, required
      - `url` string, uri, required
      - `html_url` string, uri, required
      - `followers_url` string, uri, required
      - `following_url` string, required
      - `gists_url` string, required
      - `starred_url` string, required
      - `subscriptions_url` string, uri, required
      - `organizations_url` string, uri, required
      - `repos_url` string, uri, required
      - `events_url` string, required
      - `received_events_url` string, uri, required
      - `type` string, required
      - `site_admin` boolean, required
      - `starred_at` string
    - `name` string, required — The name of the GitHub app
    - `description` string, nullable, required
    - `external_url` string, uri, required
    - `html_url` string, uri, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `permissions` object, required — The set of permissions for the GitHub app
      - `issues` string
      - `checks` string
      - `metadata` string
      - `contents` string
      - `deployments` string
    - `events` string[], required — The list of events for the GitHub app
    - `installations_count` integer — The number of installations associated with the GitHub app
    - `client_id` string
    - `client_secret` string
    - `webhook_secret` string, nullable
    - `pem` string

---

[API](https://skmtc.net/github/apis/enterprise-server.md) · [All operations](https://skmtc.net/github/apis/enterprise-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/enterprise-server/revisions/5438365412fe/schema)
