Get poll
curl --request GET \
--url https://pollunit.com/api/v1/polls/{poll_hash} \
--header 'Authorization: Bearer <token>'import requests
url = "https://pollunit.com/api/v1/polls/{poll_hash}"
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_hash}', 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_hash}",
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_hash}"
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_hash}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pollunit.com/api/v1/polls/{poll_hash}")
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{
"public_url": "<string>",
"member_hash": "<string>",
"title": "<string>",
"type": "Polls::Voting",
"admin_url": "<string>",
"admin_hash": "<string>",
"description": "<string>",
"location": "<string>",
"options_count": 123,
"voters_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>",
"settings": {
"additional_attributes": {},
"additional_option_attributes": {},
"allow_attachments": true,
"allow_change_sort": true,
"allow_comments": true,
"allow_description": true,
"allow_group_submissions": true,
"allow_info_link": true,
"allow_new_options": true,
"allow_new_rows": true,
"allow_search": true,
"allow_share": true,
"allow_subtitle": true,
"allow_voting": true,
"allowed_hosts": [
"<string>"
],
"anonymize_voter_names": true,
"custom_hash": true,
"deadline_submission": "2023-11-07T05:31:56Z",
"deadline_voting": "2023-11-07T05:31:56Z",
"default_states": [],
"disable_participant_sign_up": true,
"file_size_max_mb": 123,
"file_size_min_mb": 123,
"forward_url_parameters": true,
"group_submission_max_entries": 123,
"hidden_author_name": true,
"hidden_best_rating": true,
"hidden_image_name": true,
"hidden_participants": true,
"hide_options": true,
"hide_results": true,
"hide_tags": true,
"hide_votes": true,
"image_min_height": 123,
"image_min_smallest_side_length": 123,
"image_min_width": 123,
"indexing": true,
"jury_mode": true,
"limit_per_option": 123,
"notify_new_options": true,
"option_limit": 123,
"options_per_page": 123,
"options_visible_before_voting": true,
"photo_gallery_full_width": true,
"prevent_vote_for_own_options": true,
"privacy_policy": "<string>",
"privacy_policy_for_option_creators": true,
"privacy_policy_for_voters": true,
"private_comments": true,
"public_admin_link": true,
"publisher": "<string>",
"publisher_email": "<string>",
"publisher_info": "<string>",
"randomize_options": true,
"require_approval": true,
"require_author_name": true,
"require_description": true,
"require_voter_name": true,
"restrict_view_access": true,
"restricted_double_opt_in_domains": "<array>",
"show_as_list": true,
"show_metadata": true,
"show_photo_info_by_default": true,
"social_media_description": "<string>",
"social_media_image_data": {},
"social_media_title": "<string>",
"start_date_submission": "2023-11-07T05:31:56Z",
"start_date_voting": "2023-11-07T05:31:56Z",
"submission_fee": 123,
"submission_fee_title": "<string>",
"terms": "<string>",
"terms_for_option_creators": true,
"terms_for_voters": true,
"thank_you_page": true,
"thank_you_page_data": {},
"thank_you_page_submitter": true,
"thank_you_page_submitter_data": {},
"timezone": "<string>",
"vote_limit_per_option": 123,
"vote_limit_per_option_min": 123,
"vote_limit_per_voter": 123,
"vote_per_day": true,
"voting_fee": 123,
"voting_fee_title": "<string>",
"white_label": true
},
"configuration_hints": {}
}{
"error": "Unauthorized"
}Polls
Get poll
GET
/
api
/
v1
/
polls
/
{poll_hash}
Get poll
curl --request GET \
--url https://pollunit.com/api/v1/polls/{poll_hash} \
--header 'Authorization: Bearer <token>'import requests
url = "https://pollunit.com/api/v1/polls/{poll_hash}"
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_hash}', 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_hash}",
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_hash}"
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_hash}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pollunit.com/api/v1/polls/{poll_hash}")
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{
"public_url": "<string>",
"member_hash": "<string>",
"title": "<string>",
"type": "Polls::Voting",
"admin_url": "<string>",
"admin_hash": "<string>",
"description": "<string>",
"location": "<string>",
"options_count": 123,
"voters_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>",
"settings": {
"additional_attributes": {},
"additional_option_attributes": {},
"allow_attachments": true,
"allow_change_sort": true,
"allow_comments": true,
"allow_description": true,
"allow_group_submissions": true,
"allow_info_link": true,
"allow_new_options": true,
"allow_new_rows": true,
"allow_search": true,
"allow_share": true,
"allow_subtitle": true,
"allow_voting": true,
"allowed_hosts": [
"<string>"
],
"anonymize_voter_names": true,
"custom_hash": true,
"deadline_submission": "2023-11-07T05:31:56Z",
"deadline_voting": "2023-11-07T05:31:56Z",
"default_states": [],
"disable_participant_sign_up": true,
"file_size_max_mb": 123,
"file_size_min_mb": 123,
"forward_url_parameters": true,
"group_submission_max_entries": 123,
"hidden_author_name": true,
"hidden_best_rating": true,
"hidden_image_name": true,
"hidden_participants": true,
"hide_options": true,
"hide_results": true,
"hide_tags": true,
"hide_votes": true,
"image_min_height": 123,
"image_min_smallest_side_length": 123,
"image_min_width": 123,
"indexing": true,
"jury_mode": true,
"limit_per_option": 123,
"notify_new_options": true,
"option_limit": 123,
"options_per_page": 123,
"options_visible_before_voting": true,
"photo_gallery_full_width": true,
"prevent_vote_for_own_options": true,
"privacy_policy": "<string>",
"privacy_policy_for_option_creators": true,
"privacy_policy_for_voters": true,
"private_comments": true,
"public_admin_link": true,
"publisher": "<string>",
"publisher_email": "<string>",
"publisher_info": "<string>",
"randomize_options": true,
"require_approval": true,
"require_author_name": true,
"require_description": true,
"require_voter_name": true,
"restrict_view_access": true,
"restricted_double_opt_in_domains": "<array>",
"show_as_list": true,
"show_metadata": true,
"show_photo_info_by_default": true,
"social_media_description": "<string>",
"social_media_image_data": {},
"social_media_title": "<string>",
"start_date_submission": "2023-11-07T05:31:56Z",
"start_date_voting": "2023-11-07T05:31:56Z",
"submission_fee": 123,
"submission_fee_title": "<string>",
"terms": "<string>",
"terms_for_option_creators": true,
"terms_for_voters": true,
"thank_you_page": true,
"thank_you_page_data": {},
"thank_you_page_submitter": true,
"thank_you_page_submitter_data": {},
"timezone": "<string>",
"vote_limit_per_option": 123,
"vote_limit_per_option_min": 123,
"vote_limit_per_voter": 123,
"vote_per_day": true,
"voting_fee": 123,
"voting_fee_title": "<string>",
"white_label": true
},
"configuration_hints": {}
}{
"error": "Unauthorized"
}Authorizations
Personal API token — find yours under My Account → API.
Path Parameters
Poll member_hash or admin_hash
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
poll found
Public poll identifier (use for read/submit)
Example:
"Polls::Voting"
Available options:
active, closed Admin URL (owner/admin access only)
Admin identifier (only returned to owner)
Show child attributes
Show child attributes
Allowed values for selected configuration fields (owner/admin only)
⌘I