Skip to main content
POST

Behavior

The session_request template is validated and resolved at creation time (the agent must exist), then re-resolved on every fire.

Request body

string
required
Display name for the schedule, 1 to 255 characters.
object
required
When the schedule fires. The expression may not fire more often than once every 5 minutes.
string
required
Five-field cron expression, for example "0 9 * * 1-5".
string
required
IANA timezone the expression is evaluated in, for example "Europe/Paris".
string
"cron", the default and only variant.
object
required
Template used to create each scheduled session, in the same shape as the Create session body. Must contain at least one initial message, may not set parent_session_id, and may not attach files. Defaults to max_time_s: 3600 when the template does not set it.
string
Description, up to 255 characters.
integer
How many sessions to create before the schedule becomes inactive. Each automatic fire that creates a session counts toward it, but skipped fires, errors, and manual triggers do not. When the count is reached, the schedule is paused and pause_note explains that it became inactive. Omit it to keep firing until you pause or delete the schedule. Must be at least 1.

Response

201 with the created schedule object.

Errors