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
| Method | Path | Purpose |
|---|---|---|
| GET | /api/v1/jobs | List jobs. Filter with state and hostname. |
| POST | /api/v1/jobs | Create a job. |
| GET | /api/v1/jobs/:id | One job. |
| PATCH | /api/v1/jobs/:id | Change a job. |
| DELETE | /api/v1/jobs/:id | Delete a job and its history. |
| POST | /api/v1/jobs/:id/pause | Pause. |
| POST | /api/v1/jobs/:id/resume | Resume. |
| POST | /api/v1/jobs/:id/run | Run once now. |
| GET | /api/v1/jobs/:id/runs | Run history. |
| GET | /api/v1/me | The 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.