API Reference

Everything you need to schedule webhook calls with CronCoco.

Overview

CronCoco is a REST API for scheduling recurring HTTP webhook calls. You define a cron expression and a target URL — CronCoco fires a POST request to that URL on your schedule.

There is no dashboard. Everything is done via API.

Base URL

https://api.croncoco.io

Authentication

Most endpoints require a bearer token.

HTTP header
Authorization: Bearer coco_your_api_key

Your API key is returned once at registration. It cannot be retrieved again — use key rotation if you lose it.

Errors

All errors return standard HTTP status codes with a JSON body:

{"detail": "Invalid cron expression"}

Register

Submit your email to receive a verification token, then exchange it for your API key. The token is single-use and expires in 15 minutes.

Step 1 — Request a verification token

POST /register
Request
curl -X POST https://api.croncoco.io/register -H "Content-Type: application/json" -d '{"email":"you@example.com"}'

Step 2 — Exchange token for API key

POST /verify-email
Request
curl -X POST https://api.croncoco.io/verify-email -H "Content-Type: application/json" -d '{"token":"token-from-email"}'

Key rotation

If you lose your API key, request a rotation token by email. The token is single-use and expires in 15 minutes.

Step 1 — Request a rotation token

POST /request-key-rotation
Request
curl -X POST https://api.croncoco.io/request-key-rotation -H "Content-Type: application/json" -d '{"email":"you@example.com"}'

Step 2 — Exchange token for new key

POST /rotate-key
Request
curl -X POST https://api.croncoco.io/rotate-key -H "Content-Type: application/json" -d '{"token":"token-from-email"}'

Delete

Request a deletion token by email, then confirm with the token to permanently delete your account. All jobs and execution history are removed immediately.

Step 1 — Request a deletion token

POST /account/delete-request
Request
curl -X POST https://api.croncoco.io/account/delete-request -H "Content-Type: application/json" -d '{"email":"you@example.com"}'

Step 2 — Confirm deletion

DELETE /account
Request
curl -X DELETE https://api.croncoco.io/account -H "Content-Type: application/json" -d '{"email":"you@example.com","token":"token-from-email"}'

Account settings

Read and update account-level settings. Currently supports toggling failure email notifications.

Get account

GET /account
Request
curl https://api.croncoco.io/account -H "Authorization: Bearer coco_abc123..."
Response · 200
{
  "email": "you@example.com",
  "plan": "pro",
  "failure_email_enabled": true
}

Update account

PATCH /account
FieldTypeDescription
failure_email_enabled boolean Set to false to stop receiving failure emails for all jobs. Defaults to true.
Request — disable failure emails
curl -X PATCH https://api.croncoco.io/account -H "Authorization: Bearer coco_abc123..." -H "Content-Type: application/json" -d '{"failure_email_enabled":false}'

Failure emails go to the address used at registration. For per-job webhook alerts, set failure_webhook_url on the job itself.

Failure webhook payload

When a job fails and failure_webhook_url is set, CronCoco POSTs this JSON body to that URL:

Failure notification payload
{
  "job_id": 1,
  "job_name": "hourly-sync",
  "status": "failure",
  "response_code": 503,
  "error": "HTTP 503",
  "failed_at": "2026-05-11T14:00:00+00:00"
}

Create job

POST /jobs

Create a new scheduled job. CronCoco will POST to your webhook_url on the schedule defined by cron_expression. Minimum intervals depend on your plan.

Request body

FieldTypeDescription
name required string A label for the job. Max 100 characters.
cron_expression required string Standard 5-field cron expression. E.g. 0 * * * * (every hour).
webhook_url required string The URL to POST to. Must be publicly reachable (https recommended). Max 2048 chars.
headers object Optional HTTP headers to include. Max 20 headers, keys ≤100 chars, values ≤500 chars.
payload object Optional JSON body to POST. Max 10KB.
failure_webhook_url string Optional URL to POST a failure payload to when this job fails. Must be publicly reachable. Max 2048 chars.

Cron expression reference

ExpressionSchedule
* * * * *Every minute (Pro and Business)
0 * * * *Every hour
0 9 * * *Daily at 09:00 UTC
0 9 * * 1Every Monday at 09:00 UTC
0 0 1 * *First day of every month
*/15 * * * *Every 15 minutes

All times are UTC. Free jobs must run no more often than every 15 minutes. Pro and Business jobs can run every minute.

Example

Request
curl -X POST https://api.croncoco.io/jobs -H "Authorization: Bearer coco_abc123..." -H "Content-Type: application/json" -d '{"name":"hourly-sync","cron_expression":"0 * * * *","webhook_url":"https://your-app.com/sync","headers":{"X-Secret":"mytoken"}}'
Response · 201
{
  "id": 1,
  "name": "hourly-sync",
  "cron_expression": "0 * * * *",
  "webhook_url": "https://your-app.com/sync",
  "headers": {"X-Secret": "mytoken"},
  "payload": null,
  "failure_webhook_url": null,
  "enabled": true,
  "last_run_at": null,
  "next_run_at": "2026-05-09T14:00:00+00:00",
  "created_at": "2026-05-09T13:22:10+00:00"
}

List jobs

GET /jobs

Returns all jobs for your account, ordered by creation date descending.

Request
curl https://api.croncoco.io/jobs -H "Authorization: Bearer coco_abc123..."

Update job

PATCH /jobs/{id}

Update any fields on a job. All fields are optional — only send what you want to change.

Request body

FieldTypeDescription
namestringNew job name.
cron_expressionstringNew cron schedule. Recalculates next_run_at immediately.
webhook_urlstringNew webhook target URL.
headersobjectReplace all headers.
payloadobjectReplace the payload body. Max 10KB.
enabledbooleanPause (false) or resume (true) the job.
failure_webhook_urlstringUpdate the failure notification webhook URL for this job. Send "" to clear it.

