Skip to content

ReferenceDevelopers

CLI

Every action and read of the console from your terminal, a script or a pipeline: kontiga <resource> <verb>, answering the API’s own JSON. It checks a file in one command and waits for the verdict.

Updated

Ask about this pageRead this page as Markdown

Your key

The CLI reads the key from KONTIGA_API_KEY, else from your system’s keychain after kontiga auth login, which asks for it hidden (or reads it from stdin), checks it with the API and stores it. A key is never a flag, so it stays out of your shell history. kontiga auth status shows which key is used and where it came from; kontiga auth logout removes it. A kt_test_ key works in test mode, on Kontiga’s sample documents, and is never billed.

Check a document

kontiga documents check <file> uploads the file exactly as it is, checks it, and waits for its verdict, reading the document until its checks end (5 minutes at most; --wait-timeout changes that). --no-wait answers as soon as the document is received.

Commands

Every action and read of the console is a command, named on its resource’s page beside its API call and MCP tool: kontiga documents list, kontiga webhooks create, kontiga settings get detect. kontiga <resource> --help lists a resource’s commands, and kontiga <resource> <verb> --help shows a command’s arguments, flags and docs link.

How a call's parameters are written
ParameterOn the command line
An id in the pathAn argument, in order: kontiga documents get <document_id>
Any other parameterA flag, its name with hyphens: case_id is --case-id
Yes or no--standalone, or --standalone=false
A list of wordsComma-separated: --events document.checked,document.failed
An object or another listJSON: --metadata '{"transaction":{"amount":1250}}'
Nothing (null)none: --person-id none
Everything at once--data '{...}' or --data @params.json; a flag wins over it
A fileIts path: the CLI reads its name, type, size and checksums

Output and errors

  • The output is the API’s JSON exactly as it was sent, indented, so a script or an agent reads it as the API’s own answer. --json is accepted for scripts that pass it.
  • A refusal prints the API’s error, with its status, code, message, request_id and issues, and exits with 1. One line for a person goes to stderr.
  • A download (kontiga documents download, kontiga documents report) is saved under its own name in the current folder; --output <path> chooses where, and --output - writes it to stdout.
  • Calls are tried again after a 429, any 5xx or a lost connection, waiting as long as the API asks, with the same idempotency key, so a write never runs twice. --idempotency-key sets your own.

Live events

kontiga events tail follows the workspace’s events as they happen, one JSON line each, and picks up after a dropped connection from the last event it printed. --channels and --types narrow it; --once prints the events after --last-event-id and stops.

Anything else

  • kontiga api <METHOD> <path> --data '{...}' calls any route of the API with your key.
  • kontiga sync fetches the API’s current operations, so a call newer than your CLI still gets a command (under its resource, taking --data).
  • --base-url (or KONTIGA_BASE_URL) points the CLI at another address; --profile picks another stored key; --timeout and --max-retries change how long each try waits and how many follow.
Sign in
kontiga auth login
kontiga auth status
Check and wait
kontiga documents check payslip.pdf --reference loan-118
kontiga documents check statement.pdf --no-wait | jq -r .id