v1
latestOpenAPI 3.0.02026-08-04265791.1 MBCampaigns
Create
Create a campaign.
icon_url and background_url can be a file's _downloadURL or a created photo's url. Both have to begin with https://.
post/public/api/campaigns
Headers
Acceptstring
e.g. application/json
Request body
Example request
{
"title": "<p>campaign title here</p>",
"description": "campaign description here",
"type": "mission",
"group_ids": [
"staff"
],
"icon_url": "https://res.cloudinary.com/www-yoobic-com/image/upload/a_exif/v1569401814/ji2yhtw926naemtsj6xr.png",
"background_url": "https://res.cloudinary.com/www-yoobic-com/image/upload/a_exif/v1569401827/seuuqjbry1e4uusi0nta.png",
"page_titles": [
"My first page title"
],
"questions": [
{
"question_type": "text",
"question": "Dow do the shelves look today?",
"question_description": "<p>Tell us what you see from left to right.</p>",
"page_number": 1,
"question_number": 1
}
]
}Response
OK
Example response
{
"campaign_id": "5dc18578883086880887175e",
"title": "<p>campaign title here</p>",
"description": "campaign description here",
"type": "mission",
"group_ids": [
"staff"
],
"page_titles": [
"My first page title"
],
"icon_url": "https://res.cloudinary.com/www-yoobic-com/image/upload/a_exif/v1569401814/ji2yhtw926naemtsj6xr.png",
"background_url": "https://res.cloudinary.com/www-yoobic-com/image/upload/a_exif/v1569401827/seuuqjbry1e4uusi0nta.png",
"questions": [
{
"question_id": "32e1e38c-961a-421f-8cb7-ee1eafefbace",
"question_type": "text",
"question": "Dow do the shelves look today?",
"question_description": "<p>Tell us what you see from left to right.</p>",
"page_number": 1,
"question_number": 1,
"mandatory": false
}
],
"created_date": "2019-11-05T14:21:44.361Z",
"updated_date": "2019-11-05T14:21:44.361Z"
}