apicheats.dev Cheat sheet Raw .md
POST

Try POST /repos/{owner}/{repo}/deployments — GitHub API

GitHub playground

Create a deployment

Credentials

Kept in this tab only. Requests go through apicheats.dev's same-origin proxy straight to api.github.com; the proxy stores and logs nothing about them.

Headers

Path

Body application/json

9 body fields
  • ref · required · string — The ref to deploy. This can be a branch, tag, or SHA.
  • task · optional · string — Specifies a task to execute (e.g., `deploy` or `deploy:migrations`).
  • auto_merge · optional · boolean — Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch.
  • required_contexts · optional · string[] — The [status](https://docs.github.com/rest/commits/statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.
  • payload · optional · object — Request body field payload.
  • environment · optional · string — Name for the target deployment environment (e.g., `production`, `staging`, `qa`).
  • description · optional · string — Short description of the deployment.
  • transient_environment · optional · boolean — Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false`
  • production_environment · optional · boolean — Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise.