> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uselayers.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage outbound webhooks

> Subscribe an HTTPS endpoint to real-time Layers events for merchandising rules, sort orders, and attributes so downstream systems stay in sync.

<Note>
  Outbound webhooks are currently in **beta**. The event catalog and payload shape may still evolve.
</Note>

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

| Event                | Fires when                                                         |
| -------------------- | ------------------------------------------------------------------ |
| `sort_order.created` | A sort order is created.                                           |
| `sort_order.updated` | A sort order is edited.                                            |
| `rule.created`       | A merchandising rule is created. Preview rules are excluded.       |
| `rule.updated`       | A merchandising rule is edited without changing its enabled state. |
| `rule.published`     | A merchandising rule is enabled.                                   |
| `rule.unpublished`   | A merchandising rule is disabled.                                  |
| `attribute.created`  | An attribute is created.                                           |
| `attribute.updated`  | An attribute is edited.                                            |

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:

```json theme={null}
{
  "id": "01J...",
  "store_id": "01H...",
  "event_type": "rule.published",
  "name": "Homepage hero pin",
  "enabled": true,
  "created_at": "2026-07-20T12:34:56.000000Z",
  "updated_at": "2026-07-20T14:07:11.000000Z"
}
```

* `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](#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

* [Manage API access](/help/configuration/manage-api-access) to create tokens for the same integrations that receive your webhooks.
* [Manage roles and permissions](/help/configuration/manage-roles-and-permissions) to control who can create or edit subscriptions.
* [Navigate settings](/help/configuration/navigate-settings) to find other store configuration pages.
