Skip to main content
PATCH
/
jobs
/
{id}
Update job
curl --request PATCH \
  --url https://api.example.com/jobs/{id}
{
  "id": "<string>",
  "name": "<string>",
  "at": "<string>",
  "url": "<string>",
  "method": "<string>",
  "headers": {},
  "body": {}
}
You can only update jobs with status: "pending". Completed and failed jobs cannot be modified.

Path parameters

id
string
required
The UUID of the job to update.

Request body

All fields are optional. Only provided fields are updated.
name
string
Display name.
at
string
ISO 8601 timestamp. Must be in the future.
url
string
Webhook URL.
method
string
HTTP method: GET, POST, or DELETE.
headers
object
Custom HTTP headers.
body
object
JSON body payload.

Response

Returns the updated job object.
curl -X PATCH https://app.cronapi.dev/api/v1/jobs/b2c3d4e5-f6a7-8901-bcde-f12345678901 \
  -H "Authorization: Bearer your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "at": "2026-04-21T12:00:00.000Z",
    "body": {"user_id": "usr_456"}
  }'
200
{
  "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "user_id": "d4e5f6a7-b890-1234-cdef-567890abcdef",
  "name": "Send welcome email",
  "at": "2026-04-21T12:00:00.000Z",
  "url": "https://example.com/send-email",
  "method": "POST",
  "headers": {},
  "body": {"user_id": "usr_456"},
  "status": "pending",
  "created_at": "2026-04-15T10:00:00.000Z"
}
400
{
  "error": "Cannot update a completed or failed job"
}