# Case files

> 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/case-files

Take a case's files out of Kontiga, or put files into it. Download every document as it was received in one ZIP, or the case report as a PDF in your brand. Add documents for a party yourself, and each is checked like any upload. Every download lands on the case's timeline with who made it.

Updated November 30, 2026

## Links to files

A download answers a link to the file, not the file itself. The link works for a few minutes and only for this file; read the call again for a fresh one. Documents stay in your workspace's storage location throughout.

## Download all documents

Whatever your workspace calls them on screen, the API, CLI, MCP and webhooks say case and cases. Every document of the case in one ZIP file, as each was received, with data.json holding the case's facts and collected values.

`GET /v1/cases/{case_id}/documents.zip`. Who may: Owner, Admin, Analyst and Viewer; Developer in test mode. CLI: `kontiga cases download <case_id> [--output <path>]`. MCP tool: `download_case_documents`.

**Parameters**
- `case_id` (id (case_), required): The case whose documents to download. In the path.

**Returns** file: The ZIP file: data.json and documents/<n>_<file name>. At most 100 documents and 500 MB.

API:

```bash
curl -X GET https://api.kontiga.com/v1/cases/case_7Kq2Xw9/documents.zip \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga cases download case_7Kq2Xw9
```

MCP tool `download_case_documents`:

```json
{
  "name": "download_case_documents",
  "arguments": {
    "case_id": "case_7Kq2Xw9"
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.cases.downloadDocuments("case_7Kq2Xw9");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.cases.download_documents("case_7Kq2Xw9")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Cases.DownloadDocuments(ctx, "case_7Kq2Xw9")
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.cases().downloadDocuments("case_7Kq2Xw9");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Cases.DownloadDocumentsAsync("case_7Kq2Xw9");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->cases->downloadDocuments('case_7Kq2Xw9');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.cases.download_documents("case_7Kq2Xw9")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .cases()
    .download_documents("case_7Kq2Xw9".into())
    .await?;
```

Response, 200 OK:

```json
{
  "object": "file",
  "url": "https://files.kontiga.com/v1/case_7Kq2Xw9/documents.zip?expires=1764146400&signature=9f3c1e7a2b",
  "file_name": "APP-20418-documents.zip",
  "content_type": "application/zip"
}
```

### Inside the ZIP

- `data.json`: the case's facts and every value it collected, as [Case data](https://kontiga.com/docs/case-data) answers them.
- `documents/<n>_<file name>`: each document as it was received, numbered in the order it arrived.
- At most 100 documents and 500 MB. The link works for a few minutes; ask again for a fresh one.

**data.json**

```json
{
  "case": {
    "id": "case_7Kq2Xw9",
    "reference": "APP-20418",
    "title": "Mortgage application, 14 Harbour Row",
    "state": "decided",
    "outcome": "approved",
    "created_at": "2026-11-24T09:12:40Z",
    "decided_at": "2026-11-26T08:41:07Z"
  },
  "values": [
    {
      "key": "applicant.email",
      "label": "Email",
      "value": "clara.whelan@mail.example",
      "source": "party"
    },
    {
      "key": "answers.loan_amount",
      "label": "Loan amount",
      "value": "412000.00",
      "source": "answer"
    }
  ]
}
```

## Download the case report

Whatever your workspace calls them on screen, the API, CLI, MCP and webhooks say case and cases. The case report as a PDF in the workspace's brand: the outcome and who decided, each party's verified facts, ID document and selfie results, the findings, the latest events and the ID pictures.

`GET /v1/cases/{case_id}/report`. Who may: Owner, Admin, Analyst and Viewer; Developer in test mode. CLI: `kontiga cases report <case_id> [--include-identity-images <true|false>] [--output <path>]`. MCP tool: `download_case_report`.

**Parameters**
- `case_id` (id (case_), required): The case to report on. In the path.
- `include_identity_images` (boolean, default true): `false` leaves out the pictures of the ID and the selfie. They are in when left out.

**Returns** file: The report as a PDF.

API:

```bash
curl -X GET "https://api.kontiga.com/v1/cases/case_7Kq2Xw9/report?include_identity_images=false" \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga cases report case_7Kq2Xw9 \
  --include-identity-images=false
```

MCP tool `download_case_report`:

```json
{
  "name": "download_case_report",
  "arguments": {
    "case_id": "case_7Kq2Xw9",
    "include_identity_images": false
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.cases.report("case_7Kq2Xw9", {
  include_identity_images: false,
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.cases.report("case_7Kq2Xw9", include_identity_images=False)
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Cases.Report(ctx, "case_7Kq2Xw9", &kontiga.CasesReportParams{
	IncludeIdentityImages: false,
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.cases().report("case_7Kq2Xw9", CasesReportParams.builder()
    .includeIdentityImages(false)
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Cases.ReportAsync("case_7Kq2Xw9", new CasesReportOptions
{
    IncludeIdentityImages = false,
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->cases->report('case_7Kq2Xw9', [
    'include_identity_images' => false,
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.cases.report("case_7Kq2Xw9", include_identity_images: false)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .cases()
    .report("case_7Kq2Xw9".into(), kontiga::cases::ReportParams {
        include_identity_images: false,
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "file",
  "url": "https://files.kontiga.com/v1/case_7Kq2Xw9/report.pdf?expires=1764146400&signature=4d8b2a6f1c",
  "file_name": "APP-20418-case-report.pdf",
  "content_type": "application/pdf"
}
```

The report holds the outcome and its reasons, who decided and when, each party's verified facts, the ID document's data, the face match and liveness results, the findings in plain words, the 10 latest events and, unless you leave them out, the ID pictures.

