Skip to main content
Outbound webhooks are currently in beta. The event catalog and payload shape may still evolve.
Outbound webhooks let Layers push a real-time event to an HTTPS endpoint you control whenever a merchandising rule, sort order, or attribute changes in your store. Use them to keep an internal cache warm, mirror configuration changes into your own database, trigger a downstream deploy, or notify a Slack bot when merchandising goes live. Managing outbound webhooks requires the Manage webhooks permission, which is granted to the Owner, Admin, and Developer roles by default.

Open the Webhooks page

  1. In the Layers dashboard, go to Settings.
  2. Select Webhooks (under the Developer category, or search for “webhooks” in the sidebar).
The page lists every subscription for the store, with columns for the endpoint URL, subscribed events, status, and per-row actions.

Add a subscription

  1. On the Webhooks page, select Add subscription.
  2. Enter an Endpoint URL. The URL must start with https:// — HTTP endpoints are rejected.
  3. Select one or more Event types from the picker.
  4. Save the subscription. New subscriptions are created in the Active state and begin receiving events immediately.
Each store can subscribe to as many endpoints as it needs. A single event fans out to every active subscription that lists that event type.

Supported events

Preview merchandising rules do not emit events. If an update toggles a rule’s enabled flag, Layers sends rule.published or rule.unpublished instead of rule.updated.

Payload shape

Each delivery is a JSON POST containing the changed record plus two envelope fields:
  • store_id — the Layers store the event belongs to. Use it to route events when a single endpoint serves multiple stores.
  • event_type — one of the values from the supported events table.
The remaining fields match the model that changed (sort order, rule, or attribute). Your endpoint should ignore unknown fields so it keeps working as Layers adds new ones.

Manage a subscription

Each row on the Webhooks page has an actions menu:
  • Edit — change the endpoint URL or the subscribed event types.
  • Disable — stop sending events without deleting the subscription. Disabled subscriptions are ignored by the event dispatcher and are safe to leave in place while you debug a receiver.
  • Enable — resume delivery for a disabled subscription.
  • Delete — permanently remove the subscription. This cannot be undone.
Use the search box to filter by URL, and the Status and Event type filters to narrow the list. Columns for URL, status, created, and updated are sortable.

Endpoint requirements

  • The URL must use HTTPS.
  • The endpoint should respond quickly with a 2xx status. Slow endpoints delay retries and can cause backlogs.
  • Requests may be retried on transient failures, so treat every event as at-least-once — dedupe on the id field of the payload when the operation is not naturally idempotent.
  • Because the same event fans out to every active subscription, endpoints on multiple stores should verify store_id before acting.

Next steps