REST API

Every action in the web UI is also available over JSON. Use it to wire claude-scheduler into your CI, your own dashboards, or other agents.

Authentication

Two ways, in order of preference for scripts:

  1. API key (recommended) — org-scoped, admin role, revocable any time. Created from Settings → API keys. Pro / Team plans only.
  2. Session cookie — what the dashboard uses. Convenient for browser-side scripts, not for CI.
# create the key once from the dashboard, copy it now (only shown once)
export CS_KEY=csk_live_…
curl -fsS https://cronforclaude.com/api/projects \
  -H "Authorization: Bearer $CS_KEY"

Quota + plan errors

When a plan limit is hit, the endpoint returns HTTP 402 Payment Required with a body shaped like { error, code } where code is one of schedules, jobs, runners, members, api_keys. Scripts should treat 402 as a hard stop and surface the message verbatim.

403 is permission related — most often the key was created on a Free-plan org and is calling a Pro-only feature. 401 means the key is invalid or revoked.

Endpoints

MethodPathNotes
GET/api/projectslist (?includeArchived=1 to include)
POST/api/projectscreate (admin)
GET/api/projects/:idOrSlugby id or slug
PATCH/api/projects/:idOrSlugpartial update (admin)
DELETE/api/projects/:idOrSlugcascades (admin)
GET/api/scheduleslist
POST/api/schedulescreate (admin)
GET/api/schedules/:id
PATCH/api/schedules/:idpartial update (admin)
DELETE/api/schedules/:id(admin)
POST/api/schedules/:id/triggerenqueue one job now
DELETE/api/schedules/:id/sessiondrop saved Claude session id
GET/api/jobslist (filters: status, project, scheduleId)
GET/api/jobs/:idfull row incl prompt/stdout/stderr
GET/api/jobs/:id/eventsstream-json events, paginated
POST/api/jobs/:id/cancel
POST/api/jobs/:id/replayre-enqueue same prompt
POST/api/jobs/cancel-queued?project=&scheduleId= (admin)
GET/api/runnerslist (token hash redacted)
POST/api/runnerscreate + return one-time token (admin)
DELETE/api/runners/:id(admin)
GET/api/settingsorg settings (token masked)
PUT/api/settingsupdate (admin)
GET/api/orgsyour memberships
POST/api/orgs/switchset active org for this session

Common recipes

List today's failed jobs

curl -fsS "https://cronforclaude.com/api/jobs?status=failed&limit=200" \
  -H "Authorization: Bearer $CS_KEY" | jq '.[].id'

Trigger a schedule from CI

curl -fsS -X POST https://cronforclaude.com/api/schedules/$SCHED_ID/trigger \
  -H "Authorization: Bearer $CS_KEY"

Watch a job to completion

while true; do
  resp=$(curl -fsS https://cronforclaude.com/api/jobs/$ID -H "Authorization: Bearer $CS_KEY")
  status=$(echo "$resp" | jq -r .status)
  echo "[$ID] $status"
  case "$status" in succeeded|failed|timeout|cancelled) break ;; esac
  sleep 5
done

Rate limits

100 req/min per key by default. Sign-in / sign-up / password-reset endpoints have tighter buckets (5/min, 3/min, 3/15min). Keys are tied to admin role; member API keys are not a thing yet.