PATCH /v1/webhook-endpoints/:endpointId
Update a webhook endpoint's url, events, description, or status.
PATCH
/v1/webhook-endpoints/{endpointId}Phase 1stableidempotent
- Auth
- X-Api-Key
Partial update. At least one field is required. Setting status: "active" on an auto-paused endpoint also resets consecutiveFailureCount so the dispatcher doesn't immediately re-pause on the first delivery.
Headers
Idempotency-Keystring (UUID)optionalReplays within 24h.
Body
urlstringoptionalUpdated endpoint URL. HTTPS required in prod.eventsstring[]optional1–50 event types from the catalog. Replaces the existing subscription list.descriptionstring | nulloptionalHuman label; pass `null` to clear.statusstringoptional`active` or `paused`. Cannot be set to `auto_paused` by partners — that's the dispatcher's lane.
Example
curl -X PATCH https://api.layers.com/v1/webhook-endpoints/d4c71b62-... \
-H "X-Api-Key: $LAYERS_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ "events": ["job.completed", "content.approved", "post.published"] }'200OK — returns the updated endpoint
Errors
| Status | Code | When |
|---|---|---|
| 422 | VALIDATION | No fields supplied, unknown event type, URL invalid, events empty/too long. |
| 404 | NOT_FOUND | Endpoint not owned by the calling org. |
| 409 | IDEMPOTENCY_CONFLICT | Idempotency-Key reused with a different body. |