Experiments, learnings and the backlog
Look up the REST routes for experiments, their results and readouts, learnings and the experiment backlog, with their fields and who may call them.
The REST routes for experiments, learnings and the backlog, generated with npm run openapi from the schemas Handline validates every request with. Routes are under https://app.handline.io/api/v1 and take Authorization: Bearer <key or token>; the ids in braces are path parameters. The OpenAPI document is at https://app.handline.io/api/v1/openapi.json.
A GET or DELETE takes its fields as query parameters: numbers and true or false are read as such, and a repeated key is a list. Other methods take a JSON body with content-type: application/json.
GET /products/{productId}/experiments#
List experiments with their state, grade, version and next planned look.
Operation: experiments.list, MCP tool experiments_list. Who: owners, admins, editors and viewers (record.read); agent keys with read.
| Query | Type | Required | Rules |
|---|---|---|---|
status | string | No | One of draft, scheduled, running, called, stopped, ended. |
GET /products/{productId}/experiments/{experimentId}#
Read an experiment: its registration, plan, state, versions and history. Results are read with experiments.results.
Operation: experiments.get, MCP tool experiments_get. Who: owners, admins, editors and viewers (record.read); agent keys with read.
No query parameters.
POST /products/{productId}/experiments/design#
The design check: is this experiment worth running? Sample, duration, cost, looks and alternatives. Send the experiment id of a draft, or a registration to try before writing it. The app works out the baseline, the traffic each arm gets, the sample for the smallest worthwhile effect (from the library when none is given), the planned looks, the duration and the cost, and says whether it is feasible. When it isn’t, it lists alternatives.
Operation: experiments.design, MCP tool experiments_design. Who: owners, admins, editors and viewers (record.read); agent keys with read.
| Body | Type | Required | Rules |
|---|---|---|---|
experimentId | string | No | |
registration | object | No | Any keys; each value any. |
assume | object | No | |
assume.baseline | number | No | From 0.0001 to 0.9999. |
assume.dailyVisits | number | No | Above 0. |
POST /products/{productId}/experiments/{experimentId}/start#
Start an experiment: the app checks it, plans it, locks it and schedules its looks. It can’t start without a decision metric, a decision for each outcome and a scope; an infeasible design is refused when the experiment rules say to block, and an experiment competing for the same audience and channel is refused. From the start, its grade is fixed and a change to a locked field makes a new version.
Operation: experiments.start, MCP tool experiments_start. Who: owners, admins and editors (experiments.manage); agent keys with publish.
| Body | Type | Required | Rules |
|---|---|---|---|
assume | object | No | |
assume.baseline | number | No | From 0.0001 to 0.9999. |
assume.dailyVisits | number | No | Above 0. |
POST /products/{productId}/experiments/{experimentId}/stop#
Stop an experiment early. It makes no call and produces no learning.
Operation: experiments.stop, MCP tool experiments_stop. Who: owners, admins and editors (experiments.manage); agent keys with publish.
| Body | Type | Required | Rules |
|---|---|---|---|
reason | string | Yes | 3 to 1000 characters. |
basedOn | string | No |
GET /products/{productId}/experiments/{experimentId}/results#
An experiment’s numbers: the call when there is one, otherwise interim numbers labelled not callable until the next planned look. Every read is logged. Interim numbers are not a result: only the analysis at a planned look calls an experiment. After a winner is applied, the standing control is reported against the original estimate.
Operation: experiments.results, MCP tool experiments_results. Who: owners, admins, editors and viewers (record.read); agent keys with read.
No query parameters.
GET /products/{productId}/experiments/{experimentId}/calls#
Every look and call of an experiment, with the inputs it used, so any call can be reproduced.
Operation: experiments.calls, MCP tool experiments_calls. Who: owners, admins, editors and viewers (record.read); agent keys with read.
No query parameters.
GET /products/{productId}/experiments/{experimentId}/looks#
Who looked at an experiment’s numbers, and when: every read of results, slices, calls and the readout. Reading this log shows no numbers, so it is not itself logged. Looks at interim numbers while the experiment runs are marked.
Operation: experiments.looks, MCP tool experiments_looks. Who: owners, admins, editors and viewers (record.read); agent keys with read.
No query parameters.
POST /products/{productId}/experiments/{experimentId}/slices#
An exploratory slice of an experiment by country, day, channel or placement. Never a result. Slices are labelled exploratory on every surface and can’t be cited by a learning. Asking for many slices of a running experiment is flagged. Excluding days, visits or placements after the start is refused and flagged. To test a slice properly, register it with experiments.promoteSlice.
Operation: experiments.slice, MCP tool experiments_slice. Who: owners, admins, editors and viewers (record.read); agent keys with read.
| Body | Type | Required | Rules |
|---|---|---|---|
by | string | Yes | One of country, day, channel, placement. |
exclude | object | No | |
exclude.days | string[] | No | |
exclude.visitIds | string[] | No | |
exclude.placementIds | string[] | No |
POST /products/{productId}/experiments/{experimentId}/slices/promote#
Turn an exploratory slice into its own registered experiment, in a new change set.
Operation: experiments.promoteSlice, MCP tool experiments_promoteSlice. Who: owners, admins and editors (record.propose); agent keys with propose.
| Body | Type | Required | Rules |
|---|---|---|---|
by | string | Yes | One of country, day, channel, placement. |
value | string | Yes | 1 to 100 characters. |
GET /products/{productId}/experiments/{experimentId}/readout#
The readout, written by the app in a fixed template from stored results, with the agent’s interpretation kept apart.
Operation: experiments.readout, MCP tool experiments_readout. Who: owners, admins, editors and viewers (record.read); agent keys with read. Outside text: interpretation.text.
No query parameters.
POST /products/{productId}/experiments/{experimentId}/readout#
Publish the readout of a finished experiment. Refused while any section is empty or any number doesn’t resolve to a stored result.
Operation: experiments.publishReadout, MCP tool experiments_publishReadout. Who: owners, admins and editors (experiments.manage); agent keys with publish.
No body.
POST /products/{productId}/experiments/{experimentId}/interpretation#
Add your interpretation to an experiment’s readout. It is shown as yours, and can’t change any number.
Operation: experiments.interpret, MCP tool experiments_interpret. Who: owners, admins and editors (experiments.manage); agent keys with propose.
| Body | Type | Required | Rules |
|---|---|---|---|
text | string | Yes | 3 to 3000 characters. |
basedOn | string | No |
POST /products/{productId}/experiments/{experimentId}/apply-winner#
Apply a page experiment’s winning version through a change set, keeping a standing control on the old version. The original page takes the winning version’s content. The old version keeps a small share of traffic for the period the experiment rules set, and its result is reported against the winner’s original estimate.
Operation: experiments.applyWinner, MCP tool experiments_applyWinner. Who: owners, admins and editors (record.propose); agent keys with propose.
No body.
POST /products/{productId}/experiments/{experimentId}/recipient-links#
Issue recipient links for an email or outbound experiment, each dealt to an arm: send each recipient their arm’s version. Load each arm’s version into the sending tool with its own A/B feature off, and send every recipient the version of their arm at every step. Report sends per arm with numbers.report on each arm’s placement.
Operation: experiments.recipientLinks, MCP tool experiments_recipientLinks. Who: owners, admins and editors (placements.record); agent keys with report.
| Body | Type | Required | Rules |
|---|---|---|---|
count | integer | Yes | From 2 to 10000. |
GET /products/{productId}/learnings#
List learnings, with their grade, scope and evidence. Filter by audience, channel, concept or stage. Grade A and B learnings come from experiments; grade C learnings are observed outside experiments and count for nothing in the library.
Operation: learnings.list, MCP tool learnings_list. Who: owners, admins, editors and viewers (record.read); agent keys with read. Outside text: learnings.[].interpretation.text.
| Query | Type | Required | Rules |
|---|---|---|---|
audienceId | string | No | |
channelId | string | No | |
conceptId | string | No | |
stage | string | No | |
includeSuperseded | boolean | No | Default false. |
GET /products/{productId}/learnings/{learningId}#
Read one learning with the concepts, pages and calls behind it.
Operation: learnings.get, MCP tool learnings_get. Who: owners, admins, editors and viewers (record.read); agent keys with read. Outside text: learning.interpretation.text.
No query parameters.
POST /products/{productId}/learnings#
Propose an observed learning (grade C) from a comparison outside an experiment, with its evidence. Observed learnings are labelled observed. The library and the design check never count them. Evidence must name the concepts and the date range of the results it rests on; exploratory slices and simulated pre-screens can’t be cited.
Operation: learnings.propose, MCP tool learnings_propose. Who: owners, admins and editors (experiments.manage); agent keys with propose.
| Body | Type | Required | Rules |
|---|---|---|---|
statement | string | Yes | 10 to 1000 characters. |
scope | object | Yes | |
scope.audienceIds | string[] | No | At most 20 items. Default []. |
scope.channelIds | string[] | No | At most 20 items. Default []. |
stage | string | No | |
evidence | object | Yes | |
evidence.conceptIds | string[] | No | At most 20 items. Default []. |
evidence.pageIds | string[] | No | At most 20 items. Default []. |
evidence.callIds | string[] | No | At most 20 items. Default []. |
evidence.from | string | Yes | Matches ^\d{4}-\d{2}-\d{2}$. |
evidence.to | string | Yes | Matches ^\d{4}-\d{2}-\d{2}$. |
evidence.groupBy | string | No | Default concept. |
POST /products/{productId}/learnings/{learningId}/interpretation#
Add your interpretation to a learning. It is shown as yours, beside the app’s statement and numbers.
Operation: learnings.interpret, MCP tool learnings_interpret. Who: owners, admins and editors (experiments.manage); agent keys with propose.
| Body | Type | Required | Rules |
|---|---|---|---|
text | string | Yes | 3 to 2000 characters. |
POST /products/{productId}/learnings/{learningId}/supersede#
Mark a learning as superseded by a newer one. It stays readable and links to its replacement.
Operation: learnings.supersede, MCP tool learnings_supersede. Who: owners, admins and editors (experiments.manage); agent keys with publish.
| Body | Type | Required | Rules |
|---|---|---|---|
byLearningId | string | Yes | |
note | string | Yes | 3 to 1000 characters. |
GET /products/{productId}/learnings/library#
The learning library: how often each kind of test wins, by how much, and which near-stage wins held. Counts only grade A and B learnings from finished experiments. Observed learnings are listed by count but never counted.
Operation: learnings.library, MCP tool learnings_library. Who: owners, admins, editors and viewers (record.read); agent keys with read.
No query parameters.
POST /products/{productId}/learnings/lift-studies#
Record a lift study run with a platform’s own tools as a grade B learning, with the platform’s result attached. Handline doesn’t analyse lift studies: it keeps the platform’s result as reported, labelled as the platform’s, so later tests can build on it.
Operation: learnings.recordLiftStudy, MCP tool learnings_recordLiftStudy. Who: owners, admins and editors (experiments.manage); agent keys with propose. Outside text: learning.evidence.results.[].filter.studyId.
| Body | Type | Required | Rules |
|---|---|---|---|
statement | string | Yes | 10 to 1000 characters. |
scope | object | Yes | |
scope.audienceIds | string[] | No | At most 20 items. Default []. |
scope.channelIds | string[] | No | At most 20 items. Default []. |
stage | string | Yes | |
platform | string | Yes | 1 to 60 characters. |
studyId | string | Yes | 1 to 200 characters. |
result | object | Yes | |
result.lift | number | Yes | |
result.lo | number | Yes | |
result.hi | number | Yes | |
from | string | Yes | Matches ^\d{4}-\d{2}-\d{2}$. |
to | string | Yes | Matches ^\d{4}-\d{2}-\d{2}$. |
GET /products/{productId}/backlog#
The experiment backlog, ranked: feasible first, then what fits the exploration budget left, then priority.
Operation: backlog.list, MCP tool backlog_list. Who: owners, admins, editors and viewers (record.read); agent keys with read. Outside text: items.[].prescreens.[].summary.
| Query | Type | Required | Rules |
|---|---|---|---|
limit | integer | No | From 1 to 100. Default 20. |
POST /products/{productId}/backlog#
Add a hypothesis to the backlog, with its proposed arms and decision metric.
Operation: backlog.add, MCP tool backlog_add. Who: owners, admins and editors (experiments.manage); agent keys with propose.
| Body | Type | Required | Rules |
|---|---|---|---|
hypothesis | string | Yes | 10 to 1000 characters. |
type | string | Yes | One of page, message, concept, platform. |
decisionStage | string or null | No | Default null. |
arms | object[] | No | At most 5 items. Default []. |
arms[].id | string | Yes | Matches ^[a-z][a-z0-9-]{0,30}$. |
arms[].name | string | Yes | 1 to 80 characters. |
arms[].control | boolean | No | Default false. |
arms[].share | number | Yes | From 0.01 to 1. |
arms[].pageId | string | No | |
arms[].conceptId | string | No | |
arms[].copyId | string | No | |
arms[].platformArmId | string | No | |
arms[].placementIds | string[] | No | At most 50 items. Default []. |
arms[].settings | object | No | Any keys; each value string. Default {}. |
scope | object | No | |
scope.audienceIds | string[] | No | Default []. |
scope.channelIds | string[] | No | Default []. |
buildsOn | string[] | No | At most 10 items. Default []. |
challenges | string[] | No | At most 10 items. Default []. |
priority | integer | No | From 0 to 100. Default 50. |
PATCH /products/{productId}/backlog/{itemId}#
Change a backlog item: its hypothesis, arms, metric, priority, or drop it.
Operation: backlog.update, MCP tool backlog_update. Who: owners, admins and editors (experiments.manage); agent keys with propose.
| Body | Type | Required | Rules |
|---|---|---|---|
hypothesis | string | No | 10 to 1000 characters. |
type | string | No | One of page, message, concept, platform. |
decisionStage | string or null | No | Default null. |
arms | object[] | No | At most 5 items. Default []. |
arms[].id | string | Yes | Matches ^[a-z][a-z0-9-]{0,30}$. |
arms[].name | string | Yes | 1 to 80 characters. |
arms[].control | boolean | No | Default false. |
arms[].share | number | Yes | From 0.01 to 1. |
arms[].pageId | string | No | |
arms[].conceptId | string | No | |
arms[].copyId | string | No | |
arms[].platformArmId | string | No | |
arms[].placementIds | string[] | No | At most 50 items. Default []. |
arms[].settings | object | No | Any keys; each value string. Default {}. |
scope | object | No | |
scope.audienceIds | string[] | No | Default []. |
scope.channelIds | string[] | No | Default []. |
buildsOn | string[] | No | At most 10 items. Default []. |
challenges | string[] | No | At most 10 items. Default []. |
priority | integer | No | From 0 to 100. Default 50. |
drop | boolean | No |
POST /products/{productId}/backlog/{itemId}/prescreens#
Attach a simulated pre-screen (agents role-playing buyers) to a backlog item, to help rank it. Never evidence.
Operation: backlog.attachPrescreen, MCP tool backlog_attachPrescreen. Who: owners, admins and editors (experiments.manage); agent keys with propose. Outside text: prescreen.summary.
| Body | Type | Required | Rules |
|---|---|---|---|
summary | string | Yes | 3 to 3000 characters. |
POST /products/{productId}/backlog/{itemId}/promote#
Turn a backlog item into a registered experiment, in a new change set, with the item’s hypothesis and arms.
Operation: backlog.promote, MCP tool backlog_promote. Who: owners, admins and editors (record.propose); agent keys with propose.
| Body | Type | Required | Rules |
|---|---|---|---|
registration | object | No | Any keys; each value any. Default {}. |
Was this page helpful?