# Uploads

> 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/uploads

Files never travel inside an API call. You announce each file, send its bytes straight to your workspace's storage location at the address you get back, and then name the upload when you check a document, verify an identity or add a policy document. An upload not used within the hour is deleted.

Updated November 30, 2026

## How an upload works

1. Call **Upload files** with each file's name, type, size and MD5 checksum in base64. Up to 100 files at once.
2. `PUT` each file's bytes to its `url` with exactly the `headers` given, within 5 minutes. The storage refuses other bytes.
3. Pass its `upload_id` to [Check a document](https://kontiga.com/docs/documents#check-a-document) or [Add a policy document](https://kontiga.com/docs/policies#add-a-policy-document) within the hour.

## File types and size limits

Each upload's `purpose` sets the file types it takes and its size limit, per file.

What each purpose takes

| Purpose | Files | Largest |
| --- | --- | --- |
| `document` | PDF, JPEG, PNG, HEIC, HEIF, TIFF and WebP | 64 MB |
| `identity` | JPEG, PNG and WebP | 10 MB |
| `policy` | PDF, Word, PowerPoint, Excel, text, Markdown and HTML | 50 MB |

## The upload object

- `id` (string): The upload's id: `upl_` and 32 hex digits. It works only in this workspace.
- `object` (string): Always `upload`.
- `mode` (enum): `live` or `test`: the mode of the key or member that made it. A test upload is never used by a live call, and back.
- `purpose` (enum): `document`, `identity` or `policy`.
- `file_name` (string): The file's name, as you gave it.
- `content_type` (string): The file's type.
- `byte_size` (number): The file's size in bytes.
- `checksum` (string): The MD5 you declared, in base64.
- `state` (enum): `pending` until used, `consumed` once a document, a verification or a policy used it, `deleted` when it was not used within the hour.
- `storage` (object): Where the file is kept: your workspace's storage location.
- `created_by` (object): The member or the API key that made it.
- `created_at` (string): When it was made.
- `expires_at` (string): When it can no longer be used: an hour after it was made.
- `used_by` (object): What used it, once consumed.

## Upload files

Get an address to send each file to, straight into your workspace's storage location, then name the upload when you check a document or add one to a policy. An upload not used within the hour is deleted.

`POST /v1/uploads`. Who may: Owner, Admin and Analyst; Developer in test mode. CLI: `kontiga uploads create <file>... [--purpose <document|identity|policy>]`. MCP tool: `create_uploads`.

**Parameters**
- `purpose` (enum, default "document"): What the files are for. It sets the types and sizes they may have. One of `document`, `identity`, `policy`.
- `files` (array of object, required): 1 to 100 files, each with its `file_name`, `content_type`, `byte_size` and `checksum` (MD5 in base64), and `sha256` in base64 when you have it. The CLI reads all of these from the files you name.

**Returns** list of uploads: One address per file, in the order given, each good for a PUT within 5 minutes; the upload is usable for an hour.

API:

```bash
curl -X POST https://api.kontiga.com/v1/uploads \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "purpose": "document",
    "files": [
      {
        "file_name": "payslip-october-2026.pdf",
        "content_type": "application/pdf",
        "byte_size": 184320,
        "checksum": "c4HqQNNKufm8IDn8S7WG2A=="
      },
      {
        "file_name": "bank-statement-october-2026.pdf",
        "content_type": "application/pdf",
        "byte_size": 402118,
        "checksum": "Wbc2J2W4yXGqODeQdKZMWw=="
      }
    ]
  }'
```

CLI:

```bash
kontiga uploads create --purpose document
```

MCP tool `create_uploads`:

```json
{
  "name": "create_uploads",
  "arguments": {
    "purpose": "document",
    "files": [
      {
        "file_name": "payslip-october-2026.pdf",
        "content_type": "application/pdf",
        "byte_size": 184320,
        "checksum": "c4HqQNNKufm8IDn8S7WG2A=="
      },
      {
        "file_name": "bank-statement-october-2026.pdf",
        "content_type": "application/pdf",
        "byte_size": 402118,
        "checksum": "Wbc2J2W4yXGqODeQdKZMWw=="
      }
    ]
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.uploads.create({
  purpose: "document",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.uploads.create(purpose="document")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Uploads.Create(ctx, &kontiga.UploadsCreateParams{
	Purpose: "document",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.uploads().create(UploadsCreateParams.builder()
    .purpose("document")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Uploads.CreateAsync(new UploadsCreateOptions
{
    Purpose = "document",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->uploads->create([
    'purpose' => 'document',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.uploads.create(purpose: "document")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .uploads()
    .create(kontiga::uploads::CreateParams {
        purpose: "document".into(),
        ..Default::default()
    })
    .await?;
```

Response, 201 Created:

```json
{
  "object": "upload_list",
  "uploads": [
    {
      "upload_id": "upl_5f2c8e1a9b7d4c3e6a0f1b2c3d4e5f60",
      "url": "https://uploads.kontiga.com/eu-west-1/upl_5f2c8e1a9b7d4c3e6a0f1b2c3d4e5f60?X-Signature=7c41e0b9d2",
      "method": "PUT",
      "headers": {
        "Content-Type": "application/pdf",
        "Content-MD5": "c4HqQNNKufm8IDn8S7WG2A=="
      },
      "expires_at": "2026-11-26T09:20:00Z"
    },
    {
      "upload_id": "upl_a3e19c4b7d20f85e6c1b9a4d2f7e3c08",
      "url": "https://uploads.kontiga.com/eu-west-1/upl_a3e19c4b7d20f85e6c1b9a4d2f7e3c08?X-Signature=2e9f63a1c8",
      "method": "PUT",
      "headers": {
        "Content-Type": "application/pdf",
        "Content-MD5": "Wbc2J2W4yXGqODeQdKZMWw=="
      },
      "expires_at": "2026-11-26T09:20:00Z"
    }
  ],
  "expires_in": 300,
  "storage": {
    "region": "eu-west-1",
    "region_name": "Ireland",
    "kind": "regional"
  }
}
```

## Read an upload

Where an upload stands: waiting to be used, used and by what, or deleted, with its file's name, type, size, where it is stored and who made it.

`GET /v1/uploads/{upload_id}`. Who may: Owner, Admin, Analyst and Viewer; Developer in test mode. CLI: `kontiga uploads get <upload_id>`. MCP tool: `get_upload`.

**Parameters**
- `upload_id` (id (upl_), required): The upload to read. Another workspace's upload answers `404`. In the path.

**Returns** upload: The upload, never its bytes.

API:

```bash
curl -X GET https://api.kontiga.com/v1/uploads/upl_5f2c8e1a9b7d4c3e6a0f1b2c3d4e5f60 \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga uploads get upl_5f2c8e1a9b7d4c3e6a0f1b2c3d4e5f60
```

MCP tool `get_upload`:

```json
{
  "name": "get_upload",
  "arguments": {
    "upload_id": "upl_5f2c8e1a9b7d4c3e6a0f1b2c3d4e5f60"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.uploads.get("upl_5f2c8e1a9b7d4c3e6a0f1b2c3d4e5f60");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.uploads.get("upl_5f2c8e1a9b7d4c3e6a0f1b2c3d4e5f60")
```

Go:

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

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.uploads().get("upl_5f2c8e1a9b7d4c3e6a0f1b2c3d4e5f60");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Uploads.GetAsync("upl_5f2c8e1a9b7d4c3e6a0f1b2c3d4e5f60");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->uploads->get('upl_5f2c8e1a9b7d4c3e6a0f1b2c3d4e5f60');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.uploads.get("upl_5f2c8e1a9b7d4c3e6a0f1b2c3d4e5f60")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .uploads()
    .get("upl_5f2c8e1a9b7d4c3e6a0f1b2c3d4e5f60".into())
    .await?;
```

Response, 200 OK:

```json
{
  "id": "upl_5f2c8e1a9b7d4c3e6a0f1b2c3d4e5f60",
  "object": "upload",
  "mode": "live",
  "purpose": "document",
  "file_name": "payslip-october-2026.pdf",
  "content_type": "application/pdf",
  "byte_size": 184320,
  "checksum": "c4HqQNNKufm8IDn8S7WG2A==",
  "state": "consumed",
  "storage": {
    "region": "eu-west-1",
    "region_name": "Ireland",
    "kind": "regional"
  },
  "created_by": {
    "kind": "api_key",
    "id": "key_4Qm8Zt2",
    "name": "Loan origination server"
  },
  "created_at": "2026-11-26T09:15:00Z",
  "expires_at": "2026-11-26T10:15:00Z",
  "used_by": {
    "object": "document",
    "id": "doc_3Xe7Rk1"
  }
}
```
