API

A REST API mirrors the dashboard. Tokens are created in settings, shown once, and sent as a bearer token. Validation matches the forms exactly, because both call the same code.

curl https://cronjob.dev/api/v1/jobs \
  -H "Authorization: Bearer $TOKEN"
Endpoints
MethodPathPurpose
GET/api/v1/jobsList jobs. Filter with state and hostname.
POST/api/v1/jobsCreate a job.
GET/api/v1/jobs/:idOne job.
PATCH/api/v1/jobs/:idChange a job.
DELETE/api/v1/jobs/:idDelete a job and its history.
POST/api/v1/jobs/:id/pausePause.
POST/api/v1/jobs/:id/resumeResume.
POST/api/v1/jobs/:id/runRun once now.
GET/api/v1/jobs/:id/runsRun history.
GET/api/v1/meThe account.
Creating a job
curl -X POST https://cronjob.dev/api/v1/jobs \
  -H "Authorization: Bearer $TOKEN" \
  -H "content-type: application/json" \
  -d '{"url":"https://api.example.com/health",
       "method":"GET",
       "schedule_type":"cron",
       "schedule":"*/5 * * * *",
       "timezone":"Europe/Berlin"}'
Errors and limits

Errors come back as application/problem+json with a status, a title and, for a validation failure, the field at fault. Six hundred requests an hour per token.