> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.beehiiv.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.beehiiv.com/_mcp/server.

# Get poll <Badge intent="info" minimal outlined>OAuth Scope: polls:read</Badge>

GET https://api.beehiiv.com/v2/publications/{publicationId}/polls/{pollId}

Retrieve detailed information about a specific poll belonging to a publication. Use `expand[]=stats` for aggregate vote counts, or `expand[]=poll_responses` for individual subscriber responses.

Reference: https://developers.beehiiv.com/api-reference/polls/show

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `publicationId` (string, required) — The prefixed ID of the publication object
- `pollId` (string, required) — The prefixed ID of the poll object

### Query parameters

- `expand[]` (list of enum, optional) — Optionally expand the response to include additional data. `stats` - Returns aggregate vote counts per choice and total completions. `poll_responses` - Returns up to 10 most recent subscriber responses. Use /polls/\{pollId}/responses for paginated access to all responses. `trivia_answer` - Returns the correct answer for trivia-type polls.
  - Allowed values: `stats`, `poll_responses`, `trivia_answer`

## Response

### 200

OK

- `data` (Poll, required)

## Errors

### 401 Unauthorized Error

Unauthorized. The API key or OAuth access token is missing, invalid, or expired.

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

### 404 Not Found Error

Resource Not Found

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

### 429 Too Many Requests Error

Rate Limit Exceeded

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

### 500 Internal Server Error

Internal Server Error

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

## Types

### Poll

- `id` (string, required) — The prefixed ID of the poll.
- `name` (string, required) — The name of the poll.
- `question` (string, required) — The poll question text.
- `poll_type` (enum, required) — The type of poll.
  - Allowed values: `voting`, `trivia`
- `status` (enum, required) — The current status of the poll.
  - Allowed values: `draft`, `published`
- `created_at` (integer, required) — The time the poll was created. Measured in seconds since the Unix epoch.
- `poll_choices` (list of PollChoice, required) — The available choices for this poll.
- `description` (string, optional) — An optional description of the poll.
- `trivia_answer` (string, optional) — The correct answer for trivia-type polls. Only included when `expand[]=trivia_answer` is specified and the poll is of type trivia.
- `stats` (PollStats, optional) — Aggregate statistics for the poll. Only included when `expand[]=stats` is specified.
- `total_responses` (integer, optional) — Total number of responses to this poll. Only included when `expand[]=poll_responses` is specified.
- `poll_responses` (list of PollResponseItem, optional) — Up to 10 most recent subscriber responses. Only included when `expand[]=poll_responses` is specified. Use /polls/\{pollId}/responses for paginated access to all responses.

### ErrorDetail

- `message` (string, required)
- `code` (string, required)

### PollChoice

- `id` (string, required) — The unique identifier of the poll choice.
- `label` (string, required) — The text label for this choice.

### PollStats

- `completions` (integer, required) — The total number of responses to this poll.
- `vote_counts` (map from string to integer, required) — A map of poll choice labels to the number of votes each choice received.

### PollResponseItem

- `id` (string, required) — The unique identifier of the poll response.
- `subscription_deleted` (boolean, required) — Whether the associated subscription has been deleted or permanently removed.
- `poll_choice_id` (string, required) — The UUID of the poll choice selected.
- `created_at` (integer, required) — The time the response was created. Measured in seconds since the Unix epoch.
- `subscription_id` (string, optional) — The prefixed ID of the subscription that responded. Null if the subscription has been permanently deleted.
- `poll_choice_label` (string, optional) — The text label of the poll choice selected.
- `extended_feedback` (string, optional) — Optional extended feedback provided by the subscriber.
- `post_id` (string, optional) — The prefixed ID of the post where the response was collected. Only included when `expand[]=post` is specified.
- `post_title` (string, optional) — The title of the post where the response was collected. Only included when `expand[]=post` is specified.
- `post_publish_date` (integer, optional) — The scheduled publication date of the post where the response was collected. Measured in seconds since the Unix epoch. Only included when `expand[]=post` is specified. Null if the post is not yet scheduled.

## Examples

### Example 1

**Response**

