Create a schedule
POST
Create a recurring coding-run schedule. Each fire runs the saved prompt as a coding run, with the saved policy_config.
Supervised or autonomous is policy_config.autonomy:
| You want | policy_config.autonomy | What each fire does |
|---|---|---|
| Review every change | auto (or omit: the project default applies at fire time) | Opens a PR; while it is unmerged the next slot rests |
| Approve before a PR exists | gated | Holds for approval up to 24 h, then cancels; later slots skip while it holds |
| Fully autonomous | merge | Lands when every gate is green, while the key or person that saved the policy may still merge |
| Fully autonomous, no PR | push | Fast-forwards the default branch (API only) |
triggeris a 5-field cron with an IANA timezone, at most every 15 minutes; runs start within 5 minutes of the slot.- Scheduled runs never ask clarifying questions and never hold for plan review. They get one design direction.
occurrence_budget_usdcaps each fire.from_coding_run_idrepeats an existing run: the schedule runs that run's original, full prompt on its repository. Omitpromptandcoding_repository_idwith it; send both without it.- With
skip_if_no_new_commits(defaulttrue) a slot rests while the default branch has not moved since the last successful run, so closing a PR without merging keeps the job resting until the next commit. Sendfalsefor jobs driven by the outside world (news, registry bumps). - Merging stands only while its consent does: the API key that saved the policy must stay unrevoked, or the person must stay an owner or admin. Otherwise the fire opens a PR and its occurrence summary says so; re-saving the policy restores merging.
- Out of credits or over the monthly spend ceiling, a fire is skipped with a summary that says so, and the next slot retries on its own.
- A schedule needs an existing repository: create one with a New-project run (
new_repository), or connect GitHub. - Fires spend nothing until
schedule_paid_onistrue: only a workspace owner or admin (or a key one of them created) may set it (403 otherwise), and it needsoccurrence_budget_usd(400 otherwise). A fire without that consent does not run. - Send
client_request_idto make the create safe to retry: a replay returns 409 with aLocationheader naming the existing schedule.
CustomerApiKeyheader
AuthorizationBearer <API Key>Customer API key sent as a bearer token
customer_id?|nullapplication/json- body
client_request_id?|nullcoding_repository_id?|nullfrom_coding_run_id?|nulloccurrence_budget_usd?number|nullpolicy_config?prompt?string|nullschedule_paid_on?booleanDefault
falseskip_if_no_new_commits?booleanDefault
truetrigger*Document created, URL follows
application/json- response
cadence_label*stringcoding_repository_id*stringFormat
uuidconsecutive_failures*integercreated_at*stringFormat
date-timeid*stringFormat
uuidlast_occurrence?|nulllast_run_at?|nullnext_fire_at?|nulloccurrence_budget_usd?number|nullpause_reason?string|nullpolicy_config?prompt*stringrepo_name?string|nullschedule_paid_on?booleanDefault
falseskip_if_no_new_commits*booleanstatus*stringtrigger*upcoming?array<>curl -X POST 'https://api.syndai.ai/api/v1/external/coding/schedules' \ -H 'Content-Type: application/json' \ -d '{ "client_request_id": "weekly-deps-storefront", "coding_repository_id": "8a1d4e2f-5b6c-4d7e-8f9a-0b1c2d3e4f50", "prompt": "Update dependencies and fix anything the upgrade breaks.", "skip_if_no_new_commits": true, "trigger": { "expr": "0 9 * * 1", "kind": "cron", "timezone": "Europe/London" }}'Example Response
{ "cadence_label": "Weekly on Monday at 9:00 AM", "coding_repository_id": "8a1d4e2f-5b6c-4d7e-8f9a-0b1c2d3e4f50", "consecutive_failures": 0, "created_at": "2026-10-27T09:00:00Z", "id": "7d6c5b4a-3928-4f17-8e6d-5c4b3a291807", "next_fire_at": "2026-11-02T09:00:00Z", "prompt": "Update dependencies and fix anything the upgrade breaks.", "repo_name": "storefront", "schedule_paid_on": false, "skip_if_no_new_commits": true, "status": "active", "trigger": { "expr": "0 9 * * 1", "kind": "cron", "timezone": "Europe/London" }}