# Webhooks and rebuilds

> Configure Uniform webhooks and frontend rebuild strategies so that production sites are only rebuilt at the right moments during the release lifecycle.

Source: https://docs.uniform.app/docs/guides/composition/releases/webhooks-and-rebuilds

When using the releases feature, it is important to review the services which are subscribed to webhooks from Uniform so as to best ensure that these services are triggered at the most appropriate moments. Without care, every edit inside a release can fan out into webhook events and cause unnecessary rebuilds of production sites that should only ever rebuild on launch.

The events which trigger certain webhooks can be seen in the illustration below:

![](https://docs.uniform.app/images/guides/composition/releases-and-scheduling/releases-webhook-diagram.jpg)

## Rebuilding websites after a release

In order to prevent unnecessary rebuilds of a production website when using the releases feature, we recommend following these tips:

- **Filter out release-scoped events.** Ensure that release-scoped events from content objects are not triggering rebuilds. These events are denoted by the `.release` part in the event name – such as `entry.release` or `composition.release`.
- **Take note of the `trigger` property in non-release-scoped content events.** When content is launched and moved into the "base" of the project, Uniform will emit individual events for content objects such as compositions and entries. This can cause a lot of events to appear in quick succession. These events can be filtered out by looking for the presence of the `trigger` property in the webhook payload, which should include information about the type of trigger (release) and the ID of the release.
- **Leverage the `release.launched` event for rebuilds after releases.** The `release.launched` webhook fires after all of the contents of a release have been moved into the base, and the launch process has ended. As such, we recommend using this webhook to initiate site rebuilds.

  - For partial rebuilding of websites, you can also use the release ID from this event to make a call to the _For the US region:_

    _For the EU region:_

    , which will provide details around the entities that were launched as part of the release.

To learn more about the webhook events available and the expected payloads, check out our [webhook catalog](https://www.svix.com/event-types/us/org_2HgMLYs57QWpjfM80UPmW98qTgT/).

## See also

- [Preview release content](https://docs.uniform.app/docs/guides/composition/releases/preview-release-content) – preview release content end-to-end before it is launched, so that the rebuild that follows `release.launched` only ships content you have already validated.
- [Launch a release](https://docs.uniform.app/docs/guides/composition/releases/launch-a-release) – understand when `release.launched` fires for manual versus scheduled launches.
