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.
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.
--jsonis accepted for scripts that pass it. - A refusal prints the API’s error, with its
status,code,message,request_idandissues, and exits with1. 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, any5xxor a lost connection, waiting as long as the API asks, with the same idempotency key, so a write never runs twice.--idempotency-keysets 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 syncfetches the API’s current operations, so a call newer than your CLI still gets a command (under its resource, taking--data).--base-url(orKONTIGA_BASE_URL) points the CLI at another address;--profilepicks another stored key;--timeoutand--max-retrieschange how long each try waits and how many follow.
kontiga auth login
kontiga auth statuskontiga documents check payslip.pdf --reference loan-118
kontiga documents check statement.pdf --no-wait | jq -r .id