Skip to main content
PATCH
/
crons
/
{id}
Update cron
curl --request PATCH \
  --url https://api.example.com/crons/{id}
{
  "id": "<string>",
  "name": "<string>",
  "cron": "<string>",
  "url": "<string>",
  "method": "<string>",
  "headers": {},
  "body": {},
  "paused": true
}

Path parameters

id
string
required
The UUID of the cron to update.

Request body

All fields are optional. Only provided fields are updated.
name
string
Display name.
cron
string
Cron expression. If changed, next_run_at is automatically recalculated.
url
string
Webhook URL.
method
string
HTTP method: GET, POST, or DELETE.
headers
object
Custom HTTP headers.
body
object
JSON body payload.
paused
boolean
Set to true to pause execution, false to resume.

Response

Returns the updated cron object.
curl -X PATCH https://app.cronapi.dev/api/v1/crons/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "cron": "0 */2 * * *",
    "paused": false
  }'
200
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "user_id": "d4e5f6a7-b890-1234-cdef-567890abcdef",
  "name": "Health check",
  "cron": "0 */2 * * *",
  "url": "https://example.com/health",
  "method": "GET",
  "headers": {},
  "body": {},
  "paused": false,
  "next_run_at": "2026-04-15T16:00:00.000Z",
  "last_run_at": "2026-04-15T14:30:00.000Z",
  "created_at": "2026-04-12T10:30:00.000Z"
}
400
{
  "error": "Invalid cron expression"
}