Documentation menu
Projects

Create a deployment

POST /api/v1/projects/{projectId}/environments/{environmentId}/deployments

Validates the Release's artifacts, then atomically claims the Idempotency-Key and queues the Deployment for asynchronous execution. A replay with the same key and payload returns the original Deployment regardless of later activations. 404: missing Project, Environment, Release, or configuration pins. 409: expected-active-deployment-mismatch, idempotency_key_reused, or an invalid Release snapshot. 422: artifact diagnostics. 503: the execution could not be queued (Retry-After).

Parameters

path

NameTypeRequiredDescription
projectIdstringrequiredIdentifies the Project that owns the addressed resource. Applies to Create a deployment.
environmentIdstringrequiredIdentifies the Project environment addressed by the operation. Applies to Create a deployment.

header

NameTypeRequiredDescription
Idempotency-Keystringrequired

Request body

Required — Submit an existing Release and explicit Environment configuration revision for asynchronous Deployment execution. Promotion and rollback are new Deployments of an existing Release; expectedActiveDeploymentId optionally guards them against a concurrent activation change.

application/json

NameTypeRequiredDescription
releaseIdstringrequiredImmutable Release whose exact Agent and Definition revision pins will be deployed.
configurationRevisionIdstringrequiredExisting immutable configuration revision head for this Project Environment.
expectedActiveDeploymentIdstringoptionalCompare-and-set guard: the ready Deployment the Environment must currently activate.

Responses

StatusDescriptionBody
201Response for status 201application/json — object — type: "deployment" (required); id: string (required); projectId: string (required); environmentId: string (required); releaseId: string | null (required); configurationRevisionId: string (required); status: "queued" | "validating" | "provisioning" | "materializing" | "ready" | "failed" | "canceled" (required); diagnostics: object | null (required); createdAt: string (required); updatedAt: string (required)
400The request is malformed or cannot be processed.application/json — PublicApiError — error: object (required)
401Authentication failed. The Authorization header is missing, or the credential is invalid or expired.application/json — PublicApiError — error: object (required)
403Access denied. The authenticated user does not have permission to perform this action.application/json — PublicApiError — error: object (required)
404Resource not found.application/json — PublicApiError — error: object (required)
409Request conflicts with current state of the resource, including safe deployment conflict classifications.application/json — PublicApiError — error: object (required)
422Request validation failed. Check the request body, query parameters, or path parameters.application/json — PublicApiError — error: object (required)
429Too many requests.application/json — PublicApiError — error: object (required)
500The server could not complete the request.application/json — PublicApiError — error: object (required)
503Service temporarily unavailable (e.g. execution capacity exhausted). The response carries a Retry-After header; retry with backoff.application/json — PublicApiError — error: object (required)