Skip to main content
A job is a one-time scheduled webhook. You specify a future timestamp and CronAPI fires the HTTP request at that time. Unlike crons, jobs execute once and are marked as completed or failed.

Job object

FieldTypeDescription
idstringUnique identifier (UUID)
namestring | nullOptional display name
atstringISO 8601 timestamp for when to fire
urlstringWebhook URL to call
methodstringHTTP method: GET, POST, or DELETE
headersobjectCustom HTTP headers sent with the request
bodyobjectJSON body sent with POST requests
statusstringCurrent status: pending, completed, or failed
created_atstringISO 8601 timestamp of creation

Job lifecycle

pending → completed (if webhook returns 2xx)
pending → failed    (if webhook returns non-2xx or times out)
  • pending — Waiting for the scheduled time
  • completed — Webhook fired successfully (2xx status code)
  • failed — Webhook returned an error or timed out
You can only update or delete a job while its status is pending. Completed and failed jobs are immutable.

Scheduling

The at field must be a valid ISO 8601 datetime string set in the future:
{
  "at": "2026-04-20T15:00:00.000Z",
  "url": "https://example.com/webhook",
  "method": "POST",
  "body": {"report_id": "abc123"}
}
If you provide a past timestamp, the API returns a 400 error.

Webhook execution

When a job fires, the behavior is identical to crons:
  • Configured method, headers, and body are sent
  • 30-second timeout applies
  • Execution is logged as a run
  • Job status is updated to completed or failed based on the response

Manual trigger

You can fire a pending job immediately using the trigger endpoint. This executes the webhook right away and updates the job status accordingly.