Update Deployment
Updated at:
Updates the configuration of a specified Deployment. All fields are optional; only the provided fields are updated.
Prerequisites
Endpoint and authentication configured. For details, see Overview and authentication.
Endpoint
POST /deployments/{deployment_id}
Path parameters
| Field | Required | Type | Description |
|---|---|---|---|
deployment_id | Yes | string | Deployment ID |
Request body
All fields are optional; only the provided fields are updated.
| Field | Required | Type | Description |
|---|---|---|---|
name | No | string | Deployment name, max 256 characters |
description | No | string | Description of the deployment's purpose |
agent | No | object | Associated Agent. Contains id (string, required) and version (integer; locks to a specific Agent version; omit to use the latest version) |
environment_id | No | string | null | Associated Environment ID; pass null to clear the association |
schedule | No | object | null | Schedule trigger configuration; pass null to clear the schedule. Contains type (cron), expression, timezone |
initial_events | No | array<object> | Initial events sent to the Agent on trigger, 1–50 items |
resources | No | array<object> | Mounted file resources. Each item contains type (file), file_id, mount_path |
vault_ids | No | array<string> | Associated Vault ID list |
metadata | No | object | Custom key-value pairs |
Request example
curl -X POST "$AGENTSTUDIO_URL/deployments/depl_xxx" \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "daily-order-summary-v2",
"schedule": null
}'
Response example
{
"id": "depl_xxx",
"type": "deployment",
"name": "daily-order-summary-v2",
"status": "active",
"agent": {
"id": "agent_xxx",
"version": 12
},
"environment_id": "env_xxx",
"schedule": null,
"initial_events": [
{
"type": "message",
"role": "user",
"content": [
{
"type": "text",
"text": "Summarize yesterday's order data"
}
]
}
],
"resources": [],
"vault_ids": [],
"metadata": {},
"paused_reason": null,
"archived_at": null,
"created_at": "2026-07-28T01:00:00Z",
"updated_at": "2026-07-28T01:00:00Z",
"request_id": "req_xxx"
}
Response fields
| Field | Type | Description |
|---|---|---|
id | string | Deployment ID |
type | string | Always deployment |
name | string | Deployment name |
description | string | Deployment purpose description |
agent | object | Snapshot of the associated Agent at the locked version |
environment_id | string | Associated Environment ID |
schedule | object | null | Schedule trigger configuration; null if cleared |
initial_events | array<object> | Initial events sent to the Agent on trigger |
resources | array<object> | Mounted file resources |
vault_ids | array<string> | Associated Vault ID list |
metadata | object | Custom key-value pairs |
status | string | Deployment status: active or paused |
paused_reason | object | null | Pause reason; returned only when the status is paused |
archived_at | string | null | Archive timestamp; null if not archived |
created_at | string | Creation time, ISO 8601 |
updated_at | string | Last update time, ISO 8601 |
request_id | string | Unique request identifier |
Error codes
| HTTP status | Error code | Description |
|---|---|---|
| 400 | InvalidParameter | Required parameter missing or invalid |
| 401 | InvalidApiKey | Invalid API key provided |
| 409 | DEPLOYMENT_STATE_CONFLICT | Cannot update an archived deployment |
Is this page helpful?