Revalidation

BusinessDash can trigger a revalidation of your site's pages when content changes in the dashboard — no polling, no manual rebuilds.

The revalidation handler verifies incoming webhook payloads using the HMAC secret configured in Settings → Integrations.

// Next.js App Router
import { revalidateHandler } from '@businessdash/sdk/next/revalidate'

export const POST = revalidateHandler({
  secret: process.env.BD_REVALIDATION_SECRET,
})

// Generic adapter
import { createRevalidateHandler } from '@businessdash/sdk/adapters/revalidate'

const handler = createRevalidateHandler({
  secret: process.env.BD_REVALIDATION_SECRET,
  revalidate: async (paths) => {
    // paths is a string[] of changed URLs
    await Promise.all(paths.map((p) => myCache.revalidate(p)))
  },
})

Configure the webhook URL in your BusinessDash dashboard under Settings → Webhooks with a whsec_… secret. BusinessDash sends a POST with the changed page paths whenever content is published or updated.