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

# Authentication

> Getting an API key, and sending it.

## Get a key

Create a key on the [API keys page](https://app.leadvector.app/account/api-key) of the LeadVector app. The key is shown once, when you create it: LeadVector keeps only a hash of it, so copy it then. You can delete a key there at any time; it stops working at once.

A key acts as the user who created it: its lookups are that user's, and its campaigns, mailboxes and inbox are that user's own. In a team, lookups spend the credits of the team owner's plan.

## Send it

Put the key in the `x-api-key` header of every request:

```bash theme={null}
curl https://prod.leadvector.app/v1/auth/me \
  -H "x-api-key: YOUR_API_KEY"
```

`GET /v1/auth/me` answers `{ "authenticated": true, "userId": … }` while the key works.

## When a key is refused

| Status | `message` | Why |
| - | - | - |
| 401 | `API_KEY_REQUIRED` | No `x-api-key` header. |
| 401 | `INVALID_API_KEY` | The key is unknown, or was deleted. |
| 403 | `ACCOUNT_DEACTIVATED` | The key's account is deactivated. |
| 403 | `TEAM_DEACTIVATED` | The key's user is in a team whose owner is deactivated. |

Keep keys on your servers. A key in a browser or a mobile app can be read by anyone who uses it.


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