Rebuild your static site when specific content is changed. For example, to refresh the content preview.
Keep your search index current with the latest content.
Control when your app reacts to changes. No need to respond to webhooks as they come. Synchronize the changes in an interval that suits you best.
Keep content synchronization async. If your app gets offline occasionally, you can fetch and process updates when online. You can also choose the type of synchronized content by specifying filters.
Sync API compared to webhooks
Both webhooks and Sync API are tools to react to changes in your live and preview content. You can use them together or separately.Webhooks give you real-time notifications about changes in your content items. Webhooks are great if you need immediate updates. For example, when reporting the latest news or advancements in a sports match. However, immediate updates also mean your app must always be available to process those updates quickly and respond to them. This might be an issue if your app receives a lot of webhook notifications at once.With Sync API, you get a list of recently changed content items. These can be changes to any content item in any language or a specific type of localized content. You call Sync API in intervals that fit your use case and process the content changes as necessary.