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. Reports include channel grouping and project-level first or last touch attribution settings.

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, domain whitelist, attribution settings, and plan limits.

projects.update

Update project name, domain whitelist, or project attribution settings.

projects.archive

Archive a project so its pixel stops serving experiments while history is kept.

experiments.create

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

experiments.get

Return one experiment by ID, including URLs, status, targeting, and URL pattern rules.

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.archive

Archive an experiment by ending it while keeping exposures, events, and reports available.

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.

goals.deactivate

Deactivate a conversion goal by goal ID or event name while keeping historical reporting data.

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.

domains.remove

Remove a whitelisted hostname from a project so the pixel stops accepting that domain.

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 and channel retrieval

Agents should fetch experiment totals, channel breakdowns, and attribution-aware results through the API.

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

{
  "command": "reports.experiment.channels",
  "input": {
    "experimentId": "exp_123",
    "goal": "Purchase"
  }
}