Skip to main content
POST
Create a schedule

Authorizations

x-api-key
string
header
required

Body

application/json

Create a schedule that runs tool_name on cadence, or once now when no cadence is given.

tool_kwargs are the arguments each fire passes to the tool, the tool's alone and forwarded untouched — a tool whose OWN argument is named subject carries it here like any argument. subject is the OPTIONAL top-level door field naming the schedule-door state context each fire re-establishes: the create door stamps it onto the job, and the fire keys its state writes and parks on it (it never reaches the base tool). state_binding is the OPTIONAL door-layer binding the fire applies around the started tool alone (never the base tool's). schedule_name names a recurring schedule; without it the door derives one from the tool, its arguments and the cadence.

A schedule is a parkable-driving door: it carries the four :class:ParkableDoorMixin jqs (start_expr builds the fired tool's kwargs; cancel_expr / resume_expr act on the run's parked interactions; extras_expr builds the started run's extras), each evaluated over the fired tool's arguments with the run's parked interactions bound as $parked. Any contract jq needs an execution_key (the api-key user_id the recurring fire runs as, so a park it raises can be rebound and resumed under that authority).

tool_name
string
required

The base tool to run.

Minimum string length: 1
cadence
IntervalCadence · object

Fire every every seconds; relative aligns the schedule to the interval's own clock.

cancel_expr
TemplatedText · object | null

A renderable text: its source plus the parameters its render takes.

EXACTLY ONE source is set — content (the text inline) or id (the id of a stored resource holding the text); neither and both are refused at construction. kwargs are the render parameters for the TEXT and apply either way, so moving a text from inline to stored (or back) leaves its parameters untouched.

execution_key
string | null

The api-key user_id a contract-bearing recurring fire runs as (required with any contract jq).

Minimum string length: 1
extras_expr
TemplatedText · object | null

A renderable text: its source plus the parameters its render takes.

EXACTLY ONE source is set — content (the text inline) or id (the id of a stored resource holding the text); neither and both are refused at construction. kwargs are the render parameters for the TEXT and apply either way, so moving a text from inline to stored (or back) leaves its parameters untouched.

resume_expr
TemplatedText · object | null

A renderable text: its source plus the parameters its render takes.

EXACTLY ONE source is set — content (the text inline) or id (the id of a stored resource holding the text); neither and both are refused at construction. kwargs are the render parameters for the TEXT and apply either way, so moving a text from inline to stored (or back) leaves its parameters untouched.

schedule_name
string | null
Minimum string length: 1
start_expr
TemplatedText · object | null

A renderable text: its source plus the parameters its render takes.

EXACTLY ONE source is set — content (the text inline) or id (the id of a stored resource holding the text); neither and both are refused at construction. kwargs are the render parameters for the TEXT and apply either way, so moving a text from inline to stored (or back) leaves its parameters untouched.

state_binding
StateBinding · object | null

The optional binding a door carries: one or more :class:StateAttach entries. Frozen.

The same shape is stored on PresetBody/PresetSeed, TargetConversationConfig, HookRegister and ScheduleCreate, deposited on ToolInvocation through the ambient dispatch context, and re-applied per binding site by a consumer.

subject
StateSubject · object | null

One addressed subject: a scope (target_kind, target_name) plus (kind, key) within it.

Equality (and identity across every store method) is all four fields. key is stripped and must be 1..512 characters; kind matches :data:SUBJECT_KIND_RE. Frozen so a validated subject cannot be mutated after it is read back.

tool_kwargs
Tool Kwargs · object

Response

Success.

data
any
required

The deliberate "any JSON value" marker for a genuinely-open body.

A tool or upstream passthrough whose shape is not fixed. A named subclass, never a bare alias: the emitter registers a component under model.__name__, so only a real class yields a stable, unique component name. Reach for it ONLY for a genuinely-open body, never as a shortcut past authoring a real model.