Skip to main content
POST
Start a test with your own openings

Authorizations

Authorization
string
header
required

A secret key (dk_live_…). Scopes: conversations:read, contacts:read, contacts:write, meetings:read, analytics:read, events:read, webhooks:write, knowledge:read, knowledge:write, agent:read, agent:write, experiments:read, experiments:write, privacy:write, chat:write.

Headers

Idempotency-Key
string

Retry safely: the first response is replayed for 24 hours (not for streamed answers).

Maximum string length: 255

Body

application/json
name
string
required

What your team calls the test.

Required string length: 1 - 120
openings
object[]
required

1 to 4 new openings. Each is tested against the opening the page shows now, which Darwin adds as the current one.

Required array length: 1 - 4 elements
hypothesis
string

Why the new openings should do better.

Maximum string length: 500
page
string

One page to test: a path such as /pricing, or an address on your website.

Required string length: 1 - 500
unit
string

Instead of page: "site" for every page on the site's opening, "type:<home|pricing|comparison|integration|product|guide|proof|developer|company|other>" for a page type, or "group:" for a page group.

Pattern: ^(site|type:(home|pricing|comparison|integration|product|guide|proof|developer|company|other)|group:[a-f0-9-]{36})$
launch
boolean

Default true: start showing the openings at once. false saves the test as a draft.

Response

OK

id
string
required
Pattern: ^exp_
Example:

"exp_4c1f0a2b9d3e7a10"

object
string
required
Allowed value: "experiment"
name
string
required
status
string
required

draft, ready, running, winner_found, applied, stopped, paused, failed or invalidated.

internal_status
string
required
unit
string
required

What the test covers: page:, type:, group: or site.

pages
string[]
required
metric
string
required
hypothesis
string | null
required
winner
string | null
required
verdict
string | null
required
created_at
string<date-time> | null
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
started_at
string<date-time> | null
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
ended_at
string<date-time> | null
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
applied_at
string<date-time> | null
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
variants
object[]
required
result
any
live
object

On GET /experiments/{id}: the results worked out now, as the Experiments screen shows them. Reading it saves nothing.