Webhooks
PATCH
/v1/orgs/{org_id}/webhooks/{webhook_id}Update Webhook
Bearer token or X-API-Keyscope: adminoperation_id: webhooks.update
Authentication
Send either Authorization: Bearer <token> or X-API-Key: <token>. The caller must hold the "admin" role on the organization. Any org token with sufficient scope. Create tokens from the console or the /v1/orgs/{org_id}/tokens endpoints. Requests without a valid credential are rejected with 401.
SDK install
pip install znyx-sdknpm install @znyx/sdkCode samples
Request
curl -X PATCH "$ZNYX_API_URL/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
Path 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. | - |