curl --request PATCH \
--url https://devs.adaptyvbio.com/api/v1/webhooks/{webhook_id} \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"headers": "<unknown>",
"secret": "<string>",
"url": "https://example.com/adaptyv/webhook-v2"
}
'import requests
url = "https://devs.adaptyvbio.com/api/v1/webhooks/{webhook_id}"
payload = {
"enabled": True,
"headers": "<unknown>",
"secret": "<string>",
"url": "https://example.com/adaptyv/webhook-v2"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
headers: '<unknown>',
secret: '<string>',
url: 'https://example.com/adaptyv/webhook-v2'
})
};
fetch('https://devs.adaptyvbio.com/api/v1/webhooks/{webhook_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://devs.adaptyvbio.com/api/v1/webhooks/{webhook_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'headers' => '<unknown>',
'secret' => '<string>',
'url' => 'https://example.com/adaptyv/webhook-v2'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://devs.adaptyvbio.com/api/v1/webhooks/{webhook_id}"
payload := strings.NewReader("{\n \"enabled\": true,\n \"headers\": \"<unknown>\",\n \"secret\": \"<string>\",\n \"url\": \"https://example.com/adaptyv/webhook-v2\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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))
}HttpResponse<String> response = Unirest.patch("https://devs.adaptyvbio.com/api/v1/webhooks/{webhook_id}")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"headers\": \"<unknown>\",\n \"secret\": \"<string>\",\n \"url\": \"https://example.com/adaptyv/webhook-v2\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devs.adaptyvbio.com/api/v1/webhooks/{webhook_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"headers\": \"<unknown>\",\n \"secret\": \"<string>\",\n \"url\": \"https://example.com/adaptyv/webhook-v2\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"enabled": true,
"headers": "<unknown>",
"id": "019462a4-b1c2-7def-8901-23456789abcd",
"secret_set": true,
"updated_at": "2023-11-07T05:31:56Z",
"url": "https://example.com/adaptyv/webhook"
}{
"error": "experiment not found",
"request_id": "req_019462a4-b1c2-7def-8901-23456789abcd"
}{
"error": "experiment not found",
"request_id": "req_019462a4-b1c2-7def-8901-23456789abcd"
}{
"error": "experiment not found",
"request_id": "req_019462a4-b1c2-7def-8901-23456789abcd"
}{
"error": "experiment not found",
"request_id": "req_019462a4-b1c2-7def-8901-23456789abcd"
}{
"error": "experiment not found",
"request_id": "req_019462a4-b1c2-7def-8901-23456789abcd"
}{
"error": "experiment not found",
"request_id": "req_019462a4-b1c2-7def-8901-23456789abcd"
}Modify a webhook registration, including rotating or clearing its secret.
curl --request PATCH \
--url https://devs.adaptyvbio.com/api/v1/webhooks/{webhook_id} \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"headers": "<unknown>",
"secret": "<string>",
"url": "https://example.com/adaptyv/webhook-v2"
}
'import requests
url = "https://devs.adaptyvbio.com/api/v1/webhooks/{webhook_id}"
payload = {
"enabled": True,
"headers": "<unknown>",
"secret": "<string>",
"url": "https://example.com/adaptyv/webhook-v2"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
headers: '<unknown>',
secret: '<string>',
url: 'https://example.com/adaptyv/webhook-v2'
})
};
fetch('https://devs.adaptyvbio.com/api/v1/webhooks/{webhook_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://devs.adaptyvbio.com/api/v1/webhooks/{webhook_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'headers' => '<unknown>',
'secret' => '<string>',
'url' => 'https://example.com/adaptyv/webhook-v2'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://devs.adaptyvbio.com/api/v1/webhooks/{webhook_id}"
payload := strings.NewReader("{\n \"enabled\": true,\n \"headers\": \"<unknown>\",\n \"secret\": \"<string>\",\n \"url\": \"https://example.com/adaptyv/webhook-v2\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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))
}HttpResponse<String> response = Unirest.patch("https://devs.adaptyvbio.com/api/v1/webhooks/{webhook_id}")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"headers\": \"<unknown>\",\n \"secret\": \"<string>\",\n \"url\": \"https://example.com/adaptyv/webhook-v2\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devs.adaptyvbio.com/api/v1/webhooks/{webhook_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"headers\": \"<unknown>\",\n \"secret\": \"<string>\",\n \"url\": \"https://example.com/adaptyv/webhook-v2\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"enabled": true,
"headers": "<unknown>",
"id": "019462a4-b1c2-7def-8901-23456789abcd",
"secret_set": true,
"updated_at": "2023-11-07T05:31:56Z",
"url": "https://example.com/adaptyv/webhook"
}{
"error": "experiment not found",
"request_id": "req_019462a4-b1c2-7def-8901-23456789abcd"
}{
"error": "experiment not found",
"request_id": "req_019462a4-b1c2-7def-8901-23456789abcd"
}{
"error": "experiment not found",
"request_id": "req_019462a4-b1c2-7def-8901-23456789abcd"
}{
"error": "experiment not found",
"request_id": "req_019462a4-b1c2-7def-8901-23456789abcd"
}{
"error": "experiment not found",
"request_id": "req_019462a4-b1c2-7def-8901-23456789abcd"
}{
"error": "experiment not found",
"request_id": "req_019462a4-b1c2-7def-8901-23456789abcd"
}Path Parameters
Registration id to modify
Body
Request to modify an existing organization-level webhook.
Every field is optional; omitted fields are left unchanged. secret uses a
nested option so the three cases stay distinguishable in one payload:
absent = leave as-is, null = clear it (fall back to the deployment-wide
secret), a string = replace it. Rotation is therefore a single PATCH.
Example
{"secret": "a-new-32-plus-character-shared-secret", "enabled": true}
Pause or resume deliveries without deleting the registration.
Replacement header map.
Replacement secret, or an explicit null to clear it.
32Replacement HTTPS URL.
"https://example.com/adaptyv/webhook-v2"
Response
Updated registration
An organization-level webhook registration as returned to the customer.
Creation timestamp.
When false, this registration receives no deliveries.
Extra HTTP headers sent with each delivery.
Registration identifier.
"019462a4-b1c2-7def-8901-23456789abcd"
Whether a signing secret is configured for this registration.
The secret itself is never returned by any endpoint. false means
deliveries fall back to Adaptyv's deployment-wide secret.
Last-modification timestamp.
HTTPS URL deliveries are POSTed to.
"https://example.com/adaptyv/webhook"
Was this page helpful?