Skip to main content
Deployments

Run a deployment

POST /api/v1/cloud/deployments/{id}/run Manually triggers a deployment run. The deployment must be in active status (not paused or archived). If CAS cannot create a session for the run, the returned Deployment Run has session_id: null and an error object.

Path parameters

ParameterTypeDescription
idstringDeployment ID with the dep_ prefix

Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT or SAT>
Content-TypeYesapplication/json

Request body

No request body is required. Send an empty JSON object {} or omit the body.

Example request

curl -X POST "https://api.qoder.com.cn/api/v1/cloud/deployments/dep_019ec556114c78f8b60ee34fcb98bf59/run" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN" \
  -H "Content-Type: application/json"

Example response

HTTP 200 OK Returns a Deployment Run object.
{
  "agent": {
    "id": "agent_019eb4d4a06d747c865d5800b9c57ae2",
    "type": "agent",
    "version": 1
  },
  "created_at": "2026-06-14T08:54:06Z",
  "deployment_id": "dep_019ec556114c78f8b60ee34fcb98bf59",
  "error": null,
  "id": "drun_019ec55694c07f2a9b402ffb4448ec18",
  "session_id": "sess_019ec55694c47605a8904c8f3d842ccb",
  "trigger_context": {
    "type": "manual"
  },
  "type": "deployment_run"
}

Response fields (Deployment Run)

FieldTypeDescription
idstringRun unique identifier (drun_ prefix)
typestringAlways "deployment_run"
deployment_idstringParent Deployment ID
agentobjectAgent reference: {id, type, version}
errorobject or nullError details ({message, type}) when the run failed to create a session; null when session_id is present
trigger_contextobjectTrigger source: {"type": "manual"} or {"type": "schedule", "scheduled_at": "..."}
session_idstring or nullAssociated Session ID. Public rows expose exactly one of session_id or error.
created_atstringRecord creation time (ISO 8601)

Errors

HTTPTypeTrigger
401authentication_errorPAT or SAT invalid or expired
404not_found_errorDeployment does not exist
409conflict_errorDeployment is archived or not in active status
See Errors for the full error envelope.