/repos/{owner}/{repo}/deploymentsCreate a deployment
Creates a deployment for a repository ref, such as a branch, tag, or commit SHA. Supply ref and configure the target environment, commit status checks, or deployment payload as needed; omitted settings use the documented defaults. A 202 response indicates that the default branch was merged into the requested ref instead of creating a deployment.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Configuration for the deployment. ref is required; other fields control the task, environment, status checks, and deployment metadata.
A 409 is returned when merging the default branch causes a conflict or required commit status checks have not succeeded. A 422 is returned when validation fails or the endpoint has been spammed. ref is required and must identify a branch, tag, or SHA; environment defaults to production, and required_contexts defaults to all unique status contexts.