curl --request POST \
--url https://api.pickfu.com/v1/surveys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"projectId": "<string>",
"projects": [
"<string>"
],
"tags": [
{
"id": 123
}
],
"targeting": [
"<string>"
],
"reporting": [
"<string>"
],
"country": "<string>",
"sampleSize": "<string>",
"surveyIntent": "<string>",
"isMiniPoll": true,
"externalId": "<string>",
"questions": [
{
"prompt": "<string>",
"variant": "<string>",
"context": {
"text": "<string>",
"mediaUrl": "<string>"
},
"options": [
{
"value": "<string>",
"mediaUrl": "<string>",
"asin": "<string>",
"imageSet": [
"<string>"
],
"mockup": {
"image": "<string>",
"title": "<string>",
"numRatings": 123,
"reviewScore": 123,
"rating": 123,
"reviews": 123,
"price": 123,
"currency": "<string>"
}
}
]
}
]
}
'import requests
url = "https://api.pickfu.com/v1/surveys"
payload = {
"name": "<string>",
"projectId": "<string>",
"projects": ["<string>"],
"tags": [{ "id": 123 }],
"targeting": ["<string>"],
"reporting": ["<string>"],
"country": "<string>",
"sampleSize": "<string>",
"surveyIntent": "<string>",
"isMiniPoll": True,
"externalId": "<string>",
"questions": [
{
"prompt": "<string>",
"variant": "<string>",
"context": {
"text": "<string>",
"mediaUrl": "<string>"
},
"options": [
{
"value": "<string>",
"mediaUrl": "<string>",
"asin": "<string>",
"imageSet": ["<string>"],
"mockup": {
"image": "<string>",
"title": "<string>",
"numRatings": 123,
"reviewScore": 123,
"rating": 123,
"reviews": 123,
"price": 123,
"currency": "<string>"
}
}
]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
projectId: '<string>',
projects: ['<string>'],
tags: [{id: 123}],
targeting: ['<string>'],
reporting: ['<string>'],
country: '<string>',
sampleSize: '<string>',
surveyIntent: '<string>',
isMiniPoll: true,
externalId: '<string>',
questions: [
{
prompt: '<string>',
variant: '<string>',
context: {text: '<string>', mediaUrl: '<string>'},
options: [
{
value: '<string>',
mediaUrl: '<string>',
asin: '<string>',
imageSet: ['<string>'],
mockup: {
image: '<string>',
title: '<string>',
numRatings: 123,
reviewScore: 123,
rating: 123,
reviews: 123,
price: 123,
currency: '<string>'
}
}
]
}
]
})
};
fetch('https://api.pickfu.com/v1/surveys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pickfu.com/v1/surveys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'projectId' => '<string>',
'projects' => [
'<string>'
],
'tags' => [
[
'id' => 123
]
],
'targeting' => [
'<string>'
],
'reporting' => [
'<string>'
],
'country' => '<string>',
'sampleSize' => '<string>',
'surveyIntent' => '<string>',
'isMiniPoll' => true,
'externalId' => '<string>',
'questions' => [
[
'prompt' => '<string>',
'variant' => '<string>',
'context' => [
'text' => '<string>',
'mediaUrl' => '<string>'
],
'options' => [
[
'value' => '<string>',
'mediaUrl' => '<string>',
'asin' => '<string>',
'imageSet' => [
'<string>'
],
'mockup' => [
'image' => '<string>',
'title' => '<string>',
'numRatings' => 123,
'reviewScore' => 123,
'rating' => 123,
'reviews' => 123,
'price' => 123,
'currency' => '<string>'
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pickfu.com/v1/surveys"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"projectId\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"tags\": [\n {\n \"id\": 123\n }\n ],\n \"targeting\": [\n \"<string>\"\n ],\n \"reporting\": [\n \"<string>\"\n ],\n \"country\": \"<string>\",\n \"sampleSize\": \"<string>\",\n \"surveyIntent\": \"<string>\",\n \"isMiniPoll\": true,\n \"externalId\": \"<string>\",\n \"questions\": [\n {\n \"prompt\": \"<string>\",\n \"variant\": \"<string>\",\n \"context\": {\n \"text\": \"<string>\",\n \"mediaUrl\": \"<string>\"\n },\n \"options\": [\n {\n \"value\": \"<string>\",\n \"mediaUrl\": \"<string>\",\n \"asin\": \"<string>\",\n \"imageSet\": [\n \"<string>\"\n ],\n \"mockup\": {\n \"image\": \"<string>\",\n \"title\": \"<string>\",\n \"numRatings\": 123,\n \"reviewScore\": 123,\n \"rating\": 123,\n \"reviews\": 123,\n \"price\": 123,\n \"currency\": \"<string>\"\n }\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pickfu.com/v1/surveys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"projectId\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"tags\": [\n {\n \"id\": 123\n }\n ],\n \"targeting\": [\n \"<string>\"\n ],\n \"reporting\": [\n \"<string>\"\n ],\n \"country\": \"<string>\",\n \"sampleSize\": \"<string>\",\n \"surveyIntent\": \"<string>\",\n \"isMiniPoll\": true,\n \"externalId\": \"<string>\",\n \"questions\": [\n {\n \"prompt\": \"<string>\",\n \"variant\": \"<string>\",\n \"context\": {\n \"text\": \"<string>\",\n \"mediaUrl\": \"<string>\"\n },\n \"options\": [\n {\n \"value\": \"<string>\",\n \"mediaUrl\": \"<string>\",\n \"asin\": \"<string>\",\n \"imageSet\": [\n \"<string>\"\n ],\n \"mockup\": {\n \"image\": \"<string>\",\n \"title\": \"<string>\",\n \"numRatings\": 123,\n \"reviewScore\": 123,\n \"rating\": 123,\n \"reviews\": 123,\n \"price\": 123,\n \"currency\": \"<string>\"\n }\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pickfu.com/v1/surveys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"projectId\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"tags\": [\n {\n \"id\": 123\n }\n ],\n \"targeting\": [\n \"<string>\"\n ],\n \"reporting\": [\n \"<string>\"\n ],\n \"country\": \"<string>\",\n \"sampleSize\": \"<string>\",\n \"surveyIntent\": \"<string>\",\n \"isMiniPoll\": true,\n \"externalId\": \"<string>\",\n \"questions\": [\n {\n \"prompt\": \"<string>\",\n \"variant\": \"<string>\",\n \"context\": {\n \"text\": \"<string>\",\n \"mediaUrl\": \"<string>\"\n },\n \"options\": [\n {\n \"value\": \"<string>\",\n \"mediaUrl\": \"<string>\",\n \"asin\": \"<string>\",\n \"imageSet\": [\n \"<string>\"\n ],\n \"mockup\": {\n \"image\": \"<string>\",\n \"title\": \"<string>\",\n \"numRatings\": 123,\n \"reviewScore\": 123,\n \"rating\": 123,\n \"reviews\": 123,\n \"price\": 123,\n \"currency\": \"<string>\"\n }\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<string>",
"name": "<string>",
"country": "<string>",
"currency": "<string>",
"sampleSize": 123,
"numResponses": 123,
"status": "<string>",
"targeting": [
"<string>"
],
"reporting": [
"<string>"
],
"reportingDefaultsApplied": [
"<string>"
],
"tags": [
{
"id": "<string>",
"name": "<string>"
}
],
"projects": [
{
"id": "<string>",
"name": "<string>"
}
],
"surveyUrl": "<string>",
"surveyIntent": "<string>",
"externalId": "<string>",
"template": {
"id": "<string>",
"name": "<string>",
"constraints": {
"questionTypes": [
"head_to_head"
],
"optionTypes": [
"text"
],
"optionCount": {
"min": 123,
"max": 123
},
"sampleSizes": [
"<string>"
],
"defaultSampleSize": "<string>",
"countries": [
"<string>"
],
"defaultCountry": "<string>"
}
},
"questions": [
{
"id": "<string>",
"type": "<string>",
"variant": "<string>",
"value": "<string>",
"translation": "<string>",
"likertScale": "agreement5",
"options": [
{
"id": "<string>",
"label": "<string>",
"value": "<string>",
"type": "<string>",
"translation": "<string>",
"product": {
"asin": "<string>",
"title": "<string>",
"price": 123,
"salePrice": 123,
"currency": "<string>",
"rating": 123,
"reviews": 123,
"reviewScore": 123,
"numRatings": 123,
"image": "<string>"
},
"imageSetDirection": "<string>",
"mockupType": "<string>"
}
],
"context": {
"type": "<string>",
"value": "<string>",
"translation": "<string>"
},
"results": {
"totalResponses": 123,
"winningOptionId": "<string>",
"averageScore": 123,
"options": [
{
"id": "<string>",
"label": "<string>",
"votes": 123,
"percentage": 123,
"rank": 123,
"isWinner": true
}
]
},
"responses": [
{
"id": "<string>",
"pinned": true,
"explanation": "<string>",
"translation": "<string>",
"chosenOption": "<string>",
"selectedOptions": [
"<string>"
],
"score": 123,
"clicks": [
{
"number": 123,
"xCoord": 123,
"yCoord": 123
}
],
"ranking": [
{
"rank": 123,
"option": "<string>"
}
],
"media": "<string>",
"mediaTranscription": "<string>",
"matchup": {
"option1": "<string>",
"option2": "<string>"
},
"statements": [
{
"id": "<string>",
"statement": "<string>",
"value": 123
}
],
"prices": {
"tooCheap": 123,
"bargain": 123,
"expensive": 123,
"tooExpensive": 123
},
"respondent": [
{
"trait": "<string>",
"value": "<string>"
}
]
}
],
"ai": {}
}
]
},
"cost": {
"amount": 123,
"balance": 123,
"currency": "<string>",
"canPayWithBalance": true,
"quotedCreditsCost": 123,
"creditsCostSubtotal": 123,
"discounts": [
[
"<string>"
]
],
"discountsMoney": [
[
"<string>"
]
],
"planRequired": "<string>"
},
"completionEstimate": {
"bucket": "<string>",
"estimatedMinutes": 123,
"status": "<string>"
}
}{
"statusCode": 123,
"error": "<string>",
"code": "<string>",
"param": "<string>",
"message": "<string>"
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 123,
"error": "<string>",
"code": "<string>",
"param": "<string>",
"message": "<string>",
"violations": [
{
"code": "<string>",
"param": "<string>",
"message": "<string>",
"allowed": "<unknown>",
"received": "<unknown>"
}
],
"blanks": [
{
"name": "<string>",
"placeholder": "<string>"
}
]
}Create survey
Creates a new survey in draft status. The survey must be published separately using the publish endpoint.
Each survey contains one or more questions, each with a type (head_to_head, ranked, open_ended, etc.) and optional answer options. You can also specify targeting traits, reporting breakdowns, country, and sample size.
To start from a template instead, send template (an id from GET /v1/templates, plus any blanks and options) in place of questions. The draft is checked against the template limits before anything is written; a request outside them is a 422 listing every violation with its allowed values.
curl --request POST \
--url https://api.pickfu.com/v1/surveys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"projectId": "<string>",
"projects": [
"<string>"
],
"tags": [
{
"id": 123
}
],
"targeting": [
"<string>"
],
"reporting": [
"<string>"
],
"country": "<string>",
"sampleSize": "<string>",
"surveyIntent": "<string>",
"isMiniPoll": true,
"externalId": "<string>",
"questions": [
{
"prompt": "<string>",
"variant": "<string>",
"context": {
"text": "<string>",
"mediaUrl": "<string>"
},
"options": [
{
"value": "<string>",
"mediaUrl": "<string>",
"asin": "<string>",
"imageSet": [
"<string>"
],
"mockup": {
"image": "<string>",
"title": "<string>",
"numRatings": 123,
"reviewScore": 123,
"rating": 123,
"reviews": 123,
"price": 123,
"currency": "<string>"
}
}
]
}
]
}
'import requests
url = "https://api.pickfu.com/v1/surveys"
payload = {
"name": "<string>",
"projectId": "<string>",
"projects": ["<string>"],
"tags": [{ "id": 123 }],
"targeting": ["<string>"],
"reporting": ["<string>"],
"country": "<string>",
"sampleSize": "<string>",
"surveyIntent": "<string>",
"isMiniPoll": True,
"externalId": "<string>",
"questions": [
{
"prompt": "<string>",
"variant": "<string>",
"context": {
"text": "<string>",
"mediaUrl": "<string>"
},
"options": [
{
"value": "<string>",
"mediaUrl": "<string>",
"asin": "<string>",
"imageSet": ["<string>"],
"mockup": {
"image": "<string>",
"title": "<string>",
"numRatings": 123,
"reviewScore": 123,
"rating": 123,
"reviews": 123,
"price": 123,
"currency": "<string>"
}
}
]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
projectId: '<string>',
projects: ['<string>'],
tags: [{id: 123}],
targeting: ['<string>'],
reporting: ['<string>'],
country: '<string>',
sampleSize: '<string>',
surveyIntent: '<string>',
isMiniPoll: true,
externalId: '<string>',
questions: [
{
prompt: '<string>',
variant: '<string>',
context: {text: '<string>', mediaUrl: '<string>'},
options: [
{
value: '<string>',
mediaUrl: '<string>',
asin: '<string>',
imageSet: ['<string>'],
mockup: {
image: '<string>',
title: '<string>',
numRatings: 123,
reviewScore: 123,
rating: 123,
reviews: 123,
price: 123,
currency: '<string>'
}
}
]
}
]
})
};
fetch('https://api.pickfu.com/v1/surveys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pickfu.com/v1/surveys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'projectId' => '<string>',
'projects' => [
'<string>'
],
'tags' => [
[
'id' => 123
]
],
'targeting' => [
'<string>'
],
'reporting' => [
'<string>'
],
'country' => '<string>',
'sampleSize' => '<string>',
'surveyIntent' => '<string>',
'isMiniPoll' => true,
'externalId' => '<string>',
'questions' => [
[
'prompt' => '<string>',
'variant' => '<string>',
'context' => [
'text' => '<string>',
'mediaUrl' => '<string>'
],
'options' => [
[
'value' => '<string>',
'mediaUrl' => '<string>',
'asin' => '<string>',
'imageSet' => [
'<string>'
],
'mockup' => [
'image' => '<string>',
'title' => '<string>',
'numRatings' => 123,
'reviewScore' => 123,
'rating' => 123,
'reviews' => 123,
'price' => 123,
'currency' => '<string>'
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pickfu.com/v1/surveys"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"projectId\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"tags\": [\n {\n \"id\": 123\n }\n ],\n \"targeting\": [\n \"<string>\"\n ],\n \"reporting\": [\n \"<string>\"\n ],\n \"country\": \"<string>\",\n \"sampleSize\": \"<string>\",\n \"surveyIntent\": \"<string>\",\n \"isMiniPoll\": true,\n \"externalId\": \"<string>\",\n \"questions\": [\n {\n \"prompt\": \"<string>\",\n \"variant\": \"<string>\",\n \"context\": {\n \"text\": \"<string>\",\n \"mediaUrl\": \"<string>\"\n },\n \"options\": [\n {\n \"value\": \"<string>\",\n \"mediaUrl\": \"<string>\",\n \"asin\": \"<string>\",\n \"imageSet\": [\n \"<string>\"\n ],\n \"mockup\": {\n \"image\": \"<string>\",\n \"title\": \"<string>\",\n \"numRatings\": 123,\n \"reviewScore\": 123,\n \"rating\": 123,\n \"reviews\": 123,\n \"price\": 123,\n \"currency\": \"<string>\"\n }\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pickfu.com/v1/surveys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"projectId\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"tags\": [\n {\n \"id\": 123\n }\n ],\n \"targeting\": [\n \"<string>\"\n ],\n \"reporting\": [\n \"<string>\"\n ],\n \"country\": \"<string>\",\n \"sampleSize\": \"<string>\",\n \"surveyIntent\": \"<string>\",\n \"isMiniPoll\": true,\n \"externalId\": \"<string>\",\n \"questions\": [\n {\n \"prompt\": \"<string>\",\n \"variant\": \"<string>\",\n \"context\": {\n \"text\": \"<string>\",\n \"mediaUrl\": \"<string>\"\n },\n \"options\": [\n {\n \"value\": \"<string>\",\n \"mediaUrl\": \"<string>\",\n \"asin\": \"<string>\",\n \"imageSet\": [\n \"<string>\"\n ],\n \"mockup\": {\n \"image\": \"<string>\",\n \"title\": \"<string>\",\n \"numRatings\": 123,\n \"reviewScore\": 123,\n \"rating\": 123,\n \"reviews\": 123,\n \"price\": 123,\n \"currency\": \"<string>\"\n }\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pickfu.com/v1/surveys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"projectId\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"tags\": [\n {\n \"id\": 123\n }\n ],\n \"targeting\": [\n \"<string>\"\n ],\n \"reporting\": [\n \"<string>\"\n ],\n \"country\": \"<string>\",\n \"sampleSize\": \"<string>\",\n \"surveyIntent\": \"<string>\",\n \"isMiniPoll\": true,\n \"externalId\": \"<string>\",\n \"questions\": [\n {\n \"prompt\": \"<string>\",\n \"variant\": \"<string>\",\n \"context\": {\n \"text\": \"<string>\",\n \"mediaUrl\": \"<string>\"\n },\n \"options\": [\n {\n \"value\": \"<string>\",\n \"mediaUrl\": \"<string>\",\n \"asin\": \"<string>\",\n \"imageSet\": [\n \"<string>\"\n ],\n \"mockup\": {\n \"image\": \"<string>\",\n \"title\": \"<string>\",\n \"numRatings\": 123,\n \"reviewScore\": 123,\n \"rating\": 123,\n \"reviews\": 123,\n \"price\": 123,\n \"currency\": \"<string>\"\n }\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<string>",
"name": "<string>",
"country": "<string>",
"currency": "<string>",
"sampleSize": 123,
"numResponses": 123,
"status": "<string>",
"targeting": [
"<string>"
],
"reporting": [
"<string>"
],
"reportingDefaultsApplied": [
"<string>"
],
"tags": [
{
"id": "<string>",
"name": "<string>"
}
],
"projects": [
{
"id": "<string>",
"name": "<string>"
}
],
"surveyUrl": "<string>",
"surveyIntent": "<string>",
"externalId": "<string>",
"template": {
"id": "<string>",
"name": "<string>",
"constraints": {
"questionTypes": [
"head_to_head"
],
"optionTypes": [
"text"
],
"optionCount": {
"min": 123,
"max": 123
},
"sampleSizes": [
"<string>"
],
"defaultSampleSize": "<string>",
"countries": [
"<string>"
],
"defaultCountry": "<string>"
}
},
"questions": [
{
"id": "<string>",
"type": "<string>",
"variant": "<string>",
"value": "<string>",
"translation": "<string>",
"likertScale": "agreement5",
"options": [
{
"id": "<string>",
"label": "<string>",
"value": "<string>",
"type": "<string>",
"translation": "<string>",
"product": {
"asin": "<string>",
"title": "<string>",
"price": 123,
"salePrice": 123,
"currency": "<string>",
"rating": 123,
"reviews": 123,
"reviewScore": 123,
"numRatings": 123,
"image": "<string>"
},
"imageSetDirection": "<string>",
"mockupType": "<string>"
}
],
"context": {
"type": "<string>",
"value": "<string>",
"translation": "<string>"
},
"results": {
"totalResponses": 123,
"winningOptionId": "<string>",
"averageScore": 123,
"options": [
{
"id": "<string>",
"label": "<string>",
"votes": 123,
"percentage": 123,
"rank": 123,
"isWinner": true
}
]
},
"responses": [
{
"id": "<string>",
"pinned": true,
"explanation": "<string>",
"translation": "<string>",
"chosenOption": "<string>",
"selectedOptions": [
"<string>"
],
"score": 123,
"clicks": [
{
"number": 123,
"xCoord": 123,
"yCoord": 123
}
],
"ranking": [
{
"rank": 123,
"option": "<string>"
}
],
"media": "<string>",
"mediaTranscription": "<string>",
"matchup": {
"option1": "<string>",
"option2": "<string>"
},
"statements": [
{
"id": "<string>",
"statement": "<string>",
"value": 123
}
],
"prices": {
"tooCheap": 123,
"bargain": 123,
"expensive": 123,
"tooExpensive": 123
},
"respondent": [
{
"trait": "<string>",
"value": "<string>"
}
]
}
],
"ai": {}
}
]
},
"cost": {
"amount": 123,
"balance": 123,
"currency": "<string>",
"canPayWithBalance": true,
"quotedCreditsCost": 123,
"creditsCostSubtotal": 123,
"discounts": [
[
"<string>"
]
],
"discountsMoney": [
[
"<string>"
]
],
"planRequired": "<string>"
},
"completionEstimate": {
"bucket": "<string>",
"estimatedMinutes": 123,
"status": "<string>"
}
}{
"statusCode": 123,
"error": "<string>",
"code": "<string>",
"param": "<string>",
"message": "<string>"
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 123,
"error": "<string>",
"code": "<string>",
"param": "<string>",
"message": "<string>",
"violations": [
{
"code": "<string>",
"param": "<string>",
"message": "<string>",
"allowed": "<unknown>",
"received": "<unknown>"
}
],
"blanks": [
{
"name": "<string>",
"placeholder": "<string>"
}
]
}Authorizations
OAuth2 access token obtained via the authorization flow. Include in the Authorization header as: Bearer {access_token}
Body
Send exactly one of questions (write your own poll) or template (build it from a template id returned by GET /v1/templates).
Send exactly one of questions (write your own poll) or template (build it from a template id returned by GET /v1/templates).
Survey name (1-255 characters, trimmed)
1 - 255Project GUID (string) or numeric ID to associate with the survey, or null to leave unassigned. Mutually exclusive with projects.
Project GUIDs (or numeric IDs) to associate the survey with. Mutually exclusive with projectId.
50Tags to attach. Each item has either id (existing tag) or name (find-or-create).
10- Option 1
- Option 2
Show child attributes
Show child attributes
Demographic targeting traits
Reporting breakdown traits
Two-letter country code (e.g. US)
Number of respondents. Standard surveys: "15", "30", "50", "75", "100", "200", "300", "500". Screen recording surveys: "5", "10", "15", "20", "25", "30", "50", "75" (max 75).
Original intent of the survey as interpreted by AI (max 255 characters)
255Whether to create this survey as a daily mini-poll
Optional opaque correlation key for your own records. Omit when unset. Case-sensitive and byte-exact — send the identical string every time. Many surveys may share the same id. We do not interpret this value.
1 - 255Create the survey from a template instead of writing questions. A template is one ready-made question with a fixed price per response and fixed limits (question type, option count and kinds, sample sizes, countries, audience). Call GET /v1/templates/{id} first to read its question, blanks, option slots and constraints. The server picks the question type from the template (head_to_head for 2 options or fewer and ranked for 3 or more, where a template offers both). Omitted survey fields come from the template: sampleSize its default size, country its default country, name its title, and targeting its preset audience (send the full list to change it, keeping the preset). Its reporting traits always apply, so reporting cannot be sent. A request outside the limits is rejected with a 422 listing every violation; nothing is written. Create only: edit the draft afterwards with questions.
Show child attributes
Show child attributes
List of questions for the survey. Required unless template is sent.
1Show child attributes
Show child attributes
Was this page helpful?
