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.
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. These can be changes to content items, content types, languages, or taxonomy groups. You call Sync API in intervals that fit your use case and process the content changes as necessary.