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:
falsecampaignIdstring · nullableOptional
prioritystring · nullableOptional
surfaceAreastring · nullableOptional
impactinteger · nullableOptional
effortinteger · nullableOptional
tagIdsstring · uuid[] · nullableOptional
Responses
201
Created
application/json
idstring · uuidRequired
400
Bad Request
application/problem+json
403
Forbidden
application/problem+json
404
Not Found
application/problem+json
409
Conflict
application/problem+json
422
Unprocessable Entity
application/problem+json
429
Too Many Requests
application/problem+json
502
Bad Gateway
application/problem+json
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?