Create custom audience
Creates a new custom audience scoped to the store. Audiences can be referenced by ID when creating or updating tests. Names are unique per store (exact match); a duplicate returns 400.
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
namestringRequired
Responses
201
Created
application/json
400
Bad Request
application/problem+json
typestring · nullableOptional
titlestring · nullableOptional
statusinteger · nullableOptional
detailstring · nullableOptional
instancestring · nullableOptional
403
Forbidden
application/problem+json
429
Too Many Requests
application/problem+json
post/api/public/v1/custom-audiences
POST /api/public/v1/custom-audiences HTTP/1.1
Host: app.shoplift.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 98
{
"name": "text",
"rules": [
{
"dimension": "text",
"operator": "text",
"values": [
"text"
],
"selector": null
}
]
}{
"type": null,
"title": null,
"status": null,
"detail": null,
"instance": null
}Last updated
Was this helpful?