Integration

Add Spectare to any site in an afternoon

Four paths, one atom library. Pick the one that fits your setup.

Integrate Spectare your way

WordPress, Next.js, script tag, or REST API, choose the path that fits your stack.

From: Four ways to integrate Spectare starting with WordPress

Four ways to integrate Spectare starting with WordPress

The WordPress plugin is the recommended path and works on all plans. Install it from Plugins, Add New in your WordPress admin, connect your workspace key, and you get two things at once: a Spectare Atoms post type for authoring content in wp-admin, and a Spectare Zone block for placing personalised sections anywhere in the block editor. No code is required. The plugin calls the assembly API server-side so personalised content is in the HTML at first paint.

The script tag works on any platform that serves HTML. Add one script tag to your page head, mark the elements where content should vary with a data attribute, and Spectare fills them client-side after the visitor's intent is classified. Setup takes under thirty minutes and requires no backend changes.

The Next.js SSR path calls the assembly endpoint from a server component and renders the returned HTML before the response leaves your server. There is no flash of default content because personalisation happens before the browser receives the page. This path suits teams who want zero DOM swap and full control over the render.

The REST API directly exposes the same qualify, assemble, and convert flow that all three paths use under the hood. Call it from your own backend, an AI agent, or any platform not covered by the other paths. Every endpoint accepts a Bearer token matching your workspace API key.

How Spectare works, for developers

The how-it-works page covers the full request flow: how visitor signals are collected, how intent is classified, how atoms are selected from your library, and how the assembled page is cached and delivered.

Read more →
01Script tagAny site
02WordPress pluginNo code
03Next.js SSRZero flicker
04REST APICustom integrations
01Script tag

Works on any platform

Drop one script tag into your page head. Mark your content areas with data-spectare-slot attributes. Spectare handles intent detection, assembly, and slot filling automatically.

Works on Webflow, Shopify, Squarespace, Next.js, or any site that runs JavaScript. No build step, no backend changes.

✓WordPress
✓Webflow
✓Shopify
✓Squarespace
✓Next.js
✓Plain HTML
index.html
<!-- Add to <head> on every page -->
<script
  src="https://spectare.ai/spectare.js"
  data-org="YOUR_WORKSPACE_SLUG"
></script>

<!-- Place slots where personalised content should appear -->
<div data-spectare-slot="primary"></div>
<div data-spectare-slot="supporting"></div>

<!-- Set conversion URL in Settings. Fires automatically. -->
<!-- Or call manually on any event: -->
<script>spectare('conversion');</script>
02WordPress plugin

43% of the web. Zero code.

Install the plugin, add your workspace slug and API key, and place Spectare Zone blocks in Gutenberg. Zones render personalised content into the HTML at first paint: no shimmer, and SEO-ready. Prefer no API key, or personalising a heavily cached page? Spectare Slot blocks fill client-side instead. The plugin can also publish an llms.txt on your domain from your content: a curated entry point so an agent that reads your site extracts your facts accurately from a few fetches, instead of scraping a rendered page.

1In wp-admin, go to Plugins → Add New, search for Spectare, and install it from the official WordPress plugin directory
2Go to Settings → Spectare and paste your workspace slug, plus your API key to enable zones.
3In Gutenberg, add a Spectare Zone block (hero, body, proof, or cta) where you want personalised content. Prefer client-side fill? Use a Spectare Slot block instead. Publish.
4In your Spectare admin under Settings, add your conversion URL pattern to activate tracking.
WordPress: Edit Page
● Saved
ParagraphWelcome to our site. We help teams ship faster.
Spectare Zone
zone="hero"
Personalised content rendered into the HTML
HeadingOur key features
Spectare Zone
zone="body"
Block · Spectare ZoneZone: hero ›
03Next.js SSR

Personalised content before the page loads

Call /api/assemble/ssr from a Next.js server component. Spectare classifies intent from your UTM params and referrer, assembles content, and returns a component list before HTML is sent to the browser. No shimmer. No layout shift. Personalised from first paint.

The client pipeline still runs in the background. Returning visitors with browsing history get a more specific assembly; the DOM updates silently in ~150ms if audience or stage differs from the server result.

✓
Zero content flash: Content is in the HTML before JavaScript runs
✓
Shared Redis cache: Warm intent patterns return in under 50ms, no Claude call
✓
Full pipeline still runs: Conversion tracking and returning visitor logic always active
app/page.tsx
import { headers } from 'next/headers';
import PersonalisedSection from '@/components/PersonalisedSection';

export default async function Page({ searchParams }) {
  const h = await headers();
  const sp = await searchParams;
  const res = await fetch(
    'https://spectare.ai/api/assemble/ssr',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        Authorization: `Bearer ${process.env.SPECTARE_API_KEY}`,
      },
      body: JSON.stringify({
        orgSlug: 'your-workspace-slug',
        referrer: h.get('referer') ?? undefined,
        utmSource: sp.utm_source,
        utmMedium: sp.utm_medium,
      }),
      next: { revalidate: 0 },
    }
  );
  const { assembly, intent } = res.ok
    ? await res.json()
    : {};

  return (
    <PersonalisedSection
      orgSlug="your-workspace-slug"
      initialAssembly={assembly}
      initialIntent={intent}
    />
  );
}
04REST API

Full control over rendering

Call /api/qualify first to get a signed token, then choose your assemble path. /api/assemble/components returns structured JSON with a named component and slots for each section, making it straightforward to render in React or any custom UI. /api/assemble streams SSE events for slot-based or server-rendered output.

All three endpoints are public. No API key required. Rate limited by IP.

// 1. Qualify the visitor
POST /api/qualify/{orgSlug}
{ "summary": "developer evaluating personalisation",
  "direct": true }
→ { token, intent, ... }

// 2a. Assemble: slot/SSE rendering (widget path)
POST /api/assemble
{ "token": "<token>", "orgSlug": "your-slug" }
→ streams sections as server-sent events

// 2b. Assemble: component JSON (React / custom)
POST /api/assemble/components
{ "token": "<token>", "orgSlug": "your-slug" }
→ { assembly: [{ component, slots, size }, ...] }
For AI agents

Automatic, nothing to install

Once your content is in Spectare, an agent that reads your site gets structured facts rather than a guess, with no setup. Your site serves an llms.txt describing what you offer, and every published atom is available as clean JSON at /api/content and /api/content/{slug}, each with a stable slug.

An assistant can also call the public qualify endpoint with what its user is after and share the returned link, so an agent-driven referral lands on a page personalised for that person. Through the WordPress plugin and SSR helper the same JSON is served on your own domain, not just spectare.ai.

Content API reference →

Not sure which path fits?

Start with the script tag or the WordPress plugin. Add Next.js SSR or the REST API later without changing your atom library.