Developer docs
One script tag for most sites. A WordPress plugin for WordPress. A direct API for custom integrations.
The fastest path. One script tag in your page head, slot divs where personalised content should appear. Spectare handles qualify, assemble, and render automatically.
<!-- 1. Add to <head> on every page -->
<script src="https://spectare.ai/spectare.js" data-org="YOUR_WORKSPACE_SLUG"></script>
<!-- 2. Place slots where personalised content should appear -->
<div data-spectare-slot="primary"></div>
<div data-spectare-slot="supporting"></div>
<div data-spectare-slot="secondary"></div>
<!-- 3. Set your conversion URL in Settings. Fires automatically. -->
<!-- Or call manually on any page or event: -->
<script>spectare('conversion');</script>In your Spectare admin, create content atoms: one feature, one FAQ, one pricing block each. Aim for 10 to start. The more atoms you have, the more precisely Spectare can personalise for each visitor.
In Settings, add the URL path or string that identifies your confirmation page, for example order-received or /thank-you. When a visitor lands on a matching URL, the conversion is recorded automatically against the atoms and image they saw. No code required.
Install once and add personalised slots from the block editor or any page builder.
Install the plugin
Download the Spectare plugin zip from spectare.ai. In your WordPress admin go to Plugins, Add New, Upload Plugin, select the zip and install. Activate.
Enter your workspace slug
Go to Settings, Spectare. Enter the workspace slug shown in your Spectare admin under Settings. Save. The script is now live on every page of the site.
Add slots
In Gutenberg, add a Spectare Slot block wherever you want personalised content. Choose a slot name (primary, supporting, or secondary) and publish. For Elementor or other page builders, use the shortcode instead.
Set your conversion URL
In your Spectare admin under Settings, scroll to Conversion tracking. Add the URL pattern for the order confirmation or thank-you page, for example order-received for WooCommerce. Save. Conversion tracking is now active.
Shortcode
[spectare_slot name="primary"] [spectare_slot name="supporting"]
All endpoints are public and require no API key. Rate limits apply per IP. The script uses qualify and assemble automatically. Call them directly for custom integrations or AI agents.
/api/qualify: always first. Returns a signed token and intent classification.
/api/assemble: for the script tag and slot-based rendering. Streams sections as SSE events.
/api/assemble/components: for React and custom renderers. Returns structured JSON with a component array.
/api/qualify/{orgSlug}Classify visitor intent and get a signed context token. The script calls this automatically. Call it directly to qualify visitors from your own UI or an AI agent.
Auth: None. Rate limited by IP.
Request body
{
"summary": "developer evaluating personalisation pricing",
"direct": true // set true for explicit user input
}Response
{
"token": "<signed-context-token>",
"url": "https://your-domain.com/landing?ctx=<token>",
"intent": {
"type": "feature-evaluation",
"confidence": 0.88,
"userContext": { "audience": "developer", "stage": "consideration" },
"entities": {
"features": ["personalisation", "pricing"],
"useCases": ["SaaS landing page"]
}
},
"conversionUrlPatterns": ["order-received", "/thank-you"]
}/api/assembleAssemble a personalised page from a context token. Streams back sections as server-sent events. The script calls this automatically after qualify. Use this endpoint when you are filling data-spectare-slot divs or building a server-rendered HTML response.
Auth: None. Rate limited by IP.
Request body
{
"token": "<signed-context-token>",
"orgSlug": "your-workspace-slug"
}Response
event: status
data: {"step":"Searching content atoms..."}
event: meta
data: {"template":"explainer","pageTitle":"...","action":{...}}
event: section
data: {"slot":"primary","atoms":[{...}]}
event: section
data: {"slot":"supporting","atoms":[{...}]}
event: done
data: {"intent":{...},"cached":false,"assemblyTimeMs":180}/api/assemble/componentsAssemble a personalised page as structured JSON. Returns a ComponentAssembly array: each item names a component from the registry and provides its props in a slots object. Use this endpoint for React integrations, custom renderers, or any situation where you want to control markup entirely. This is what PersonalisedSection uses internally.
Auth: None. Rate limited by IP.
Request body
{
"token": "<signed-context-token>",
"orgSlug": "your-workspace-slug"
}Response
{
"assembly": [
{
"component": "HeroStatement",
"slots": { "headline": "...", "subheading": "..." },
"size": "full"
},
{
"component": "StatGrid",
"slots": { "stats": [{ "value": "$0", "label": "To start" }] },
"size": "half"
},
{
"component": "CtaStrip",
"slots": { "headline": "...", "primary": { "label": "...", "href": "..." } },
"size": "full"
}
],
"intent": {
"type": "feature-evaluation",
"confidence": 0.88,
"userContext": { "audience": "developer", "stage": "consideration" }
},
"assemblyTimeMs": 340,
"cached": false
}Spectare exposes an MCP server so AI agents can qualify visitors and search your content atoms directly. No API key needed from the agent side.
MCP server URL
https://spectare.ai/api/mcpAdd this to your Claude Desktop or agent config as a Streamable HTTP MCP server.
qualify_intentClassify visitor intent from a conversation or summary. Returns a signed token and a ready-to-share personalised URL.
search_atomsSearch your published content library by natural language query. Useful for answering questions before directing to a landing page.
list_actionsList the available conversion actions on your landing pages: free trial, demo, pricing, docs.
Ready to build?
Create your free workspace