Update cron
curl --request PATCH \
--url https://api.example.com/crons/{id}import requests
url = "https://api.example.com/crons/{id}"
response = requests.patch(url)
print(response.text)const options = {method: 'PATCH'};
fetch('https://api.example.com/crons/{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/crons/{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/crons/{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/crons/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/crons/{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>",
"cron": "<string>",
"url": "<string>",
"method": "<string>",
"headers": {},
"body": {},
"paused": true
}Crons
Update cron
Update an existing cron
PATCH
/
crons
/
{id}
Update cron
curl --request PATCH \
--url https://api.example.com/crons/{id}import requests
url = "https://api.example.com/crons/{id}"
response = requests.patch(url)
print(response.text)const options = {method: 'PATCH'};
fetch('https://api.example.com/crons/{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/crons/{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/crons/{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/crons/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/crons/{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>",
"cron": "<string>",
"url": "<string>",
"method": "<string>",
"headers": {},
"body": {},
"paused": true
}Path parameters
string
required
The UUID of the cron to update.
Request body
All fields are optional. Only provided fields are updated.string
Display name.
string
Cron expression. If changed,
next_run_at is automatically recalculated.string
Webhook URL.
string
HTTP method:
GET, POST, or DELETE.object
Custom HTTP headers.
object
JSON body payload.
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
}'
const response = await fetch(
`https://app.cronapi.dev/api/v1/crons/${cronId}`,
{
method: "PATCH",
headers: {
"Authorization": `Bearer your_api_key_here`,
"Content-Type": "application/json",
},
body: JSON.stringify({
cron: "0 */2 * * *",
paused: false,
}),
}
);
const cron = await response.json();
import requests
response = requests.patch(
f"https://app.cronapi.dev/api/v1/crons/{cron_id}",
headers={"Authorization": "Bearer your_api_key_here"},
json={"cron": "0 */2 * * *", "paused": False},
)
cron = response.json()
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"
}
⌘I