Webhooks
Update Webhook Endpoint
Change a webhook endpoint’s URL, events or description, or turn it on or off, with PATCH /api/webhooks/.
PATCH
/
api
/
webhooks
/
{id}
Update Webhook Endpoint
curl --request PATCH \
--url https://octanist.com/api/webhooks/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"url": "<string>",
"events": [
"lead.created",
"lead.status_changed"
],
"description": "<string>",
"enabled": true
}
'import requests
url = "https://octanist.com/api/webhooks/{id}"
payload = {
"url": "<string>",
"events": ["lead.created", "lead.status_changed"],
"description": "<string>",
"enabled": True
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
events: ['lead.created', 'lead.status_changed'],
description: '<string>',
enabled: true
})
};
fetch('https://octanist.com/api/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://octanist.com/api/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' => [
'lead.created',
'lead.status_changed'
],
'description' => '<string>',
'enabled' => 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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://octanist.com/api/webhooks/{id}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"events\": [\n \"lead.created\",\n \"lead.status_changed\"\n ],\n \"description\": \"<string>\",\n \"enabled\": true\n}")
req, _ := http.NewRequest("PATCH", 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))
}HttpResponse<String> response = Unirest.patch("https://octanist.com/api/webhooks/{id}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"events\": [\n \"lead.created\",\n \"lead.status_changed\"\n ],\n \"description\": \"<string>\",\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://octanist.com/api/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"events\": [\n \"lead.created\",\n \"lead.status_changed\"\n ],\n \"description\": \"<string>\",\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "9b2f1c4e-6a1d-4f7e-9a51-2c8f0f3d1a77",
"url": "https://crm.example.com/webhooks/octanist",
"description": "CRM sync",
"events": [
"lead.created",
"lead.status_changed"
],
"enabled": true,
"disabledReason": null,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}Send only the fields you want to change.
Needs an API key with full access.
Request Body
| Field | Type | Description |
|---|---|---|
url | string | New HTTPS URL. |
events | string[] | Replaces the subscribed events. At least one. |
description | string | New description; null or "" clears it. |
enabled | boolean | false turns the endpoint off and stops deliveries that wait for a retry. true turns it back on, also after it answered 410 Gone. |
Example Request
curl -X PATCH \
-H "X-API-KEY: your_api_key" \
-H "Content-Type: application/json" \
-d '{ "enabled": false }' \
"https://octanist.com/api/webhooks/9b2f1c4e-6a1d-4f7e-9a51-2c8f0f3d1a77"
Example Response
{
"success": true,
"data": {
"id": "9b2f1c4e-6a1d-4f7e-9a51-2c8f0f3d1a77",
"url": "https://crm.example.com/webhooks/octanist",
"description": "CRM sync",
"events": ["lead.created", "lead.status_changed"],
"enabled": false,
"disabledReason": "user",
"createdAt": "2026-11-30T10:00:00.000Z",
"updatedAt": "2026-11-30T11:00:00.000Z"
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-11-30T11:00:00.000Z"
}
}
Body
application/json
⌘I
Update Webhook Endpoint
curl --request PATCH \
--url https://octanist.com/api/webhooks/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"url": "<string>",
"events": [
"lead.created",
"lead.status_changed"
],
"description": "<string>",
"enabled": true
}
'import requests
url = "https://octanist.com/api/webhooks/{id}"
payload = {
"url": "<string>",
"events": ["lead.created", "lead.status_changed"],
"description": "<string>",
"enabled": True
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
events: ['lead.created', 'lead.status_changed'],
description: '<string>',
enabled: true
})
};
fetch('https://octanist.com/api/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://octanist.com/api/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' => [
'lead.created',
'lead.status_changed'
],
'description' => '<string>',
'enabled' => 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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://octanist.com/api/webhooks/{id}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"events\": [\n \"lead.created\",\n \"lead.status_changed\"\n ],\n \"description\": \"<string>\",\n \"enabled\": true\n}")
req, _ := http.NewRequest("PATCH", 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))
}HttpResponse<String> response = Unirest.patch("https://octanist.com/api/webhooks/{id}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"events\": [\n \"lead.created\",\n \"lead.status_changed\"\n ],\n \"description\": \"<string>\",\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://octanist.com/api/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"events\": [\n \"lead.created\",\n \"lead.status_changed\"\n ],\n \"description\": \"<string>\",\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "9b2f1c4e-6a1d-4f7e-9a51-2c8f0f3d1a77",
"url": "https://crm.example.com/webhooks/octanist",
"description": "CRM sync",
"events": [
"lead.created",
"lead.status_changed"
],
"enabled": true,
"disabledReason": null,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}