Docs / Website Integration

Sanity Setup Wizard

Build a narrow Sanity document webhook that posts directly into Crawlbaby’s existing page-change intake endpoint. This keeps Sanity first-class in Website Integration without adding a new polling or app-install runtime.

Showing placeholder site values. Open this from a site settings page to prefill the Crawlbaby endpoint and production domain.

1

Basics

Use the site’s saved base URL as the production domain. Collect only the Sanity values needed for routing and webhook generation.

Production domain
https://example.com
Webhook token
Create or rotate it in Website Integration first.
2

Routing

Leave unused rows blank. Route patterns support only {slug}, {locale}, {parent}, and {category} placeholders.

3

Generated Config

Paste these values into Sanity Manage -> API -> Webhooks and enable only Create and Update triggers.

Complete the basics and at least one valid route row.
  • Sanity project ID is required.
  • Sanity dataset is required.
  • Add at least one valid document type and route pattern to generate the webhook filter and projection.
Routing rows skipped
  • Row 1: document type is missing or invalid.
  • Row 1: route pattern is required.
  • Row 1: Route pattern is required.
Endpoint URL
https://app.crawlbaby.com/api/sites/<your-site-id>/events/page-changed
Recommended header
X-Crawlbaby-Event-Token: <site webhook token>
Alternate auth
Authorization: Bearer <site webhook token>
Recommended triggers
create, update
Routing limitations / assumptions
  • Publish-only mode matches Sanity’s default webhook behavior: published document changes trigger the webhook while drafts stay ignored.
  • Sanity drafts and versions stay disabled by default. Enable them only if your production site renders unpublished content.
  • Delete triggers stay disabled in this guide. This setup is intentionally limited to live page creates and updates.
  • Route patterns support only {slug}, {locale}, {parent}, and {category} placeholders.
  • The {category} placeholder assumes a single reference field whose target document exposes slug.current.