# Keys and test mode

> Kontiga is document fraud detection by Bynn Intelligence for insurers, letting agents, lenders and HR screening teams: every document is compared with a proprietary library of more than 300 million original documents, gathered over 20 years.

Documentation index: https://kontiga.com/llms.txt

Section: Get started. URL: https://kontiga.com/docs/keys-and-test-mode

Which key to use where, how to send it, and what test mode accepts. A key belongs to one workspace and names no region: every workspace calls the same host.

Updated November 29, 2026

## Send a key

Send the key as a bearer token on `https://api.kontiga.com`. Never put a secret key in a browser, an app or a URL.

```
Authorization: Bearer kt_live_...
```

## Key kinds

Credentials

| Kind | Prefix | Held by | May call |
| --- | --- | --- | --- |
| Secret | `kt_live_` | Your server | Every server route of its workspace, except managing keys. |
| Restricted | `kt_live_` | A server or a device | The routes of its scopes, such as `documents:write`, with an expiry, a daily spend cap and labels. |
| Provisioning | `kt_live_` | Your provisioning server | Only creating, listing, changing and revoking restricted keys. |
| Test | `kt_test_` | A developer | As a secret key, in test mode. |
| Publishable | `kt_pub_` | Code in a page or an app | Only starting an end customer's session, from the exact origins you list. |
| Session token | none | One end customer's browser or app | The one request or verification it was issued for. |

## Test mode

- A test key, or the console's test switch, makes test objects. They never bill and never touch the free start.
- Test mode takes Kontiga's sample documents, sample identities and sample people only. Any other file is refused with `422 test_mode_sample_only`, which lists where the samples are.
- The sample documents: [`sample-payslip-altered.pdf`](https://kontiga.com/samples/sample-payslip-altered.pdf), a payslip whose net pay was changed after it was issued; [`sample-bank-statement-altered.pdf`](https://kontiga.com/samples/sample-bank-statement-altered.pdf), a bank statement with a salary credit added after it was issued; [`sample-invoice-altered.pdf`](https://kontiga.com/samples/sample-invoice-altered.pdf), an invoice whose total and payment account were changed after it was issued.
- A sample is sent like any file: upload it (`POST /v1/uploads`, then `PUT` its bytes to the address given), then check it with `POST /v1/documents` and its `upload_id`. [Check your first document](https://kontiga.com/docs/quickstart) has every step.
- Every result is computed by the real checks, never stored or made up.
- Test and live never mix: not in lists, exports or insights. Test events go only to webhook endpoints registered for test.
- A test request is delivered only to the email addresses of the workspace's members.

> **Every object says its mode.** Each object and each event carries `mode`, `live` or `test`, so a handler can never mistake one for the other.

## Errors

Key errors

| Status | Code | What to do |
| --- | --- | --- |
| 401 | `unauthorized` | Send a valid key in `Authorization: Bearer`. |
| 401 | `key_expired` | The key passed its expiry. Create or roll a key. |
| 403 | `forbidden` | The key's scopes, or your role, do not allow the call. |
| 429 | `rate_limited` | Wait the seconds in `Retry-After`, then retry with the same `Idempotency-Key`. |
