Update a webhook
PATCH/v1/webhooks/{id}Scope webhooks
Changes the name, URL, events or state of a webhook. With rotateSecret the response carries a new signing secret and the old one stops working at once.
Path parameters
Section titled “Path parameters”| Name | Type | Description |
|---|---|---|
id required |
string |
ID of the webhook. |
Request body
Section titled “Request body”| Field | Type | Description |
|---|---|---|
enabled |
boolean |
Pause (false) or resume (true) deliveries. |
events |
string[] |
New list of events; it replaces the current one. 1 to 20 items. One of ticket.created, ticket.status_changed, ticket.priority_changed, ticket.comment_added, ticket.attachment_added. |
name |
string |
New name. 2 to 160 characters. |
rotateSecret |
boolean |
Issue a new signing secret. The old one stops working at once. |
url |
string |
New HTTPS URL. Up to 1000 characters. A public https URL. |
{ "events": [ "ticket.created", "ticket.status_changed", "ticket.comment_added" ]}Response
Section titled “Response”200 OK · data
| Field | Type | Description |
|---|---|---|
createdAt |
date-time |
When it was created. |
enabled |
boolean |
Whether deliveries are active. |
events |
string[] |
Events the webhook receives. |
id |
integer |
Unique ID. |
name |
string |
Name in the language of Accept-Language. |
secret |
string |
Signing secret. Store it now: it is never shown again. |
updatedAt |
date-time |
When it last changed. |
url |
string |
HTTPS URL that receives the deliveries. |
version |
string |
Payload version the webhook receives. |
{ "data": { "id": 7, "name": "ERP sync", "url": "https://erp.example.com/hooks/duty", "events": [ "ticket.created", "ticket.status_changed" ], "enabled": true, "version": "v1", "secret": "whsec_5b1f0e8c2a9d4e7f8a6b3c1d0e9f2a4b", "createdAt": "2026-12-01T09:00:00Z", "updatedAt": "2026-12-01T09:00:00Z" }}Errors
Section titled “Errors”Errors share one shape; see Errors for every key.
Code examples
Section titled “Code examples”curl -X PATCH 'https://api.client.service-desk.goldmaster.io/v1/webhooks/7' \ -H "Authorization: Bearer $DUTY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "events": [ "ticket.created", "ticket.status_changed", "ticket.comment_added" ]}'const response = await fetch('https://api.client.service-desk.goldmaster.io/v1/webhooks/7', { method: 'PATCH', headers: { Authorization: `Bearer ${process.env.DUTY_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "events": [ "ticket.created", "ticket.status_changed", "ticket.comment_added" ] }),});const body = await response.json();if (!response.ok) throw new Error(`${body.error}: ${body.message}`);console.log(body.data);import os
import requests
response = requests.request( "PATCH", "https://api.client.service-desk.goldmaster.io/v1/webhooks/7", headers={"Authorization": f"Bearer {os.environ['DUTY_API_KEY']}"}, json={ "events": [ "ticket.created", "ticket.status_changed", "ticket.comment_added" ] }, timeout=30,)response.raise_for_status()print(response.json()["data"])package main
import ( "fmt" "io" "net/http" "os" "strings")
func main() { payload := strings.NewReader(`{ "events": [ "ticket.created", "ticket.status_changed", "ticket.comment_added" ]}`) req, _ := http.NewRequest("PATCH", "https://api.client.service-desk.goldmaster.io/v1/webhooks/7", payload) req.Header.Set("Authorization", "Bearer "+os.Getenv("DUTY_API_KEY")) req.Header.Set("Content-Type", "application/json") res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() data, _ := io.ReadAll(res.Body) fmt.Println(res.Status, string(data))}<?php$ch = curl_init('https://api.client.service-desk.goldmaster.io/v1/webhooks/7');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'PATCH', CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('DUTY_API_KEY'), 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => <<<'JSON'{ "events": [ "ticket.created", "ticket.status_changed", "ticket.comment_added" ]}JSON,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);echo $status, PHP_EOL, $response;using System.Net.Http.Headers;
using var client = new HttpClient();using var request = new HttpRequestMessage(new HttpMethod("PATCH"), "https://api.client.service-desk.goldmaster.io/v1/webhooks/7");request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("DUTY_API_KEY"));request.Content = new StringContent(""" { "events": [ "ticket.created", "ticket.status_changed", "ticket.comment_added" ] } """, System.Text.Encoding.UTF8, "application/json");using var response = await client.SendAsync(request);Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");import java.net.URI;import java.net.http.*;
HttpClient client = HttpClient.newHttpClient();HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.client.service-desk.goldmaster.io/v1/webhooks/7")) .header("Authorization", "Bearer " + System.getenv("DUTY_API_KEY")) .header("Content-Type", "application/json") .method("PATCH", HttpRequest.BodyPublishers.ofString(""" { "events": [ "ticket.created", "ticket.status_changed", "ticket.comment_added" ] } """)) .build();var response = client.send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.statusCode() + " " + response.body());