Cronomonitor

API

Create and manage checks from scripts and deploy pipelines, so new jobs are monitored the moment they ship. The API is part of the Team plan.

Authentication

Create a key on your Account page (owners only), then send it as a bearer token. A key can manage every project in its account, so keep it secret, for example in your CI system's secrets.

curl https://cronomonitor.com/api/v1/projects \
  -H "Authorization: Bearer cm_live_…"

Each key can make 120 requests a minute. Errors come back as JSON with an error message and a status code: 400 (invalid input), 401 (missing or revoked key), 402 (subscription needed), 403 (plan doesn't include the API), 404, or 429 (slow down; see the Retry-After header).

Endpoints

  • GET/api/v1/projectsYour projects.
  • GET/api/v1/checksYour checks. Add ?projectId=… for one project.
  • POST/api/v1/checksCreate a check.
  • GET/api/v1/checks/:idOne check.
  • PATCH/api/v1/checks/:idChange a check (send only the fields to change).
  • DELETE/api/v1/checks/:idDelete a check.
  • POST/api/v1/checks/:id/pausePause monitoring.
  • POST/api/v1/checks/:id/resumeResume monitoring.

Create a check

curl https://cronomonitor.com/api/v1/checks \
  -H "Authorization: Bearer $CRONOMONITOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "projectId": "PROJECT_ID",
    "name": "Nightly backup",
    "periodSeconds": 86400,
    "cronExpression": "0 3 * * *",
    "timezone": "Europe/London",
    "graceSeconds": 900
  }'

The response includes the check's pingUrl, ready to add to the job.

{
  "check": {
    "id": "…",
    "name": "Nightly backup",
    "status": "PENDING",
    "schedule": { "type": "cron", "cronExpression": "0 3 * * *", "timezone": "Europe/London" },
    "pingUrl": "https://cronomonitor.com/api/ping/…",
    …
  }
}

Check fields

projectId
Required when creating. The project's id.
name
Required when creating. Up to 100 characters.
periodSeconds
Required when creating. 60 to 604800; used unless cronExpression is set.
cronExpression
A 5-field cron schedule, e.g. "0 3 * * *". null or "" for an interval check.
timezone
IANA time zone for the cron schedule, e.g. "Europe/London". Defaults to UTC.
graceSeconds
Required when creating. 30 to 86400.
maxDurationSeconds
Alert if a run takes longer (30 to 86400), or null for no limit.
slowAlertsEnabled
true to alert when a run is much slower than usual.
failureKeywords
Up to 10 strings; output containing one counts as a failure.
alertAfterFailures
1 to 10: failure pings in a row before alerting.
remindEveryMinutes
60, 360 or 1440 to repeat the alert while down, or null.
webhookUrl, slackWebhookUrl, discordWebhookUrl, teamsWebhookUrl
Alert destinations for this check (blank uses the project's).

Pinging

Pinging doesn't need a key: jobs call their check's pingUrl directly, with /start, /fail or an exit code like /1 on the end. Each check's card has ready-made setup snippets.