Webhook + Sightkick: publish SEO pages to a site built in code

Connect a site built in code to Sightkick with one signed webhook. The headers, the payload, a tested HMAC check and the receiver's job, so every page your agent writes goes live on its day.

By Updated 11 min read

Sightkick is the SEO and GEO toolkit for AI agents, and its webhook is how a site built in code takes the pages. Your coding agent adds one POST endpoint to the site: it checks Sightkick's HMAC-SHA256 signature, saves each page by its id and answers 200. From then on every page your agent, Sightkick or you write goes live on its day, served by your own code, so the site can win new customers from Google and AI search. Next.js, Astro, a Lovable, Bolt or Replit project: anything that can take a POST.

We make Sightkick, the SEO and GEO toolkit for AI agents. sightkick.so publishes through this same webhook, 88 pages since 22 September 2026. The receiver code below was run on 16 November 2026 in Node 24 against events signed the way Sightkick signs them.

Key takeaways

  • One endpoint, four events. publish_article, update_article, unpublish_article and test, each a signed JSON POST.
  • The signature comes first. x-sightkick-signature is sha256= and the hex HMAC-SHA256 of the raw body, keyed with your signing secret. Anything that doesn't match gets a 401.
  • Save by id, answer with the URL. Upsert on article.id, never the slug, and answer 200 with the page's real address.
  • Render on the server. AI crawlers don't run JavaScript, so a page drawn in the browser is invisible to them.
  • Your agent builds it. One guide, sightkick.so/connect/webhook.md, holds the whole contract.

How do you connect a site built in code to Sightkick?

Give your coding agent the guide at sightkick.so/connect/webhook.md and it runs four steps, about 5 minutes when it works in the site's code. Prefer to click? In Sightkick, Settings → Publishing, pick "your site", choose how it's built (Lovable, Bolt, Next.js, Replit or other) and copy the prompt for your coding agent. Every platform Sightkick publishes to is on Integrations → Publishing.

No Sightkick account yet? See what AI search says about you – free, then give your agent the whole toolkit with the 7-day trial.

  1. Connect to Sightkick. Your agent adds Sightkick's MCP server, https://app.sightkick.so/mcp, by sightkick.so/connect/agent.md, and signs in to your workspace. Claude Code, Codex, Cursor and Gemini CLI work in the site's code, so one session can build the webhook and connect it (see Claude Code + Sightkick). A site has one publishing destination, so if another one is connected, the agent asks you before it removes it.
  2. Build the webhook and the blog pages. A POST route, for example /api/sightkick, that does the receiver's job below, plus a /blog list, a page per post and the typed pages at their own paths. Deploy it, so it answers at a public https address.
  3. Connect. The agent calls update_connections with action connect_webhook, the webhook's full address and the blog's address. Sightkick answers with a signing secret and an IndexNow key, shown this once. They go into the host's environment as SIGHTKICK_SIGNING_SECRET and SIGHTKICK_INDEXNOW_KEY, never into the code or a commit. Then deploy again.
  4. Test. update_connections with action test sends a signed test event with no article. Your webhook answers 200 without saving anything, and the connection is live.

The connection then sits in Sightkick under Settings → Publishing, where you change or remove it. A failed test says what it likely means: 401 or 403 is the secret, 404 the route, 500 and up the site's logs.

What does Sightkick send to the webhook?

Sightkick sends one JSON POST per event, with the event in the body's event_type and four headers that matter. A page goes out when its day comes, again when it changes, and once more as unpublish_article when it's taken down.

The headers on every Sightkick webhook event, as of November 2026
HeaderWhat it holdsWhat the receiver does with it
x-sightkick-signaturesha256= and the hex HMAC-SHA256 of the raw bodyChecks it before anything else, in constant time
x-sightkick-eventThe event type, as in the bodyOptional: routing before the body is parsed
x-sightkick-idempotency-keyOne key per page revision and destinationSkips a key it has handled, and still answers 200
authorizationBearer and a token, only if you set one when connectingOptional second check

Source: Sightkick's webhook contract, sightkick.so/connect/webhook.md, and its sender, read 16 November 2026.

A publish for an integration page looks like this, values shortened:

{
  "event_type": "publish_article",
  "is_update": false,
  "timestamp": "2026-11-16T06:00:04.000Z",
  "idempotency_key": "…",
  "article": {
    "id": "integrations/webhook",
    "slug": "webhook",
    "page_type": "integration",
    "path": "/integrations/webhook",
    "title": "…",
    "content_html": "…",
    "meta_title": "…",
    "meta_description": "…",
    "excerpt": "…",
    "language": "en",
    "status": "published",
    "image_url": "https://…",
    "images": [{ "url": "https://…", "alt": "…", "role": "featured" }],
    "internal_links": ["…"],
    "author": "…",
    "published_at": "…",
    "updated_at": "…",
    "minor_edit": false,
    "json_ld": { "@context": "https://schema.org" }
  }
}

