Start free. Scale as your blog grows.Get started

Developer documentation

Webhooks

Publishing webhooks let ContioReach notify your application when content changes.

This is especially useful when your frontend uses cached or statically generated pages. Instead of repeatedly checking whether content changed, your application can refresh the relevant pages when ContioReach sends a webhook.

Common use case

A typical publishing flow looks like this:

  1. Content is published in ContioReach
  2. ContioReach sends a webhook
  3. Your application verifies the secret
  4. The blog index is revalidated
  5. The article page is revalidated

Configure your webhook

Inside your workspace:

  1. 1Open Developer Settings
  2. 2Select Webhook Integration
  3. 3Enter the URL for your deployed application
  4. 4Generate a secure token
  5. 5Save the webhook configuration

Store the generated token in your application:

.env.local
REVALIDATION_SECRET=your_generated_secret_token

Next.js revalidation example

Create:

Path
app/api/revalidate/route.ts
app/api/revalidate/route.ts
import { revalidatePath } from "next/cache";

export async function POST(request: Request) {
  const { secret, post } = await request.json();

  if (
    secret !==
    process.env.REVALIDATION_SECRET
  ) {
    return Response.json(
      { error: "Invalid token" },
      { status: 401 }
    );
  }

  revalidatePath("/blog");

  if (post?.slug) {
    revalidatePath(`/blog/${post.slug}`);
  }

  return Response.json({
    revalidated: true
  });
}

When ContioReach sends the webhook, your application verifies the secret before revalidating content.

What gets refreshed

The example refreshes:

Path
/blog

and, when the payload includes a post slug:

Path
/blog/[slug]

This keeps both the blog listing and the individual article current.

Keep your webhook secret private

The webhook secret should be treated like a credential. Do not expose it in browser code or commit it to a public repository.

Always verify the secret before performing revalidation.