## Add documents to the case

Whatever your workspace calls them on screen, the API, CLI, MCP and webhooks say case and cases. Upload up to 10 files to a case for one of its parties (PDF, JPEG or PNG, 64 MB each); each is checked like any upload and can answer an item of their checklist.

`POST /v1/cases/{case_id}/documents/uploads`. Who may: Owner, Admin and Analyst; Developer in test mode. CLI: `kontiga cases upload <case_id> <file>... --party-id <party_id> [--item-id <item_id>]`. MCP tool: `upload_case_documents`.

**Parameters**
- `case_id` (id (case_), required): The case to add the documents to. In the path.
- `party_id` (id (pty_), required): The party the documents belong to.
- `item_id` (id (itm_)): An item of the party's checklist the files answer. It becomes received whatever the check finds: you decide. When it was the last required item, the request completes.
- `files` (array of object, required): 1 to 10 files, each a PDF or a photo (JPEG, PNG, HEIC, HEIF, TIFF or WebP) of up to 64 MB, each with the `upload_id` of the upload its bytes went to ([Upload a file](https://kontiga.com/docs/uploads)). The CLI uploads each file and reads its name, type and size from the file itself.

**Returns** uploaded documents: The new documents, received and being checked; their results arrive by event.

API:

```bash
curl -X POST https://api.kontiga.com/v1/cases/case_7Kq2Xw9/documents/uploads \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "party_id": "pty_9Hd4Vb1",
    "item_id": "itm_2Gc7Mx4",
    "files": [
      {
        "file_name": "employment-contract-page-1.pdf",
        "content_type": "application/pdf",
        "byte_size": 218734,
        "upload_id": "upl_3f8a1c6e9b2d4f7a8c1e5b9d2a6f4c3e"
      },
      {
        "file_name": "employment-contract-page-2.pdf",
        "content_type": "application/pdf",
        "byte_size": 196402,
        "upload_id": "upl_7b2e9d4a1c6f4e8b9a3d5c7e1f2b4a6d"
      }
    ]
  }'
```

CLI:

```bash
kontiga cases upload case_7Kq2Xw9 \
  --party-id pty_9Hd4Vb1 \
  --item-id itm_2Gc7Mx4
```

MCP tool `upload_case_documents`:

```json
{
  "name": "upload_case_documents",
  "arguments": {
    "case_id": "case_7Kq2Xw9",
    "party_id": "pty_9Hd4Vb1",
    "item_id": "itm_2Gc7Mx4",
    "files": [
      {
        "file_name": "employment-contract-page-1.pdf",
        "content_type": "application/pdf",
        "byte_size": 218734,
        "upload_id": "upl_3f8a1c6e9b2d4f7a8c1e5b9d2a6f4c3e"
      },
      {
        "file_name": "employment-contract-page-2.pdf",
        "content_type": "application/pdf",
        "byte_size": 196402,
        "upload_id": "upl_7b2e9d4a1c6f4e8b9a3d5c7e1f2b4a6d"
      }
    ]
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";
import { openAsBlob } from "node:fs";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.cases.uploadDocuments("case_7Kq2Xw9", {
  file: await openAsBlob("case_7Kq2Xw9"),
  party_id: "pty_9Hd4Vb1",
  item_id: "itm_2Gc7Mx4",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.cases.upload_documents(
    "case_7Kq2Xw9",
    file=open("case_7Kq2Xw9", "rb"),
    party_id="pty_9Hd4Vb1",
    item_id="itm_2Gc7Mx4",
)
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Cases.UploadDocuments(ctx, "case_7Kq2Xw9", &kontiga.CasesUploadDocumentsParams{
	File:    kontiga.FileFromPath("case_7Kq2Xw9"),
	PartyId: "pty_9Hd4Vb1",
	ItemId:  "itm_2Gc7Mx4",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.cases().uploadDocuments("case_7Kq2Xw9", CasesUploadDocumentsParams.builder()
    .file(Path.of("case_7Kq2Xw9"))
    .partyId("pty_9Hd4Vb1")
    .itemId("itm_2Gc7Mx4")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Cases.UploadDocumentsAsync("case_7Kq2Xw9", new CasesUploadDocumentsOptions
{
    File = File.OpenRead("case_7Kq2Xw9"),
    PartyId = "pty_9Hd4Vb1",
    ItemId = "itm_2Gc7Mx4",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->cases->uploadDocuments('case_7Kq2Xw9', [
    'file' => fopen('case_7Kq2Xw9', 'r'),
    'party_id' => 'pty_9Hd4Vb1',
    'item_id' => 'itm_2Gc7Mx4',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.cases.upload_documents(
  "case_7Kq2Xw9",
  file: File.open("case_7Kq2Xw9"),
  party_id: "pty_9Hd4Vb1",
  item_id: "itm_2Gc7Mx4"
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .cases()
    .upload_documents("case_7Kq2Xw9".into(), kontiga::cases::UploadDocumentsParams {
        file: kontiga::File::open("case_7Kq2Xw9").await?,
        party_id: "pty_9Hd4Vb1".into(),
        item_id: "itm_2Gc7Mx4".into(),
        ..Default::default()
    })
    .await?;
```

Response, 201 Created:

```json
{
  "object": "uploaded_documents",
  "document_ids": ["doc_9Cq4Ws7", "doc_1Ym6Bh3"]
}
```

Each new document starts as received and is checked like any upload. Its verdict, findings and scores arrive by the `document.checked_fast` and `document.checked` events; read it any time with [Read a document](https://kontiga.com/docs/documents#read-a-document).
