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

# invalid_api_key

> 401 · Missing or invalid API key

> [!NOTE]
>
> HTTP status **401** · Retry: **Yes, after fixing the request** · Failed requests never cost credits.

```json 401 response theme={null}
{
  "error": {
    "code": "invalid_api_key",
    "message": "Missing or invalid API key.",
    "hint": "…",
    "docs": "https://docs.appgoat.ai/errors/invalid_api_key"
  }
}
```

## Why

The `x-api-key` header is missing, the key is mistyped, or it was revoked.

## Fix

Send your key in the `x-api-key` header. Create or copy a key in the dashboard at dash.appgoat.ai under API keys.

## Still stuck?

Email [support@appgoat.ai](mailto:support@appgoat.ai) with the endpoint and the time of the request.


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