Syndai Docs

Create a schedule

POST
/api/v1/external/coding/schedules

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 wantpolicy_config.autonomyWhat each fire does
Review every changeauto (or omit: the project default applies at fire time)Opens a PR; while it is unmerged the next slot rests
Approve before a PR existsgatedHolds for approval up to 24 h, then cancels; later slots skip while it holds
Fully autonomousmergeLands when every gate is green, while the key or person that saved the policy may still merge
Fully autonomous, no PRpushFast-forwards the default branch (API only)
  • trigger is 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_usd caps each fire.
  • from_coding_run_id repeats an existing run: the schedule runs that run's original, full prompt on its repository. Omit prompt and coding_repository_id with it; send both without it.
  • With skip_if_no_new_commits (default true) 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. Send false for 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_on is true: only a workspace owner or admin (or a key one of them created) may set it (403 otherwise), and it needs occurrence_budget_usd (400 otherwise). A fire without that consent does not run.
  • Send client_request_id to make the create safe to retry: a replay returns 409 with a Location header naming the existing schedule.

Authorization

CustomerApiKey
headerAuthorizationBearer <API Key>

Customer API key sent as a bearer token

Query Parameters

customer_id?|null

Request Body

application/json
  1. body
client_request_id?|null
coding_repository_id?|null
from_coding_run_id?|null
occurrence_budget_usd?number|null
policy_config?
prompt?string|null
schedule_paid_on?boolean
Defaultfalse
skip_if_no_new_commits?boolean
Defaulttrue
trigger*

Response Body

Document created, URL follows

application/json
  1. response
cadence_label*string
coding_repository_id*string
Formatuuid
consecutive_failures*integer
created_at*string
Formatdate-time
id*string
Formatuuid
last_occurrence?|null
last_run_at?|null
next_fire_at?|null
occurrence_budget_usd?number|null
pause_reason?string|null
policy_config?
prompt*string
repo_name?string|null
schedule_paid_on?boolean
Defaultfalse
skip_if_no_new_commits*boolean
status*string
trigger*
upcoming?array<>
Example Request
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"  }}