Start automated task running

Manually start an enabled scheduled automation task and create a run record.

HTTP
POST $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/agent-automation-tasks/{automation_task_id}/runs

Before you call

Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. First Query automation task details confirm that the task is enabled and obtain the task ID. Prepare a personal access token and target workspace ID that can access the target workspace.

Select the active state and the cron task of the deployed workflow.

Request body

Replace $WORKSPACE_ID, $TASK_ID, $CLOUDSIGMA_API_KEY in the example with actual values.

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/agent-automation-tasks/$TASK_ID/runs" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d '{
  "payload": {
    "date": "2026-08-18"
  }
}'

payload must conform to the task’s trigger input schema. idempotency_key is not supported on this interface.

Parameter

Type

Required

Description

workspace_id

string

Yes

workspace ID.

automation_task_id

string

Yes

Automation task ID.

Request body

Field

Type

Required

Description

payload

object or null

No

Input data for this run.

trigger_context

object or null

No

Additional context for this trigger.

Successful response

JSON
{
  "code": 0,
  "data": {
    "id": "run_01",
    "workspace_id": "ws_01",
    "automation_task_id": "task_01",
    "automation_task_version": 1,
    "trigger_type": "manual",
    "trigger_config_snapshot": {
      "mode": "cron"
    },
    "status": "queued",
    "created_at": "2026-08-21T07:00:00Z",
    "updated_at": "2026-08-21T07:00:00Z"
  }
}

Field

Type

Description

data.id

string

New run, workspace and automation task identifiers.

data.workspace_id

string

New run, workspace and automation task identifiers.

data.automation_task_id

string

New run, workspace and automation task identifiers.

data.automation_task_version

integer

The task version used for this run.

data.trigger_type

string

Fixed trigger type and configuration snapshot for manual triggering. Values: cron, api, manual, callback.

data.trigger_config_snapshot

object

Fixed trigger type and configuration snapshot for manual triggering.

data.trigger_config_snapshot.mode

string

processing mode. Values: cron, api, callback.

data.trigger_config_snapshot.cron_expression

string

Cron expressions.

data.trigger_config_snapshot.result_mode

string

How to handle results.

data.trigger_config_snapshot.service_name

string

Service name.

data.trigger_config_snapshot.input_schema

object or null

Input field structure.

data.trigger_config_snapshot.config

object or null

Configuration.

data.status

string

Initial operating status. Please refer to the status of subsequent checks. Values: queued, running, input_required, pending_approval, succeeded, failed, canceled, expired.

data.final_text

string

Final text.

data.structured_output

object or null

Structured output.

data.output_validation_status

string

Output verification status. Values: passed, failed, skipped.

data.output_validation_error

string

Output verification errors.

data.artifact_refs

array of object

Product reference.

data.artifact_refs[].type

string

type.

data.artifact_refs[].id

string

logo.

data.artifact_refs[].uri

string

File URI.

data.artifact_refs[].name

string

Name.

data.artifact_refs[].mime

string

Media type.

data.artifact_refs[].meta

object or null

Extended metadata.

data.error

object or null

error message.

data.started_at

string

Start time. RFC 3339 time.

data.completed_at

string

Completion time. RFC 3339 time.

data.created_at

string

Creation and last update times, using RFC 3339 format. RFC 3339 time.

data.updated_at

string

Creation and last update times, using RFC 3339 format. RFC 3339 time.

Record data.id. Running a call does not mean it is finished. Use this ID Query the automation task running details to track the status. After entering the final state Query the automation task running result.

Error response

When the task already has cron with status queued, running, input_required or pending_approval running, HTTP 409, code=4 is returned.

Before submitting the workflow, running snapshots, queued or failed records, events, and audit records may have been created. After failure, first query the running record and task last_run_summary. When HTTP 201 is returned, the running status is not necessarily queued, and it cannot be judged that the operation has been completed based on this.

JSON
{
  "code": 2,
  "message": "<错误信息>"
}

Common HTTP errors

HTTP status code

error code

Description

400

2(INVALID_ARGUMENT)

The request body is invalid, the task is not a manually runnable enabled scheduled task, or the input does not meet the task constraints. Recommendation: Check the task status, trigger method and input.

401

6(UNAUTHENTICATED)

Valid identity credentials are missing. Recommendation: Check the API Key.

403

5(PERMISSION_DENIED)

The current identity has not been verified for workspace access and valid roles. Recommendation: Use an identity and a valid role with workspace access.

404

3(NOT_FOUND)

The automated task does not exist. Suggestion: Check the task details first.

409

4(ALREADY_EXISTS)

The task has conflicting activities running, or the task status conflicts. Suggestion: Wait for the existing run to end or refresh the task status before trying again.

503

15(UNAVAILABLE)

Running executors, input snapshots, or workflow submission services are temporarily unavailable. Suggestion: Check the current status first. Do not automatically resubmit.

Last updated on