API

Agent-friendly commands for experiments and reporting.

The dashboard stays small because agents create experiments, set targeting, launch tests, retrieve performance, and configure goals through the API.

Example agent command

A coding agent can call the command endpoint with the user's API key.

POST /api/external/v1/commands
Authorization: Bearer sl_live_...

{
  "command": "experiments.create",
  "input": {
    "name": "Homepage headline test",
    "controlUrl": "https://example.com/",
    "variationUrl": "https://example.com/new",
    "trafficAllocation": 50
  }
}

Available commands

This is the first v1 command surface for package-led experiments.

projects.create

Create a new client/project workspace and allocate a unique public pixel ID.

projects.list

List projects available to the API key's account, including each public pixel ID.

projects.get

Return the current project, public pixel ID, allowed domains, and plan limits.

projects.update

Update project name, allowed domains, or default reporting settings.

experiments.create

Create an external URL A/B test with control URL, variation URL, traffic split, and targeting filters.

experiments.update

Change an experiment's URLs, allocation, filters, URL pattern rules, or selected conversion goals.

experiments.set_status

Move an experiment through draft, running, paused, and ended states.

experiments.list

List experiments for the project with status and URL filters.

reports.experiment.details

Return experiment totals, variants, visitors, exposures, conversions, rates, lift, and selected goal data.

reports.experiment.chart

Return time-series experiment performance for agent analysis.

reports.experiment.channels

Return acquisition channel and metadata performance using the pixel's collected UTMs, click IDs, referrers, and browser context.

goals.create

Create a conversion goal that can be fired by the browser pixel or documented for an AI agent.

goals.list

List conversion goals available for experiments and reporting.

domains.list

List allowed customer-owned domains for pixel and redirect safety.

domains.add

Add a customer-owned domain that may load the pixel or participate in redirects.

usage.summary

Return billing usage such as events, sessions, exposures, active experiments, and plan limits.

billing.portal

Create or return a billing portal link for subscription management.

Performance retrieval

Agents should fetch reports through the API and explain the result back to the user.

{
  "command": "reports.experiment.details",
  "input": {
    "experimentId": "exp_123",
    "goal": "Lead"
  }
}