> For the complete documentation index, see [llms.txt](https://support.dashworks.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.dashworks.ai/api/authentication.md).

# Authentication

The Dashworks API uses API keys for authentication. This page explains how to use API keys, how to obtain them, and best practices for managing them securely.

## Using API Keys

All API endpoints require authentication using an API key. To authenticate your requests:

1. Include an `Authorization` header in your HTTP request.
2. Set the value to `Bearer {api_key}`, replacing `{api_key}` with your actual API key.

Example:

```http
Authorization: Bearer your_api_key_here
```

If you send an incorrect or deleted API key, you will receive a 401 Unauthorized response.

## Obtaining API Keys

To generate API keys for your workspace:

1. Log in to your Dashworks account.
2. Navigate to [Settings > API Keys](https://web.dashworks.ai/admin/api-keys).
3. Click on the "New API Key" button.

Only Admins can create and manage API keys. API keys are long-lived and do not expire automatically. You can delete API keys at any time by going to Settings > API Keys.

{% hint style="info" %}
If you encounter any issues with authentication or have questions about API key management, please contact our [support team](mailto:undefined).
{% endhint %}
