Get poll results
curl --request GET \
--url https://api.rallly.co/v1/polls/{pollId}/results \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.rallly.co/v1/polls/{pollId}/results"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.rallly.co/v1/polls/{pollId}/results', 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.rallly.co/v1/polls/{pollId}/results",
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://api.rallly.co/v1/polls/{pollId}/results"
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://api.rallly.co/v1/polls/{pollId}/results")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rallly.co/v1/polls/{pollId}/results")
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{
"data": {
"pollId": "Xk3pQ9vLm2Ab",
"kind": "time",
"status": "open",
"participantCount": 8,
"options": [
{
"id": "cm5h8x2k40000q9l4f7e2d3an",
"date": "2025-01-15",
"votes": [
{
"type": "yes",
"count": 3
}
],
"score": 5004,
"isTopChoice": true
}
],
"highScore": 5004
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}Polls
Get poll results
Retrieves aggregated voting results for a poll: vote counts per option without individual participant data. Use GET /polls/:pollId/participants to list who responded.
votes lists every vote type the poll offers with its count, zero included. score is an opaque ranking value: sort by it to order options from best to worst, and use isTopChoice or highScore to find the leading options. Its formula is not part of the contract, so do not decode it, compare it across polls or threshold on it.
GET
/
v1
/
polls
/
{pollId}
/
results
Get poll results
curl --request GET \
--url https://api.rallly.co/v1/polls/{pollId}/results \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.rallly.co/v1/polls/{pollId}/results"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.rallly.co/v1/polls/{pollId}/results', 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.rallly.co/v1/polls/{pollId}/results",
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://api.rallly.co/v1/polls/{pollId}/results"
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://api.rallly.co/v1/polls/{pollId}/results")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rallly.co/v1/polls/{pollId}/results")
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{
"data": {
"pollId": "Xk3pQ9vLm2Ab",
"kind": "time",
"status": "open",
"participantCount": 8,
"options": [
{
"id": "cm5h8x2k40000q9l4f7e2d3an",
"date": "2025-01-15",
"votes": [
{
"type": "yes",
"count": 3
}
],
"score": 5004,
"isTopChoice": true
}
],
"highScore": 5004
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}Was this page helpful?