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

# Authentication

> How to use Project API Tokens safely.

Send a Bearer token on protected routes:

```http theme={null}
Authorization: Bearer pat_PROJECT_TOKEN
```

## Project API Tokens

Project API Tokens are the public integration credential for project data API calls.

| Token             | Prefix | Purpose                                                      |
| ----------------- | -----: | ------------------------------------------------------------ |
| Project API Token | `pat_` | Long-lived backend/server token for one project's API calls. |

<Warning>
  Project API Tokens have full database power inside their project. Store them like database passwords.
</Warning>

## Creating and rotating tokens

The usual path is the ZangTable admin panel: log in at [https://zangtable.com](https://zangtable.com), open a project, and create a token from the project's API Tokens area.

Server-side token-management endpoints also exist for trusted automation. Use them only from a backend that already has a project credential allowed to manage API tokens. Creating a new Project API Token adds another active token; existing Project API Tokens keep working until you explicitly revoke them.

## Error behavior

* Missing Bearer token returns `401 missing_authorization`.
* Expired, revoked, inactive, or unknown tokens return `401 invalid_token`.
* Token creation through the API requires an existing project credential that is allowed to manage API tokens.

## Token management endpoints

<CardGroup cols={2}>
  <Card title="List tokens" icon="list" href="/reference/auth/list-tokens" />

  <Card title="Create Project API Token" icon="key" href="/reference/auth/create-project-api-token" />

  <Card title="Test token" icon="vial" href="/reference/auth/test-token" />

  <Card title="Delete token" icon="trash" href="/reference/auth/delete-token" />
</CardGroup>