A blog post has page_type and path null and lives at /blog/ and its slug. The body also carries content_markdown, expected_url, tags, author_profile, type_path and destination. expected_url is only Sightkick's guess at the page's address: your site owns its URLs.

How does the receiver check the signature?

The receiver checks the signature by computing the HMAC-SHA256 of the raw body with SIGHTKICK_SIGNING_SECRET, comparing it with the header in constant time, and refusing anything that doesn't match. It also refuses a body whose timestamp is more than 10 minutes old, so a captured delivery can't be replayed. This is a Next.js route handler, app/api/sightkick/route.ts. savePost, removePost, seen and markSeen are your own storage:

import { createHmac, timingSafeEqual } from "node:crypto";

export async function POST(req: Request) {
  const raw = await req.text();
  const expected = "sha256=" + createHmac("sha256", process.env.SIGHTKICK_SIGNING_SECRET!)
    .update(raw).digest("hex");
  const got = req.headers.get("x-sightkick-signature") ?? "";
  if (got.length !== expected.length ||
      !timingSafeEqual(Buffer.from(got), Buffer.from(expected)))
    return new Response("Bad signature", { status: 401 });

  const event = JSON.parse(raw);
  if (Date.now() - Date.parse(event.timestamp) > 10 * 60 * 1000)
    return new Response("Too old", { status: 400 });
  if (event.event_type === "test") return Response.json({ ok: true });

  const key = req.headers.get("x-sightkick-idempotency-key");
  if (key && (await seen(key))) return Response.json({ ok: true });

  const a = event.article;
  let answer: object = { ok: true };
  if (event.event_type === "publish_article" || event.event_type === "update_article") {
    await savePost(a); // by a.id, never by slug
    answer = { published_url: new URL(a.path ?? "/blog/" + a.slug, process.env.SITE_URL).href };
  } else if (event.event_type === "unpublish_article") {
    await removePost(a.id, a.redirect_to);
  }
  if (key) await markSeen(key);
  return Response.json(answer);
}

We ran the same code as plain JavaScript on 16 November 2026, with an in-memory store, against events signed with the same Web Crypto HMAC Sightkick's sender uses:

  • The test event, a post, a typed page and an unknown event type: 200.
  • The post came back with published_url https://example.com/blog/my-post, the typed page with /integrations/webhook.
  • The same idempotency key twice: 200, and the second body wasn't saved.
  • A wrong secret, and a body changed after signing: 401.
  • A timestamp 11 minutes old: 400.

Read the body as text before parsing it. The signature covers the exact bytes Sightkick sent, so a body parsed and serialized again won't match.

What does the receiver have to do?

The receiver has to save each page, serve it where it belongs, and tell search engines it exists. The contract asks for seven things beyond the signature:

  • Upsert by article.id. A changed slug is an update: the old address redirects to the new one.
  • Typed pages at their path. page_type "comparison", "alternatives", "integration" or "use_case" lives at article.path, such as /vs/peec-ai, in its own folder at the site's root. Never under /blog, and never in the blog's list.
  • Keep the date on small edits. When article.minor_edit is true, the page's visible "Updated" date stays as it was.
  • Take pages down. unpublish_article removes the page. When redirect_to is set, the old address redirects to its url, or to /blog/ and its slug when url is empty.
  • Render on the server. Use content_html as it is, rendered on the server or pre-rendered at build time. Vercel's study of AI crawlers found that OpenAI's and Anthropic's fetch JavaScript files but don't run them.
  • The head and the sitemap. meta_title in the title tag, meta_description in the meta description, a canonical link to the page's own URL (never expected_url), image_url as og:image, json_ld in a script tag of type application/ld+json, and every page in sitemap.xml with updated_at as its lastmod.
  • IndexNow. Serve /<key>.txt at the site's root with SIGHTKICK_INDEXNOW_KEY as its only content. Sightkick then tells Bing and the other IndexNow engines about each new or changed page.

A site with a Lovable or Bolt front end that draws in the browser needs its blog pages pre-rendered to static HTML. Sightkick's prompt for those builders says so, and its prompt for Next.js asks for server components.

What can your agent do once the webhook is connected?

One job end to end, from a search to a page Google can index, without your agent touching the site's code again. This is the run sightkick.so goes through for each new page:

Research "[topic]" with research_keywords and pick the search with
real volume. Run get_pages check_topic so we don't write a second page
on a question we already answer. Write the page with update_page,
score it with score_page and clear its checklist. Then put it on the
schedule for [date] and tell me what goes live.

