curl --request PUT \
--url https://async.api.zenrows.com/v1/jobs/{job_id}/webhook \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"url": "<string>",
"signature": true
}
'import requests
url = "https://async.api.zenrows.com/v1/jobs/{job_id}/webhook"
payload = {
"url": "<string>",
"signature": True
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', signature: true})
};
fetch('https://async.api.zenrows.com/v1/jobs/{job_id}/webhook', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://async.api.zenrows.com/v1/jobs/{job_id}/webhook';
const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', signature: true})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://async.api.zenrows.com/v1/jobs/{job_id}/webhook"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"signature\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://async.api.zenrows.com/v1/jobs/{job_id}/webhook",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'signature' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://async.api.zenrows.com/v1/jobs/{job_id}/webhook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"signature\": true\n}"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.put("https://async.api.zenrows.com/v1/jobs/{job_id}/webhook")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"signature\": true\n}")
.asString();{
"url": "<string>",
"signature": true
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"instance": "<string>",
"invalid_tasks": [
{
"index": 123,
"reason": "malformed_url",
"value": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"instance": "<string>",
"invalid_tasks": [
{
"index": 123,
"reason": "malformed_url",
"value": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"instance": "<string>",
"invalid_tasks": [
{
"index": 123,
"reason": "malformed_url",
"value": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"instance": "<string>",
"invalid_tasks": [
{
"index": 123,
"reason": "malformed_url",
"value": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"instance": "<string>",
"invalid_tasks": [
{
"index": 123,
"reason": "malformed_url",
"value": "<string>"
}
]
}Replace the webhook config
Replaces the webhook config wholesale. Both url and
signature are required: no defaulting at the mutate
boundary (preventing a PUT {"url":"..."} from silently
disabling signing on a job that previously had it on).
Validation matches submit: URL must be HTTPS with a host
that resolves via DNS within 1 second. When signature: true, the account must already have an active HMAC key
(POST /v1/hmac/keys/rotate), or the request fails with
400 webhook_signing_requires_active_key.
A PUT during a retry cycle applies from the next delivery
attempt.
curl --request PUT \
--url https://async.api.zenrows.com/v1/jobs/{job_id}/webhook \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"url": "<string>",
"signature": true
}
'import requests
url = "https://async.api.zenrows.com/v1/jobs/{job_id}/webhook"
payload = {
"url": "<string>",
"signature": True
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', signature: true})
};
fetch('https://async.api.zenrows.com/v1/jobs/{job_id}/webhook', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://async.api.zenrows.com/v1/jobs/{job_id}/webhook';
const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', signature: true})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://async.api.zenrows.com/v1/jobs/{job_id}/webhook"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"signature\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://async.api.zenrows.com/v1/jobs/{job_id}/webhook",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'signature' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://async.api.zenrows.com/v1/jobs/{job_id}/webhook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"signature\": true\n}"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.put("https://async.api.zenrows.com/v1/jobs/{job_id}/webhook")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"signature\": true\n}")
.asString();{
"url": "<string>",
"signature": true
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"instance": "<string>",
"invalid_tasks": [
{
"index": 123,
"reason": "malformed_url",
"value": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"instance": "<string>",
"invalid_tasks": [
{
"index": 123,
"reason": "malformed_url",
"value": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"instance": "<string>",
"invalid_tasks": [
{
"index": 123,
"reason": "malformed_url",
"value": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"instance": "<string>",
"invalid_tasks": [
{
"index": 123,
"reason": "malformed_url",
"value": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"instance": "<string>",
"invalid_tasks": [
{
"index": 123,
"reason": "malformed_url",
"value": "<string>"
}
]
}Authorizations
Path Parameters
Body
Webhook delivery config for run.completed / run.failed. Returned on
GET /v1/jobs/{id} (inline under webhook) and on
GET /v1/jobs/{id}/webhook. PUT requires both fields:
no defaulting at the mutate boundary (otherwise toggling
url would silently disable signing). Submit body accepts
the same shape with signature optional (defaults false).
Delivery: one event per run that completes or fails on its own (a
run stopped with /stop sends none), retried with backoff for up
to 3 days, so the same event can arrive more than once; dedupe on
X-ZenRows-Event-Id. Read GET /v1/jobs/{id} when you need to be
sure a run finished.
Opt-in HMAC signing. When true, each delivery is signed
with the account's active HMAC key
(POST /v1/hmac/keys/rotate) and carries
X-Signature: t=<unix>,v1=<hex>,kid=<active>. The signed
input is t + "." + raw_body, HMAC-SHA256, keyed with the
secret's raw bytes: base64-decode the secret that
/rotate returned before using it. When false,
deliveries carry no X-Signature header: header
absence is the signal.
Response
New webhook config persisted.
Webhook delivery config for run.completed / run.failed. Returned on
GET /v1/jobs/{id} (inline under webhook) and on
GET /v1/jobs/{id}/webhook. PUT requires both fields:
no defaulting at the mutate boundary (otherwise toggling
url would silently disable signing). Submit body accepts
the same shape with signature optional (defaults false).
Delivery: one event per run that completes or fails on its own (a
run stopped with /stop sends none), retried with backoff for up
to 3 days, so the same event can arrive more than once; dedupe on
X-ZenRows-Event-Id. Read GET /v1/jobs/{id} when you need to be
sure a run finished.
Opt-in HMAC signing. When true, each delivery is signed
with the account's active HMAC key
(POST /v1/hmac/keys/rotate) and carries
X-Signature: t=<unix>,v1=<hex>,kid=<active>. The signed
input is t + "." + raw_body, HMAC-SHA256, keyed with the
secret's raw bytes: base64-decode the secret that
/rotate returned before using it. When false,
deliveries carry no X-Signature header: header
absence is the signal.
Was this page helpful?