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.

Servers

Path parameters

Name Type Required Description
repo String Yes

The name of the repository without the .git extension. The name is not case sensitive.

deployment_id Integer Yes

deployment_id parameter

owner String Yes

The account owner of the repository. The name is not case sensitive.

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
target_url String No

The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment.

[!NOTE] It's recommended to use the log_url parameter, which replaces target_url.

description String No

A short description of the status. The maximum description length is 140 characters.

environment_url String No

Sets the URL for accessing your environment. Default: ""

environment String No

Name for the target deployment environment, which can be changed when setting a deploy status. For example, production, staging, or qa. If not defined, the environment of the previous status on the deployment will be used, if it exists. Otherwise, the environment of the deployment will be used.

log_url String No

The full URL of the deployment's output. This parameter replaces target_url. We will continue to accept target_url to support legacy uses, but we recommend replacing target_url with log_url. Setting log_url will automatically set target_url to the same value. Default: ""

state String Yes

The state of the status. When you set a transient deployment to inactive, the deployment will be shown as destroyed in GitHub.

Possible values:

  • "inactive"
  • "in_progress"
  • "error"
  • "queued"
  • "success"
  • "failure"
  • "pending"
auto_inactive Boolean No

Adds a new inactive status to all prior non-transient, non-production environment deployments with the same repository and environment name as the created status's deployment. An inactive status is only added to deployments that had a success state. Default: true

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.