Skip to content

ReferenceDevelopers

Bynn-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

Ask about this pageRead this page as Markdown

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
CallWhat it does
POST /v1/documentsSends 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/documentsThe 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_keyThe RSA public key that verifies the document webhooks. No key needed.
GET /v1/echo_with_private_keyChecks a secret key: {"success": true, "vendor": "<workspace name>"}.
GET /v1/echo_with_public_keyThe 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.

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

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.

curl https://api.kontiga.com/compat/v1/documents/7KQH4MZPA \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
List documents
{
  "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
{
  "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
StatustypeWhen
400invalid_request_errorA parameter is wrong; the message names it.
400missing_documentNeither file nor document_base64_strict holds a document.
401authentication_errorNo key, or one that is not a valid secret key. The answer carries WWW-Authenticate.
402insufficient_balanceThe workspace has nothing left to pay for the document.
403ssl_errorThe call came over plain HTTP.
404not_foundNo document with that id in the workspace.
405unknown_requestA path or method the API does not have.
413payload_too_largeThe document is over 64 MB.
415invalid_mime_typeA file type the API does not take.
415invalid_imageA HEIC or HEIF photo that cannot be opened.
429throttleToo many calls; retry_after and the Retry-After header say when to call again.
500processing_errorThe document could not be taken. Try again.
503service_unavailableNot now; call again after Retry-After.
An error
{
  "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.

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).