Create a campaign
- Print
Create a campaign
- Print
Article summary
Did you find this summary helpful?
Thank you for your feedback
Post
/v2/{accessKey}/campaign
Example of the request body(Please make sure to set campaignMeta when testing API explorer.)
{
"campaignMeta": {
"title": "New campaign name here",
"description": "Description of the campaign here",
"tags": "tag1,tag2",
"rehearsalPasscode": "1234",
"serveReplay": true
}
}
Header parameters
Authorization
stringRequired
Authorization: Bearer
Path parameters
accessKey
stringRequired
Customer access key
Body parameters
example
Example of Body
{
"campaignMeta": {
"title": "New campaign name here",
"description": "Description of the campaign here",
"tags": "tag1,tag2",
"rehearsalPasscode": "1234",
"serveReplay": true
}
}
object
campaignMeta
object Required
title
string Required
Title of the campaign
description
string
Description of the campaign (memo in the campaign setting)
tags
string
Tag information set for the campaign (Max 10 tags can be set)
rehearsalPasscode
string
Passcode to access when campaign is in rehearsal state
serveReplay
boolean
Whether replays are public
brand
object
brandId
integer (int64) Required
Brand ID
scheduledStartAt
string
OffsetDateTime(YYYY-MM-DD'T'HH:mm:ss'Z', UTC format only)
scheduledEndAt
string
OffsetDateTime(YYYY-MM-DD'T'HH:mm:ss'Z', UTC format only)
seller
object
sellerId
integer (int64) Required
Seller ID
Responses
200
200
Result
"{\n \"campaignMeta\": {\n \"campaignId\": \"1234\",\n \"campaignKey\": \"{campaignKey}\",\n \"accessKey\": \"{accessKey}\",\n \"shoplivePlayerUrl\": \"https://www.shoplive.show/v1/player.html?ak={accessKey}&ck={campaignKey}\",\n \"title\": \"New campaign name here\",\n \"description\": \"Description of the campaign here\",\n \"campaignStatus\": \"READY\",\n \"rehearsalPasscode\": \"1234\",\n \"serveReplay\": true\n \"logoImageUrl\": null,\n \"brand\": {\n \"brandId\": \"1\",\n \"name\": \"API V2 Brand\",\n \"identifier\": \"api_v2_brand\",\n \"description\": \"API V2 Brand description,\n \"imageUrl\": \"https://image.shoplive.cloud/aa1a2ae6-e557-462c-ae6d-a2ce47d245a1.png\",\n \"imageWidth\": 2110,\n \"imageHeight\": 317,\n \"createdAt\": \"2023-02-22T13:32:50Z\",\n \"updatedAt\": \"2023-02-22T13:33:46Z\"\n },\n \"preCampaignVideoUrl\": null,\n \"preCampaignImageUrl\": \"https://image.shoplive.cloud/14352cf2-ef40-4ba9-93af-279a104cb3c8.png\",\n \"postCampaignImageUrl\": \"https://image.shoplive.cloud/6da19c2d-8d53-4cea-801f-7b39913f7c35.png\",\n \"backgroundImageUrl\": \"https://image.shoplive.cloud/0b1bd566-4087-40ef-b376-fb863a888d72.png\",\n \"ieUnsupportImageUrl\": \"https://image.shoplive.cloud/5a0fd01c-8889-4d28-8a15-8b7661a422a2.png\",\n \"scheduledStartAt\": \"2022-11-01T09:00:00Z\",\n \"scheduledEndAt\": \"2022-11-01T10:00:00Z\",\n \"campaignStartedAt\": null,\n \"campaignEndedAt\": null,\n \"createdAt\": \"2022-11-01T08:15:00Z\",\n \"updatedAt\": \"2022-11-01T08:29:09Z\"\n },\n \"stream\": {\n \"streamUrl\": \"rtmp://stream.shoplive.cloud:1935/stream\",\n \"streamKey\": \"{streamKey}\",\n \"videoAspectRatio\": \"9:16\",\n \"liveUrl\": \"https://live.shoplive.cloud/live/{streamKey}.m3u8\",\n \"liveUrls\": {\n \"480p\": \"https://live.shoplive.cloud/live/{streamKey}_480p/playlist.m3u8\",\n \"720p\": \"https://live.shoplive.cloud/live/{streamKey}_720p/playlist.m3u8\"\n },\n \"previewLiveUrl\": \"https://live.shoplive.cloud/live/{streamKey}_320p/index.m3u8\",\n \"replayLiveUrl\": null,\n \"replayLiveUrls\": null,\n \"previewReplayLiveUrl\": \"https://api.shoplive.cloud/v1/replay/{accessKey}/{campaignKey}/replay_320p/ORIGINAL/index.m3u8\"\n },\n \"campaignProductList\": [],\n \"seller\": {\n \t\t\"sellerId\": \"1\",\n \"name\": \"New seller\",\n \"profileUrl\": \"https://image.shoplive.cloud/14352cf2-ef40-4ba9-93af-279a104cb3c8.png\",\n \"storeUrl\": \"https://shoplive.cloud\",\n \"description\": \"Description of the seller\"\n \"schemes\": {}\n\t\t}\n}"
4XX
4XX
400
[
{
"code": -836,
"message": "campaign Meta required"
},
{
"code": -837,
"message": "Title required"
}
]
404
"{\n \"_s\": 710,\n \"_e\": \"Campaign does not exist\"\n}"
Result
"{\n \"_s\": -000,\n \"_e\": \"Error message\"\n}"