Create agent schedule
Create an active recurring agent schedule. The cadence is a five-field UTC cron expression; invalid cadences return 400. nextRunAt is computed server-side. Runs spend team credits within the supplied ceilings, which default to $100 per run and per day (1000000000 decimillicents each); explicit null removes the daily ceiling. Send an Idempotency-Key and reuse it with the same request after a lost response to return the existing schedule. Replays preserve subsequent edits and pause state; different requests return 409, and a deleted schedule returns 404 rather than being recreated.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Reuse this key with the same creation request after a lost response. The original automation is returned; a different request is rejected.
1 - 200Path Parameters
Team (workspace) id (UUID). Discover ids via the list teams endpoint or the agent context.
Body
Display name for the automation, 1-120 characters.
1 - 120The instruction the scheduled run starts from - the prompt handed to the agent.
1 - 20000Five-field cron expression (minute hour day-of-month month day-of-week), evaluated in UTC. Invalid expressions are rejected 400.
1 - 100"0 9 * * *"
"*/30 * * * 1-5"
Per-run credit ceiling in decimillicents. A scheduled run stops (incomplete, surfaced in the inbox) when it reaches this spend. Omit for the default of $100 per run (1000000000 decimillicents).
Daily credit ceiling in decimillicents across all of this schedule's runs (UTC day). The sweeper skips firing once reached. Omit for the default of $100 per day (1000000000 decimillicents); send null explicitly for no daily ceiling.
x > 0Skip firing while this many (or more) of the schedule's runs sit unreviewed in the inbox, 1-100 (default 10). Keeps a broken automation from flooding the queue.
1 <= x <= 100Response
Success
a Universally Unique Identifier
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$a Universally Unique Identifier
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$a Universally Unique Identifier
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$Display name for the automation, 1-120 characters.
1 - 120The instruction the scheduled run starts from - the prompt handed to the agent.
1 - 20000Five-field cron expression (minute hour day-of-month month day-of-week), evaluated in UTC. Invalid expressions are rejected 400.
1 - 100"0 9 * * *"
"*/30 * * * 1-5"
When the schedule next fires (ISO-8601 UTC).
When the sweeper last fired this schedule (ISO-8601 UTC); null before the first run.
Per-run credit ceiling in decimillicents. A scheduled run stops (incomplete, surfaced in the inbox) when it reaches this spend.
Optional daily credit ceiling in decimillicents across all of this schedule's runs (UTC day). The sweeper skips firing once reached; send null for no daily ceiling.
x > 0Skip firing while this many (or more) of the schedule's runs sit unreviewed in the inbox, 1-100 (default 10). Keeps a broken automation from flooding the queue.
1 <= x <= 100When the schedule was paused (ISO-8601 UTC); null while active. A paused schedule never fires.
a Universally Unique Identifier
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$