Cron API reference

Every endpoint of the Cron REST API, generated from the API itself.

All endpoints are relative to https://api.cron.cool. Create an API key in your Cron dashboard, then authenticate every request with it.

apiKeyHTTP Basic auth carrying only the API key secret: Authorization: Basic base64(<key secret>).

accessTokenOperator session token issued by the Cron dashboard: Authorization: Token <access token>.

Download the OpenAPI specification for use with your own tooling.

Jobs

GET/api/jobs

List cron jobs

Lists the cron jobs of your project, newest first. Requires the jobs:read scope.

jobs:readapiKeyaccessToken
Parameters
NameInTypeDescription
projectIdquerystring
limitqueryintegerOpt into pagination; returns a { data, cursor, hasMore } envelope.
cursorquerystringPage forward by resending the cursor from the last page.
fieldsquerystringComma-separated projection of fields to return
Responses
StatusMeaning
200Array of jobs (or a paginated envelope)
401Missing or invalid credentials
403API key is missing the jobs:read scope
429API key rate limit exceeded
POST/api/jobs

Create a cron job

Requires the jobs:write scope.

jobs:writeapiKeyaccessToken
Request body
FieldTypeDescription
namestring
expressionrequiredstringEventBridge Scheduler schedule expression
typestring
urlstring
httpMethodstring
contentTypestring
inputobject
Responses
StatusMeaning
200The created job
403API key is missing the jobs:write scope
GET/api/jobs/{jobId}

Get a cron job

Requires the jobs:read scope.

jobs:readapiKeyaccessToken
Parameters
NameInTypeDescription
jobIdrequiredpathstring
Responses
StatusMeaning
200The job
404No such job in your project
PUT/api/jobs/{jobId}

Update a cron job

Requires the jobs:write scope.

jobs:writeapiKeyaccessToken
Parameters
NameInTypeDescription
jobIdrequiredpathstring
Responses
StatusMeaning
200The updated job
404No such job in your project
DELETE/api/jobs/{jobId}

Delete a cron job

Requires the jobs:write scope.

jobs:writeapiKeyaccessToken
Parameters
NameInTypeDescription
jobIdrequiredpathstring
Responses
StatusMeaning
200Deleted
404No such job in your project
GET/api/jobs/{jobId}/executions

List a job's execution history

Returns the recorded executions of a job (status, http status, duration, truncated response body), newest first. Requires the executions:read scope.

executions:readapiKeyaccessToken
Parameters
NameInTypeDescription
jobIdrequiredpathstring
limitqueryinteger
Responses
StatusMeaning
200Array of job executions
404No such job in your project
POST/api/jobs/{jobId}/execute

Execute a cron job now

Runs the job immediately, out of schedule, and returns the target's response. Also records a job execution and fires the job.executed webhook. Requires the jobs:write scope.

jobs:writeapiKeyaccessToken
Parameters
NameInTypeDescription
jobIdrequiredpathstring
Responses
StatusMeaning
200The target's response
404No such job in your project

Webhook subscriptions

GET/api/webhooksubscriptions

List webhook subscriptions

Webhook subscriptions deliver job.created, job.updated, job.deleted and job.executed events to your server as signed POST requests (X-Croncool-Signature: t=<timestamp>,v1=<hex HMAC-SHA256 of "timestamp.body">). An endpoint failing 20 times in a row is disabled automatically. Subscriptions are managed with an operator access token; the secret is only returned once, on create.

accessToken
Parameters
NameInTypeDescription
projectIdquerystring
Responses
StatusMeaning
200Array of webhook subscriptions (without secrets)
POST/api/webhooksubscriptions

Create a webhook subscription

The response includes the signing secret exactly once — store it; it cannot be retrieved again.

accessToken
Request body
FieldTypeDescription
projectIdrequiredstring
urlrequiredstring
eventsarray (job.created | job.updated | job.deleted | job.executed)Empty array subscribes to all events
Responses
StatusMeaning
200The created subscription, including its secret
PUT/api/webhooksubscriptions/{webhookSubscriptionId}

Update a webhook subscription

url, events and active are editable; the secret and project are immutable. Re-enabling an auto-disabled endpoint is done by setting active back to true.

accessToken
Parameters
NameInTypeDescription
webhookSubscriptionIdrequiredpathstring
Responses
StatusMeaning
200The updated subscription (without secret)
DELETE/api/webhooksubscriptions/{webhookSubscriptionId}

Delete a webhook subscription

accessToken
Parameters
NameInTypeDescription
webhookSubscriptionIdrequiredpathstring
Responses
StatusMeaning
200Deleted