Update job
curl --request PATCH \
--url https://api.example.com/jobs/{id}import requests
url = "https://api.example.com/jobs/{id}"
response = requests.patch(url)
print(response.text)const options = {method: 'PATCH'};
fetch('https://api.example.com/jobs/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/jobs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/jobs/{id}"
req, _ := http.NewRequest("PATCH", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/jobs/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/jobs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"at": "<string>",
"url": "<string>",
"method": "<string>",
"headers": {},
"body": {}
}Jobs
Update job
Update a pending job
PATCH
/
jobs
/
{id}
Update job
curl --request PATCH \
--url https://api.example.com/jobs/{id}import requests
url = "https://api.example.com/jobs/{id}"
response = requests.patch(url)
print(response.text)const options = {method: 'PATCH'};
fetch('https://api.example.com/jobs/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/jobs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/jobs/{id}"
req, _ := http.NewRequest("PATCH", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/jobs/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/jobs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
response = http.request(request)
puts response.read_body{
"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
Request body
All fields are optional. Only provided fields are updated.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"}
}'
const response = await fetch(
`https://app.cronapi.dev/api/v1/jobs/${jobId}`,
{
method: "PATCH",
headers: {
"Authorization": `Bearer your_api_key_here`,
"Content-Type": "application/json",
},
body: JSON.stringify({
at: "2026-04-21T12:00:00.000Z",
body: { user_id: "usr_456" },
}),
}
);
const job = await response.json();
import requests
response = requests.patch(
f"https://app.cronapi.dev/api/v1/jobs/{job_id}",
headers={"Authorization": "Bearer your_api_key_here"},
json={
"at": "2026-04-21T12:00:00.000Z",
"body": {"user_id": "usr_456"},
},
)
job = response.json()
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"
}
⌘I