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

# Authentication

> Generate API tokens, understand token scopes, and securely authenticate API requests.

All requests to the Snapsec API require Bearer token authentication in the `Authorization` header.

```http theme={null}
Authorization: Bearer <YOUR_API_TOKEN>
```

***

## Generating API Keys

1. Navigate to **Administration > API Keys**.
2. Click **Generate New Key**.
3. Select the key type:
   * **Personal Access Token (PAT)**: Inherits the permissions of the creating user.
   * **Service Account Key**: Scoped token intended for CI/CD pipelines, automation scripts, and SIEM forwarders.
4. Set token scopes (e.g., `findings:read`, `scans:trigger`, `assets:write`).
5. Copy the generated secret immediately. Tokens are displayed only once.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.