Create personalization
Creates a personalization in draft state with control and variant configured. Every targeted visitor sees the variant: traffic is always 0/100, so there is no controlTraffic. Supported types are template, theme, urlRedirect, basicScript and manualScript. Setting automaticallyStartAt requires at least one targeting rule: an audience, a device (desktop or mobile), or a visitor type (new or returning). An optional plan (startDate, optional endDate, dates only) places the draft on the roadmap on those dates; it cannot be combined with automaticallyStartAt or automaticallyEndAt.
All requests require Authorization: Bearer sl_live_<your_api_key>. Generate a key from the Shoplift admin's API Keys settings page.
Created
Bad Request
Forbidden
Not Found
Conflict
Unprocessable Entity
Too Many Requests
Bad Gateway
POST /api/public/v1/personalizations HTTP/1.1
Host: app.shoplift.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 547
{
"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,
"hypothesisDescription": null,
"defaultAudiences": [
"text"
],
"customAudienceIds": [
"123e4567-e89b-12d3-a456-426614174000"
],
"automaticallyStartAt": null,
"automaticallyEndAt": null,
"priority": null,
"surfaceArea": null,
"impact": null,
"effort": null,
"tagIds": [
"123e4567-e89b-12d3-a456-426614174000"
],
"plan": null
}{
"id": "123e4567-e89b-12d3-a456-426614174000"
}Last updated
Was this helpful?