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

# Authentication

> Authenticate every request with your CompanyEnrich API token.

Get your API token from the [CompanyEnrich dashboard](https://app.companyenrich.com), then send it in the `Authorization` header:

```http theme={null}
Authorization: Bearer YOUR_API_TOKEN
```

Both API versions use the same authentication method and base URL: `https://api.companyenrich.com`.

## Verify your token

The current-user endpoint returns your account information, credit balance, and capabilities without consuming credits.

```bash theme={null}
export COMPANYENRICH_API_KEY="YOUR_API_TOKEN"

curl --request GET \
  --url https://api.companyenrich.com/v2/me \
  --header "Authorization: Bearer $COMPANYENRICH_API_KEY"
```

## Use the API playground

On an endpoint page, enter **`Bearer YOUR_API_TOKEN`** in the **Authorization** field, including the `Bearer` prefix. The published OpenAPI specifications define this field as the complete header value.

> [!NOTE]
>
> The playground sends real API requests. Successful billable operations consume credits according to the endpoint's description.

Keep tokens in server-side environment variables or a secret manager. Do not include them in browser code, public repositories, or shared request examples.

See [credits](https://docs.companyenrich.com/docs/credits.md) and [rate limits](https://docs.companyenrich.com/docs/rate-limit.md) before sending requests at scale.


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