Skip to main content
PATCH
/
schedule
/
{schedule_id}
Update a schedule
curl --request PATCH \
  --url https://api.example.com/schedule/{schedule_id} \
  --header 'Content-Type: application/json' \
  --header 'x-user-id: <x-user-id>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "cron_expression": "<string>",
  "timezone": "<string>",
  "enabled": true,
  "stateful": true
}
'
{
  "user_id": "<string>",
  "agent_id": "<string>",
  "data": {
    "name": "<string>",
    "cron_expression": "<string>",
    "started_at": "2023-11-07T05:31:56Z",
    "chat_model_config": {
      "type": "<string>",
      "credential_id": "<string>",
      "model": "<string>",
      "parameters": {}
    },
    "description": "",
    "enabled": true,
    "timezone": "UTC",
    "ended_at": "2023-11-07T05:31:56Z",
    "stateful": false,
    "permission_mode": "dont_ask",
    "source": "USER",
    "source_session_id": ""
  },
  "id": "<string>",
  "updated_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.agentscope.io/llms.txt

Use this file to discover all available pages before exploring further.

Headers

x-user-id
string
required

Caller's user ID. Temporary header-based identity; will be replaced by JWT auth.

Path Parameters

schedule_id
string
required

Body

application/json

Request body for partially updating a schedule.

Omit any field to keep its current value. Changing cron_expression or timezone will reschedule the APScheduler job immediately. Changing enable to False removes the job from the scheduler without deleting the record; setting it back to True re-registers it.

name
string | null

New display name.

description
string | null

New description.

cron_expression
string | null

New cron expression. Reschedules the task immediately.

timezone
string | null

New IANA timezone name.

enabled
boolean | null

Set to False to pause the schedule without deleting it.

stateful
boolean | null

Change whether executions share session context.

permission_mode
enum<string> | null

New permission mode.

Available options:
default,
accept_edits,
explore,
bypass,
dont_ask

Response

Successful Response

Persisted schedule record.

user_id
string
required

Owner user id.

agent_id
string
required

The agent id that will execute the schedule.

data
ScheduleData · object
required

Schedule configuration.

id
string

Unique identifier for the credential.

updated_at
string<date-time>
created_at
string<date-time>