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

# Generate an API Key

> Create a site-scoped API key for server-side Conversion Tracking events from the Scanova dashboard. Keys are shown once — store them securely.

Each tracking site has its own API keys. A key is scoped to one site — it can only be used to send events for that site's `site_id`.

## Steps

1. Log in to the Scanova dashboard
2. Go to **Integrations → Conversion Tracking**
3. Click on your tracking site to open site details
4. Open the **API Keys** tab
5. Click **Generate API Key**
6. Enter a descriptive name (e.g. `Production Backend`, `Checkout Service`)
7. Click **Generate**
8. **Copy the key immediately** — it is shown only once

<Warning>
  The raw API key is displayed one time only. If you close the dialog without copying it, you will need to revoke the key and generate a new one.
</Warning>

## Store the key securely

Save the key as an environment variable in your backend. Never hardcode it in source code.

```bash theme={null}
# .env
SCANOVA_API_KEY=your_key_here
```

```javascript theme={null}
// Node.js
const apiKey = process.env.SCANOVA_API_KEY;
```

```python theme={null}
# Python
import os
api_key = os.environ['SCANOVA_API_KEY']
```

## Key limits and management

* The dashboard enforces a maximum number of active keys per site
* Revoke unused or compromised keys immediately from the **API Keys** tab
* Create separate keys for different environments (production, staging) so you can rotate them independently

## How to use the key

Include it as a header on every server event request:

```http theme={null}
POST /server-events HTTP/1.1
Host: track.scanova.io
Content-Type: application/json
X-API-Key: YOUR_API_KEY
```

The key must match the `site_id` you include in the request body. A mismatch returns `403`.

## Next step

[Send your first server event →](/conversion-tracking/server/send-events)
