Skip to main content
POST
Create a new schedule

Headers

x-user-id
string
required

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

Body

application/json

Request body for creating a new schedule.

name
string
required

Display name of the schedule.

cron_expression
string
required

Standard 5-field cron expression, e.g. '0 9 * * 1-5'.

agent_id
string
required

Agent to run when the schedule fires.

chat_model_config
ChatModelConfig · object
required

Model configuration for the auto-created session.

description
string
default:""

Optional description.

timezone
string
default:UTC

IANA timezone name, e.g. 'America/New_York' or 'Asia/Shanghai'.

enabled
boolean
default:true

Whether the schedule is active immediately after creation.

stateful
boolean
default:false

If True, consecutive executions share the same session context.

permission_mode
enum<string>
default:dont_ask

Permission level for the agent during scheduled execution.

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

Response

Successful Response

Response body after creating a schedule.

schedule_id
string
required

Server-assigned schedule identifier.