PATCH /v1/webhook-endpoints/:endpointId
Update a webhook endpoint's url, events, description, or status.
PATCH
/v1/webhook-endpoints/{endpointId}Phase 1stableidempotent
- Auth
- Bearer
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 the idempotency window.
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.metadataobject | nulloptionalMerged into the endpoint's existing metadata per key (Stripe-style): omitted keys are preserved, sent keys are added/overwritten, an empty value unsets a key, and `null` clears all.statusstringoptional`active` or `paused`. Cannot be set to `auto_paused` by partners - that's the dispatcher's lane.scope"own" | "all_children"optionalRe-target delivery scope.all_children(the firehose — this org plus every direct child, each tagged withdata.organizationId) requires anorg:adminkey; otherwise403 FORBIDDEN_SCOPE. See create.
Example
curl -X PATCH https://api.layers.com/v1/webhook-endpoints/d4c71b62-... \
-H "Authorization: Bearer $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. |