Developers · Authentication
One header, two kinds of key.
Every request carries the key as a Bearer token. The same keys work on v1, v2 and v3. Keys are stored as SHA-256 hashes; a key is shown once, when it is created.
The header
POST /api/v3/validate Host: www.invoicenavigator.eu Authorization: Bearer sk_live_… Content-Type: application/json
Without the header the request is rejected with 401 UNAUTHORIZED before it reaches the engine. The Bearer header also exempts the call from the browser CSRF check, so server-to-server calls need nothing else.
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Missing Authorization header. Use: Authorization: Bearer YOUR_API_KEY"
}
}Key prefixes
| Prefix | Issued | Behaviour |
|---|---|---|
| sk_live_ | Free key without an account, or on sign-up. | Metered: 100 calls a month on the free key (60 an hour), 5,000 on Developer (100 an hour). A call counts when the API answered it (2xx or 422). v1/v2 store the validation or flow record; v3 stores no invoice content. |
| sk_test_ | Next to every live key; also without an account. | Same engine, not metered, 100 requests an hour; the instant key stops after 10 requests. Responses carry X-Test-Mode: true and meta.testMode. v1/v2 store no flow for them, so no fixWithInput follow-up. |
Details on the test keys under Test keys.
Getting a key
- 00
- A permanent free key without an account: POST /api/developers/free-key. 100 calls a month, at most 3 keys per address a day. Shown once. Upgrade the same key at /developers/upgrade.
curl -s -X POST https://www.invoicenavigator.eu/api/developers/free-key \ -H "Content-Type: application/json" -d '{}' | jq -r .apiKey # store it now — it is shown once; then: export INVOICE_NAVIGATOR_KEY=sk_live_… - 01
- A test key without an account: POST /api/developers/instant-key. 10 requests, one hour.
curl -s -X POST https://www.invoicenavigator.eu/api/developers/instant-key | jq -r .apiKey
- 02
- With an account: sign up, then Dashboard → API. A live and a test key are created together; both can be regenerated there. No card is needed for the free key.
- 03
- Keep the key in an environment variable on the server. It must not appear in browser code or a repository; revoke and regenerate it if it does.
Authentication errors
| Status | Code | When |
|---|---|---|
| 401 | UNAUTHORIZED | No Bearer header, or the key is unknown. |
| 401 | KEY_EXPIRED | An instant test key past its hour. |
| 402 | QUOTA_EXCEEDED | Monthly calls used up (Free 100, Developer 5,000; resets on the 1st, UTC), or the 10 instant-key requests. details.upgradeUrl is a checkout link for that key. |
| 403 | KEY_INACTIVE | The key was revoked. |
| 403 | INSUFFICIENT_TIER | A Team-only v1 endpoint (batch, evidence-pack, convert) called with a Free or Developer-plan key. |
| 429 | RATE_LIMITED | Too many requests in the sliding hour. Retry-After is set. |
The complete contract, including headers and what to retry, is in the API reference.