# Bynn-compatible API

> 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: Reference. URL: https://kontiga.com/docs/compatible-api

Bynn's document API and its document webhooks, byte for byte, at https://api.kontiga.com/compat. A client written for Bynn changes its base URL and its key, and nothing else.

Updated November 30, 2026

## Base URL and keys

The base URL is `https://api.kontiga.com/compat`: the same paths, parameters, identifiers, answers, errors, headers and signatures as Bynn's API. Use a Kontiga secret key, live or test, sent any way Bynn takes one: `Authorization: Bearer <key>`, the key as the HTTP Basic user name with an empty password, `Token token=<key>`, or the key alone. A test key makes test documents, never billed.

Endpoints

| Call | What it does |
| --- | --- |
| `POST /v1/documents` | Sends a document to check. `201` at once; the result comes by webhook or `GET`. |
| `GET /v1/documents/{id}` | The document, by its `document_id`, its `submission_id` or the token after `document_`. |
| `GET /v1/documents` | The workspace's documents, live and test, newest first, as Bynn lists them: `search`, `page` (1 to 1000), `per_page` (1 to 100, default 50). |
| `DELETE /v1/documents/{id}` | Takes the document out of the list. It can still be read by its id. |
| `GET /v1/webhooks/public_key` | The RSA public key that verifies the document webhooks. No key needed. |
| `GET /v1/echo_with_private_key` | Checks a secret key: `{"success": true, "vendor": "<workspace name>"}`. |
| `GET /v1/echo_with_public_key` | The same for a publishable key. |

Any other path or method answers `405 unknown_request`.

## Send a document

Send the file as `file` in a multipart form, or its bytes as `document_base64_strict`, with an optional `reference_id` of yours (no personal data in it) and optional `characteristics`. Up to 64 MB. The file's type is read from its bytes: a PDF, a JPEG, a PNG, or a HEIC or HEIF photo. Other types answer `415 invalid_mime_type`, TIFF and WebP included, as on Bynn's API; Kontiga's own API takes those two.

**Send a PDF**

curl:

```bash
curl https://api.kontiga.com/compat/v1/documents \
  -u "$KONTIGA_API_KEY:" \
  -F file=@bank-statement-may.pdf \
  -F reference_id=claim-2026-1042
```

201:

```json
{
  "submission_id": "document_1112pT7wKcR3aBdEfGhJkLmN",
  "document_id": "7KQH4MZPA",
  "status": "received",
  "jwt": null
}
```

## Read the result

While the document is checked, `status` is `pending`; then `analyzed`, with `analysis_risk_status` and `analysis_risk_score`, or `error` if it could not be checked. The answer is the whole document object as Bynn sends it, its findings by name in `risk_tags`; the sample shows some of its fields.

**Get a document**

curl:

```bash
curl https://api.kontiga.com/compat/v1/documents/7KQH4MZPA \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

200:

```json
{
  "submission_id": "document_1112pT7wKcR3aBdEfGhJkLmN",
  "request_id": "7KQH4MZPA",
  "type": "document",
  "document_content_type": "bank_statement",
  "status": "analyzed",
  "matching_original": { "id": null, "name": null, "risk_level": null },
  "analysis_risk_status": "low",
  "analysis_risk_score": 10,
  "name": "bank-statement-may.pdf",
  "reference_id": "claim-2026-1042",
  "created_at": "2026-11-30T09:41:22Z",
  "updated_at": "2026-11-30T09:41:58Z",
  "original_file_url": "https://files.kontiga.com/...",
  "media": [{ "document_type": "original", "name": "bank-statement-may.pdf", "page": 1, "version": 0, "file_url": "https://files.kontiga.com/..." }]
}
```

**List documents**

```json
{
  "documents": [
    {
      "submission_id": "document_1112pT7wKcR3aBdEfGhJkLmN",
      "document_id": "7KQH4MZPA",
      "name": "bank-statement-may.pdf",
      "reference_id": "claim-2026-1042",
      "status": "analyzed",
      "analysis_risk_status": "low",
      "analysis_risk_score": 10,
      "document_content_type": "bank_statement",
      "created_at": "2026-11-30T09:41:22Z"
    }
  ],
  "page": 1, "per_page": 50, "total": 1, "total_pages": 1
}
```

**Delete a document**

```json
{
  "submission_id": "document_1112pT7wKcR3aBdEfGhJkLmN",
  "document_id": "7KQH4MZPA",
  "status": "deleted",
  "deleted_at": "2026-11-30T10:02:41Z"
}
```

## Errors

Every error is `{"error": {"type", "message"}}` with its HTTP status, as on Bynn's API.

Errors

| Status | type | When |
| --- | --- | --- |
| 400 | `invalid_request_error` | A parameter is wrong; the message names it. |
| 400 | `missing_document` | Neither `file` nor `document_base64_strict` holds a document. |
| 401 | `authentication_error` | No key, or one that is not a valid secret key. The answer carries `WWW-Authenticate`. |
| 402 | `insufficient_balance` | The workspace has nothing left to pay for the document. |
| 403 | `ssl_error` | The call came over plain HTTP. |
| 404 | `not_found` | No document with that id in the workspace. |
| 405 | `unknown_request` | A path or method the API does not have. |
| 413 | `payload_too_large` | The document is over 64 MB. |
| 415 | `invalid_mime_type` | A file type the API does not take. |
| 415 | `invalid_image` | A HEIC or HEIF photo that cannot be opened. |
| 429 | `throttle` | Too many calls; `retry_after` and the `Retry-After` header say when to call again. |
| 500 | `processing_error` | The document could not be taken. Try again. |
| 503 | `service_unavailable` | Not now; call again after `Retry-After`. |

**An error**

```json
{
  "error": {
    "type": "invalid_mime_type",
    "message": "Unsupported media type, allowed mime types are 'image/jpeg','image/jpg','image/png','image/heic','image/heif','application/pdf'"
  }
}
```

## Limits

500 calls a minute from one address to one path, so reading many documents never shares a count; 10 a minute for each echo and 60 for the public key.

## Webhooks

A webhook endpoint in the compatible format gets `document.analyzed`, `document.rejected` and `document.monitoring_event` exactly as Bynn sends them: the body with its `jwt`, the headers and `X-Bynn-Signature`, the retries. They are signed with Kontiga's key, which `GET /v1/webhooks/public_key` gives. A document whose check fails sends no compatible event; a Kontiga endpoint gets `document.failed`. See [Receive webhooks](https://kontiga.com/docs/guides/receive-webhooks).

## What differs from Bynn

- Keys and documents are Kontiga's: a Bynn key or a document id from Bynn is not found here.
- Webhooks are signed with Kontiga's key. A client that fetches the public key from its base URL needs no change; one that stored Bynn's key fetches Kontiga's once.
- The `401` message points to Kontiga's console and these docs.
- A document past its workspace's retention is still read by its id, with its extracted data empty and no file links.
- Three findings about files that could not be read in full carry plain titles and descriptions.
- A few fields that only described internal settings are `null`.
- A base64 document is held to 64 MB once decoded, as a file is.
- There is no anonymous upload (`POST /v1/documents_anonym`).

> **Switching from Bynn?** The [switch guide](https://kontiga.com/docs/guides/switch-from-bynn) takes you through it in four steps.
