> For the complete documentation index, see [llms.txt](https://pollz.gitbook.io/pollz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pollz.gitbook.io/pollz/api-reference/polltypes/getall.md).

# getAll()

**`getAll(): Promise<PollType[]>`**

Get a list of all available poll types.

**Returns:**

* A `Promise` resolving to an array of poll type objects (`PollType`).

**Example:**

```javascript
try {
  const pollTypesList = await pollz.pollTypes.getAll();
  console.log('Poll Types List:', pollTypesList);
} catch (error) {
  console.error('Failed to retrieve poll types:', error.message);
}
```

The `getAll` method allows you to retrieve a list of all available poll types. It returns a `Promise` resolving to an array of poll type objects (`PollType`). Each poll type object includes an ID (`id`) and a name (`name`).

This method is useful for providing users with information about the available poll types they can use when creating new polls.