Example — pause a job

Request
curl -X PATCH https://api.croncoco.io/jobs/1 -H "Authorization: Bearer coco_abc123..." -H "Content-Type: application/json" -d '{"enabled":false}'

Delete job

DELETE /jobs/{id}

Permanently delete a job and stop all future executions. Returns 204 No Content on success.

Request
curl -X DELETE https://api.croncoco.io/jobs/1 -H "Authorization: Bearer coco_abc123..."

List executions

GET /jobs/{id}/executions

Returns executions for a job within your plan's history window, paginated. Use this to check if your webhook is being called and whether it's succeeding.

PlanHistory window
Free7 days
Pro30 days
Business30 days

Query parameters

ParameterDefaultDescription
limit100Number of results to return. Max 500.
offset0Number of results to skip. Use to page through history.
Request — page 1
curl "https://api.croncoco.io/jobs/1/executions?limit=100&offset=0" -H "Authorization: Bearer coco_abc123..."
Request — page 2
curl "https://api.croncoco.io/jobs/1/executions?limit=100&offset=100" -H "Authorization: Bearer coco_abc123..."

When the response contains fewer results than your limit, you have reached the last page.

Response · 200
[
  {
    "triggered_at": "2026-05-09T13:00:00+00:00",
    "completed_at": "2026-05-09T13:00:00+00:00",
    "status": "success",
    "response_code": 200,
    "duration_ms": 312,
    "error": null
  },
  {
    "triggered_at": "2026-05-09T12:00:00+00:00",
    "completed_at": "2026-05-09T12:00:01+00:00",
    "status": "failure",
    "response_code": 503,
    "duration_ms": 1043,
    "error": "HTTP 503"
  }
]

Execution status values

StatusMeaning
pendingQueued, not yet fired
successWebhook responded with 2xx or 3xx
failureWebhook responded 4xx/5xx, timed out, or URL was blocked
skippedExecution was not attempted because a monthly or capacity limit was reached

Billing

All billing is managed via API using your existing API key. Upgrades require visiting a Stripe Checkout page to enter payment — everything else (check plan, downgrade, cancel) is handled directly from the terminal.

PlanPriceActive jobsStored jobsExecutions/monthMin intervalConcurrencyBurst/minTimeoutHistory
Free$0 / forever5105,00015 min1510s7 days
Pro$12 / month50100250,0001 min56030s30 days
Business$49 / month1,0005,0002,000,0001 min2525060s30 days

Active jobs are enabled schedules. Stored jobs include both enabled and disabled schedules. Executions are webhook attempts counted monthly. Concurrency is the number of webhook executions that can run at once for your account. Burst/min is the per-minute execution start cap.

Check plan

GET /billing

Returns your current plan, usage, and plan limits.

Request
curl https://api.croncoco.io/billing -H "Authorization: Bearer coco_abc123..."
Response · 200
{
  "plan": "free",
  "stored_jobs_used": 4,
  "stored_jobs_limit": 10,
  "active_jobs_used": 4,
  "active_jobs_limit": 5,
  "executions_used": 120,
  "executions_limit": 5000,
  "usage_period_start": "2026-05-01T00:00:00+00:00",
  "min_interval_seconds": 900,
  "concurrency_limit": 1,
  "burst_per_minute": 5,
  "burst_bucket": 5,
  "timeout_seconds": 10,
  "history_days": 7,
  "has_billing": false
}

Upgrade

POST /billing/upgrade

Returns a Stripe Checkout URL. Open it in your browser to enter payment details. Use the same email address you registered with — this links the payment to your API key.

Request body

FieldTypeDescription
plan required string pro or business
Request
curl -X POST https://api.croncoco.io/billing/upgrade -H "Authorization: Bearer coco_abc123..." -H "Content-Type: application/json" -d '{"plan":"pro"}'
Response · 200
{
  "checkout_url": "https://checkout.stripe.com/..."
}

Downgrade

POST /billing/downgrade

Downgrades your plan. No browser redirect needed — handled server-side. Downgrades to Free take effect at the end of your current billing period; Business → Pro takes effect immediately with a prorated credit. Active jobs beyond the new plan's limit are paused automatically, keeping the most recently created ones active.

Request body

FieldTypeDescription
plan required string free or pro
Request
curl -X POST https://api.croncoco.io/billing/downgrade -H "Authorization: Bearer coco_abc123..." -H "Content-Type: application/json" -d '{"plan":"free"}'
Response · 200
{
  "plan": "free",
  "effective": "2026-06-10T00:00:00+00:00",
  "note": "Change takes effect at end of billing period"
}

Cancel

DELETE /billing/subscription

Cancels your subscription at the end of the current billing period. You keep full access until then. After the period ends, your account reverts to the Free plan and active jobs beyond the Free limit are paused automatically.

Request
curl -X DELETE https://api.croncoco.io/billing/subscription -H "Authorization: Bearer coco_abc123..."
Response · 200
{
  "cancelled": true,
  "effective": "2026-06-10T00:00:00+00:00",
  "note": "You keep access until the end of your billing period"
}

Payment portal

POST /billing/portal

Returns a Stripe Billing Portal URL. Open it in your browser to update your payment method, download invoices, or view payment history. Requires an active or past subscription.

Request
curl -X POST https://api.croncoco.io/billing/portal -H "Authorization: Bearer coco_abc123..."
Response · 200
{
  "url": "https://billing.stripe.com/..."
}
Need help?

Email hello@croncoco.io — we respond within 24 hours.