Update a webhook endpoint
Change the URL, subscribed events or description, or disable / re-enable the endpoint.
/v1/webhook_endpoints/{id}scope webhooks:managePath parameters
idstringrequiredWebhook endpoint ID (
we_…).
Body parameters
urlstringUp to 2048 characters.
enabled_eventsarray of stringsEvent types to receive: exact types, families such as
payment_intent.*, or*for all. Available:payment.succeeded,payment.refunded,payment_intent.created,payment_intent.requires_action,payment_intent.processing,payment_intent.succeeded,payment_intent.payment_failed,payment_intent.canceled,refund.created,refund.succeeded,refund.failed,terminal.created,terminal.deactivated,terminal.deleted,kyb.status_changed.descriptionstringUp to 500 characters.
disabledbooleantruestops deliveries (events are kept and delivered when re-enabled, within 3 days);falsere-enables and resets the failure window.
Headers
ZyloPay-VersionstringPin the request to an API version (2026-09-28). Defaults to the version the API key was created with.
Idempotency-KeystringRecommended. A unique key per operation (a UUID v4); retries with the same key and body return the first response.
Returns
HTTP 200 with the webhook endpoint object.
Errors
| Status | Meaning |
|---|---|
400 | Invalid request (invalid_request_error / idempotency_error). |
401 | Missing, invalid, expired or revoked API key (authentication_error). |
403 | The key lacks the scope, the IP is not allowed, or the account is disabled (permission_error). |
409 | Conflict: idempotency key reused or in progress, or the object is in the wrong state. |
429 | Rate limit reached for this key (rate_limit_error); see Retry-After. |
500 | Internal error (api_error). Retry with the same Idempotency-Key. |
Branch on error.code. Every code is listed in error codes.
Example request
curl https://zylopay-api.fly.dev/api/v1/webhook_endpoints/we_2Lk9Qm4Xz7Pv1Rt8Wb3Ns6Hd \
-X PATCH \
-H "Authorization: Bearer $ZYLOPAY_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled_events": [
"*"
]
}'Example response
{
"id": "we_2Lk9Qm4Xz7Pv1Rt8Wb3Ns6Hd",
"object": "webhook_endpoint",
"livemode": false,
"url": "https://example.com/zylopay/webhooks",
"description": "Order service (test)",
"enabled_events": [
"*"
],
"status": "enabled",
"disabled_reason": null,
"api_version": "2026-09-28",
"failing_since": null,
"last_success_at": "2026-09-28T14:02:41.000Z",
"secret_rotation_ends_at": null,
"created": "2026-09-20T10:00:00.000Z",
"updated": "2026-09-28T11:00:00.000Z"
}