POST /v1/deployments/{id}
Updates a deployment with merge-patch semantics. Only fields included in the request body are modified; omitted fields retain their current values.
This endpoint uses
POST (not PATCH) for CMA alignment. Only provided fields are applied as a partial update.Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Deployment ID with the dep_ prefix |
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer $QODER_PAT |
Content-Type | Yes | application/json |
Request body
All fields are optional. Only include fields you want to change.| Field | Type | Description |
|---|---|---|
name | string | New name (max 256 characters) |
description | string | New description |
agent | string or object | New Agent reference (string ID or {id, type, version} object) |
environment_id | string | New Environment ID |
schedule | object | Updated schedule config (must include all sub-fields: type, expression, timezone) |
initial_events | array | New initial events array (1–50 events) |
resources | array | Updated resources |
vault_ids | array | Updated vault IDs |
metadata | object | Merge-patch metadata (key→value upserts, key→null deletes) |
Example request
Example response
HTTP 200 OK Returns the full updated Deployment object.Errors
| HTTP | Type | Trigger |
|---|---|---|
| 400 | invalid_request_error | Invalid field value, empty name, invalid cron expression, or referenced Agent/Environment is archived |
| 401 | authentication_error | PAT invalid or expired |
| 404 | not_found_error | Deployment does not exist |
Related
Get a deployment
Retrieve details for a single deployment.
Pause a deployment
Pause scheduling while preserving configuration.
Archive a deployment
Terminate the deployment and stop all scheduling.
Errors reference
All API error codes and the error envelope convention.