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

# INVALID_API_KEY

> The API key is missing, malformed or not recognized.

`401 Unauthorized` · type `authentication`

**When it happens**

* There's no `Authorization` header, or it doesn't start with `Bearer `.
* The key is truncated or mistyped. Every key carries a checksum, so a typo is caught straight away.
* The key doesn't exist, or its prefix doesn't match its mode.

**What to do**

Check you're sending the whole key, exactly as it was shown when it was created, as `Authorization: Bearer bl_live_...`. A lost key can't be recovered: an agency admin can revoke it and create a new one under **API Keys** in the portal.

## Example

```json 401 Unauthorized theme={null}
{
  "error": {
    "type": "authentication",
    "code": "INVALID_API_KEY",
    "message": "Invalid API key provided.",
    "doc_url": "https://docs.bridgelinepf.com/errors#INVALID_API_KEY",
    "request_id": "req_8fJ2kQ9xLm4TzW7nB3cY5pDv"
  }
}
```

See all [error codes](/errors), or how to [handle errors](/guides/errors).


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