```json
{
  "data": {
    "id": "poll_00000000-0000-0000-0000-000000000000",
    "name": "Favorite Color",
    "question": "What is your favorite color?",
    "poll_type": "voting",
    "status": "published",
    "created_at": 1666800076,
    "poll_choices": [
      {
        "id": "00000000-0000-0000-0000-000000000001",
        "label": "Red"
      },
      {
        "id": "00000000-0000-0000-0000-000000000002",
        "label": "Blue"
      },
      {
        "id": "00000000-0000-0000-0000-000000000003",
        "label": "Green"
      }
    ],
    "description": "Choose an answer from the list below."
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/polls/poll_00000000-0000-0000-0000-000000000000"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/polls/poll_00000000-0000-0000-0000-000000000000';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/polls/poll_00000000-0000-0000-0000-000000000000"

	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(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/polls/poll_00000000-0000-0000-0000-000000000000")

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
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/polls/poll_00000000-0000-0000-0000-000000000000")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/polls/poll_00000000-0000-0000-0000-000000000000', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/polls/poll_00000000-0000-0000-0000-000000000000");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/polls/poll_00000000-0000-0000-0000-000000000000")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### With stats and responses

**Response**

```json
{
  "data": {
    "id": "poll_00000000-0000-0000-0000-000000000000",
    "name": "Favorite Color",
    "question": "What is your favorite color?",
    "poll_type": "voting",
    "status": "published",
    "created_at": 1666800076,
    "poll_choices": [
      {
        "id": "00000000-0000-0000-0000-000000000001",
        "label": "Red"
      },
      {
        "id": "00000000-0000-0000-0000-000000000002",
        "label": "Blue"
      },
      {
        "id": "00000000-0000-0000-0000-000000000003",
        "label": "Green"
      }
    ],
    "description": "Choose an answer from the list below.",
    "stats": {
      "completions": 150,
      "vote_counts": {
        "Red": 75,
        "Blue": 50,
        "Green": 25
      }
    },
    "total_responses": 150,
    "poll_responses": [
      {
        "id": "00000000-0000-0000-0000-000000000010",
        "subscription_deleted": false,
        "poll_choice_id": "00000000-0000-0000-0000-000000000001",
        "created_at": 1666800100,
        "subscription_id": "sub_00000000-0000-0000-0000-000000000001",
        "poll_choice_label": "Red",
        "extended_feedback": "I love red!"
      },
      {
        "id": "00000000-0000-0000-0000-000000000011",
        "subscription_deleted": false,
        "poll_choice_id": "00000000-0000-0000-0000-000000000002",
        "created_at": 1666800200,
        "subscription_id": "sub_00000000-0000-0000-0000-000000000002",
        "poll_choice_label": "Blue",
        "extended_feedback": null
      }
    ]
  }
}
```

**SDK Code**

```python With stats and responses
import requests

url = "https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/polls/poll_00000000-0000-0000-0000-000000000000"

querystring = {"expand[]":"[\"stats\",\"poll_responses\"]"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript With stats and responses
const url = 'https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/polls/poll_00000000-0000-0000-0000-000000000000?expand%5B%5D=%5B%22stats%22%2C%22poll_responses%22%5D';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go With stats and responses
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/polls/poll_00000000-0000-0000-0000-000000000000?expand%5B%5D=%5B%22stats%22%2C%22poll_responses%22%5D"

	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(res)
	fmt.Println(string(body))

}
```

```ruby With stats and responses
require 'uri'
require 'net/http'

url = URI("https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/polls/poll_00000000-0000-0000-0000-000000000000?expand%5B%5D=%5B%22stats%22%2C%22poll_responses%22%5D")

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
```

```java With stats and responses
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/polls/poll_00000000-0000-0000-0000-000000000000?expand%5B%5D=%5B%22stats%22%2C%22poll_responses%22%5D")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php With stats and responses
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/polls/poll_00000000-0000-0000-0000-000000000000?expand%5B%5D=%5B%22stats%22%2C%22poll_responses%22%5D', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp With stats and responses
using RestSharp;

var client = new RestClient("https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/polls/poll_00000000-0000-0000-0000-000000000000?expand%5B%5D=%5B%22stats%22%2C%22poll_responses%22%5D");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift With stats and responses
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/polls/poll_00000000-0000-0000-0000-000000000000?expand%5B%5D=%5B%22stats%22%2C%22poll_responses%22%5D")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```