curl --request GET \
--url https://pollunit.com/api/v1/polls/{poll_id}/options/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://pollunit.com/api/v1/polls/{poll_id}/options/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://pollunit.com/api/v1/polls/{poll_id}/options/{id}', 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://pollunit.com/api/v1/polls/{poll_id}/options/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pollunit.com/api/v1/polls/{poll_id}/options/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pollunit.com/api/v1/polls/{poll_id}/options/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pollunit.com/api/v1/polls/{poll_id}/options/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"public_url": "<string>",
"type": "Options::TextOption",
"admin_url": "<string>",
"parent_option_id": "<string>",
"content": "<string>",
"subtitle": "<string>",
"description": "<string>",
"author_name": "<string>",
"position": 123,
"state": "incoming",
"rank": 123,
"rating": 123,
"average_rating": 123,
"best_rating": true,
"selected": true,
"child_option_type": "<string>",
"data": {},
"drawing_type": "free_sketch",
"input_type": "text",
"location_type": "point",
"options_count": 123,
"paid": true,
"privacy_policy_accepted": true,
"processing": true,
"rotation": 123,
"terms_accepted": true,
"info_link": "<string>",
"info_link_title": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"video_thumb_path": "<string>",
"vimeo_id": "<string>",
"youtube_id": "<string>",
"voter_count": 123,
"voting_category_option_ratings": [
{
"voting_category_id": 123,
"rating": 123,
"average_rating": 123,
"best_rating": true,
"selected": true
}
],
"settings": {
"allowed_values": [
"<string>"
],
"column_width": 123,
"dot_vote_icon": "dot",
"mandatory": true,
"multiline": true,
"randomize_options": true,
"require_vote": true,
"show_as_list": true,
"survey_step_rating_method": "average_by_voted",
"survey_step_type": "info",
"survey_step_vote_limit_per_option": 123,
"survey_step_vote_limit_per_option_min": 123,
"survey_step_vote_limit_per_voter": 123,
"survey_step_vote_type": "Votes::BooleanVote",
"voter_limit": 123
},
"attachment": {
"attachment_url_large": "<string>",
"attachment_url_thumb": "<string>",
"attachment_url_social": "<string>",
"attachment_url_cover": "<string>",
"attachment_original_url": "<string>"
},
"approval_state": "unreviewed",
"approval_state_updated_at": "2023-11-07T05:31:56Z",
"archived": true,
"fraudulent_count": 123,
"state_change_message": "<string>"
}{
"error": "Unauthorized"
}{
"error": "Not Found"
}Get option
curl --request GET \
--url https://pollunit.com/api/v1/polls/{poll_id}/options/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://pollunit.com/api/v1/polls/{poll_id}/options/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://pollunit.com/api/v1/polls/{poll_id}/options/{id}', 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://pollunit.com/api/v1/polls/{poll_id}/options/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pollunit.com/api/v1/polls/{poll_id}/options/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pollunit.com/api/v1/polls/{poll_id}/options/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pollunit.com/api/v1/polls/{poll_id}/options/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"public_url": "<string>",
"type": "Options::TextOption",
"admin_url": "<string>",
"parent_option_id": "<string>",
"content": "<string>",
"subtitle": "<string>",
"description": "<string>",
"author_name": "<string>",
"position": 123,
"state": "incoming",
"rank": 123,
"rating": 123,
"average_rating": 123,
"best_rating": true,
"selected": true,
"child_option_type": "<string>",
"data": {},
"drawing_type": "free_sketch",
"input_type": "text",
"location_type": "point",
"options_count": 123,
"paid": true,
"privacy_policy_accepted": true,
"processing": true,
"rotation": 123,
"terms_accepted": true,
"info_link": "<string>",
"info_link_title": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"video_thumb_path": "<string>",
"vimeo_id": "<string>",
"youtube_id": "<string>",
"voter_count": 123,
"voting_category_option_ratings": [
{
"voting_category_id": 123,
"rating": 123,
"average_rating": 123,
"best_rating": true,
"selected": true
}
],
"settings": {
"allowed_values": [
"<string>"
],
"column_width": 123,
"dot_vote_icon": "dot",
"mandatory": true,
"multiline": true,
"randomize_options": true,
"require_vote": true,
"show_as_list": true,
"survey_step_rating_method": "average_by_voted",
"survey_step_type": "info",
"survey_step_vote_limit_per_option": 123,
"survey_step_vote_limit_per_option_min": 123,
"survey_step_vote_limit_per_voter": 123,
"survey_step_vote_type": "Votes::BooleanVote",
"voter_limit": 123
},
"attachment": {
"attachment_url_large": "<string>",
"attachment_url_thumb": "<string>",
"attachment_url_social": "<string>",
"attachment_url_cover": "<string>",
"attachment_original_url": "<string>"
},
"approval_state": "unreviewed",
"approval_state_updated_at": "2023-11-07T05:31:56Z",
"archived": true,
"fraudulent_count": 123,
"state_change_message": "<string>"
}{
"error": "Unauthorized"
}{
"error": "Not Found"
}Authorizations
Personal API token — find yours under My Account → API.
Path Parameters
Poll member_hash or admin_hash
Option public_id, as returned in the id field
Query Parameters
public_id of an organization the user belongs to. When given, the request runs in that organization context instead of the personal account.
Response
option found
Full representation of a single poll option. Top-level fields vary by option type and are included conditionally depending on the poll's visibility settings and your access level (admin vs. member); type-specific configuration is grouped under settings.
Option public_id
Option STI class
"Options::TextOption"
Admin access only
Collection polls only
incoming, investigation, planned, in_implementation, rejected, done Option-type-specific payload (e.g. location_data for location options)
free_sketch, sign, draw_on_image Input options only
text, textarea, email, url, select, radio, multi_select, checkbox, number, number_float, file, date, datetime point, route, polygon, circle, rectangle Only for polls with voting_categories: the rating of the option per voting category. The rating fields follow the same visibility rules as the top-level ones.
Show child attributes
Show child attributes
Option-type-specific configuration, grouped for readability.
Show child attributes
Show child attributes
URLs of the file uploaded to the option, returned by both the list and the show endpoint. Only present for option types that carry an uploaded file (image, photo, audio, drawing and advent calendar options); youtube/vimeo and uploaded-video options do not have it. The attachment_url_* keys are the processed derivatives that exist for this file, so which ones are returned depends on the uploaded file: images and videos get large, thumb and social, an audio file only gets cover if it has embedded cover art, and a file that is still processing has none at all. The whole object is omitted when none of its keys apply, e.g. an option without a file or a still-processing upload you have no download access to.
Show child attributes
Show child attributes
Admin access only
unreviewed, approved, disapproved Admin access only
Admin access only
Admin access only
Admin access only