API quickstart: keys and your first call

API & Developers·Intermediate·Updated May 31, 2026

The CronJobPro REST API lets you manage your scheduled jobs programmatically: list, create, get, update, delete, and trigger Run now. This guide walks you through creating an API key and making your first two calls with curl. It assumes you are comfortable with the command line and HTTP.

Create an API key

  1. 1

    Open API Keys settings

    Go to Settings, then API Keys. This is where every key is created and revoked.

  2. 2

    Generate a new key

    Create a key and give it a recognizable name (for example, the script or server that will use it). Optionally add an IP allowlist of CIDR ranges so the key only works from your servers.

  3. 3

    Copy and store the key

    Copy the key value and store it in a secrets manager or environment variable. Treat it like a password and never commit it to source control.

The full key value is shown only once at creation time. If you lose it, revoke the key in Settings, API Keys and create a new one. Anyone with the key can manage your jobs, so rotate it immediately if it leaks.

Authenticate every request

Send your key in the X-Api-Key request header on every call. If you added an IP allowlist, requests must also come from an address inside one of your CIDR ranges, or they are rejected.

Your first call: list jobs

Start with a read-only request to confirm your key works. Replace YOUR_API_KEY with the value you copied.

curl https://cronjobpro.com/api/v1/jobs \
  -H "X-Api-Key: YOUR_API_KEY"

A successful response returns your jobs as JSON. If you get an authentication error, double-check the header name and value and confirm your request originates from an allowlisted IP.

Create a job

Send a POST request with a JSON body describing the job. At minimum you provide a target URL, an HTTP method, and a schedule given as a 5-field cron expression or a simple interval. You can also set a per-job timezone, request headers and body, a timeout, retries, and an overlap policy.

curl -X POST https://cronjobpro.com/api/v1/jobs \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Nightly cleanup",
    "url": "https://example.com/cron/cleanup",
    "method": "POST",
    "schedule": "0 3 * * *",
    "timezone": "UTC",
    "timeoutSeconds": 30
  }'

Use UTC for the timezone to avoid daylight-saving ambiguity. Need help building the cron expression? Try the cron generator at /tools/cron-generator.

Once the job exists, CronJobPro sends the HTTP request on schedule from its servers. A 2xx response counts as success; a non-2xx status, timeout, connection error, or DNS failure is a failed execution and triggers your retry strategy and alerts. Note that each create and each Run now counts toward your plan's daily-run quota.

Next steps

  • Read the full API reference, including update, delete, and Run now endpoints, at /docs.
  • Configure alert channels under Settings, Notifications so failures reach you by email, Slack, Discord, and more.
  • Review your plan's active-job and daily-run limits on the /pricing page before scaling up.

More resources

Related articles

Was this helpful?

If you still have questions, our team is happy to help.

Contact support
API quickstart: keys and your first call — Help | CronJobPro