All Products
Search
Document Center

Qoder CN Series:Update a schedule

Last Updated:Jul 15, 2026

Updates the configuration of an existing Forward Schedule.

Request headers

Header

Required

Description

Authorization

Yes

Bearer <PAT>

Content-Type

Yes

application/json

Idempotency-Key

No

An optional idempotency key for requests with side effects.

Path parameters

Parameter

Type

Required

Description

schedule_id

string

Yes

The ID of the Forward Schedule to update.

Request body

Parameter

Type

Required

Description

name

string

No

The new name for the schedule.

description

string

No

The new description for the schedule.

template_id

string

No

The ID of the new Forward Template to associate.

initial_events

array

No

Replaces the initial event list.

execution

object

No

Updates the execution policy via merge.

trigger_policy

object|null

No

Updates the trigger policy. null changes it to manual.

environment_id

string

No

The ID of the new execution environment.

metadata

object

No

Updates metadata via merge. null values delete keys.

Example request

curl -s -X POST 'https://api.qoder.com.cn/api/v1/forward/schedules/sched_019f00112233445566778899aabbccdd' \
  -H "Authorization: Bearer $QODER_PAT" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Weekday tech brief",
    "trigger_policy": {
      "type": "cron",
      "expression": "0 9 * * 1-5",
      "timezone": "Asia/Shanghai"
    }
  }'

Example response

HTTP 200 OK

{
  "id": "sched_019f00112233445566778899aabbccdd",
  "identity_id": "idn_019eabc123",
  "template_id": "tmpl_support",
  "name": "Weekday tech brief",
  "description": "Generate a daily technology news summary",
  "status": "active",
  "paused_reason": null,
  "initial_events": [
    {
      "type": "user.message",
      "content": "Summarize current technology news in five bullet points."
    }
  ],
  "execution": {
    "session_mode": "new_session",
    "max_concurrent_runs": 1,
    "max_attempts": 1,
    "timeout_ms": 300000
  },
  "trigger_policy": {
    "type": "cron",
    "expression": "0 9 * * 1-5",
    "timezone": "Asia/Shanghai",
    "upcoming_runs_at": ["2026-06-23T01:00:00Z"]
  },
  "environment_id": "env_019e64e01a137caf953ac2ac7b42ec5c",
  "sinks": [],
  "metadata": {},
  "archived_at": null,
  "created_at": "2026-06-22T10:00:00Z",
  "updated_at": "2026-06-22T10:30:00Z"
}

Response fields

Returns the updated Schedule object.

Errors

HTTP

Type

Code

Trigger

400

invalid_request_error

invalid_trigger_policy

Trigger policy is invalid.

400

invalid_request_error

unsupported_sinks_input

Request body contains sinks.

404

not_found_error

schedule_not_found

Schedule does not exist.

409

invalid_request_error

schedule_archived

Schedule is archived.

Notes

  • HTTP update requests do not support updating sinks.

  • reuse_session means Forward manages a fixed execution Session for this Schedule; callers cannot provide an arbitrary existing session_id.