Skip to main content
This guide walks you through creating your first recurring cron using the CronAPI REST API.

Prerequisites

1. Get your API key

Log into the dashboard and navigate to the API Key page. Your API key is generated automatically on first visit. Copy it — you will only see the full key once.

2. Create a cron

Schedule a webhook that fires every 5 minutes:
curl -X POST https://app.cronapi.dev/api/v1/crons \
  -H "Authorization: Bearer your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Health check",
    "cron": "*/5 * * * *",
    "url": "https://example.com/health",
    "method": "GET"
  }'
You will receive a response like:
{
  "id": "{your_cron_id}",
  "name": "Health check",
  "cron": "*/5 * * * *",
  "url": "https://example.com/health",
  "method": "GET",
  "headers": {},
  "body": {},
  "paused": false,
  "next_run_at": "2026-04-15T14:35:00.000Z",
  "created_at": "2026-04-15T14:31:00.000Z"
}

3. Test it immediately

Trigger the cron manually without waiting for the next scheduled run:
curl -X POST https://app.cronapi.dev/api/v1/crons/{your_cron_id}/trigger \
  -H "Authorization: Bearer your_api_key_here"
{
  "status_code": 200,
  "success": true,
  "response_time_ms": 145,
  "fired_at": "2026-04-15T14:31:30.123Z"
}

4. Check execution history

View the last runs for your cron:
curl https://app.cronapi.dev/api/v1/crons/{your_cron_id}/runs \
  -H "Authorization: Bearer your_api_key_here"

Next steps

Schedule a one-time job

Learn how to schedule delayed one-time webhooks.

API reference

Explore all available endpoints.