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

# Authentication

Your API requests are authenticated using your Bugpilot **API Key**. You can get the API Key for your workspace from the Settings page in your [Bugpilot dashboard](https://dash.bugpilot.io/settings/api).

Only a Workspace Owner has access to the API Key. If you're not the owner, you'll need to contact them and ask them to send the Workspace Id and the API Key.

The API Key should start with `ws-` , and it's specific to the Workspace it was generated for.

{% hint style="warning" %}
**API Keys are private** and designed to be used server-side; do not expose your Bugpilot API Key to your users.
{% endhint %}

### Authenticating HTTP Requests

Every request you sent to the HTTP API must have the following HTTP headers. Requests that are missing one of these headers, or contain invalid values, will fail with `401 Unauthorized`. Authentication errors are opaque and will not describe the reason of the failure.

| Header name          | Header value                                                                                         | Required |
| -------------------- | ---------------------------------------------------------------------------------------------------- | -------- |
| `User-Agent`         | `Bugpilot API Client/1.0`                                                                            | Yes      |
| `X-Bugpilot-Api-Key` | The API Key you obtained from your [Bugpilot dashboard page.](https://dash.bugpilot.io/settings/api) | Yes      |
