# Source: https://www.daytona.io/docs/en/api-keys.md

Daytona API keys are used to authenticate requests to the [Daytona API](https://www.daytona.io/docs/en/tools/api.md).

## Create an API key

1. Navigate to [Daytona Dashboard ↗](https://app.daytona.io/dashboard/keys)
2. Click the **Create Key** button
3. Enter the name of the API key, set the expiration date, and [select permissions](#permissions--scopes)
4. Click the **Create** button to create the API key
5. Copy the API key to your clipboard

To use the API key in your application, set the `DAYTONA_API_KEY` environment variable.

Daytona supports multiple options to configure your environment: [in code](https://www.daytona.io/docs/en/configuration.md#configuration-in-code), [environment variables](https://www.daytona.io/docs/en/configuration.md#environment-variables), [.env file](https://www.daytona.io/docs/en/configuration.md#env-file), and [default values](https://www.daytona.io/docs/en/configuration.md#default-values).

## Permissions & Scopes

| Resource   | Scope                   | Description              |
| ---------- | ----------------------- | ------------------------ |
| Sandboxes  | **`write:sandboxes`**   | Create/modify sandboxes  |
|            | **`delete:sandboxes`**  | Delete sandboxes         |
| Snapshots  | **`write:snapshots`**   | Create/modify snapshots  |
|            | **`delete:snapshots`**  | Delete snapshots         |
| Registries | **`write:registries`**  | Create/modify registries |
|            | **`delete:registries`** | Delete registries        |
| Volumes    | **`read:volumes`**      | View volumes             |
|            | **`write:volumes`**     | Create/modify volumes    |
|            | **`delete:volumes`**    | Delete volumes           |
| Audit      | **`read:audit_logs`**   | View audit logs          |
| Regions    | **`write:regions`**     | Create/modify regions    |
|            | **`delete:regions`**    | Delete regions           |
| Runners    | **`read:runners`**      | View runners             |
|            | **`write:runners`**     | Create/modify runners    |
|            | **`delete:runners`**    | Delete runners           |
|            | `delete:runners`        | Delete runners           |