Webhooks
PATCH
/v1/orgs/{org_id}/webhooks/{webhook_id}Update Webhook
CI or Admin tokenscope: writeoperation_id: webhooks.update
Authentication
Requires a CI- or admin-level token. Runtime tokens are rejected for mutations.
SDK install
pip install znyx-sdknpm install @znyx/sdkPath parameters
| Name | Type | Required | Description |
|---|---|---|---|
| org_id#path | string | required | — |
| webhook_id#path | string | required | — |
Header parameters
| Name | Type | Required | Description |
|---|---|---|---|
| X-API-Key#header | string | null | optional | — |
| authorization#header | string | null | optional | — |
Request bodyrequired
| Field | Type | Required | Description |
|---|---|---|---|
| url | string | null | optional | — |
| events | string[] | null | optional | — |
| is_active | boolean | null | optional | — |
Responses
| Status | Description |
|---|---|
| 200 | Successful Response |
| 422 | Validation Error |
Response schema
idrequiredstring
org_idrequiredstring
urlrequiredstring
eventsrequiredstring[]
is_activerequiredboolean
created_atrequiredstring
has_secretrequiredboolean
Errors & what triggers them
| Code | Trigger | Fix |
|---|---|---|
| 400 | Webhook URL resolves to a private / loopback / reserved IP, or hostname is unresolvable. | Use a public HTTPS URL. Local testing requires a tunnel (ngrok, Cloudflare Tunnel). |
| 403 | Caller is not an org admin. | — |
| 422 | events list is empty or contains an unknown event name. | — |
Request
curl -X PATCH 'https://api.znyx.ai/v1/orgs/00000000-0000-0000-0000-000000000000/webhooks/00000000-0000-0000-0000-000000000000' \
-H 'Authorization: Bearer $ZNYX_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"url": null,
"events": null,
"is_active": null
}'Response
application/json
Successful Response
{
"id": "string",
"org_id": "string",
"url": "string",
"events": [
"string"
],
"is_active": false,
"created_at": "string",
"has_secret": false
}Schema: object