Skip to content

Update a webhook target

PATCH
/organizations/{org_id}/webhooks/{target_id}
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.

org_id
required
string
target_id
required
string
Media typeapplication/json
object
active
boolean | null
credential

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).

string | null
events
Array<string> | null
name
string | null
region

Wechselt die Anbieter-Region (global | eu) und damit den Endpunkt.

string | null
url

Nur für Arten mit kundeneigener Adresse.

string | null
Examplegenerated
{
"active": true,
"credential": "example",
"events": [
"example"
],
"name": "example",
"region": "example",
"url": "example"
}

Request succeeded. The response body contains the result.

Media typeapplication/json
object
active
required
boolean
created_at_unix
required
integer format: int64
events
required
Array<string>
id
required

Public_id (wht_…).

string
kind
required

Benannte Art: slack | teams | discord | google_chat | pagerduty | opsgenie | webhook.

string
last_delivery_at_unix
integer | null format: int64
last_delivery_ok
boolean | null
last_error
string | null
name
required
string
region

Anbieter-Region bei pagerduty/opsgenie (global | eu), sonst null. Wird aus dem gespeicherten Endpunkt zurückgewonnen.

string | null
secret_hint

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.

string | null
url
required
string
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.