> ## Documentation Index
> Fetch the complete documentation index at: https://api.pollunit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Welcome to PollUnit

> Programmatic access to PollUnit — create, manage, and read polls via the API.

## Overview

PollUnit lets you create and manage polls, surveys, and voting pages programmatically. This documentation covers everything you need to get started with the API.

<CardGroup cols={2}>
  <Card title="API Reference" icon="code" href="/api-reference/polls/list-polls">
    Explore every endpoint, request, and response schema.
  </Card>
</CardGroup>

## Authentication

Every request must include a personal API token as a `Bearer` token in the `Authorization` header. You have two tokens available:

<CardGroup cols={2}>
  <Card title="Private token" icon="lock">
    Full access — create, update, and delete polls. Keep this secret.
  </Card>

  <Card title="Public token" icon="eye">
    Read-only — safe to embed in client-side code.
  </Card>
</CardGroup>

Find both tokens under **My Account → API** in your PollUnit dashboard.

## Organizations

Every endpoint accepts an optional `organization_id` query parameter. It takes the `public_id` of an organization you belong to and runs the request in that organization's context — new polls are owned by the organization and listings are scoped to it.

Omit `organization_id` (or leave it blank) to act as your **personal account**. Passing the `public_id` of an organization you don't have access to returns `401 Unauthorized`.

## Next steps

<Steps>
  <Step title="Get your API token">
    Log in to PollUnit and copy your private or public token from Account settings.
  </Step>

  <Step title="Make a request">
    Try listing your polls with a `GET` request to `/api/v1/polls`.
  </Step>

  <Step title="Explore the reference">
    Browse the full [API Reference](/api-reference/polls/list-polls) for all available endpoints.
  </Step>
</Steps>
