List polls
list_pollsFetches polls for a specified publication, with pagination, sorting by creation date or name, and filtering by post. Optionally expand to include stats or responses.
Instructions
List polls. Reads account data. OAuth integrations require polls:read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | **Offset-based pagination (deprecated)**: Page number for offset-based pagination. Please migrate to cursor-based pagination using the `cursor` parameter. If not specified, results 1-10 from page 1 will be returned. | |
| limit | No | A limit on the number of objects to be returned. The limit can range between 1 and 100, and the default is 10. | |
| cursor | No | **Cursor-based pagination (recommended)**: Use this opaque cursor token to fetch the next page of results. When provided, pagination will use cursor-based method which is more efficient and consistent than offset-based pagination. | |
| expand | No | 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. | |
| account | No | Named private account from BEEHIIV_ACCOUNTS. Defaults to BEEHIIV_DEFAULT_ACCOUNT or the first configured account. | |
| post_id | No | Filter to only return polls that were embedded in the specified post. Accepts a prefixed post ID (e.g. `post_abc123`). | |
| order_by | No | The field that the results are sorted by. Defaults to created. `created` - The time the poll was created. `name` - The name of the poll. | created |
| all_pages | No | Read successive cursor pages, bounded by max_items (default 1000). | |
| direction | No | The direction that the results are sorted in. Defaults to asc. `asc` - Ascending, sorts from smallest to largest. `desc` - Descending, sorts from largest to smallest. | asc |
| max_items | No | Maximum records when all_pages=true. Returns continuation cursor and truncation. | |
| publication_id | Yes | The prefixed ID of the publication object |