# Authentication

To interact with **Forager.ai's API**, you must authenticate every request using your **API key**. This ensures secure access to our data services.

## Obtaining an API Key

1. **Sign up for an account** at [app.forager.ai](https://app.forager.ai).
2. Navigate to the **API** section.
3. Create and copy your **API Key** – you’ll need this for all API requests.


## Using Your API Key

Forager.ai uses **API key authentication** via the `X-API-KEY` header. You must include this key in all requests to successfully access the API.

### Example: Sending an Authenticated API Request

Below is an example of how to make a request to the **Person Phone Number Lookup API** using `curl` with your API key.

```bash
curl -X POST "https://api-v2.forager.ai/api/{account_id}/datastorage/person_contacts_lookup/phone_numbers/" \
     -H "Content-Type: application/json" \
     -H "X-API-KEY: YOUR_API_KEY" \
     -d '{
           "linkedin_public_identifier": "billgates"
         }'
```

### Explanation

- Replace {account_id} with your Forager.ai account ID.
- Replace YOUR_API_KEY with your actual API key.
- The X-API-KEY header must be included in every request to authenticate.
- The API will return an error if the key is missing or invalid.