Layers
Partner APIAPI referenceWebhooks

PATCH /v1/webhook-endpoints/:endpointId

Update a webhook endpoint's url, events, description, or status.

View as Markdown
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-Key
    string (UUID)optional
    Replays within 24h.
Body
  • url
    stringoptional
    Updated endpoint URL. HTTPS required in prod.
  • events
    string[]optional
    1–50 event types from the catalog. Replaces the existing subscription list.
  • description
    string | nulloptional
    Human label; pass `null` to clear.
  • status
    stringoptional
    `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

StatusCodeWhen
422VALIDATIONNo fields supplied, unknown event type, URL invalid, events empty/too long.
404NOT_FOUNDEndpoint not owned by the calling org.
409IDEMPOTENCY_CONFLICTIdempotency-Key reused with a different body.

See also

On this page