Create campaign
Creates a campaign. Reference its id via campaignId when creating or updating a test, or assign existing tests in bulk via POST /campaigns/{id}/tests.
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
objectivestring · nullableOptional
goalstring · 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
429
Too Many Requests
application/problem+json
post/api/public/v1/campaigns
POST /api/public/v1/campaigns HTTP/1.1
Host: app.shoplift.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 44
{
"name": "text",
"objective": null,
"goal": null
}{
"id": "123e4567-e89b-12d3-a456-426614174000"
}Last updated
Was this helpful?