Update a webhook target
const url = 'https://api.perstat.io/organizations/example/webhooks/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"active":true,"credential":"example","events":["example"],"name":"example","region":"example","url":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.perstat.io/organizations/example/webhooks/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "active": true, "credential": "example", "events": [ "example" ], "name": "example", "region": "example", "url": "example" }'Partially updates a webhook or Slack target: name, destination URL, subscribed event list, and active flag. Omitted fields keep their current value; the URL and event names are validated, and an explicitly empty name returns 400. The signing secret cannot be changed here, use the rotate-secret operation. For API-key callers, stored destination URLs are reduced to the origin with a redacted path; credential hints and delivery errors are returned as null. Omit url to retain the saved endpoint. Sending its unchanged redacted URL also preserves it; moving a redaction placeholder to another destination is rejected. Accepts API keys with the webhooks:write scope, subject to current role and resource grants.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Ersetzt den Anbieter-Schlüssel (PagerDuty/Opsgenie), z. B. nachdem er
dort rotiert wurde. Für den generischen Webhook gibt es stattdessen
rotate-secret (server-erzeugtes Signatur-Secret).
Wechselt die Anbieter-Region (global | eu) und damit den Endpunkt.
Nur für Arten mit kundeneigener Adresse.
Examplegenerated
{ "active": true, "credential": "example", "events": [ "example" ], "name": "example", "region": "example", "url": "example"}Responses
Section titled “Responses”Request succeeded. The response body contains the result.
object
Public_id (wht_…).
Benannte Art: slack | teams | discord | google_chat |
pagerduty | opsgenie | webhook.
Anbieter-Region bei pagerduty/opsgenie (global | eu), sonst
null. Wird aus dem gespeicherten Endpunkt zurückgewonnen.
Maskierter Hinweis auf das gespeicherte Geheimnis (Signatur-Secret beim generischen Webhook, Anbieter-Schlüssel bei PagerDuty/Opsgenie). Das volle Signatur-Secret gibt es genau EINMAL beim Anlegen bzw. der Rotation; einen Anbieter-Schlüssel gibt die API NIE zurück.
Examplegenerated
{ "active": true, "created_at_unix": 1, "events": [ "example" ], "id": "example", "kind": "example", "last_delivery_at_unix": 1, "last_delivery_ok": true, "last_error": "example", "name": "example", "region": "example", "secret_hint": "example", "url": "example"}The request is invalid. Check the supplied fields and values.
Authentication is missing or invalid.
The authenticated caller does not have permission to perform this operation.
No accessible resource matches the supplied identifier.