Update Webhook
curl --request PATCH \
--url https://api.example.com/webhooks/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": [
{}
],
"name": "<string>",
"description": "<string>",
"headers": [
{}
],
"isActive": true
}
'import requests
url = "https://api.example.com/webhooks/{id}"
payload = {
"url": "<string>",
"events": [{}],
"name": "<string>",
"description": "<string>",
"headers": [{}],
"isActive": True
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
events: [{}],
name: '<string>',
description: '<string>',
headers: [{}],
isActive: true
})
};
fetch('https://api.example.com/webhooks/{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/webhooks/{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([
'url' => '<string>',
'events' => [
[
]
],
'name' => '<string>',
'description' => '<string>',
'headers' => [
[
]
],
'isActive' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://api.example.com/webhooks/{id}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"events\": [\n {}\n ],\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"headers\": [\n {}\n ],\n \"isActive\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://api.example.com/webhooks/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"events\": [\n {}\n ],\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"headers\": [\n {}\n ],\n \"isActive\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"events\": [\n {}\n ],\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"headers\": [\n {}\n ],\n \"isActive\": true\n}"
response = http.request(request)
puts response.read_bodyWebhooks
Update Webhook
PATCH
/
webhooks
/
{id}
Update Webhook
curl --request PATCH \
--url https://api.example.com/webhooks/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": [
{}
],
"name": "<string>",
"description": "<string>",
"headers": [
{}
],
"isActive": true
}
'import requests
url = "https://api.example.com/webhooks/{id}"
payload = {
"url": "<string>",
"events": [{}],
"name": "<string>",
"description": "<string>",
"headers": [{}],
"isActive": True
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
events: [{}],
name: '<string>',
description: '<string>',
headers: [{}],
isActive: true
})
};
fetch('https://api.example.com/webhooks/{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/webhooks/{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([
'url' => '<string>',
'events' => [
[
]
],
'name' => '<string>',
'description' => '<string>',
'headers' => [
[
]
],
'isActive' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://api.example.com/webhooks/{id}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"events\": [\n {}\n ],\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"headers\": [\n {}\n ],\n \"isActive\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://api.example.com/webhooks/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"events\": [\n {}\n ],\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"headers\": [\n {}\n ],\n \"isActive\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"events\": [\n {}\n ],\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"headers\": [\n {}\n ],\n \"isActive\": true\n}"
response = http.request(request)
puts response.read_bodyUpdates an existing webhook configuration.
Overview
Update webhook settings including URL, subscribed events, custom headers, and active status. Only provided fields are updated; omitted fields remain unchanged.Authentication
string
required
Bearer token with
write:webhooks scopePath Parameters
string
required
The webhook configuration ID (UUID v4)
Request Body
All fields are optional. Only provided fields are updated.string
The HTTPS endpoint URL to receive webhook notifications. Maximum 2048 characters.
array
Array of event type strings to subscribe to:
"ANALYSIS_COMPLETED"- Analysis finished successfully"ANALYSIS_FAILED"- Analysis processing failed"PING"- Test event for connectivity"CONVERSATION_COMPLETED"- The call finished and analysis is available"CONVERSATION_FAILED"- A technical failure prevented the call"CONVERSATION_STARTED"- A call attempt began"CONVERSATION_RESCHEDULED"- A follow-up call attempt has been scheduled"CONVERSATION_CANCELLED"- The conversation ended without completing"SOURCING_COMPLETED"- Sourcing run finished with scored candidates"SOURCING_FAILED"- Sourcing run terminated with an error"ENRICH_COMPLETED"- Enrichment run completed"ENRICH_FAILED"- Enrichment run terminated with an error
"INTERVIEW_COMPLETED" and siblings — which register exactly the same subscription. See
Event name vocabulary.string
Human-readable name for the webhook. Maximum 255 characters.
string
Description of what this webhook is used for.
array
Custom headers to include in webhook requests. Maximum 50 headers.
This replaces all existing headers. Include all headers you want to keep.
boolean
Whether the webhook is active. Set to
false to temporarily disable the webhook.Response
Returns the updated webhook configuration.Example Request
curl -X PATCH https://api.instaview.sk/webhooks/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"url": "https://api.example.com/webhooks/instaview-v2",
"events": ["ANALYSIS_COMPLETED", "ANALYSIS_FAILED", "CONVERSATION_COMPLETED", "CONVERSATION_FAILED"]
}'
const webhookId = '550e8400-e29b-41d4-a716-446655440000';
const response = await fetch(
`https://api.instaview.sk/webhooks/${webhookId}`,
{
method: 'PATCH',
headers: {
'Authorization': `Bearer ${process.env.INSTAVIEW_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://api.example.com/webhooks/instaview-v2',
events: ["ANALYSIS_COMPLETED", "ANALYSIS_FAILED", "CONVERSATION_COMPLETED", "CONVERSATION_FAILED"]
})
}
);
const data = await response.json();
console.log(`Webhook updated: ${data.url}`);
webhook_id = '550e8400-e29b-41d4-a716-446655440000'
response = requests.patch(
f'https://api.instaview.sk/webhooks/{webhook_id}',
headers={
'Authorization': f'Bearer {os.environ["INSTAVIEW_API_KEY"]}',
'Content-Type': 'application/json'
},
json={
'url': 'https://api.example.com/webhooks/instaview-v2',
'events': ["ANALYSIS_COMPLETED", "ANALYSIS_FAILED", "CONVERSATION_COMPLETED", "CONVERSATION_FAILED"]
}
)
data = response.json()
print(f'Webhook updated: {data["url"]}')
Example Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"apiKeyId": "api-key-uuid",
"url": "https://api.example.com/webhooks/instaview-v2",
"name": "Production Webhook",
"description": "Receives conversation completion notifications",
"headers": [
{
"name": "Authorization",
"isMasked": true
}
],
"events": [
"analysis.completed",
"analysis.failed",
"conversation.completed",
"conversation.failed"
],
"vocabulary": "NEUTRAL",
"isActive": true,
"maxRetries": 3,
"timeoutMs": 30000,
"consecutiveFailures": 0,
"circuitOpenedAt": null,
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T12:00:00Z"
}
Common Update Scenarios
Disable Webhook Temporarily
await fetch(`https://api.instaview.sk/webhooks/${webhookId}`, {
method: 'PATCH',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
isActive: false
})
});
Update Event Subscriptions
await fetch(`https://api.instaview.sk/webhooks/${webhookId}`, {
method: 'PATCH',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
events: ["ANALYSIS_COMPLETED", "ANALYSIS_FAILED", "PING", "CONVERSATION_COMPLETED", "CONVERSATION_FAILED", "CONVERSATION_STARTED", "SOURCING_COMPLETED", "SOURCING_FAILED", "ENRICH_COMPLETED", "ENRICH_FAILED"]
})
});
Update Custom Headers
// Note: This replaces ALL headers
await fetch(`https://api.instaview.sk/webhooks/${webhookId}`, {
method: 'PATCH',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
headers: [
{ name: 'Authorization', value: 'Bearer new-token' },
{ name: 'X-Environment', value: 'production' }
]
})
});
Error Responses
400 - Validation Error
400 - Validation Error
{
"statusCode": 400,
"message": "Validation failed",
"errors": ["url must be a valid URL"],
"traceId": "4b1f0c9d2e6a47f8b3c5d7e9a1b2c3d4"
}
404 - Webhook Not Found
404 - Webhook Not Found
{
"statusCode": 404,
"message": "Webhook configuration not found",
"traceId": "4b1f0c9d2e6a47f8b3c5d7e9a1b2c3d4",
"timestamp": "2026-08-03T10:30:00.000Z"
}
403 - Access Denied
403 - Access Denied
{
"statusCode": 403,
"message": "Access denied to this webhook configuration",
"traceId": "4b1f0c9d2e6a47f8b3c5d7e9a1b2c3d4",
"timestamp": "2026-08-03T10:30:00.000Z"
}
Related
Get Webhook
View webhook configuration details
Reset Circuit
Reset circuit breaker for failed webhook