curl --request PATCH \
--url https://sitevisit.app/api/v1/webhook-endpoints/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"url": "<string>",
"events": [
"<string>"
],
"disabled": true
}
'import requests
url = "https://sitevisit.app/api/v1/webhook-endpoints/{id}"
payload = {
"name": "<string>",
"url": "<string>",
"events": ["<string>"],
"disabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', url: '<string>', events: ['<string>'], disabled: true})
};
fetch('https://sitevisit.app/api/v1/webhook-endpoints/{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://sitevisit.app/api/v1/webhook-endpoints/{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([
'name' => '<string>',
'url' => '<string>',
'events' => [
'<string>'
],
'disabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://sitevisit.app/api/v1/webhook-endpoints/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"disabled\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://sitevisit.app/api/v1/webhook-endpoints/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"disabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sitevisit.app/api/v1/webhook-endpoints/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"disabled\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"url": "<string>",
"events": [
"<string>"
],
"mode": "live",
"disabled": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid, revoked, or doesn't exist.",
"docs_url": "<string>",
"request_id": "req_abc123"
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid, revoked, or doesn't exist.",
"docs_url": "<string>",
"request_id": "req_abc123"
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid, revoked, or doesn't exist.",
"docs_url": "<string>",
"request_id": "req_abc123"
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid, revoked, or doesn't exist.",
"docs_url": "<string>",
"request_id": "req_abc123"
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid, revoked, or doesn't exist.",
"docs_url": "<string>",
"request_id": "req_abc123"
}
}Update a webhook endpoint
Patch any subset of name, url, events, or disabled. To rotate the signing secret, delete the endpoint and create a new one.
curl --request PATCH \
--url https://sitevisit.app/api/v1/webhook-endpoints/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"url": "<string>",
"events": [
"<string>"
],
"disabled": true
}
'import requests
url = "https://sitevisit.app/api/v1/webhook-endpoints/{id}"
payload = {
"name": "<string>",
"url": "<string>",
"events": ["<string>"],
"disabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', url: '<string>', events: ['<string>'], disabled: true})
};
fetch('https://sitevisit.app/api/v1/webhook-endpoints/{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://sitevisit.app/api/v1/webhook-endpoints/{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([
'name' => '<string>',
'url' => '<string>',
'events' => [
'<string>'
],
'disabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://sitevisit.app/api/v1/webhook-endpoints/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"disabled\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://sitevisit.app/api/v1/webhook-endpoints/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"disabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sitevisit.app/api/v1/webhook-endpoints/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"disabled\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"url": "<string>",
"events": [
"<string>"
],
"mode": "live",
"disabled": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid, revoked, or doesn't exist.",
"docs_url": "<string>",
"request_id": "req_abc123"
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid, revoked, or doesn't exist.",
"docs_url": "<string>",
"request_id": "req_abc123"
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid, revoked, or doesn't exist.",
"docs_url": "<string>",
"request_id": "req_abc123"
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid, revoked, or doesn't exist.",
"docs_url": "<string>",
"request_id": "req_abc123"
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid, revoked, or doesn't exist.",
"docs_url": "<string>",
"request_id": "req_abc123"
}
}Authorizations
Bearer API key. Two modes: sv_live_* for production data, sv_test_* for a parallel sandbox dataset that doesn't count against plan limits. Issued from Settings → Developers in the SiteVisit app.
Headers
Optional idempotency key, scoped to the authenticated account. Repeating a write with the same key + same body returns the original response; same key + different body returns 422 idempotency_key_in_use.
255Path Parameters
Body
Response
Resource updated.
Events this endpoint subscribes to. An empty array means all events — the endpoint will receive every event type. See the Webhooks guide for the full event catalogue.
Which traffic class this endpoint receives. live endpoints fire on real customer activity; test endpoints only fire on activity triggered by sv_test_* API keys. Lets integrators wire a localhost endpoint against test mode without it ever receiving real-customer traffic.
live, test When true, the endpoint is paused — events are not delivered, but the row + signing secret remain so it can be re-enabled later.
Was this page helpful?