On the day, Sightkick pushes the page to your webhook. 30 seconds later it opens the live URL and checks that it answers 200, that the canonical points at itself, and whether it carries JSON-LD and sits in the sitemap. It sends the URL to IndexNow, and from then on reads Google's index verdict for it through Search Console.

sightkick.so, 16 November 2026: of its 48 live pages, all 48 passed that check (200, self-canonical, JSON-LD, in the sitemap) and all 48 were accepted by IndexNow. At Sightkick's latest check, Google reported 38 of them as indexed. 40 more pages went out and were later taken down with unpublish_article, when posts were merged or retired.

Method: Sightkick's publishing records and index checks for sightkick.so's own workspace, which publishes only through this webhook, read 16 November 2026. Indexed means Google's URL Inspection said "Submitted and indexed".

What doesn't the webhook do?

The webhook doesn't build or host anything on your side: it delivers pages, and your code does the rest.

  • No receiver out of the box. Your agent or you write the route and the blog pages in the site's code. The contract tells it how, but there's no package to install.
  • No design. Your site's templates draw the page. Sightkick sends clean HTML with h2 and h3 sections, paragraphs, links, tables and images.
  • Images stay hosted. They come as URLs on Sightkick's storage. Copying them into your own storage is the receiver's choice.
  • No redirects followed. Sightkick posts to the address you gave and nowhere else. An address that redirects fails, and so does one inside a private network.
  • Limited retries. A network error, 408, 429 or 5xx is retried after 15 and 60 seconds (Retry-After is honoured, up to 5 minutes), then by the daily scheduler. Any other 4xx isn't retried.
  • One destination. A site publishes to one place, so the webhook can't sit beside WordPress for the same site.

How do you fix a webhook that doesn't publish?

Read the HTTP status in the failed push or test. It names the part to fix.

  • 401 or 403. The signature doesn't match. Check SIGHTKICK_SIGNING_SECRET holds the secret connect_webhook returned, that the site was deployed after you set it, and that the route hashes the raw body.
  • 404 or 405. Nothing takes a POST at that address. Check the route and the URL you connected.
  • 500 and up. The site failed while answering. Read its logs. Sightkick retries these.
  • A 3xx. The address redirects, often http to https or a missing www. Connect the address the receiver answers at itself.
  • The push worked, the page is blank to Google. The page is drawn in the browser. Render it on the server or pre-render it.
  • The check says the canonical is wrong. The page's canonical points somewhere else, often at expected_url or the homepage. Point it at the page's own URL.
  • A typed page shows up in the blog list. Leave out every page whose page_type isn't null.

Is it safe to point Sightkick at your site?

Yes. The webhook can only hand your site pages, and your code decides what to do with them.

  • Signed. Only someone with your signing secret can make a body your route accepts, and the 10-minute limit stops replays.
  • Secrets in the environment. The signing secret and IndexNow key are shown once and belong in the host's settings, never in the code, a commit or an AI tool's chat history.
  • Nothing reaches in. Sightkick gets no key to your host, your database or your repo. It sends to one public address.
  • A record. Sightkick's activity feed lists every change against the agent or key that made it. Taking a page down is marked destructive, so your agent's app asks you first.

For a review step, keep your agent to drafts. A page without a day waits in Unscheduled. A written page with a day goes live on it, exactly as written.

FAQ

Which frameworks work with Sightkick's webhook?

Any site that can take a POST and serve HTML from the server or from a build: Next.js, Astro, Remix, SvelteKit, a Lovable, Bolt or Replit project, or a plain Node, Python or PHP server.

Does the receiver have to answer in a set time?

The contract sets none. Answer once the page is saved, and a network error or 5xx is retried.

Can I use content_markdown instead of content_html?

Use content_html as it is and never mix the two: it is the page as Sightkick checked it.

Do I need a Sightkick API key?

Not for the webhook: it carries a signing secret. Your agent reaches Sightkick through a sign-in, and a key is only for an agent that runs with nobody there, sent as Authorization: Bearer and the key. See the API.

What does it cost?

Sightkick Standard is $39 a month ($31 billed yearly): your agent writes the pages and Sightkick does the rest. Pro is $99 a month ($79 billed yearly) and adds 30 articles a month written by Sightkick. Both include the webhook, and the 7-day trial takes a card and charges nothing for 7 days. See pricing.

Which AI models does Sightkick check?

3 of ChatGPT, Gemini, Google AI Overviews and Google AI Mode every day, the 4th as an add-on. Perplexity and Copilot only when your agent asks. Claude isn't checked.

Next

Written by

· Founder of Sightkick

Fabio works on SEO and GEO: getting brands ranked on Google and recommended by AI. He builds the tools that let your AI agent do that work every day.

XLinkedInAbout

Share

More in Integrations

All in Integrations
> The SEO and GEO toolkit for AI agents <

Try Sightkick with Webhook

Type your website and get started for free.