For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create test

Creates a test in draft state with control and variant configured.

post
Authorizations
AuthorizationstringRequired

All requests require Authorization: Bearer sl_live_<your_api_key>. Generate a key from the Shoplift admin's API Keys settings page.

Body
titlestringRequired
typestringRequired
goalstring · nullableRequired
devicestring · nullableRequired
visitorOptionstring · nullableRequired
controlTrafficinteger · nullableRequired
hypothesisDescriptionstring · nullableRequired
defaultAudiencesstring[] · nullableRequired
customAudienceIdsstring · uuid[] · nullableRequired
automaticallyStartAtstring · nullableRequired
automaticallyEndAtstring · nullableRequired
endWhenSignificantbooleanOptionalDefault: false
campaignIdstring · nullableOptional
prioritystring · nullableOptional
surfaceAreastring · nullableOptional
impactinteger · nullableOptional
effortinteger · nullableOptional
tagIdsstring · uuid[] · nullableOptional
Responses
201

Created

application/json
idstring · uuidRequired
post/api/public/v1/tests
POST /api/public/v1/tests HTTP/1.1
Host: app.shoplift.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 602

{
  "title": "text",
  "type": "text",
  "control": {
    "type": "text",
    "suffix": "",
    "redirectUrl": null,
    "themeId": null
  },
  "variant": {
    "type": "text",
    "mode": null,
    "source": "",
    "themeId": null,
    "redirectUrl": null,
    "granular": false
  },
  "goal": null,
  "device": null,
  "visitorOption": null,
  "controlTraffic": null,
  "hypothesisDescription": null,
  "defaultAudiences": [
    "text"
  ],
  "customAudienceIds": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "automaticallyStartAt": null,
  "automaticallyEndAt": null,
  "endWhenSignificant": false,
  "campaignId": null,
  "priority": null,
  "surfaceArea": null,
  "impact": null,
  "effort": null,
  "tagIds": [
    "123e4567-e89b-12d3-a456-426614174000"
  ]
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000"
}

Last updated

Was this helpful?