Outbound webhooks are currently in beta. The event catalog and payload shape may still evolve.
Open the Webhooks page
- In the Layers dashboard, go to Settings.
- Select Webhooks (under the Developer category, or search for “webhooks” in the sidebar).
Add a subscription
- On the Webhooks page, select Add subscription.
- Enter an Endpoint URL. The URL must start with
https://— HTTP endpoints are rejected. - Select one or more Event types from the picker.
- Save the subscription. New subscriptions are created in the Active state and begin receiving events immediately.
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 JSONPOST 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.
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.
Endpoint requirements
- The URL must use HTTPS.
- The endpoint should respond quickly with a
2xxstatus. 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
idfield 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_idbefore acting.
Next steps
- Manage API access to create tokens for the same integrations that receive your webhooks.
- Manage roles and permissions to control who can create or edit subscriptions.
- Navigate settings to find other store configuration pages.