Skip to main content

Pause Deployment

Pauses a specified Deployment, stopping scheduled triggers. The response returns the Deployment object with status set to paused.

Prerequisites

Endpoint and authentication configured. For details, see API overview and authentication.

Endpoint

POST /deployments/{deployment_id}/pause

Path parameters

deployment_id string (必选)Deployment ID

Request example

curl -X POST "$AGENTSTUDIO_URL/deployments/depl_xxx/pause" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY"

Response fields

id stringDeployment IDtype stringAlways deploymentname stringDeployment namedescription stringDeployment purpose descriptionagent objectSnapshot of the associated Agent at the locked versionenvironment_id stringAssociated Environment IDschedule objectSchedule trigger configuration. next_run_at is null when pausedinitial_events array<object>Initial events sent to the Agent on triggerresources array<object>Mounted file resourcesvault_ids array<string>Associated Vault ID listmetadata objectCustom key-value pairsstatus stringAlways paused after this operationpaused_reason objectPause reasonarchived_at string | nullArchive timestamp; null if not archivedcreated_at stringCreation time, ISO 8601updated_at stringLast update time, ISO 8601request_id stringUnique request identifier

Response

{
  "id": "depl_xxx",
  "type": "deployment",
  "name": "Daily order summary",
  "status": "paused",
  "agent": {
    "id": "agent_xxx",
    "version": 12
  },
  "environment_id": "env_xxx",
  "schedule": {
    "type": "cron",
    "expression": "0 9 * * 1-5",
    "timezone": "Asia/Shanghai",
    "last_run_at": null,
    "next_run_at": null
  },
  "initial_events": [
    {
      "type": "message",
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "Summarize order data from yesterday"
        }
      ]
    }
  ],
  "resources": [],
  "vault_ids": [],
  "metadata": {},
  "paused_reason": {
    "type": "manual"
  },
  "archived_at": null,
  "created_at": "2026-07-28T01:00:00Z",
  "updated_at": "2026-07-28T01:00:00Z",
  "request_id": "req_xxx"
}

Error codes

HTTP statusError codeDescription
400InvalidParameterRequired parameter missing or invalid.
401InvalidApiKeyInvalid API-key provided.
409DEPLOYMENT_STATE_CONFLICTCannot pause an archived deployment.