← All notes
CMS Implementation6 min

A sync tag is not a webhook

Sanity's Live Content API pushed "live by default" into mainstream Next.js and storefront stacks in 2025–2026. The temptation is to keep the old GROQ webhook that revalidates every path on publish, and layer Live on top "just in case." Those are different contracts. A sync tag is a lightweight invalidation signal scoped to the queries that actually depended on changed documents. A webhook is a delivery of a mutation event to your backend so you can run side effects — search indexing, Slack, a Sanity Function, a partner sync. We have seen marketing sites and BuilderHelp content surfaces treat them as interchangeable and end up with double revalidation, missed side effects, or a listen() stream opened in the browser that never belonged there.

Freshness and side effects are different jobs

When an editor publishes, two questions matter. First: which rendered queries are now stale, and how do those surfaces refetch without dropping the CDN? Second: what else in the system must react — rebuild a search document, notify a channel, push a product feed?

Live Content answers the first with sync tags. Queries return tags; a live events stream says which tags flipped; your app refetches only the matching queries. That design assumes high fan-out of readers and wants CDN-friendly caching, not a full document dump on every mutation.

Webhooks and listen() answer the second. They carry mutation detail (or at least a filter match) to a server you control. They are not a substitute for tag-scoped cache invalidation on the public site, and the public site is not where you want mutation payloads.

A publish webhook is a blunt revalidator

The classic Next.js pattern — on any publish, call revalidatePath or revalidateTag for a hard-coded list — works until the content graph grows. One shared author or category change then invalidates routes that never rendered that field. During a content push before a launch, the webhook queue and the origin fight each other.

Sync tags invert the bookkeeping. The query that fetched the homepage heroes already declared what it depended on. When those documents change, only those tags fire. You stop maintaining a mental map of "every page that might mention this document."

If your webhook handler is mostly guessing paths to purge, you are doing Live Content's job with worse dependency tracking. Keep the webhook for work that is not "make this HTML fresh."

Do not open listen() where Live belongs

client.listen() streams mutation-level events. It is the right tool for Studio-adjacent tooling, admin dashboards, or a server worker that needs previous revisions and transition types. It is the wrong tool for anonymous storefront traffic.

We still see prototypes that subscribe listen() in a React effect "so the page updates when Sanity changes." That bypasses CDN caching, scales with open connections instead of tags, and leaks a shape of change events the public UI never needed. Live Content exists so the browser hears "refetch this query," not "here is the mutation."

Rule of thumb we use on Sanity builds: Live (or framework live helpers) on reader surfaces; webhooks or Functions for outbound automation; listen() only when a trusted client genuinely needs mutation detail.

Where we split the paths

On marketing and notes sites, publish should refresh the listing and the note page through Live or tag invalidation tied to the queries those routes run. A separate webhook may still fire to warm OG images or ping an index — that is side-effect work with an idempotent handler, not a second full-site purge.

On product surfaces that embed CMS copy next to commerce data, Live keeps the editorial islands honest without forcing every price and inventory read through the same channel. The webhook that syncs a subset of documents into a search index stays on the server and does not double as the page's freshness mechanism.

Preview and Presentation stay on draft or release perspectives with stega for overlays. That stack is about editing. Live on the published dataset is about readers. Collapsing "preview updates" and "production freshness" into one webhook usually means both are wrong.

What we check before calling content live

Can you name, for each public query, how its cache dies — sync tags / Live, a specific revalidateTag, or deliberately static? If the answer is "the catch-all publish webhook," dependency tracking is still manual.

Does every webhook handler do something a sync tag cannot — search, notifications, partner sync — with retries and idempotency? If the handler only revalidates paths, delete it once Live covers those routes.

Is listen() absent from anonymous client bundles? Mutation streams belong behind auth or on workers. The milestone is one freshness path for readers and one event path for side effects — not two overlapping guesses.

Questions

Is this the same as treating scheduled posts as a query filter?
No. Scheduled publishing is about which documents a query returns at a given time. Sync tags vs webhooks is about how already-published changes reach readers and backends. You still filter by publishedAt; you separately choose Live or webhooks for propagation.
Should we delete all content webhooks once Live is on?
Only the ones whose sole job was revalidating the site. Keep webhooks or Sanity Functions for indexing, notifications, and other side effects. Live does not replace those deliveries.
Why not SSR everything and skip both?
You can, at the cost of origin load and losing CDN hit rates on mostly-static pages. Live is useful precisely when you want cached HTML that still refreshes when the tags for that query flip — without a custom webhook graph.

Sources

  1. Sanity Live Content API — Sync-tag based live updates designed for CDN-friendly reader surfaces.
  2. Sanity realtime updates — Live vs listen() — When to use Live Content versus mutation listeners and webhooks.
  3. Sanity JS client realtime guidance — Live for end-user apps; listen() when mutation detail is required.

Have something to build?

Tell us what you're working on and we'll tell you honestly whether we're the right fit.

Work with us