Campaigns

Create an experiment

POST
/api/v1/experiments

Creates a control/test pair with deterministic assignment, pending approval.

Authorization

HTTPBearer
AuthorizationBearer <token>

JWT access token

In: header

Query Parameters

merchant_id?|

Optional merchant to act on. Must be one you are a member of.

Formatuuid

Header Parameters

X-Merchant-ID?string|null

Request Body

application/json

audience?|null
campaign_id?|
Formatuuid
control_split_pct?number
Range0 <= value <= 100
Default50
duration_days?integer
Range1 <= value <= 120
Default14
extra_arms?array<>
Itemsitems <= 4
hypothesis*string
Length10 <= length <= 1000
name*string
Length3 <= length <= 200
opportunity_id?|
Formatuuid
start_date?|
Formatdate
success_metric?string
Default"conversion_rate"

Value in

  • "conversion_rate"
  • "revenue_per_customer"
  • "aov"
success_threshold_pct?number
Range0 <= value <= 500
Default10
test_offer_description?string
Lengthlength <= 500
Default""
unit_cost?number
Range0 <= value
Default0

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/experiments" \  -H "Content-Type: application/json" \  -d '{    "hypothesis": "stringstri",    "name": "string"  }'
{  "data": {    "agent_run_id": "c3317f32-e28b-4af1-a584-86ac8c788dd8",    "approved_at": "2019-08-24T14:15:22Z",    "campaign_id": "78614b6c-fe7c-41e2-8e25-c9b3a3c91904",    "completed_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "decision": "SCALE",    "decision_rationale": "",    "duration_days": 0,    "end_date": "2019-08-24",    "hypothesis": "string",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "is_simulated": true,    "launched_at": "2019-08-24T14:15:22Z",    "learning": "",    "name": "string",    "opportunity_id": "5c7fee95-8917-4b3c-8649-bbbc4ef0c4f7",    "requires_approval": true,    "results": [      {        "audience_size": 0,        "avg_order_value": 0,        "conversion_lift_pct": 0,        "conversion_rate": 0,        "converted_customers": 0,        "cost": 0,        "gross_margin": 0,        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "incremental_profit": 0,        "incremental_revenue": 0,        "is_significant": false,        "measured_at": "2019-08-24T14:15:22Z",        "orders": 0,        "p_value": 0,        "revenue": 0,        "revenue_lift_pct": 0,        "revenue_per_customer": 0,        "roi": 0,        "variant_id": "8a2d415d-59aa-4132-bef3-011f97c4a0f6",        "variant_key": "string",        "variant_role": "CONTROL",        "window_end": "2019-08-24",        "window_start": "2019-08-24"      }    ],    "start_date": "2019-08-24",    "status": "DRAFT",    "success_metric": "string",    "success_threshold_pct": 0,    "updated_at": "2019-08-24T14:15:22Z",    "variants": [      {        "allocation_pct": 0,        "audience_size": 0,        "description": "string",        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "key": "string",        "name": "string",        "offer_description": "string",        "role": "CONTROL",        "unit_cost": 0      }    ]  },  "meta": {},  "success": true}