Revalidation
BIAB 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 '@biab-dev/sdk/next/revalidate'
export const POST = revalidateHandler({
secret: process.env.BIAB_REVALIDATION_SECRET,
})
// Generic adapter
import { createRevalidateHandler } from '@biab-dev/sdk/adapters/revalidate'
const handler = createRevalidateHandler({
secret: process.env.BIAB_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 BIAB dashboard under Settings →
Webhooks with a whsec_… secret. BIAB sends a POST with the changed page
paths whenever content is published or updated.