# Authentication

> Every request carries your API key in the `X-API-Key` header.

```http
GET https://koboterminal.com/api/ngxdata/stocks
X-API-Key: kobo_your_key_here
```

If you cannot set headers (for example in Google Sheets `IMPORTDATA` or a quick browser test), pass it as a query parameter instead:

```
https://koboterminal.com/api/ngxdata/market?api_key=kobo_your_key_here
```

The header is preferred: query strings end up in logs and browser history.

## Getting a key

- **Free:** self-serve at [https://koboterminal.com/api#get-key](https://koboterminal.com/api#get-key), issued straight away. One free key per email.
- **Paid plans:** choose a plan on the same page and pay by card or naira bank transfer. Your key is upgraded in place, so your code does not change.

## Keep your key secret

- Call the API from your server, not from browser JavaScript or a mobile app bundle.
- Store it in an environment variable or secrets manager, never in a public repo.
- If a key leaks, revoke it (`POST /api/keys/revoke` with the key) and request a new one.

## Key format

New keys start with `kobo_`. Keys issued under our former name, NGX Pulse, start with `ngxpulse_` and keep working on koboterminal.com.
