# Workspace settings

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

The rules a workspace runs by: its name, industry, time zone and owner, the products its console shows, single sign-on, alerts, where its data is kept and for how long, the tools it connects to, the words its team uses for people and cases, when cases are due, who approves a decision, and how People recognises one person. Every change is written to the activity log with its value before and after.

Updated December 1, 2026

## Contents

- [General](https://kontiga.com/docs/settings#general)
- [Read the general settings](https://kontiga.com/docs/settings#read-the-general-settings)
- [Change the general settings](https://kontiga.com/docs/settings#change-the-general-settings)
- [Upload the workspace logo](https://kontiga.com/docs/settings#upload-the-workspace-logo)
- [Remove the workspace logo](https://kontiga.com/docs/settings#remove-the-workspace-logo)
- [Transfer ownership](https://kontiga.com/docs/settings#transfer-ownership)
- [Delete the workspace](https://kontiga.com/docs/settings#delete-the-workspace)
- [Cancel the deletion](https://kontiga.com/docs/settings#cancel-the-deletion)
- [Products](https://kontiga.com/docs/settings#products)
- [Read the workspace's products](https://kontiga.com/docs/settings#read-the-workspace-products)
- [Choose the workspace's products](https://kontiga.com/docs/settings#choose-the-workspace-products)
- [Single sign-on](https://kontiga.com/docs/settings#single-sign-on)
- [Read the sign-in settings](https://kontiga.com/docs/settings#read-the-sign-in-settings)
- [Change the sign-in settings](https://kontiga.com/docs/settings#change-the-sign-in-settings)
- [Test single sign-on](https://kontiga.com/docs/settings#test-single-sign-on)
- [List single sign-on attempts](https://kontiga.com/docs/settings#list-single-sign-on-attempts)
- [Activity log](https://kontiga.com/docs/settings#activity-log)
- [Read the activity log](https://kontiga.com/docs/settings#read-the-activity-log)
- [Alerts and notices](https://kontiga.com/docs/settings#alerts-and-notices)
- [List the alert rules](https://kontiga.com/docs/settings#list-the-alert-rules)
- [Add an alert rule](https://kontiga.com/docs/settings#add-an-alert-rule)
- [Change an alert rule](https://kontiga.com/docs/settings#change-an-alert-rule)
- [Delete an alert rule](https://kontiga.com/docs/settings#delete-an-alert-rule)
- [Read the notice defaults](https://kontiga.com/docs/settings#read-the-notice-defaults)
- [Change a notice default](https://kontiga.com/docs/settings#change-a-notice-default)
- [Data and storage](https://kontiga.com/docs/settings#data-and-storage)
- [Read the data settings](https://kontiga.com/docs/settings#read-the-data-settings)
- [Change retention](https://kontiga.com/docs/settings#change-retention)
- [Change where files are stored](https://kontiga.com/docs/settings#change-where-files-are-stored)
- [Integrations](https://kontiga.com/docs/settings#integrations)
- [List the integrations](https://kontiga.com/docs/settings#list-the-integrations)
- [Connect an integration](https://kontiga.com/docs/settings#connect-an-integration)
- [Disconnect an integration](https://kontiga.com/docs/settings#disconnect-an-integration)
- [Browse a connected storage](https://kontiga.com/docs/settings#browse-a-connected-storage)
- [List the watched folders](https://kontiga.com/docs/settings#list-the-watched-folders)
- [Watch a folder](https://kontiga.com/docs/settings#watch-a-folder)
- [Change a watched folder](https://kontiga.com/docs/settings#change-a-watched-folder)
- [Stop watching a folder](https://kontiga.com/docs/settings#stop-watching-a-folder)
- [Read an integration](https://kontiga.com/docs/settings#read-an-integration)
- [List a watched folder's files](https://kontiga.com/docs/settings#list-a-watched-folders-files)
- [Import a file again](https://kontiga.com/docs/settings#import-a-file-again)
- [Cases and approvals](https://kontiga.com/docs/settings#cases-and-approvals)
- [Read the case rules](https://kontiga.com/docs/settings#read-the-case-rules)
- [Change the case rules](https://kontiga.com/docs/settings#change-the-case-rules)
- [List the second approver rules](https://kontiga.com/docs/settings#list-the-second-approver-rules)
- [Add a second approver rule](https://kontiga.com/docs/settings#add-a-second-approver-rule)
- [Change a second approver rule](https://kontiga.com/docs/settings#change-a-second-approver-rule)
- [Delete a second approver rule](https://kontiga.com/docs/settings#delete-a-second-approver-rule)
- [People](https://kontiga.com/docs/settings#people)
- [Read the registry rules](https://kontiga.com/docs/settings#read-the-registry-rules)
- [Change the registry rules](https://kontiga.com/docs/settings#change-the-registry-rules)

## General

The workspace's name, website, industry, time zone, currency and logo, who owns it, and its deletion. The time zone sets the working calendar and the day summaries; each member still sees times in their own time zone ([preferences](https://kontiga.com/docs/account#change-your-preferences)).

- `workspace_id` (string): The workspace's id, starting with `ws_`.
- `slug` (string): Set when the workspace is created and never changed. It ends the single sign-on address.
- `website` (string): The company's website, starting with `https://`. `null` when not given.
- `industry` (enum): What the company does, such as `insurance`, `real_estate` or `lending`. `null` when not given. The setup asks it and uses it to suggest the words for [people](#read-the-registry-rules) and [cases](#read-the-case-rules); changing it never changes a word your team chose.
- `time_zone` (string): An IANA time zone, such as `Europe/Amsterdam`.
- `currency` (enum): The currency members type amounts in: `EUR`, `GBP` or `USD`.
- `storage` (object): Where files are stored: the region the workspace chooses, in Kontiga's storage or a bucket of its own. Records are kept in the EU.
- `deletion` (object): A deletion asked for and not done yet: the date everything is purged, when it was asked for and by whom. `null` when none is scheduled.

**General settings**

```json
{
  "object": "general_settings",
  "workspace_id": "ws_8Rq4Lm2",
  "name": "Brightwater Lending",
  "slug": "brightwater-lending",
  "website": "https://brightwater.example",
  "industry": "lending",
  "time_zone": "Europe/Amsterdam",
  "currency": "EUR",
  "logo": null,
  "storage": {
    "kind": "regional",
    "region": "eu-west-1",
    "region_name": "Ireland"
  },
  "owner_id": "mem_9Wd2Hc5",
  "created_at": "2026-09-14T08:12:00Z",
  "deletion": null
}
```

## Read the general settings

The workspace's name, slug, time zone, default currency and logo, where its files are stored, and a deletion if one is scheduled.

`GET /v1/settings/general`. Who may: Owner, Admin, Analyst, Developer, Viewer and Billing. CLI: `kontiga settings general get`. MCP tool: `get_general_settings`.

**Parameters**

**Returns** general settings: The workspace's name, time zone, currency, logo and storage location.

API:

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

CLI:

```bash
kontiga settings general get
```

MCP tool `get_general_settings`:

```json
{
  "name": "get_general_settings",
  "arguments": {}
}
```

TypeScript:

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

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

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.general_settings.get()
```

Go:

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

Java:

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

.NET:

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

PHP:

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

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.general_settings.get
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .general_settings()
    .get()
    .await?;
```

Response, 200 OK:

```json
{
  "object": "general_settings",
  "workspace_id": "ws_8Rq4Lm2",
  "name": "Brightwater Lending",
  "slug": "brightwater-lending",
  "website": "https://brightwater.example",
  "industry": "lending",
  "time_zone": "Europe/Amsterdam",
  "currency": "EUR",
  "logo": null,
  "storage": {
    "kind": "regional",
    "region": "eu-west-1",
    "region_name": "Ireland"
  },
  "owner_id": "mem_9Wd2Hc5",
  "created_at": "2026-09-14T08:12:00Z",
  "deletion": null
}
```

## Change the general settings

Rename the workspace, change the time zone its dates and summaries use or the currency members type amounts in, or say the company's website and industry.

`PATCH /v1/settings/general`. Who may: Owner and Admin. CLI: `kontiga settings general set [--name <text>] [--time-zone <IANA zone>] [--currency <EUR|GBP|USD>] [--website <https://...|none>] [--industry <industry|none>]`. MCP tool: `update_general_settings`.

**Parameters**
- `name` (string): The workspace's new name, as members and end customers see it. At most 80 characters.
- `time_zone` (string): An IANA time zone. It sets the working calendar and the day summaries. At most 64 characters.
- `currency` (enum): The currency members type amounts in, on cases and in approval rules. One of `EUR`, `GBP`, `USD`.
- `website` (string or null): The company's website, starting with `https://`, or `null` to clear it.
- `industry` (enum): What the company does, or `null` to clear it. One of `retail_banking`, `insurance`, `lending`, `payments`, `crypto`, `wealth_management`, `gaming`, `border_protection`, `airport_security`, `government_id`, `customs`, `public_benefits`, `healthcare`, `pharmacies`, `education`, `employment`, `real_estate`, `travel`, `ecommerce`, `telecom`, `saas`, `other`. `null` clears it.

**Returns** general settings: The general settings, changed.

API:

```bash
curl -X PATCH https://api.kontiga.com/v1/settings/general \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "time_zone": "Europe/Amsterdam",
    "currency": "EUR",
    "industry": "lending"
  }'
```

CLI:

```bash
kontiga settings general set \
  --time-zone Europe/Amsterdam \
  --currency EUR \
  --industry lending
```

MCP tool `update_general_settings`:

```json
{
  "name": "update_general_settings",
  "arguments": {
    "time_zone": "Europe/Amsterdam",
    "currency": "EUR",
    "industry": "lending"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.generalSettings.update({
  time_zone: "Europe/Amsterdam",
  currency: "EUR",
  industry: "lending",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.general_settings.update(
    time_zone="Europe/Amsterdam",
    currency="EUR",
    industry="lending",
)
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.GeneralSettings.Update(ctx, &kontiga.GeneralSettingsUpdateParams{
	TimeZone: "Europe/Amsterdam",
	Currency: "EUR",
	Industry: "lending",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.generalSettings().update(GeneralSettingsUpdateParams.builder()
    .timeZone("Europe/Amsterdam")
    .currency("EUR")
    .industry("lending")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.GeneralSettings.UpdateAsync(new GeneralSettingsUpdateOptions
{
    TimeZone = "Europe/Amsterdam",
    Currency = "EUR",
    Industry = "lending",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->generalSettings->update([
    'time_zone' => 'Europe/Amsterdam',
    'currency' => 'EUR',
    'industry' => 'lending',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.general_settings.update(
  time_zone: "Europe/Amsterdam",
  currency: "EUR",
  industry: "lending"
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .general_settings()
    .update(kontiga::general_settings::UpdateParams {
        time_zone: "Europe/Amsterdam".into(),
        currency: "EUR".into(),
        industry: "lending".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "general_settings",
  "workspace_id": "ws_8Rq4Lm2",
  "name": "Brightwater Lending",
  "slug": "brightwater-lending",
  "website": "https://brightwater.example",
  "industry": "lending",
  "time_zone": "Europe/Amsterdam",
  "currency": "EUR",
  "logo": null,
  "storage": {
    "kind": "regional",
    "region": "eu-west-1",
    "region_name": "Ireland"
  },
  "owner_id": "mem_9Wd2Hc5",
  "created_at": "2026-09-14T08:12:00Z",
  "deletion": null
}
```

## Upload the workspace logo

A PNG or JPEG of at most 512 KB, shown to members in the console beside the workspace's name.

`PUT /v1/settings/general/logo`. Who may: Owner and Admin. CLI: `kontiga settings logo upload <file_name>`. MCP tool: `upload_workspace_logo`.

**Parameters**
- `file_name` (string, required): The file's name. At most 200 characters.
- `content_type` (enum, required): The file's type. One of `image/png`, `image/jpeg`.
- `byte_size` (integer, required): The file's size in bytes. At least 1, at most 524,288.
- `content` (string, required): The file, encoded in base64. The CLI reads it from the file you name. At most 720,000 characters.

**Returns** general settings: The general settings, with the new logo.

API:

```bash
curl -X PUT https://api.kontiga.com/v1/settings/general/logo \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file_name": "brightwater-logo.png",
    "content_type": "image/png",
    "byte_size": 48211,
    "content": "<content>"
  }'
```

CLI:

```bash
kontiga settings logo upload brightwater-logo.png
```

MCP tool `upload_workspace_logo`:

```json
{
  "name": "upload_workspace_logo",
  "arguments": {
    "file_name": "brightwater-logo.png",
    "content_type": "image/png",
    "byte_size": 48211,
    "content": "<content>"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.workspaceLogo.upload({
  file: await openAsBlob("brightwater-logo.png"),
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.workspace_logo.upload(file=open("brightwater-logo.png", "rb"))
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.WorkspaceLogo.Upload(ctx, &kontiga.WorkspaceLogoUploadParams{
	File: kontiga.FileFromPath("brightwater-logo.png"),
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.workspaceLogo().upload(WorkspaceLogoUploadParams.builder()
    .file(Path.of("brightwater-logo.png"))
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.WorkspaceLogo.UploadAsync(new WorkspaceLogoUploadOptions
{
    File = File.OpenRead("brightwater-logo.png"),
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->workspaceLogo->upload([
    'file' => fopen('brightwater-logo.png', 'r'),
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.workspace_logo.upload(file: File.open("brightwater-logo.png"))
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .workspace_logo()
    .upload(kontiga::workspace_logo::UploadParams {
        file: kontiga::File::open("brightwater-logo.png").await?,
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "general_settings",
  "workspace_id": "ws_8Rq4Lm2",
  "name": "Brightwater Lending",
  "logo": {
    "url": "https://files.kontiga.com/ws_8Rq4Lm2/logo.png",
    "file_name": "brightwater-logo.png",
    "byte_size": 48211,
    "uploaded_at": "2026-11-26T09:12:40Z"
  }
}
```

## Remove the workspace logo

The console shows the workspace's initials again.

`DELETE /v1/settings/general/logo`. Who may: Owner and Admin. CLI: `kontiga settings logo remove`. MCP tool: `remove_workspace_logo`.

**Parameters**

**Returns** general settings: The general settings, with no logo.

API:

```bash
curl -X DELETE https://api.kontiga.com/v1/settings/general/logo \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga settings logo remove
```

MCP tool `remove_workspace_logo`:

```json
{
  "name": "remove_workspace_logo",
  "arguments": {}
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.workspaceLogo.remove();
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.workspace_logo.remove()
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.WorkspaceLogo.Remove(ctx)
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.workspaceLogo().remove();
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.WorkspaceLogo.RemoveAsync();
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->workspaceLogo->remove();
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.workspace_logo.remove
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .workspace_logo()
    .remove()
    .await?;
```

Response, 200 OK:

```json
{
  "object": "general_settings",
  "workspace_id": "ws_8Rq4Lm2",
  "name": "Brightwater Lending",
  "slug": "brightwater-lending",
  "website": "https://brightwater.example",
  "industry": "lending",
  "time_zone": "Europe/Amsterdam",
  "currency": "EUR",
  "logo": null,
  "storage": {
    "kind": "regional",
    "region": "eu-west-1",
    "region_name": "Ireland"
  },
  "owner_id": "mem_9Wd2Hc5",
  "created_at": "2026-09-14T08:12:00Z",
  "deletion": null
}
```

## Transfer ownership

Hand the owner role to another member; you become an admin. Only the owner can do this.

`POST /v1/workspace/transfer_ownership`. Who may: Owner and Admin. CLI: `kontiga workspace transfer-ownership --member-id <mem_id>`. MCP tool: `transfer_workspace_ownership`.

**Parameters**
- `member_id` (id (mem_), required): The member who becomes the owner. They must already be a member of the workspace.

**Returns** general settings: The general settings, with the new owner.

API:

```bash
curl -X POST https://api.kontiga.com/v1/workspace/transfer_ownership \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "member_id": "mem_6Tb1Nf8"
  }'
```

CLI:

```bash
kontiga workspace transfer-ownership --member-id mem_6Tb1Nf8
```

MCP tool `transfer_workspace_ownership`:

```json
{
  "name": "transfer_workspace_ownership",
  "arguments": {
    "member_id": "mem_6Tb1Nf8"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.workspace.transferOwnership({
  member_id: "mem_6Tb1Nf8",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.workspace.transfer_ownership(member_id="mem_6Tb1Nf8")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Workspace.TransferOwnership(ctx, &kontiga.WorkspaceTransferOwnershipParams{
	MemberId: "mem_6Tb1Nf8",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.workspace().transferOwnership(WorkspaceTransferOwnershipParams.builder()
    .memberId("mem_6Tb1Nf8")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Workspace.TransferOwnershipAsync(new WorkspaceTransferOwnershipOptions
{
    MemberId = "mem_6Tb1Nf8",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->workspace->transferOwnership([
    'member_id' => 'mem_6Tb1Nf8',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.workspace.transfer_ownership(member_id: "mem_6Tb1Nf8")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .workspace()
    .transfer_ownership(kontiga::workspace::TransferOwnershipParams {
        member_id: "mem_6Tb1Nf8".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "general_settings",
  "workspace_id": "ws_8Rq4Lm2",
  "name": "Brightwater Lending",
  "owner_id": "mem_6Tb1Nf8"
}
```

## Delete the workspace

Schedules the workspace for deletion in 30 days: then its cases, people, documents and files are purged. Type its name to confirm.

`DELETE /v1/workspace`. Who may: Owner and Admin. CLI: `kontiga workspace delete --confirm-name <workspace name>`. MCP tool: `delete_workspace`.

**Parameters**
- `confirm_name` (string, required): The workspace's name, typed exactly as it is. Anything else is refused and nothing is scheduled. At most 80 characters.

**Returns** general settings: The general settings, with the deletion date.

API:

```bash
curl -X DELETE "https://api.kontiga.com/v1/workspace?confirm_name=Brightwater+Lending" \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga workspace delete --confirm-name 'Brightwater Lending'
```

MCP tool `delete_workspace`:

```json
{
  "name": "delete_workspace",
  "arguments": {
    "confirm_name": "Brightwater Lending"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.workspace.scheduleDeletion({
  confirm_name: "Brightwater Lending",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.workspace.schedule_deletion(confirm_name="Brightwater Lending")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Workspace.ScheduleDeletion(ctx, &kontiga.WorkspaceScheduleDeletionParams{
	ConfirmName: "Brightwater Lending",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.workspace().scheduleDeletion(WorkspaceScheduleDeletionParams.builder()
    .confirmName("Brightwater Lending")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Workspace.ScheduleDeletionAsync(new WorkspaceScheduleDeletionOptions
{
    ConfirmName = "Brightwater Lending",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->workspace->scheduleDeletion([
    'confirm_name' => 'Brightwater Lending',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.workspace.schedule_deletion(confirm_name: "Brightwater Lending")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .workspace()
    .schedule_deletion(kontiga::workspace::ScheduleDeletionParams {
        confirm_name: "Brightwater Lending".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "general_settings",
  "workspace_id": "ws_8Rq4Lm2",
  "name": "Brightwater Lending",
  "deletion": {
    "scheduled_for": "2026-12-26T09:20:00Z",
    "requested_at": "2026-11-26T09:20:00Z",
    "requested_by": "mem_9Wd2Hc5"
  }
}
```

## Cancel the deletion

The workspace stays, as it was.

`POST /v1/workspace/cancel_deletion`. Who may: Owner and Admin. CLI: `kontiga workspace cancel-deletion`. MCP tool: `cancel_workspace_deletion`.

**Parameters**

**Returns** general settings: The general settings, with no deletion scheduled.

API:

```bash
curl -X POST https://api.kontiga.com/v1/workspace/cancel_deletion \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga workspace cancel-deletion
```

MCP tool `cancel_workspace_deletion`:

```json
{
  "name": "cancel_workspace_deletion",
  "arguments": {}
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.workspace.cancelDeletion();
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.workspace.cancel_deletion()
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Workspace.CancelDeletion(ctx)
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.workspace().cancelDeletion();
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Workspace.CancelDeletionAsync();
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->workspace->cancelDeletion();
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.workspace.cancel_deletion
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .workspace()
    .cancel_deletion()
    .await?;
```

Response, 200 OK:

```json
{
  "object": "general_settings",
  "workspace_id": "ws_8Rq4Lm2",
  "name": "Brightwater Lending",
  "slug": "brightwater-lending",
  "website": "https://brightwater.example",
  "industry": "lending",
  "time_zone": "Europe/Amsterdam",
  "currency": "EUR",
  "logo": null,
  "storage": {
    "kind": "regional",
    "region": "eu-west-1",
    "region_name": "Ireland"
  },
  "owner_id": "mem_9Wd2Hc5",
  "created_at": "2026-09-14T08:12:00Z",
  "deletion": null
}
```

## Products

Which of the three products the console shows for everyone in the workspace: Document fraud detection (`detect`), Document collection (`collect`) and Identity verification (`verify`). It is a view setting only. The plan stays as it is, and every API call, CLI command and MCP tool works for every product whatever it says.

## Read the workspace's products

Which products the console shows for this workspace: Document fraud detection, Document collection and Identity verification. It changes only what the console shows; the API has every product.

`GET /v1/workspace/products`. Who may: Owner, Admin, Analyst, Developer, Viewer and Billing. CLI: `kontiga products get`. MCP tool: `get_workspace_products`.

**Parameters**

**Returns** workspace products: The products the console shows for this workspace, and who changed them last.

API:

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

CLI:

```bash
kontiga products get
```

MCP tool `get_workspace_products`:

```json
{
  "name": "get_workspace_products",
  "arguments": {}
}
```

TypeScript:

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

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

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.workspace_products.get()
```

Go:

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

Java:

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

.NET:

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

PHP:

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

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.workspace_products.get
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .workspace_products()
    .get()
    .await?;
```

Response, 200 OK:

```json
{
  "object": "workspace_products",
  "workspace_id": "ws_8Rq4Lm2",
  "products": ["detect", "collect", "verify"],
  "updated_at": null,
  "updated_by": null
}
```

## Choose the workspace's products

The products the console shows for everyone in this workspace; at least one stays on. Only what the console shows changes: the plan, the API, the CLI and the MCP server stay as they are.

`PUT /v1/workspace/products`. Who may: Owner and Admin. CLI: `kontiga products set --products <detect|collect|verify>,...`. MCP tool: `set_workspace_products`.

**Parameters**
- `products` (array of enum, required): The products to show, each named once, and at least one. The list is given whole: a product left out leaves the console's menu and pages. One of `detect`, `collect`, `verify`.

**Returns** workspace products: The products the console shows for this workspace now.

API:

```bash
curl -X PUT https://api.kontiga.com/v1/workspace/products \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "products": [
      "detect",
      "collect"
    ]
  }'
```

CLI:

```bash
kontiga products set --products detect,collect
```

MCP tool `set_workspace_products`:

```json
{
  "name": "set_workspace_products",
  "arguments": {
    "products": [
      "detect",
      "collect"
    ]
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.workspaceProducts.set({
  products: ["detect", "collect"],
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.workspace_products.set(products=["detect", "collect"])
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.WorkspaceProducts.Set(ctx, &kontiga.WorkspaceProductsSetParams{
	Products: []string{"detect", "collect"},
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.workspaceProducts().set(WorkspaceProductsSetParams.builder()
    .products(List.of("detect", "collect"))
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.WorkspaceProducts.SetAsync(new WorkspaceProductsSetOptions
{
    Products = new[] { "detect", "collect" },
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->workspaceProducts->set([
    'products' => ['detect', 'collect'],
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.workspace_products.set(products: ["detect", "collect"])
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .workspace_products()
    .set(kontiga::workspace_products::SetParams {
        products: vec!["detect".into(), "collect".into()],
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "workspace_products",
  "workspace_id": "ws_8Rq4Lm2",
  "products": ["detect", "collect"],
  "updated_at": "2026-11-26T09:24:10Z",
  "updated_by": "mem_9Wd2Hc5"
}
```

## Single sign-on

Members sign in through your company's identity provider, with OIDC or SAML. Groups in the identity provider map to roles at every sign-in. A person it signs in for the first time gets an account and the default role, if their email domain is allowed. A secret or a certificate is stored encrypted and is only ever answered as set or not set.

## Read the sign-in settings

Single sign-on: the protocol, its fields, whether it is enforced, and which identity-provider groups get which role. Secrets are never returned.

`GET /v1/settings/security`. Who may: Owner and Admin. CLI: `kontiga settings security get`. MCP tool: `get_security_settings`.

**Parameters**

**Returns** security settings: Single sign-on and its group-to-role mapping, with no secret.

API:

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

CLI:

```bash
kontiga settings security get
```

MCP tool `get_security_settings`:

```json
{
  "name": "get_security_settings",
  "arguments": {}
}
```

TypeScript:

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

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

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.security_settings.get()
```

Go:

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

Java:

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

.NET:

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

PHP:

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

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.security_settings.get
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .security_settings()
    .get()
    .await?;
```

Response, 200 OK:

```json
{
  "object": "security_settings",
  "protocol": "saml",
  "enforced": false,
  "saml": {
    "idp_entity_id": "https://sso.brightwater.example/saml/idp",
    "sso_url": "https://sso.brightwater.example/saml/login",
    "slo_url": "https://sso.brightwater.example/saml/logout",
    "metadata_url": "",
    "sp_entity_id": "",
    "certificate_set": true
  },
  "oidc": {
    "authorization_url": "",
    "token_url": "",
    "client_id": "",
    "domain": "",
    "jwks_url": "",
    "client_secret_set": false
  },
  "role_mapping": [
    { "group": "Credit risk", "role": "analyst" },
    { "group": "Platform engineering", "role": "developer" },
    { "group": "Finance", "role": "billing" }
  ],
  "default_role": "viewer",
  "allowed_domains": ["brightwater.example"],
  "urls": {
    "login_url": "https://kontiga.com/sign-in/sso/brightwater-lending",
    "callback_url": "https://api.kontiga.com/v1/sso/brightwater-lending/oidc/callback",
    "acs_url": "https://api.kontiga.com/v1/sso/brightwater-lending/saml/acs",
    "sp_entity_id": "https://api.kontiga.com/v1/sso/brightwater-lending/saml/metadata",
    "sp_metadata_url": "https://api.kontiga.com/v1/sso/brightwater-lending/saml/metadata"
  }
}
```

## Change the sign-in settings

Set up single sign-on with OIDC or SAML, enforce it, map identity-provider groups to roles, and choose the role of a person it signs in for the first time. Every identity provider address uses https and may not point to a private network. A secret is stored encrypted and never shown again.

`PATCH /v1/settings/security`. Who may: Owner and Admin. CLI: `kontiga settings security set [--protocol <disabled|oidc|saml>] [--enforced <true|false>] [--oidc-authorization-url <url>] [--oidc-token-url <url>] [--oidc-client-id <id>] [--oidc-client-secret <secret>] [--oidc-domain <domain>] [--oidc-jwks-url <url>] [--saml-idp-entity-id <id>] [--saml-sso-url <url>] [--saml-slo-url <url>] [--saml-metadata-url <url>] [--saml-certificate <pem>] [--saml-sp-entity-id <id>] [--role-mapping <group=role>,...] [--default-role <admin|analyst|developer|viewer|billing>] [--allowed-domains <domain>,...]`. MCP tool: `update_security_settings`.

**Parameters**
- `protocol` (enum): How members sign in through the identity provider. `disabled` turns single sign-on off. One of `disabled`, `oidc`, `saml`.
- `enforced` (boolean): Members may sign in only through the identity provider. Every other way in is refused for them.
- `oidc_authorization_url` (string): The identity provider's sign-in address, over https. At most 2,048 characters.
- `oidc_token_url` (string): Where Kontiga exchanges the code for the tokens, over https. At most 2,048 characters.
- `oidc_client_id` (string): The client id the identity provider gave Kontiga. At most 200 characters.
- `oidc_client_secret` (string): The client secret. Stored encrypted and never answered again. At most 500 characters.
- `oidc_domain` (string): The identity provider's domain, to find its signing keys by discovery. Give this or `oidc_jwks_url`. At most 253 characters.
- `oidc_jwks_url` (string): The address of the identity provider's signing keys. Every token is checked against them. At most 2,048 characters.
- `saml_idp_entity_id` (string): The identity provider's entity id. Every response is checked for who sent it, who it is for and when. At most 500 characters.
- `saml_sso_url` (string): Where sign-in requests go, over https. At most 2,048 characters.
- `saml_slo_url` (string): Where sign-out requests go, over https. At most 2,048 characters.
- `saml_metadata_url` (string): The identity provider's metadata address. Kontiga reads the entity id and the certificate from it. At most 2,048 characters.
- `saml_certificate` (string): The certificate the identity provider signs its responses with. Stored and never answered again. At most 10,000 characters.
- `saml_sp_entity_id` (string): Kontiga's own entity id, when your identity provider needs another one. Empty uses Kontiga's default. At most 500 characters.
- `default_role` (enum): The role of a person signed in for the first time who is in none of the mapped groups. One of `admin`, `analyst`, `developer`, `viewer`, `billing`.
- `role_mapping` (array of string): Each mapping as `group=role`, such as `Credit risk=analyst`. The whole list is given each time. At most 50 items.
- `allowed_domains` (array of string): The email domains single sign-on accepts. An address with another domain is refused. Empty accepts any address the identity provider vouches for. At most 20 items.

**Returns** security settings: Single sign-on, changed; secrets only as set or not set.

API:

```bash
curl -X PATCH https://api.kontiga.com/v1/settings/security \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "protocol": "saml",
    "saml_idp_entity_id": "https://sso.brightwater.example/saml/idp",
    "saml_sso_url": "https://sso.brightwater.example/saml/login",
    "default_role": "viewer",
    "role_mapping": [
      "Credit risk=analyst",
      "Finance=billing"
    ]
  }'
```

CLI:

```bash
kontiga settings security set \
  --protocol saml \
  --saml-idp-entity-id https://sso.brightwater.example/saml/idp \
  --saml-sso-url https://sso.brightwater.example/saml/login \
  --default-role viewer \
  --role-mapping 'Credit risk=analyst,Finance=billing'
```

MCP tool `update_security_settings`:

```json
{
  "name": "update_security_settings",
  "arguments": {
    "protocol": "saml",
    "saml_idp_entity_id": "https://sso.brightwater.example/saml/idp",
    "saml_sso_url": "https://sso.brightwater.example/saml/login",
    "default_role": "viewer",
    "role_mapping": [
      "Credit risk=analyst",
      "Finance=billing"
    ]
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.securitySettings.update({
  protocol: "saml",
  saml_idp_entity_id: "https://sso.brightwater.example/saml/idp",
  saml_sso_url: "https://sso.brightwater.example/saml/login",
  default_role: "viewer",
  role_mapping: ["Credit risk=analyst", "Finance=billing"],
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.security_settings.update(
    protocol="saml",
    saml_idp_entity_id="https://sso.brightwater.example/saml/idp",
    saml_sso_url="https://sso.brightwater.example/saml/login",
    default_role="viewer",
    role_mapping=["Credit risk=analyst", "Finance=billing"],
)
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.SecuritySettings.Update(ctx, &kontiga.SecuritySettingsUpdateParams{
	Protocol:        "saml",
	SamlIdpEntityId: "https://sso.brightwater.example/saml/idp",
	SamlSsoUrl:      "https://sso.brightwater.example/saml/login",
	DefaultRole:     "viewer",
	RoleMapping:     []string{"Credit risk=analyst", "Finance=billing"},
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.securitySettings().update(SecuritySettingsUpdateParams.builder()
    .protocol("saml")
    .samlIdpEntityId("https://sso.brightwater.example/saml/idp")
    .samlSsoUrl("https://sso.brightwater.example/saml/login")
    .defaultRole("viewer")
    .roleMapping(List.of("Credit risk=analyst", "Finance=billing"))
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.SecuritySettings.UpdateAsync(new SecuritySettingsUpdateOptions
{
    Protocol = "saml",
    SamlIdpEntityId = "https://sso.brightwater.example/saml/idp",
    SamlSsoUrl = "https://sso.brightwater.example/saml/login",
    DefaultRole = "viewer",
    RoleMapping = new[] { "Credit risk=analyst", "Finance=billing" },
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->securitySettings->update([
    'protocol' => 'saml',
    'saml_idp_entity_id' => 'https://sso.brightwater.example/saml/idp',
    'saml_sso_url' => 'https://sso.brightwater.example/saml/login',
    'default_role' => 'viewer',
    'role_mapping' => ['Credit risk=analyst', 'Finance=billing'],
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.security_settings.update(
  protocol: "saml",
  saml_idp_entity_id: "https://sso.brightwater.example/saml/idp",
  saml_sso_url: "https://sso.brightwater.example/saml/login",
  default_role: "viewer",
  role_mapping: ["Credit risk=analyst", "Finance=billing"]
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .security_settings()
    .update(kontiga::security_settings::UpdateParams {
        protocol: "saml".into(),
        saml_idp_entity_id: "https://sso.brightwater.example/saml/idp".into(),
        saml_sso_url: "https://sso.brightwater.example/saml/login".into(),
        default_role: "viewer".into(),
        role_mapping: vec!["Credit risk=analyst".into(), "Finance=billing".into()],
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "security_settings",
  "protocol": "saml",
  "enforced": false,
  "saml": {
    "idp_entity_id": "https://sso.brightwater.example/saml/idp",
    "sso_url": "https://sso.brightwater.example/saml/login",
    "slo_url": "https://sso.brightwater.example/saml/logout",
    "metadata_url": "",
    "sp_entity_id": "",
    "certificate_set": true
  },
  "oidc": {
    "authorization_url": "",
    "token_url": "",
    "client_id": "",
    "domain": "",
    "jwks_url": "",
    "client_secret_set": false
  },
  "role_mapping": [
    { "group": "Credit risk", "role": "analyst" },
    { "group": "Platform engineering", "role": "developer" },
    { "group": "Finance", "role": "billing" }
  ],
  "default_role": "viewer",
  "allowed_domains": ["brightwater.example"],
  "urls": {
    "login_url": "https://kontiga.com/sign-in/sso/brightwater-lending",
    "callback_url": "https://api.kontiga.com/v1/sso/brightwater-lending/oidc/callback",
    "acs_url": "https://api.kontiga.com/v1/sso/brightwater-lending/saml/acs",
    "sp_entity_id": "https://api.kontiga.com/v1/sso/brightwater-lending/saml/metadata",
    "sp_metadata_url": "https://api.kontiga.com/v1/sso/brightwater-lending/saml/metadata"
  }
}
```

## Test single sign-on

Check the saved setup the way a sign-in will, before anyone depends on it: the identity provider's addresses answer, its signing keys or certificate are there and in date, and Kontiga can check who a response is from and for whom. Each check says what it found.

`POST /v1/settings/security/test`. Who may: Owner and Admin. CLI: `kontiga settings security test`. MCP tool: `test_single_sign_on`.

**Parameters**

**Returns** single sign-on test: Each check with what it found, and whether sign-in is ready.

API:

```bash
curl -X POST https://api.kontiga.com/v1/settings/security/test \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga settings security test
```

MCP tool `test_single_sign_on`:

```json
{
  "name": "test_single_sign_on",
  "arguments": {}
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.securitySettings.test();
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.security_settings.test()
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.SecuritySettings.Test(ctx)
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.securitySettings().test();
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.SecuritySettings.TestAsync();
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->securitySettings->test();
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.security_settings.test
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .security_settings()
    .test()
    .await?;
```

Response, 200 OK:

```json
{
  "object": "single_sign_on_test",
  "protocol": "saml",
  "ready": true,
  "checks": [
    {
      "key": "sign_in_address",
      "label": "Sign-in address",
      "result": "passed",
      "detail": "Sign-in requests go to sso.brightwater.example over https."
    },
    {
      "key": "certificate",
      "label": "Signing certificate",
      "result": "passed",
      "detail": "Set, and in date until 14 Sep 2029."
    },
    {
      "key": "entity_id",
      "label": "Identity provider's entity id",
      "result": "passed",
      "detail": "https://sso.brightwater.example/saml/idp: every response is checked for who sent it, who it is for and when."
    }
  ],
  "tested_at": "2026-11-26T09:14:02Z"
}
```

## List single sign-on attempts

The latest sign-ins through your identity provider, newest first: who, how each ended, the role it gave and why, the accounts it made for people signing in for the first time, and for each refusal what the response said beside what Kontiga expected.

`GET /v1/settings/security/sign_ins`. Who may: Owner and Admin. CLI: `kontiga settings security sign-ins [--result <signed_in|provisioned|refused>] [--limit <n>]`. MCP tool: `list_sso_sign_ins`.

**Parameters**
- `result` (enum): Only sign-ins that ended this way. `provisioned` is a person given an account at their first sign-in. One of `signed_in`, `provisioned`, `refused`.
- `limit` (integer, default 50): How many to answer, newest first. At least 1, at most 100.

**Returns** list of sign-ins: The sign-ins, newest first, refusals with their reason and what disagreed.

API:

```bash
curl -X GET "https://api.kontiga.com/v1/settings/security/sign_ins?result=refused" \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga settings security sign-ins --result refused
```

MCP tool `list_sso_sign_ins`:

```json
{
  "name": "list_sso_sign_ins",
  "arguments": {
    "result": "refused"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.ssoSignIns.list({
  result: "refused",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.sso_sign_ins.list(result="refused")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.SsoSignIns.List(ctx, &kontiga.SsoSignInsListParams{
	Result: "refused",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.ssoSignIns().list(SsoSignInsListParams.builder()
    .result("refused")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.SsoSignIns.ListAsync(new SsoSignInsListOptions
{
    Result = "refused",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->ssoSignIns->list([
    'result' => 'refused',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.sso_sign_ins.list(result: "refused")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .sso_sign_ins()
    .list(kontiga::sso_sign_ins::ListParams {
        result: "refused".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "items": [
    {
      "id": "ssi_4Kd8Pw2",
      "at": "2026-11-26T08:02:17Z",
      "protocol": "saml",
      "email": "elif.kaya@brightwater.example",
      "name": "Elif Kaya",
      "result": "signed_in",
      "role": "analyst",
      "groups": ["Credit risk"],
      "role_from": "mapping",
      "reason": null,
      "diagnosis": null
    },
    {
      "id": "ssi_7Ra3Ns5",
      "at": "2026-11-25T16:40:51Z",
      "protocol": "saml",
      "email": "lena.hoffmann@brightwater.example",
      "name": null,
      "result": "refused",
      "role": null,
      "groups": [],
      "role_from": null,
      "reason": "The response was meant for another service provider.",
      "diagnosis": [
        {
          "field": "audience",
          "label": "Audience",
          "received": "https://sso.brightwater.example/apps/kontiga-old",
          "expected": "https://api.kontiga.com/v1/sso/brightwater-lending/saml/metadata"
        }
      ]
    }
  ],
  "next_cursor": null
}
```

## Activity log

Every change to the workspace's settings, members and keys: who made it (a member, a key by its name, Kontiga support or the system), when, and the value before and after. A secret is never written to it.

## Read the activity log

Every change to the workspace's settings, members and keys, newest first, with who made it, when, and the value before and after. Never a secret.

`GET /v1/audit_log`. Who may: Owner and Admin. CLI: `kontiga audit list [--q <words>] [--area <area>] [--limit <n>]`. MCP tool: `list_audit_log`.

**Parameters**
- `q` (string): Words in the summary, the actor or a value. At most 120 characters.
- `area` (string): Only changes to one area, as the log names it: `General`, `Members`, `Retention`, `Notifications`, `Sign-in`. At most 60 characters.
- `limit` (integer): How many to answer, newest first. The answer's `next_cursor` reads the next page. At least 1, at most 200.

**Returns** list of activity: The changes, newest first.

API:

```bash
curl -X GET "https://api.kontiga.com/v1/audit_log?area=Retention&limit=20" \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga audit list --area Retention --limit 20
```

MCP tool `list_audit_log`:

```json
{
  "name": "list_audit_log",
  "arguments": {
    "area": "Retention",
    "limit": 20
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.auditLog.list({
  area: "Retention",
  limit: 20,
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.audit_log.list(area="Retention", limit=20)
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.AuditLog.List(ctx, &kontiga.AuditLogListParams{
	Area:  "Retention",
	Limit: 20,
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.auditLog().list(AuditLogListParams.builder()
    .area("Retention")
    .limit(20)
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.AuditLog.ListAsync(new AuditLogListOptions
{
    Area = "Retention",
    Limit = 20,
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->auditLog->list([
    'area' => 'Retention',
    'limit' => 20,
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.audit_log.list(area: "Retention", limit: 20)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .audit_log()
    .list(kontiga::audit_log::ListParams {
        area: "Retention".into(),
        limit: 20,
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "items": [
    {
      "id": "aud_3Hn7Vc1",
      "at": "2026-11-24T06:42:00Z",
      "actor": "Jonas Eriksen",
      "actor_kind": "member",
      "area": "Retention",
      "summary": "Changed how long documents are kept",
      "before": "90 days",
      "after": "180 days"
    },
    {
      "id": "aud_8Lp2Qs6",
      "at": "2026-11-22T08:42:00Z",
      "actor": "Onboarding service (key ending 7Q2K)",
      "actor_kind": "key",
      "area": "Notifications",
      "summary": "Added the alert rule: A case is overdue",
      "before": null,
      "after": "credit-ops@brightwater.example"
    }
  ],
  "next_cursor": "eyJpZCI6ImF1ZF84THAyUXM2In0"
}
```

## Alerts and notices

Alert rules tell people outside the console when something happens, by email or in a connected chat channel. Notices are what each member gets in the console; these settings say which also go by email or to chat by default. Every workspace has one built-in rule, an integration that stopped working, sent to its owners and admins.

## List the alert rules

When the workspace tells whom what: each rule's trigger, where it goes and whether it is on.

`GET /v1/alert_rules`. Who may: Owner, Admin, Analyst, Developer and Viewer. CLI: `kontiga alerts list`. MCP tool: `list_alert_rules`.

**Parameters**

**Returns** list of alert rules: The workspace's alert rules.

API:

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

CLI:

```bash
kontiga alerts list
```

MCP tool `list_alert_rules`:

```json
{
  "name": "list_alert_rules",
  "arguments": {}
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.alertRules.list();
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.alert_rules.list()
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.AlertRules.List(ctx)
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.alertRules().list();
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.AlertRules.ListAsync();
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->alertRules->list();
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.alert_rules.list
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .alert_rules()
    .list()
    .await?;
```

Response, 200 OK:

```json
{
  "items": [
    {
      "id": "alr_1Bw6Ke4",
      "object": "alert_rule",
      "preset": "integration_broken",
      "name": "An integration stopped working",
      "destinations": ["maria.lind@brightwater.example", "jonas.eriksen@brightwater.example"],
      "include_person_name": false,
      "status": "on",
      "built_in": true,
      "last_sent_at": "2026-11-24T05:10:00Z",
      "last_sent_about": "Dropbox stopped working"
    },
    {
      "id": "alr_5Tq9Mx3",
      "object": "alert_rule",
      "preset": "high_risk_document",
      "name": "A document is High risk",
      "destinations": ["#risk-alerts"],
      "include_person_name": false,
      "status": "on",
      "built_in": false,
      "last_sent_at": "2026-11-26T07:31:18Z",
      "last_sent_about": "Utility bill on BW-4463"
    }
  ],
  "next_cursor": null
}
```

## Add an alert rule

Tell people by email or chat when something happens: a High risk document, a case ready for review, an overdue case and more.

`POST /v1/alert_rules`. Who may: Owner and Admin. CLI: `kontiga alerts create --preset <preset> --destinations <email or #channel>,... [--include-person-name <true|false>]`. MCP tool: `create_alert_rule`.

**Parameters**
- `preset` (enum, required): What the rule tells. One of `high_risk_document`, `case_ready`, `case_overdue`, `case_decided`, `documents_received`, `request_expired`, `screening_match`, `identity_review`, `workflow_failed`, `expert_review_ready`, `integration_broken`, `verdict_changed`.
- `destinations` (array of string, required): Email addresses, and connected chat channels written as `#channel`. At least one.
- `include_person_name` (boolean, default false): Whether the message names the person. Off, it names the case and the document only.

**Returns** alert rule: The alert rule, on.

API:

```bash
curl -X POST https://api.kontiga.com/v1/alert_rules \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "preset": "high_risk_document",
    "destinations": [
      "#risk-alerts"
    ]
  }'
```

CLI:

```bash
kontiga alerts create \
  --preset high_risk_document \
  --destinations '#risk-alerts'
```

MCP tool `create_alert_rule`:

```json
{
  "name": "create_alert_rule",
  "arguments": {
    "preset": "high_risk_document",
    "destinations": [
      "#risk-alerts"
    ]
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.alertRules.create({
  preset: "high_risk_document",
  destinations: ["#risk-alerts"],
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.alert_rules.create(preset="high_risk_document", destinations=["#risk-alerts"])
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.AlertRules.Create(ctx, &kontiga.AlertRulesCreateParams{
	Preset:       "high_risk_document",
	Destinations: []string{"#risk-alerts"},
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.alertRules().create(AlertRulesCreateParams.builder()
    .preset("high_risk_document")
    .destinations(List.of("#risk-alerts"))
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.AlertRules.CreateAsync(new AlertRulesCreateOptions
{
    Preset = "high_risk_document",
    Destinations = new[] { "#risk-alerts" },
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->alertRules->create([
    'preset' => 'high_risk_document',
    'destinations' => ['#risk-alerts'],
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.alert_rules.create(preset: "high_risk_document", destinations: ["#risk-alerts"])
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .alert_rules()
    .create(kontiga::alert_rules::CreateParams {
        preset: "high_risk_document".into(),
        destinations: vec!["#risk-alerts".into()],
        ..Default::default()
    })
    .await?;
```

Response, 201 Created:

```json
{
  "id": "alr_5Tq9Mx3",
  "object": "alert_rule",
  "preset": "high_risk_document",
  "name": "A document is High risk",
  "destinations": ["#risk-alerts"],
  "include_person_name": false,
  "status": "on",
  "built_in": false,
  "last_sent_at": "2026-11-26T07:31:18Z",
  "last_sent_about": "Utility bill on BW-4463"
}
```

## Change an alert rule

Turn a rule on or off, change where it goes, or whether it names the person.

`PATCH /v1/alert_rules/{alert_rule_id}`. Who may: Owner and Admin. CLI: `kontiga alerts update <alert_rule_id> [--status <on|off>] [--destinations <email or #channel>,...] [--include-person-name <true|false>]`. MCP tool: `update_alert_rule`.

**Parameters**
- `alert_rule_id` (id (alr_), required): The rule to change. In the path.
- `status` (enum): Turn the rule on or off. The built-in rule stays on. One of `on`, `off`.
- `destinations` (array of string): Where it goes from now on. The whole list is given. At most 20 items.
- `include_person_name` (boolean): Whether the message names the person.

**Returns** alert rule: The alert rule, changed.

API:

```bash
curl -X PATCH https://api.kontiga.com/v1/alert_rules/alr_5Tq9Mx3 \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "destinations": [
      "#risk-alerts",
      "compliance@brightwater.example"
    ]
  }'
```

CLI:

```bash
kontiga alerts update alr_5Tq9Mx3 \
  --destinations '#risk-alerts,compliance@brightwater.example'
```

MCP tool `update_alert_rule`:

```json
{
  "name": "update_alert_rule",
  "arguments": {
    "alert_rule_id": "alr_5Tq9Mx3",
    "destinations": [
      "#risk-alerts",
      "compliance@brightwater.example"
    ]
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.alertRules.update("alr_5Tq9Mx3", {
  destinations: ["#risk-alerts", "compliance@brightwater.example"],
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.alert_rules.update("alr_5Tq9Mx3", destinations=["#risk-alerts", "compliance@brightwater.example"])
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.AlertRules.Update(ctx, "alr_5Tq9Mx3", &kontiga.AlertRulesUpdateParams{
	Destinations: []string{"#risk-alerts", "compliance@brightwater.example"},
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.alertRules().update("alr_5Tq9Mx3", AlertRulesUpdateParams.builder()
    .destinations(List.of("#risk-alerts", "compliance@brightwater.example"))
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.AlertRules.UpdateAsync("alr_5Tq9Mx3", new AlertRulesUpdateOptions
{
    Destinations = new[] { "#risk-alerts", "compliance@brightwater.example" },
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->alertRules->update('alr_5Tq9Mx3', [
    'destinations' => ['#risk-alerts', 'compliance@brightwater.example'],
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.alert_rules.update("alr_5Tq9Mx3", destinations: ["#risk-alerts", "compliance@brightwater.example"])
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .alert_rules()
    .update("alr_5Tq9Mx3".into(), kontiga::alert_rules::UpdateParams {
        destinations: vec!["#risk-alerts".into(), "compliance@brightwater.example".into()],
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "id": "alr_5Tq9Mx3",
  "object": "alert_rule",
  "preset": "high_risk_document",
  "name": "A document is High risk",
  "destinations": ["#risk-alerts"],
  "include_person_name": false,
  "status": "on",
  "built_in": false,
  "last_sent_at": "2026-11-26T07:31:18Z",
  "last_sent_about": "Utility bill on BW-4463"
}
```

## Delete an alert rule

No more messages from it. The built-in rules cannot be deleted.

`DELETE /v1/alert_rules/{alert_rule_id}`. Who may: Owner and Admin. CLI: `kontiga alerts delete <alert_rule_id>`. MCP tool: `delete_alert_rule`.

**Parameters**
- `alert_rule_id` (id (alr_), required): The rule to delete. In the path.

**Returns** alert rule, deleted: The alert rule sends nothing more.

API:

```bash
curl -X DELETE https://api.kontiga.com/v1/alert_rules/alr_5Tq9Mx3 \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga alerts delete alr_5Tq9Mx3
```

MCP tool `delete_alert_rule`:

```json
{
  "name": "delete_alert_rule",
  "arguments": {
    "alert_rule_id": "alr_5Tq9Mx3"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.alertRules.delete("alr_5Tq9Mx3");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.alert_rules.delete("alr_5Tq9Mx3")
```

Go:

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

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.alertRules().delete("alr_5Tq9Mx3");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.AlertRules.DeleteAsync("alr_5Tq9Mx3");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->alertRules->delete('alr_5Tq9Mx3');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.alert_rules.delete("alr_5Tq9Mx3")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .alert_rules()
    .delete("alr_5Tq9Mx3".into())
    .await?;
```

Response, 200 OK:

```json
{
  "id": "alr_5Tq9Mx3",
  "object": "alert_rule",
  "deleted": true
}
```

## Read the notice defaults

For each kind of notice a member gets, whether it also goes by email and to chat by default. Each member can mute email for themselves.

`GET /v1/settings/notifications`. Who may: Owner, Admin, Analyst, Developer and Viewer. CLI: `kontiga settings notifications get`. MCP tool: `get_notification_settings`.

**Parameters**

**Returns** notification settings: The workspace's notice defaults, by kind.

API:

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

CLI:

```bash
kontiga settings notifications get
```

MCP tool `get_notification_settings`:

```json
{
  "name": "get_notification_settings",
  "arguments": {}
}
```

TypeScript:

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

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

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.notification_settings.get()
```

Go:

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

Java:

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

.NET:

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

PHP:

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

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.notification_settings.get
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .notification_settings()
    .get()
    .await?;
```

Response, 200 OK:

```json
{
  "object": "notification_settings",
  "kinds": [
    { "kind": "case_assigned", "label": "A case is assigned to you", "email": true, "chat": false },
    { "kind": "approval_waiting", "label": "A decision waits for your approval", "email": true, "chat": true },
    { "kind": "overdue", "label": "A case of yours is overdue", "email": true, "chat": true },
    { "kind": "mentioned", "label": "Someone mentions you in a note", "email": false, "chat": false }
  ],
  "chat_connected": true
}
```

## Change a notice default

Whether one kind of notice also goes by email or to chat, for every member who has not chosen for themselves.

`PATCH /v1/settings/notifications`. Who may: Owner and Admin. CLI: `kontiga settings notifications set --kind <kind> [--email <true|false>] [--chat <true|false>]`. MCP tool: `update_notification_settings`.

**Parameters**
- `kind` (enum, required): The kind of notice. One of `case_assigned`, `back_from_waiting`, `mentioned`, `approval_waiting`, `decision_returned`, `near_due`, `overdue`, `escalated`, `follow_up_undelivered`, `report_ready`.
- `email` (boolean): Whether it also goes by email, for members who have not chosen for themselves.
- `chat` (boolean): Whether it also goes to the connected team chat. Needs a team chat connected.

**Returns** notification settings: The notice defaults, changed.

API:

```bash
curl -X PATCH https://api.kontiga.com/v1/settings/notifications \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "overdue",
    "chat": true
  }'
```

CLI:

```bash
kontiga settings notifications set --kind overdue --chat
```

MCP tool `update_notification_settings`:

```json
{
  "name": "update_notification_settings",
  "arguments": {
    "kind": "overdue",
    "chat": true
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.notificationSettings.update({
  kind: "overdue",
  chat: true,
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.notification_settings.update(kind="overdue", chat=True)
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.NotificationSettings.Update(ctx, &kontiga.NotificationSettingsUpdateParams{
	Kind: "overdue",
	Chat: true,
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.notificationSettings().update(NotificationSettingsUpdateParams.builder()
    .kind("overdue")
    .chat(true)
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.NotificationSettings.UpdateAsync(new NotificationSettingsUpdateOptions
{
    Kind = "overdue",
    Chat = true,
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->notificationSettings->update([
    'kind' => 'overdue',
    'chat' => true,
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.notification_settings.update(kind: "overdue", chat: true)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .notification_settings()
    .update(kontiga::notification_settings::UpdateParams {
        kind: "overdue".into(),
        chat: true,
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "notification_settings",
  "kinds": [
    { "kind": "case_assigned", "label": "A case is assigned to you", "email": true, "chat": false },
    { "kind": "approval_waiting", "label": "A decision waits for your approval", "email": true, "chat": true },
    { "kind": "overdue", "label": "A case of yours is overdue", "email": true, "chat": true },
    { "kind": "mentioned", "label": "Someone mentions you in a note", "email": false, "chat": false }
  ],
  "chat_connected": true
}
```

## Data and storage

How long each kind of data is kept, counted from the decision of its case, or from its receipt when it is on no case, and where files are stored. Records are kept in the EU. Your files are stored in the region your workspace chooses, in Kontiga's storage, in a bucket for this workspace alone or in your own bucket, and you can change the region later. What Kontiga learns from documents to catch fraud is not kept under these periods.

## Read the data settings

Where files are stored, that the database and processing are in the EU, how long each kind of data is kept, and where data goes outside the EU.

`GET /v1/settings/data`. Who may: Owner, Admin, Analyst, Developer, Viewer and Billing. CLI: `kontiga settings data get`. MCP tool: `get_data_settings`.

**Parameters**

**Returns** data settings: Storage location, retention, model improvement and where data goes.

API:

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

CLI:

```bash
kontiga settings data get
```

MCP tool `get_data_settings`:

```json
{
  "name": "get_data_settings",
  "arguments": {}
}
```

TypeScript:

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

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

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.data_settings.get()
```

Go:

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

Java:

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

.NET:

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

PHP:

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

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.data_settings.get
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .data_settings()
    .get()
    .await?;
```

Response, 200 OK:

```json
{
  "object": "data_settings",
  "processing": "EU",
  "storage": {
    "kind": "regional",
    "region": "eu-west-1",
    "region_name": "Ireland",
    "bucket": null,
    "role_arn": null,
    "external_id": "kt-ext-3c9f1a7e5b20",
    "since": "2026-09-14T08:12:00Z",
    "move": null
  },
  "retention": {
    "documents": 180,
    "identity": 90,
    "biometrics": 30,
    "screenings": 90,
    "cases": 365,
    "people": 365,
    "conversations": 90
  },
  "zero_retention": false,
  "improve_models": true,
  "destinations": [],
  "offered_regions": [
    { "code": "eu-west-1", "name": "Ireland" },
    { "code": "eu-central-1", "name": "Germany (Frankfurt)" },
    { "code": "eu-north-1", "name": "Sweden (Stockholm)" }
  ]
}
```

## Change retention

How many days each kind of data is kept after its case is decided, zero retention, and whether documents may improve the models.

`PATCH /v1/settings/data`. Who may: Owner and Admin. CLI: `kontiga settings data set [--retention-documents <days>] [--retention-identity <days>] [--retention-biometrics <days|at_completion>] [--retention-screenings <days>] [--retention-cases <days>] [--retention-people <days>] [--retention-conversations <days>] [--zero-retention <true|false>] [--improve-models <true|false>]`. MCP tool: `update_data_settings`.

**Parameters**
- `retention_documents` (integer): Days documents and their files are kept after their case is decided, or after receipt for a document on no case. At least 1, at most 3,650.
- `retention_identity` (integer): Days identity verifications are kept. At least 1, at most 3,650.
- `retention_biometrics` (literal or integer): Days selfies and liveness frames are kept, or `at_completion` to delete them once the verification is done.
- `retention_screenings` (integer): Days screenings and their matches are kept. At least 1, at most 3,650.
- `retention_cases` (integer): Days decided cases are kept. At least 1, at most 3,650.
- `retention_people` (integer): Days a person with no open case is kept. At least 1, at most 3,650.
- `retention_conversations` (integer): Days assistant conversations are kept. At least 1, at most 3,650.
- `zero_retention` (boolean): Delete each document, its files and everything read from it within a day of its arrival, and turn off improving the checks with your documents. What the checks learned stays.
- `improve_models` (boolean): Whether this workspace's documents may be used to make Kontiga's checks better.

**Returns** data settings: The data settings, changed.

API:

```bash
curl -X PATCH https://api.kontiga.com/v1/settings/data \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "retention_documents": 180,
    "retention_biometrics": "at_completion"
  }'
```

CLI:

```bash
kontiga settings data set \
  --retention-documents 180 \
  --retention-biometrics at_completion
```

MCP tool `update_data_settings`:

```json
{
  "name": "update_data_settings",
  "arguments": {
    "retention_documents": 180,
    "retention_biometrics": "at_completion"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.dataSettings.update({
  retention_documents: 180,
  retention_biometrics: "at_completion",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.data_settings.update(retention_documents=180, retention_biometrics="at_completion")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.DataSettings.Update(ctx, &kontiga.DataSettingsUpdateParams{
	RetentionDocuments:  180,
	RetentionBiometrics: "at_completion",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.dataSettings().update(DataSettingsUpdateParams.builder()
    .retentionDocuments(180)
    .retentionBiometrics("at_completion")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.DataSettings.UpdateAsync(new DataSettingsUpdateOptions
{
    RetentionDocuments = 180,
    RetentionBiometrics = "at_completion",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->dataSettings->update([
    'retention_documents' => 180,
    'retention_biometrics' => 'at_completion',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.data_settings.update(retention_documents: 180, retention_biometrics: "at_completion")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .data_settings()
    .update(kontiga::data_settings::UpdateParams {
        retention_documents: 180,
        retention_biometrics: "at_completion".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "data_settings",
  "processing": "EU",
  "storage": {
    "kind": "regional",
    "region": "eu-west-1",
    "region_name": "Ireland",
    "bucket": null,
    "role_arn": null,
    "external_id": "kt-ext-3c9f1a7e5b20",
    "since": "2026-09-14T08:12:00Z",
    "move": null
  },
  "retention": {
    "documents": 180,
    "identity": 90,
    "biometrics": 30,
    "screenings": 90,
    "cases": 365,
    "people": 365,
    "conversations": 90
  },
  "zero_retention": false,
  "improve_models": true,
  "destinations": [],
  "offered_regions": [
    { "code": "eu-west-1", "name": "Ireland" },
    { "code": "eu-central-1", "name": "Germany (Frankfurt)" },
    { "code": "eu-north-1", "name": "Sweden (Stockholm)" }
  ]
}
```

## Change where files are stored

Store new files in another AWS region, in a bucket of the workspace's own, or in your own bucket. The database and processing stay in the EU. Files already stored move only if you ask.

`PUT /v1/settings/data/storage`. Who may: Owner and Admin. CLI: `kontiga settings storage set --kind <regional|dedicated|customer> --region <aws region> [--bucket <name>] [--role-arn <arn>] [--move-existing <true|false>]`. MCP tool: `set_storage_location`.

**Parameters**
- `kind` (enum, required): `regional` stores files in Kontiga's bucket of the region; `dedicated` in a bucket for this workspace alone; `customer` in your own bucket.
- `region` (string, required): The region's code, such as `eu-central-1` (Frankfurt).
- `bucket` (string): The bucket's name, for `dedicated` or `customer`.
- `role_arn` (string): The role in your account that Kontiga assumes, for `customer`. Its trust policy names the workspace's `external_id`.
- `move_existing` (boolean, default false): Move the files already stored too. Without it, only new files go to the new place.

**Returns** storage location: Where new files go from now on, and any move under way.

API:

```bash
curl -X PUT https://api.kontiga.com/v1/settings/data/storage \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "regional",
    "region": "eu-central-1",
    "move_existing": true
  }'
```

CLI:

```bash
kontiga settings storage set \
  --kind regional \
  --region eu-central-1 \
  --move-existing
```

MCP tool `set_storage_location`:

```json
{
  "name": "set_storage_location",
  "arguments": {
    "kind": "regional",
    "region": "eu-central-1",
    "move_existing": true
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.storageLocation.update({
  kind: "regional",
  region: "eu-central-1",
  move_existing: true,
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.storage_location.update(
    kind="regional",
    region="eu-central-1",
    move_existing=True,
)
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.StorageLocation.Update(ctx, &kontiga.StorageLocationUpdateParams{
	Kind:         "regional",
	Region:       "eu-central-1",
	MoveExisting: true,
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.storageLocation().update(StorageLocationUpdateParams.builder()
    .kind("regional")
    .region("eu-central-1")
    .moveExisting(true)
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.StorageLocation.UpdateAsync(new StorageLocationUpdateOptions
{
    Kind = "regional",
    Region = "eu-central-1",
    MoveExisting = true,
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->storageLocation->update([
    'kind' => 'regional',
    'region' => 'eu-central-1',
    'move_existing' => true,
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.storage_location.update(
  kind: "regional",
  region: "eu-central-1",
  move_existing: true
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .storage_location()
    .update(kontiga::storage_location::UpdateParams {
        kind: "regional".into(),
        region: "eu-central-1".into(),
        move_existing: true,
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "storage_location",
  "kind": "regional",
  "region": "eu-central-1",
  "region_name": "Germany (Frankfurt)",
  "bucket": null,
  "role_arn": null,
  "external_id": "kt-ext-3c9f1a7e5b20",
  "since": "2026-11-26T09:30:00Z",
  "move": {
    "state": "moving",
    "files_total": 1284,
    "files_moved": 0,
    "started_at": "2026-11-26T09:30:00Z",
    "from_region": "eu-west-1"
  }
}
```

## Integrations

The tools Kontiga connects to: chat for alerts and notices, storage to import files from, and the systems a decided case is written back to. A watched folder imports each new file and checks it, into a case per folder, a case per file, or as documents with no case.

### How a watched folder works

- Connect Dropbox once with `connections.connect`: a person opens the `authorization_url` within 10 minutes and allows Kontiga in, and the browser comes back to Settings > Integrations. Kontiga keeps the access encrypted and never shows it again; one Dropbox account a workspace.
- Kontiga reads a watched folder within seconds of Dropbox's notice of a change, and every 10 minutes in any case. One read at a time a folder, so a file is never imported twice.
- Files already in the folder when you start watching it are left alone. So are hidden files, files whose name starts with `~$`, and anything inside the results folder or a folder named `Processed`.
- A file is imported when it is a PDF, JPEG or PNG by its content, not its name, of 1 byte to 64 MB. Any other file is listed as skipped, with the reason.
- `documents_only` takes the files of the folder itself, each a checked document with no case. `case_per_file` opens a case of the collection for each file, named after the file. `case_per_folder` reads the folders inside it: each becomes a case of the collection with the folder's name as its reference, or the open case that already has that reference. A file in a subfolder named after a checklist item's key, or whose name names the item's document type (`payslip-october.pdf`), goes onto that item of the case's open request; any other file goes on the case.
- Once imported, a file moves into the results folder (`Processed` by default) at the same place it had in the watched folder, so the folder shows only what is still to come. With `results_folder` null it stays where it is. Kontiga never deletes a file in your storage.
- A file that could not be downloaded or imported is tried again by the next two reads, then waits for `storage_syncs.import_item`.
- When Dropbox stops accepting Kontiga's access, the integration shows as broken with the reason, the activity log records it once, and its watched folders wait. Nothing is lost: connect it again and each folder goes on from where it stopped.
- On a Dropbox Business account, a folder is read from the team folders (the default), or as one team member by their email. Kontiga reads the folders of the account that connected Dropbox and the team folders; to watch another member's own folders, connect Dropbox as that member.
- Each imported file is a document like any other: checked, priced and kept as the workspace's documents are, and listed in Documents with its source.

What a refused call answers

| Code | Status | When |
| --- | --- | --- |
| `already_connected` | 409 | The integration is connected. Disconnect it first to connect another account. |
| `connection_not_connected` | 409 | The integration is not connected, so it has no folders to browse or watch. |
| `connection_broken` | 409 | The integration stopped working. Connect it again. |
| `folder_watched` | 409 | The folder is watched already. One watched folder a folder. |
| `team_member_unreadable` | 409 | The team member's own folders are not readable with this connection. Connect Dropbox as that member, or watch a team folder. |
| `already_imported` | 409 | The file is imported already. |
| `not_importable` | 409 | The folder's rules do not take the file. The message says why. |
| `collection_gone` | 409 | The collection the folder's cases use was deleted. Choose another with `storage_syncs.update`. |
| `file_gone` | 409 | The file is no longer in the watched folder. |
| `storage_unavailable` | 503 | Dropbox did not answer. Try again after `Retry-After`. |

## List the integrations

Each tool Kontiga can connect to, whether it is connected, what uses it, and what went wrong if it stopped working.

`GET /v1/connections`. Who may: Owner, Admin, Analyst, Developer and Viewer. CLI: `kontiga connections list`. MCP tool: `list_connections`.

**Parameters**

**Returns** list of connections: Every integration and its state.

API:

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

CLI:

```bash
kontiga connections list
```

MCP tool `list_connections`:

```json
{
  "name": "list_connections",
  "arguments": {}
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.connections.list();
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.connections.list()
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Connections.List(ctx)
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.connections().list();
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Connections.ListAsync();
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->connections->list();
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.connections.list
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .connections()
    .list()
    .await?;
```

Response, 200 OK:

```json
{
  "items": [
    {
      "id": "con_6Sk1Vt4",
      "object": "connection",
      "kind": "slack",
      "name": "Slack",
      "group": "chat",
      "state": "connected",
      "account": "brightwater-lending.slack.com",
      "connected_at": "2026-10-24T09:00:00Z",
      "last_error": null,
      "used_by": ["Alert: A document is High risk"]
    },
    {
      "id": "con_2Dx7Rb9",
      "object": "connection",
      "kind": "dropbox",
      "name": "Dropbox",
      "group": "storage",
      "state": "broken",
      "account": "Brightwater Lending (Dropbox Business)",
      "connected_at": "2026-10-06T10:02:00Z",
      "last_error": "Dropbox stopped accepting Kontiga's access on 24 Nov. New files in the Loan applications folder are not imported until it is connected again.",
      "used_by": ["Storage sync: Loan applications"]
    }
  ],
  "next_cursor": null
}
```

## Connect an integration

Opens the tool's own sign-in, where a person allows Kontiga in; the connection is ready when they return.

`POST /v1/connections`. Who may: Owner and Admin. CLI: `kontiga connections connect --kind <slack|teams|microsoft_365|google|dropbox|aws_role|salesforce|hubspot|guidewire|duck_creek>`. MCP tool: `connect_integration`.

**Parameters**
- `kind` (enum, required): The tool to connect. One of `slack`, `teams`, `microsoft_365`, `google`, `dropbox`, `aws_role`, `salesforce`, `hubspot`, `guidewire`, `duck_creek`.

**Returns** connection: The connection, with the address a person opens to allow access.

API:

```bash
curl -X POST https://api.kontiga.com/v1/connections \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "hubspot"
  }'
```

CLI:

```bash
kontiga connections connect --kind hubspot
```

MCP tool `connect_integration`:

```json
{
  "name": "connect_integration",
  "arguments": {
    "kind": "hubspot"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.connections.connect({
  kind: "hubspot",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.connections.connect(kind="hubspot")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Connections.Connect(ctx, &kontiga.ConnectionsConnectParams{
	Kind: "hubspot",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.connections().connect(ConnectionsConnectParams.builder()
    .kind("hubspot")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Connections.ConnectAsync(new ConnectionsConnectOptions
{
    Kind = "hubspot",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->connections->connect([
    'kind' => 'hubspot',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.connections.connect(kind: "hubspot")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .connections()
    .connect(kontiga::connections::ConnectParams {
        kind: "hubspot".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "id": "con_9Hb3Lw5",
  "object": "connection",
  "kind": "hubspot",
  "name": "HubSpot",
  "group": "crm",
  "purpose": "Cases and people written back to your records",
  "state": "connected",
  "account": "brightwater-lending portal 48120937",
  "connected_at": "2026-11-26T09:22:10Z",
  "used_by": [],
  "authorization_url": "https://connect.kontiga.com/hubspot/start?workspace=ws_8Rq4Lm2"
}
```

## Disconnect an integration

Kontiga stops using it at once and forgets its credentials. What used it stops until it is connected again.

`DELETE /v1/connections/{connection_id}`. Who may: Owner and Admin. CLI: `kontiga connections disconnect <connection_id>`. MCP tool: `disconnect_integration`.

**Parameters**
- `connection_id` (id (con_), required): The connection to end. In the path.

**Returns** connection: The integration, not connected.

API:

```bash
curl -X DELETE https://api.kontiga.com/v1/connections/con_9Hb3Lw5 \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga connections disconnect con_9Hb3Lw5
```

MCP tool `disconnect_integration`:

```json
{
  "name": "disconnect_integration",
  "arguments": {
    "connection_id": "con_9Hb3Lw5"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.connections.disconnect("con_9Hb3Lw5");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.connections.disconnect("con_9Hb3Lw5")
```

Go:

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

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.connections().disconnect("con_9Hb3Lw5");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Connections.DisconnectAsync("con_9Hb3Lw5");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->connections->disconnect('con_9Hb3Lw5');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.connections.disconnect("con_9Hb3Lw5")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .connections()
    .disconnect("con_9Hb3Lw5".into())
    .await?;
```

Response, 200 OK:

```json
{
  "id": "con_9Hb3Lw5",
  "object": "connection",
  "kind": "hubspot",
  "name": "HubSpot",
  "state": "not_connected",
  "account": null,
  "connected_at": null,
  "used_by": []
}
```

## Browse a connected storage

The folders inside one folder of a connected storage (Dropbox, Google Drive, OneDrive or SharePoint), to choose the one Kontiga watches. Files are counted, never listed.

`GET /v1/connections/{connection_id}/folders`. Who may: Owner and Admin. CLI: `kontiga connections folders <connection_id> [--path </folder>] [--team-access <member|team_folders>] [--team-member-email <email>]`. MCP tool: `list_storage_folders`.

**Parameters**
- `connection_id` (id (con_), required): The connected storage. In the path.
- `path` (string): The folder to open, from the storage's root. Left out, the root. At most 1,000 characters.
- `team_access` (enum): On a Dropbox Business account: read as one team member, or from the team folders. One of `member`, `team_folders`.
- `team_member_email` (email): The team member to read as, with `team_access` `member`.

**Returns** folder listing: The folder asked for (the root by default) and the folders in it.

API:

```bash
curl -X GET "https://api.kontiga.com/v1/connections/con_2Dx7Rb9/folders?path=%2FLoan+applications&team_access=team_folders" \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga connections folders con_2Dx7Rb9 \
  --path '/Loan applications' \
  --team-access team_folders
```

MCP tool `list_storage_folders`:

```json
{
  "name": "list_storage_folders",
  "arguments": {
    "connection_id": "con_2Dx7Rb9",
    "path": "/Loan applications",
    "team_access": "team_folders"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.storageFolders.list("con_2Dx7Rb9", {
  path: "/Loan applications",
  team_access: "team_folders",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.storage_folders.list(
    "con_2Dx7Rb9",
    path="/Loan applications",
    team_access="team_folders",
)
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.StorageFolders.List(ctx, "con_2Dx7Rb9", &kontiga.StorageFoldersListParams{
	Path:       "/Loan applications",
	TeamAccess: "team_folders",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.storageFolders().list("con_2Dx7Rb9", StorageFoldersListParams.builder()
    .path("/Loan applications")
    .teamAccess("team_folders")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.StorageFolders.ListAsync("con_2Dx7Rb9", new StorageFoldersListOptions
{
    Path = "/Loan applications",
    TeamAccess = "team_folders",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->storageFolders->list('con_2Dx7Rb9', [
    'path' => '/Loan applications',
    'team_access' => 'team_folders',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.storage_folders.list(
  "con_2Dx7Rb9",
  path: "/Loan applications",
  team_access: "team_folders"
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .storage_folders()
    .list("con_2Dx7Rb9".into(), kontiga::storage_folders::ListParams {
        path: "/Loan applications".into(),
        team_access: "team_folders".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "folder_listing",
  "path": "/Loan applications",
  "folders": [
    { "path": "/Loan applications/Incoming", "name": "Incoming", "folders": 14, "files": 3 },
    { "path": "/Loan applications/Archive 2025", "name": "Archive 2025", "folders": 212, "files": 0 }
  ]
}
```

## List the watched folders

Every folder Kontiga watches in a connected storage, where its new files go, whether it is on, and what it imported in the last 30 days.

`GET /v1/storage_syncs`. Who may: Owner, Admin, Analyst, Developer and Viewer. CLI: `kontiga storage-syncs list`. MCP tool: `list_storage_syncs`.

**Parameters**

**Returns** list of storage syncs: The watched folders, newest first.

API:

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

CLI:

```bash
kontiga storage-syncs list
```

MCP tool `list_storage_syncs`:

```json
{
  "name": "list_storage_syncs",
  "arguments": {}
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.storageSyncs.list();
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.storage_syncs.list()
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.StorageSyncs.List(ctx)
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.storageSyncs().list();
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.StorageSyncs.ListAsync();
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->storageSyncs->list();
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.storage_syncs.list
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .storage_syncs()
    .list()
    .await?;
```

Response, 200 OK:

```json
{
  "object": "list",
  "items": [
    {
      "id": "ssy_7Nc4Pg2",
      "object": "storage_sync",
      "provider": "Dropbox",
      "folder_path": "/Loan applications/Incoming",
      "route": "case_per_folder",
      "collection_name": "Personal loan",
      "state": "waiting",
      "imported_30d": 87,
      "last_import_at": "2026-11-24T05:02:00Z"
    }
  ],
  "next_cursor": null
}
```

## Watch a folder

Kontiga imports every new file that lands in the folder and checks it. A case per folder: each folder inside it becomes a case with the collection's checklist. A case per file: each file opens its own case. Documents only: each file is checked, with no case. Files already there are left alone.

`POST /v1/storage_syncs`. Who may: Owner and Admin. CLI: `kontiga storage-syncs create --connection-id <con_id> --folder-path </folder> --route <case_per_folder|case_per_file|documents_only> [--collection-id <col_id>] [--results-folder <name>] [--team-access <member|team_folders>] [--team-member-email <email>]`. MCP tool: `create_storage_sync`.

**Parameters**
- `connection_id` (id (con_), required): The connected storage.
- `folder_path` (string, required): The folder to watch, from the storage's root. At most 1,000 characters.
- `route` (enum, required): Where each new file goes: a case per folder inside it, a case per file, or a document with no case. One of `case_per_folder`, `case_per_file`, `documents_only`.
- `collection_id` (id (col_)): The collection whose checklist each new case gets, for a route that makes cases. `null` clears it.
- `results_folder` (string): A subfolder of the watched folder that each file moves to once imported, so the folder shows only what is still to come. At most 120 characters. `null` clears it.
- `team_access` (enum): On a Dropbox Business account: read as one team member, or from the team folders. One of `member`, `team_folders`.
- `team_member_email` (email): The team member to read as, with `team_access` `member`.

**Returns** storage sync: The watched folder, on.

API:

```bash
curl -X POST https://api.kontiga.com/v1/storage_syncs \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connection_id": "con_2Dx7Rb9",
    "folder_path": "/Loan applications/Incoming",
    "route": "case_per_folder",
    "collection_id": "col_5Gk3Tm7",
    "results_folder": "Processed"
  }'
```

CLI:

```bash
kontiga storage-syncs create \
  --connection-id con_2Dx7Rb9 \
  --folder-path '/Loan applications/Incoming' \
  --route case_per_folder \
  --collection-id col_5Gk3Tm7 \
  --results-folder Processed
```

MCP tool `create_storage_sync`:

```json
{
  "name": "create_storage_sync",
  "arguments": {
    "connection_id": "con_2Dx7Rb9",
    "folder_path": "/Loan applications/Incoming",
    "route": "case_per_folder",
    "collection_id": "col_5Gk3Tm7",
    "results_folder": "Processed"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.storageSyncs.create({
  connection_id: "con_2Dx7Rb9",
  folder_path: "/Loan applications/Incoming",
  route: "case_per_folder",
  collection_id: "col_5Gk3Tm7",
  results_folder: "Processed",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.storage_syncs.create(
    connection_id="con_2Dx7Rb9",
    folder_path="/Loan applications/Incoming",
    route="case_per_folder",
    collection_id="col_5Gk3Tm7",
    results_folder="Processed",
)
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.StorageSyncs.Create(ctx, &kontiga.StorageSyncsCreateParams{
	ConnectionId:  "con_2Dx7Rb9",
	FolderPath:    "/Loan applications/Incoming",
	Route:         "case_per_folder",
	CollectionId:  "col_5Gk3Tm7",
	ResultsFolder: "Processed",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.storageSyncs().create(StorageSyncsCreateParams.builder()
    .connectionId("con_2Dx7Rb9")
    .folderPath("/Loan applications/Incoming")
    .route("case_per_folder")
    .collectionId("col_5Gk3Tm7")
    .resultsFolder("Processed")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.StorageSyncs.CreateAsync(new StorageSyncsCreateOptions
{
    ConnectionId = "con_2Dx7Rb9",
    FolderPath = "/Loan applications/Incoming",
    Route = "case_per_folder",
    CollectionId = "col_5Gk3Tm7",
    ResultsFolder = "Processed",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->storageSyncs->create([
    'connection_id' => 'con_2Dx7Rb9',
    'folder_path' => '/Loan applications/Incoming',
    'route' => 'case_per_folder',
    'collection_id' => 'col_5Gk3Tm7',
    'results_folder' => 'Processed',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.storage_syncs.create(
  connection_id: "con_2Dx7Rb9",
  folder_path: "/Loan applications/Incoming",
  route: "case_per_folder",
  collection_id: "col_5Gk3Tm7",
  results_folder: "Processed"
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .storage_syncs()
    .create(kontiga::storage_syncs::CreateParams {
        connection_id: "con_2Dx7Rb9".into(),
        folder_path: "/Loan applications/Incoming".into(),
        route: "case_per_folder".into(),
        collection_id: "col_5Gk3Tm7".into(),
        results_folder: "Processed".into(),
        ..Default::default()
    })
    .await?;
```

Response, 201 Created:

```json
{
  "id": "ssy_7Nc4Pg2",
  "object": "storage_sync",
  "connection_id": "con_2Dx7Rb9",
  "provider": "Dropbox",
  "folder_path": "/Loan applications/Incoming",
  "route": "case_per_folder",
  "collection_id": "col_5Gk3Tm7",
  "collection_name": "Personal loan",
  "state": "on",
  "imported_30d": 87,
  "outcomes_30d": { "checking": 2, "failed": 1, "trusted": 71, "review": 11, "high_risk": 2 },
  "results_folder": "Processed",
  "last_import_at": "2026-11-24T06:42:00Z",
  "team_access": { "kind": "team_folders" },
  "created_at": "2026-10-07T09:00:00Z",
  "created_by": "Maria Lind"
}
```

## Change a watched folder

Pause or resume it, or change where its new files go. Files already imported stay where they are.

`PATCH /v1/storage_syncs/{sync_id}`. Who may: Owner and Admin. CLI: `kontiga storage-syncs update <sync_id> [--state <on|paused>] [--route <case_per_folder|case_per_file|documents_only>] [--collection-id <col_id>]`. MCP tool: `update_storage_sync`.

**Parameters**
- `sync_id` (id (ssy_), required): The watched folder. In the path.
- `state` (enum): Pause it, or turn it on again. One of `on`, `paused`.
- `route` (enum): Where new files go from now on. One of `case_per_folder`, `case_per_file`, `documents_only`.
- `collection_id` (id (col_)): The collection new cases get from now on. `null` clears it.

**Returns** storage sync: The watched folder, changed.

API:

```bash
curl -X PATCH https://api.kontiga.com/v1/storage_syncs/ssy_7Nc4Pg2 \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "state": "paused"
  }'
```

CLI:

```bash
kontiga storage-syncs update ssy_7Nc4Pg2 --state paused
```

MCP tool `update_storage_sync`:

```json
{
  "name": "update_storage_sync",
  "arguments": {
    "sync_id": "ssy_7Nc4Pg2",
    "state": "paused"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.storageSyncs.update("ssy_7Nc4Pg2", {
  state: "paused",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.storage_syncs.update("ssy_7Nc4Pg2", state="paused")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.StorageSyncs.Update(ctx, "ssy_7Nc4Pg2", &kontiga.StorageSyncsUpdateParams{
	State: "paused",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.storageSyncs().update("ssy_7Nc4Pg2", StorageSyncsUpdateParams.builder()
    .state("paused")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.StorageSyncs.UpdateAsync("ssy_7Nc4Pg2", new StorageSyncsUpdateOptions
{
    State = "paused",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->storageSyncs->update('ssy_7Nc4Pg2', [
    'state' => 'paused',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.storage_syncs.update("ssy_7Nc4Pg2", state: "paused")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .storage_syncs()
    .update("ssy_7Nc4Pg2".into(), kontiga::storage_syncs::UpdateParams {
        state: "paused".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "id": "ssy_7Nc4Pg2",
  "object": "storage_sync",
  "connection_id": "con_2Dx7Rb9",
  "provider": "Dropbox",
  "folder_path": "/Loan applications/Incoming",
  "route": "case_per_folder",
  "collection_id": "col_5Gk3Tm7",
  "collection_name": "Personal loan",
  "state": "on",
  "imported_30d": 87,
  "outcomes_30d": { "checking": 2, "failed": 1, "trusted": 71, "review": 11, "high_risk": 2 },
  "results_folder": "Processed",
  "last_import_at": "2026-11-24T06:42:00Z",
  "team_access": { "kind": "team_folders" },
  "created_at": "2026-10-07T09:00:00Z",
  "created_by": "Maria Lind"
}
```

## Stop watching a folder

Kontiga stops importing from the folder. Nothing in the folder or in Kontiga is deleted.

`DELETE /v1/storage_syncs/{sync_id}`. Who may: Owner and Admin. CLI: `kontiga storage-syncs delete <sync_id>`. MCP tool: `delete_storage_sync`.

**Parameters**
- `sync_id` (id (ssy_), required): The watched folder to stop watching. In the path.

**Returns** storage sync, deleted: The folder is no longer watched.

API:

```bash
curl -X DELETE https://api.kontiga.com/v1/storage_syncs/ssy_7Nc4Pg2 \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga storage-syncs delete ssy_7Nc4Pg2
```

MCP tool `delete_storage_sync`:

```json
{
  "name": "delete_storage_sync",
  "arguments": {
    "sync_id": "ssy_7Nc4Pg2"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.storageSyncs.delete("ssy_7Nc4Pg2");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.storage_syncs.delete("ssy_7Nc4Pg2")
```

Go:

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

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.storageSyncs().delete("ssy_7Nc4Pg2");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.StorageSyncs.DeleteAsync("ssy_7Nc4Pg2");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->storageSyncs->delete('ssy_7Nc4Pg2');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.storage_syncs.delete("ssy_7Nc4Pg2")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .storage_syncs()
    .delete("ssy_7Nc4Pg2".into())
    .await?;
```

Response, 200 OK:

```json
{
  "id": "ssy_7Nc4Pg2",
  "object": "storage_sync",
  "deleted": true
}
```

## Read an integration

One integration: whether it is connected, the account on the other side, what in the workspace uses it, and what went wrong if it stopped working. Credentials are never shown.

`GET /v1/connections/{connection_id}`. Who may: Owner, Admin, Analyst, Developer and Viewer. CLI: `kontiga connections get <connection_id>`. MCP tool: `get_connection`.

**Parameters**
- `connection_id` (id (con_), required): The integration to read. In the path.

**Returns** connection: The integration and its state.

API:

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

CLI:

```bash
kontiga connections get con_2Dx7Rb9
```

MCP tool `get_connection`:

```json
{
  "name": "get_connection",
  "arguments": {
    "connection_id": "con_2Dx7Rb9"
  }
}
```

TypeScript:

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

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

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.connections.get("con_2Dx7Rb9")
```

Go:

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

Java:

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

.NET:

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

PHP:

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

Ruby:

```ruby
require "kontiga"

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

Rust:

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

Response, 200 OK:

```json
{
  "id": "con_2Dx7Rb9",
  "object": "connection",
  "kind": "dropbox",
  "name": "Dropbox",
  "group": "storage",
  "state": "connected",
  "account": "Brightwater Lending (team)",
  "connected_at": "2026-10-24T09:12:00Z",
  "last_error": null,
  "broken_at": null,
  "used_by": ["Storage sync: Incoming"],
  "team_account": true
}
```

## List a watched folder's files

The files Kontiga found in a watched folder, newest first: imported (with the case and the document they became), skipped and why, or not imported because of an error.

`GET /v1/storage_syncs/{sync_id}/items`. Who may: Owner, Admin, Analyst, Developer and Viewer. CLI: `kontiga storage-syncs items <sync_id> [--state <imported|skipped|failed>] [--limit <n>] [--cursor <next_cursor>]`. MCP tool: `list_storage_sync_items`.

**Parameters**
- `sync_id` (id (ssy_), required): The watched folder. In the path.
- `state` (enum): Only files `imported`, `skipped` or `failed`.
- `limit` (integer): How many to answer, 1 to 200 (50 when left out).
- `cursor` (id (ssi_)): The `next_cursor` of the page before, for the next page. Files are newest first.

**Returns** list of storage sync items: The folder's files, newest first, each with what became of it.

API:

```bash
curl -X GET "https://api.kontiga.com/v1/storage_syncs/ssy_7Nc4Pg2/items?state=failed" \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga storage-syncs items ssy_7Nc4Pg2 --state failed
```

MCP tool `list_storage_sync_items`:

```json
{
  "name": "list_storage_sync_items",
  "arguments": {
    "sync_id": "ssy_7Nc4Pg2",
    "state": "failed"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.storageSyncs.items("ssy_7Nc4Pg2", {
  state: "failed",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.storage_syncs.items("ssy_7Nc4Pg2", state="failed")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.StorageSyncs.Items(ctx, "ssy_7Nc4Pg2", &kontiga.StorageSyncsItemsParams{
	State: "failed",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.storageSyncs().items("ssy_7Nc4Pg2", StorageSyncsItemsParams.builder()
    .state("failed")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.StorageSyncs.ItemsAsync("ssy_7Nc4Pg2", new StorageSyncsItemsOptions
{
    State = "failed",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->storageSyncs->items('ssy_7Nc4Pg2', [
    'state' => 'failed',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.storage_syncs.items("ssy_7Nc4Pg2", state: "failed")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .storage_syncs()
    .items("ssy_7Nc4Pg2".into(), kontiga::storage_syncs::ItemsParams {
        state: "failed".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "list",
  "items": [{
  "id": "ssi_8Wc3Kd6",
  "object": "storage_sync_item",
  "sync_id": "ssy_7Nc4Pg2",
  "path": "/Loan applications/Incoming/BW-4611/statement.pdf",
  "file_name": "statement.pdf",
  "seen_at": "2026-11-26T08:10:00Z",
  "state": "failed",
  "reason": "The file could not be downloaded from the storage.",
  "case_id": null,
  "document_id": null,
  "imported_at": null,
  "moved_to": null
}],
  "next_cursor": null
}
```

## Import a file again

Try one file of a watched folder again, after it failed or was skipped: it is imported by the folder's route, as a new file would be.

`POST /v1/storage_syncs/{sync_id}/items/{item_id}/import`. Who may: Owner and Admin. CLI: `kontiga storage-syncs import <sync_id> <item_id>`. MCP tool: `import_storage_sync_item`.

**Parameters**
- `sync_id` (id (ssy_), required): The watched folder. In the path.
- `item_id` (id (ssi_), required): A file that failed or was skipped. It is read again from the storage and imported by the folder's route; a file the folder's rules do not take (its type, its size, a file with no folder of its own on a case per folder) is refused with `not_importable` and the reason. In the path.

**Returns** storage sync item: The file, imported, with the case and the document it became.

API:

```bash
curl -X POST https://api.kontiga.com/v1/storage_syncs/ssy_7Nc4Pg2/items/ssi_8Wc3Kd6/import \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga storage-syncs import ssy_7Nc4Pg2 ssi_8Wc3Kd6
```

MCP tool `import_storage_sync_item`:

```json
{
  "name": "import_storage_sync_item",
  "arguments": {
    "sync_id": "ssy_7Nc4Pg2",
    "item_id": "ssi_8Wc3Kd6"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.storageSyncs.importItem("ssy_7Nc4Pg2", "ssi_8Wc3Kd6");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.storage_syncs.import_item("ssy_7Nc4Pg2", "ssi_8Wc3Kd6")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.StorageSyncs.ImportItem(ctx, "ssy_7Nc4Pg2", "ssi_8Wc3Kd6")
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.storageSyncs().importItem("ssy_7Nc4Pg2", "ssi_8Wc3Kd6");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.StorageSyncs.ImportItemAsync("ssy_7Nc4Pg2", "ssi_8Wc3Kd6");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->storageSyncs->importItem('ssy_7Nc4Pg2', 'ssi_8Wc3Kd6');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.storage_syncs.import_item("ssy_7Nc4Pg2", "ssi_8Wc3Kd6")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .storage_syncs()
    .import_item("ssy_7Nc4Pg2".into(), "ssi_8Wc3Kd6".into())
    .await?;
```

Response, 200 OK:

```json
{
  "id": "ssi_8Wc3Kd6",
  "object": "storage_sync_item",
  "sync_id": "ssy_7Nc4Pg2",
  "path": "/Loan applications/Incoming/BW-4611/statement.pdf",
  "file_name": "statement.pdf",
  "seen_at": "2026-11-26T08:10:00Z",
  "state": "imported",
  "reason": null,
  "case_id": "case_3Fp8Lc1",
  "document_id": "doc_2Hy6Qa4",
  "imported_at": "2026-11-26T08:10:04Z",
  "moved_to": "/Loan applications/Incoming/Processed/statement.pdf"
}
```

## Cases and approvals

The word the team uses for a case (Claims, Applications or its own), when a case is due and when members are warned, whether references are unique, and what a new document does to a decided case. An approval rule asks a second member to approve a decision that matches it, before the outcome is final.

> **The word is for your team, never for the API.** The API, the CLI, the MCP server and webhooks always say case and cases, whatever the word: `/v1/cases`, `case_` ids, `case_id`, `case.*` events. Read `word_singular` and `word_plural` to write to your team in its own word. `offered_words` are the words the setup and Settings offer, the industry's likeliest first.

## Read the case rules

The word the team uses for a case on its screens, when a case is due, the working calendar, when members are warned, whether references are unique, and what happens to a decided case when something new arrives. The API always says case and cases, whatever the word.

`GET /v1/settings/cases`. Who may: Owner, Admin, Analyst, Developer and Viewer. CLI: `kontiga settings cases get`. MCP tool: `get_case_settings`.

**Parameters**

**Returns** case settings: The workspace's case rules.

API:

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

CLI:

```bash
kontiga settings cases get
```

MCP tool `get_case_settings`:

```json
{
  "name": "get_case_settings",
  "arguments": {}
}
```

TypeScript:

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

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

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.case_settings.get()
```

Go:

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

Java:

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

.NET:

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

PHP:

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

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.case_settings.get
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .case_settings()
    .get()
    .await?;
```

Response, 200 OK:

```json
{
  "object": "case_settings",
  "word_singular": "Application",
  "word_plural": "Applications",
  "offered_words": [
    { "singular": "Application", "plural": "Applications" },
    { "singular": "Case", "plural": "Cases" },
    { "singular": "Claim", "plural": "Claims" },
    { "singular": "File", "plural": "Files" },
    { "singular": "Matter", "plural": "Matters" },
    { "singular": "Dossier", "plural": "Dossiers" },
    { "singular": "Onboarding", "plural": "Onboardings" }
  ],
  "default_due_hours": 24,
  "due_calendar": "working_hours",
  "working_calendar": {
    "time_zone": "Europe/Amsterdam",
    "days": ["mon", "tue", "wed", "thu", "fri"],
    "start": "09:00",
    "end": "17:30"
  },
  "warn_at_percent": 75,
  "unique_reference": true,
  "reopen_on_raised_verdict": true,
  "after_decision": "flag"
}
```

## Change the case rules

The word the team uses for a case, due times, the working calendar, the warning, unique references and what happens to a decided case.

`PATCH /v1/settings/cases`. Who may: Owner and Admin. CLI: `kontiga settings cases set [--word-singular <text>] [--word-plural <text>] [--default-due-hours <hours>] [--due-calendar <calendar_hours|working_hours>] [--working-time-zone <IANA zone>] [--working-days <mon,tue,...>] [--working-start <hh:mm>] [--working-end <hh:mm>] [--warn-at-percent <10-95>] [--unique-reference <true|false>] [--reopen-on-raised-verdict <true|false>] [--after-decision <flag|reopen>]`. MCP tool: `update_case_settings`.

**Parameters**
- `word_singular` (string): The word for one case on your team's screens, up to 30 characters, such as `Claim`.
- `word_plural` (string): The word for many, such as `Claims`. At most 30 characters.
- `default_due_hours` (integer): Hours from when a case comes in until it is due. At least 1, at most 720.
- `due_calendar` (enum): Count every hour, or only the working hours of the calendar below. One of `calendar_hours`, `working_hours`.
- `working_time_zone` (string): The working calendar's time zone. At most 64 characters.
- `working_days` (array of enum): The working days. One of `mon`, `tue`, `wed`, `thu`, `fri`, `sat`, `sun`. At most 7 items.
- `working_start` (string): When a working day starts, as `HH:MM`.
- `working_end` (string): When a working day ends, as `HH:MM`.
- `warn_at_percent` (integer): Members are warned when this share of the due time is gone. At least 10, at most 95.
- `unique_reference` (boolean): A case's reference is unique in the workspace, in live and in test.
- `reopen_on_raised_verdict` (boolean): A decided case opens again when a full result raises a document's verdict above the one decided on.
- `after_decision` (enum): What a new document or result does to a decided case: flag it, or open it again. One of `flag`, `reopen`.

**Returns** case settings: The case rules, changed.

API:

```bash
curl -X PATCH https://api.kontiga.com/v1/settings/cases \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "word_singular": "Application",
    "word_plural": "Applications",
    "default_due_hours": 24,
    "due_calendar": "working_hours",
    "working_days": [
      "mon",
      "tue",
      "wed",
      "thu",
      "fri"
    ],
    "working_start": "09:00",
    "working_end": "17:30"
  }'
```

CLI:

```bash
kontiga settings cases set \
  --word-singular Application \
  --word-plural Applications \
  --default-due-hours 24 \
  --due-calendar working_hours \
  --working-days mon,tue,wed,thu,fri \
  --working-start 09:00 \
  --working-end 17:30
```

MCP tool `update_case_settings`:

```json
{
  "name": "update_case_settings",
  "arguments": {
    "word_singular": "Application",
    "word_plural": "Applications",
    "default_due_hours": 24,
    "due_calendar": "working_hours",
    "working_days": [
      "mon",
      "tue",
      "wed",
      "thu",
      "fri"
    ],
    "working_start": "09:00",
    "working_end": "17:30"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.caseSettings.update({
  word_singular: "Application",
  word_plural: "Applications",
  default_due_hours: 24,
  due_calendar: "working_hours",
  working_days: ["mon", "tue", "wed", "thu", "fri"],
  working_start: "09:00",
  working_end: "17:30",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.case_settings.update(
    word_singular="Application",
    word_plural="Applications",
    default_due_hours=24,
    due_calendar="working_hours",
    working_days=["mon", "tue", "wed", "thu", "fri"],
    working_start="09:00",
    working_end="17:30",
)
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.CaseSettings.Update(ctx, &kontiga.CaseSettingsUpdateParams{
	WordSingular:    "Application",
	WordPlural:      "Applications",
	DefaultDueHours: 24,
	DueCalendar:     "working_hours",
	WorkingDays:     []string{"mon", "tue", "wed", "thu", "fri"},
	WorkingStart:    "09:00",
	WorkingEnd:      "17:30",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.caseSettings().update(CaseSettingsUpdateParams.builder()
    .wordSingular("Application")
    .wordPlural("Applications")
    .defaultDueHours(24)
    .dueCalendar("working_hours")
    .workingDays(List.of("mon", "tue", "wed", "thu", "fri"))
    .workingStart("09:00")
    .workingEnd("17:30")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.CaseSettings.UpdateAsync(new CaseSettingsUpdateOptions
{
    WordSingular = "Application",
    WordPlural = "Applications",
    DefaultDueHours = 24,
    DueCalendar = "working_hours",
    WorkingDays = new[] { "mon", "tue", "wed", "thu", "fri" },
    WorkingStart = "09:00",
    WorkingEnd = "17:30",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->caseSettings->update([
    'word_singular' => 'Application',
    'word_plural' => 'Applications',
    'default_due_hours' => 24,
    'due_calendar' => 'working_hours',
    'working_days' => ['mon', 'tue', 'wed', 'thu', 'fri'],
    'working_start' => '09:00',
    'working_end' => '17:30',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.case_settings.update(
  word_singular: "Application",
  word_plural: "Applications",
  default_due_hours: 24,
  due_calendar: "working_hours",
  working_days: ["mon", "tue", "wed", "thu", "fri"],
  working_start: "09:00",
  working_end: "17:30"
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .case_settings()
    .update(kontiga::case_settings::UpdateParams {
        word_singular: "Application".into(),
        word_plural: "Applications".into(),
        default_due_hours: 24,
        due_calendar: "working_hours".into(),
        working_days: vec!["mon".into(), "tue".into(), "wed".into(), "thu".into(), "fri".into()],
        working_start: "09:00".into(),
        working_end: "17:30".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "case_settings",
  "word_singular": "Application",
  "word_plural": "Applications",
  "offered_words": [
    { "singular": "Application", "plural": "Applications" },
    { "singular": "Case", "plural": "Cases" },
    { "singular": "Claim", "plural": "Claims" },
    { "singular": "File", "plural": "Files" },
    { "singular": "Matter", "plural": "Matters" },
    { "singular": "Dossier", "plural": "Dossiers" },
    { "singular": "Onboarding", "plural": "Onboardings" }
  ],
  "default_due_hours": 24,
  "due_calendar": "working_hours",
  "working_calendar": {
    "time_zone": "Europe/Amsterdam",
    "days": ["mon", "tue", "wed", "thu", "fri"],
    "start": "09:00",
    "end": "17:30"
  },
  "warn_at_percent": 75,
  "unique_reference": true,
  "reopen_on_raised_verdict": true,
  "after_decision": "flag"
}
```

## List the second approver rules

When a decision needs a second member to approve it: the conditions, who may approve, and in how many hours.

`GET /v1/approval_rules`. Who may: Owner, Admin, Analyst, Developer and Viewer. CLI: `kontiga approvals list`. MCP tool: `list_approval_rules`.

**Parameters**

**Returns** list of approval rules: The rules, in the order they are tried.

API:

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

CLI:

```bash
kontiga approvals list
```

MCP tool `list_approval_rules`:

```json
{
  "name": "list_approval_rules",
  "arguments": {}
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.approvalRules.list();
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.approval_rules.list()
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.ApprovalRules.List(ctx)
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.approvalRules().list();
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.ApprovalRules.ListAsync();
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->approvalRules->list();
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.approval_rules.list
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .approval_rules()
    .list()
    .await?;
```

Response, 200 OK:

```json
{
  "items": [
    {
      "id": "arl_4Wm8Tc6",
      "object": "approval_rule",
      "name": "Loans of 50,000 or more",
      "active": true,
      "position": 0,
      "outcomes": ["approved"],
      "amount_at_least": 50000,
      "pool": "any_decider",
      "due_hours": 8
    },
    {
      "id": "arl_1Qz5Hd3",
      "object": "approval_rule",
      "name": "Rejections for document fraud",
      "active": true,
      "position": 1,
      "outcomes": ["rejected"],
      "reasons": ["document_fraud"],
      "pool": "members",
      "member_ids": ["mem_6Tb1Nf8"],
      "due_hours": 4
    }
  ],
  "next_cursor": null
}
```

## Add a second approver rule

Ask for a second approver when a decision matches: an outcome, an amount at or above a value, a document's verdict or a reason.

`POST /v1/approval_rules`. Who may: Owner and Admin. CLI: `kontiga approvals create --name <text> --outcomes <approved|rejected|needs_attention>,... [--amount-at-least <value>] [--any-document-verdict <trusted|review|high_risk>,...] [--reasons <code>,...] [--pool <queue_leads|any_decider|members>] [--member-ids <mem_id>,...] [--due-hours <1-168>]`. MCP tool: `create_approval_rule`.

**Parameters**
- `name` (string, required): The rule's name, as the approver sees it. At most 80 characters.
- `outcomes` (array of enum, required): The outcomes it applies to. One of `approved`, `rejected`, `needs_attention`. At most 3 items.
- `amount_at_least` (number): A case whose amount is at least this, in the workspace's currency.
- `any_document_verdict` (array of enum): A case with a document of any of these verdicts. One of `trusted`, `review`, `high_risk`. At most 3 items.
- `reasons` (array of string): A decision with any of these reason codes. At most 30 items.
- `pool` (enum, default "any_decider"): Who may approve: the queue's leads, anyone who may decide, or the members named. One of `queue_leads`, `any_decider`, `members`.
- `member_ids` (array of id (mem_)): The members who may approve, with `pool` `members`. At most 50 items.
- `due_hours` (integer, default 8): Hours the approver has. At least 1, at most 168.

**Returns** approval rule: The rule, active, tried after the ones before it.

API:

```bash
curl -X POST https://api.kontiga.com/v1/approval_rules \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Loans of 50,000 or more",
    "outcomes": [
      "approved"
    ],
    "amount_at_least": 50000,
    "pool": "any_decider",
    "due_hours": 8
  }'
```

CLI:

```bash
kontiga approvals create \
  --name 'Loans of 50,000 or more' \
  --outcomes approved \
  --amount-at-least 50000 \
  --pool any_decider \
  --due-hours 8
```

MCP tool `create_approval_rule`:

```json
{
  "name": "create_approval_rule",
  "arguments": {
    "name": "Loans of 50,000 or more",
    "outcomes": [
      "approved"
    ],
    "amount_at_least": 50000,
    "pool": "any_decider",
    "due_hours": 8
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.approvalRules.create({
  name: "Loans of 50,000 or more",
  outcomes: ["approved"],
  amount_at_least: 50000,
  pool: "any_decider",
  due_hours: 8,
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.approval_rules.create(
    name="Loans of 50,000 or more",
    outcomes=["approved"],
    amount_at_least=50000,
    pool="any_decider",
    due_hours=8,
)
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.ApprovalRules.Create(ctx, &kontiga.ApprovalRulesCreateParams{
	Name:          "Loans of 50,000 or more",
	Outcomes:      []string{"approved"},
	AmountAtLeast: 50000,
	Pool:          "any_decider",
	DueHours:      8,
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.approvalRules().create(ApprovalRulesCreateParams.builder()
    .name("Loans of 50,000 or more")
    .outcomes(List.of("approved"))
    .amountAtLeast(50000)
    .pool("any_decider")
    .dueHours(8)
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.ApprovalRules.CreateAsync(new ApprovalRulesCreateOptions
{
    Name = "Loans of 50,000 or more",
    Outcomes = new[] { "approved" },
    AmountAtLeast = 50000,
    Pool = "any_decider",
    DueHours = 8,
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->approvalRules->create([
    'name' => 'Loans of 50,000 or more',
    'outcomes' => ['approved'],
    'amount_at_least' => 50000,
    'pool' => 'any_decider',
    'due_hours' => 8,
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.approval_rules.create(
  name: "Loans of 50,000 or more",
  outcomes: ["approved"],
  amount_at_least: 50000,
  pool: "any_decider",
  due_hours: 8
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .approval_rules()
    .create(kontiga::approval_rules::CreateParams {
        name: "Loans of 50,000 or more".into(),
        outcomes: vec!["approved".into()],
        amount_at_least: 50000,
        pool: "any_decider".into(),
        due_hours: 8,
        ..Default::default()
    })
    .await?;
```

Response, 201 Created:

```json
{
  "id": "arl_4Wm8Tc6",
  "object": "approval_rule",
  "name": "Loans of 50,000 or more",
  "active": true,
  "position": 0,
  "outcomes": ["approved"],
  "amount_at_least": 50000,
  "currency": "EUR",
  "any_document_verdict": [],
  "reasons": [],
  "pool": "any_decider",
  "member_ids": [],
  "due_hours": 8
}
```

## Change a second approver rule

Turn a rule on or off, rename it, or change who approves and how soon.

`PATCH /v1/approval_rules/{approval_rule_id}`. Who may: Owner and Admin. CLI: `kontiga approvals update <approval_rule_id> [--active <true|false>] [--name <text>] [--pool <queue_leads|any_decider|members>] [--due-hours <1-168>]`. MCP tool: `update_approval_rule`.

**Parameters**
- `approval_rule_id` (id (arl_), required): The rule to change. In the path.
- `active` (boolean): Turn the rule on or off.
- `name` (string): Its new name. At most 80 characters.
- `pool` (enum): Who may approve from now on. One of `queue_leads`, `any_decider`, `members`.
- `due_hours` (integer): Hours the approver has, for decisions from now on. At least 1, at most 168.

**Returns** approval rule: The rule, changed.

API:

```bash
curl -X PATCH https://api.kontiga.com/v1/approval_rules/arl_4Wm8Tc6 \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "due_hours": 4
  }'
```

CLI:

```bash
kontiga approvals update arl_4Wm8Tc6 --due-hours 4
```

MCP tool `update_approval_rule`:

```json
{
  "name": "update_approval_rule",
  "arguments": {
    "approval_rule_id": "arl_4Wm8Tc6",
    "due_hours": 4
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.approvalRules.update("arl_4Wm8Tc6", {
  due_hours: 4,
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.approval_rules.update("arl_4Wm8Tc6", due_hours=4)
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.ApprovalRules.Update(ctx, "arl_4Wm8Tc6", &kontiga.ApprovalRulesUpdateParams{
	DueHours: 4,
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.approvalRules().update("arl_4Wm8Tc6", ApprovalRulesUpdateParams.builder()
    .dueHours(4)
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.ApprovalRules.UpdateAsync("arl_4Wm8Tc6", new ApprovalRulesUpdateOptions
{
    DueHours = 4,
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->approvalRules->update('arl_4Wm8Tc6', [
    'due_hours' => 4,
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.approval_rules.update("arl_4Wm8Tc6", due_hours: 4)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .approval_rules()
    .update("arl_4Wm8Tc6".into(), kontiga::approval_rules::UpdateParams {
        due_hours: 4,
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "id": "arl_4Wm8Tc6",
  "object": "approval_rule",
  "name": "Loans of 50,000 or more",
  "active": true,
  "position": 0,
  "outcomes": ["approved"],
  "amount_at_least": 50000,
  "currency": "EUR",
  "any_document_verdict": [],
  "reasons": [],
  "pool": "any_decider",
  "member_ids": [],
  "due_hours": 8
}
```

## Delete a second approver rule

New decisions no longer match it; those waiting keep their approver.

`DELETE /v1/approval_rules/{approval_rule_id}`. Who may: Owner and Admin. CLI: `kontiga approvals delete <approval_rule_id>`. MCP tool: `delete_approval_rule`.

**Parameters**
- `approval_rule_id` (id (arl_), required): The rule to delete. In the path.

**Returns** approval rule, deleted: The rule no longer applies to new decisions.

API:

```bash
curl -X DELETE https://api.kontiga.com/v1/approval_rules/arl_1Qz5Hd3 \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga approvals delete arl_1Qz5Hd3
```

MCP tool `delete_approval_rule`:

```json
{
  "name": "delete_approval_rule",
  "arguments": {
    "approval_rule_id": "arl_1Qz5Hd3"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.approvalRules.delete("arl_1Qz5Hd3");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.approval_rules.delete("arl_1Qz5Hd3")
```

Go:

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

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.approvalRules().delete("arl_1Qz5Hd3");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.ApprovalRules.DeleteAsync("arl_1Qz5Hd3");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->approvalRules->delete('arl_1Qz5Hd3');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.approval_rules.delete("arl_1Qz5Hd3")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .approval_rules()
    .delete("arl_1Qz5Hd3".into())
    .await?;
```

Response, 200 OK:

```json
{
  "id": "arl_1Qz5Hd3",
  "object": "approval_rule",
  "deleted": true
}
```

## People

The word the team uses for the registry (Applicants, Claimants, Tenants or its own), how two arrivals are recognised as one person, and which signals suggest a duplicate for a member to look at.

> **The word is for your team, never for the API.** The API, the CLI, the MCP server and webhooks always say person and people, whatever the word: `/v1/people`, `per_` ids, `person_id`, `person.*` events. Read `word_singular` and `word_plural` to write to your team in its own word. A member is always someone on your team, even where the word is Members.

## Read the registry rules

The word the team uses for the registry, how two arrivals are found to be one person, which signals suggest a duplicate, and the other rules of People.

`GET /v1/settings/people`. Who may: Owner, Admin, Analyst, Developer and Viewer. CLI: `kontiga settings people get`. MCP tool: `get_people_settings`.

**Parameters**

**Returns** people settings: The registry's word and rules.

API:

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

CLI:

```bash
kontiga settings people get
```

MCP tool `get_people_settings`:

```json
{
  "name": "get_people_settings",
  "arguments": {}
}
```

TypeScript:

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

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

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.people_settings.get()
```

Go:

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

Java:

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

.NET:

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

PHP:

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

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.people_settings.get
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .people_settings()
    .get()
    .await?;
```

Response, 200 OK:

```json
{
  "object": "people_settings",
  "word_singular": "Applicant",
  "word_plural": "Applicants",
  "offered_words": [
    { "singular": "Person", "plural": "People" },
    { "singular": "Applicant", "plural": "Applicants" },
    { "singular": "Claimant", "plural": "Claimants" },
    { "singular": "Policyholder", "plural": "Policyholders" },
    { "singular": "Customer", "plural": "Customers" },
    { "singular": "Tenant", "plural": "Tenants" },
    { "singular": "Member", "plural": "Members" },
    { "singular": "Candidate", "plural": "Candidates" },
    { "singular": "Seller", "plural": "Sellers" }
  ],
  "match_rule": [
    "Your own reference, when one is given, decides: the same reference is always the same profile.",
    "Otherwise the email address, then the phone number, finds the profile, unless the two hold different references.",
    "A name alone never joins two profiles, however alike."
  ],
  "duplicate_signals": {
    "same_identity": true,
    "same_email": true,
    "identifier_conflict": true,
    "same_phone": true,
    "same_name_and_birth_date": true,
    "same_face": true
  },
  "auto_merge": false,
  "renewal_window_days": 30,
  "phone_country": "NL",
  "attach_compatible": true
}
```

A change names only the rules it changes; the rest are kept. The word is given both ways or not at all. A change that names nothing, or a value out of its range, answers `400 invalid_input` naming the field. Live and test mode share these rules, so a test-mode secret key cannot change them: it answers `403 key_scope_denied`; change them with a live secret key or in the console.

## Change the registry rules

The word every People screen uses, the duplicate signals, automatic merging and the other rules of People.

`PATCH /v1/settings/people`. Who may: Owner and Admin. CLI: `kontiga settings people set [--word-singular <text>] [--word-plural <text>] [--duplicate-signals <signal>,...] [--auto-merge <true|false>] [--renewal-window-days <0-365>] [--phone-country <CC|none>] [--attach-compatible <true|false>]`. MCP tool: `update_people_settings`.

**Parameters**
- `word_singular` (string): The word for one person on your team's screens, up to 30 characters, such as `Claimant`.
- `word_plural` (string): The word for the registry, such as `Claimants`. At most 30 characters.
- `duplicate_signals` (array of enum): The signals that suggest a duplicate. The whole list is given. One of `same_identity`, `same_email`, `identifier_conflict`, `same_phone`, `same_name_and_birth_date`, `same_face`. At most 6 items.
- `auto_merge` (boolean): Merge two profiles with no member when their passed identity verifications share an identity document, a personal number or an electronic identity: the older is kept, two with different references are never merged, at most five a verification and only a profile in at most 1,000 cases folded into another (the rest stay strong suggestions), and each merge can be undone. Off by default: they are suggested.
- `renewal_window_days` (integer): Days before a document or a check stops being valid that the person is asked to renew it. At most 365.
- `phone_country` (string): The country a phone number with no country code is read in, as a two-letter code such as `NL`, or `none` to take only numbers in international form. Without one, a number with no `+` is refused with `invalid_identifier`.
- `attach_compatible` (boolean): Documents sent through the Bynn-compatible document API join the person they name.

**Returns** people settings: The registry's rules, changed.

API:

```bash
curl -X PATCH https://api.kontiga.com/v1/settings/people \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "word_singular": "Applicant",
    "word_plural": "Applicants"
  }'
```

CLI:

```bash
kontiga settings people set \
  --word-singular Applicant \
  --word-plural Applicants
```

MCP tool `update_people_settings`:

```json
{
  "name": "update_people_settings",
  "arguments": {
    "word_singular": "Applicant",
    "word_plural": "Applicants"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.peopleSettings.update({
  word_singular: "Applicant",
  word_plural: "Applicants",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.people_settings.update(word_singular="Applicant", word_plural="Applicants")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.PeopleSettings.Update(ctx, &kontiga.PeopleSettingsUpdateParams{
	WordSingular: "Applicant",
	WordPlural:   "Applicants",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.peopleSettings().update(PeopleSettingsUpdateParams.builder()
    .wordSingular("Applicant")
    .wordPlural("Applicants")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.PeopleSettings.UpdateAsync(new PeopleSettingsUpdateOptions
{
    WordSingular = "Applicant",
    WordPlural = "Applicants",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->peopleSettings->update([
    'word_singular' => 'Applicant',
    'word_plural' => 'Applicants',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.people_settings.update(word_singular: "Applicant", word_plural: "Applicants")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .people_settings()
    .update(kontiga::people_settings::UpdateParams {
        word_singular: "Applicant".into(),
        word_plural: "Applicants".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "people_settings",
  "word_singular": "Applicant",
  "word_plural": "Applicants",
  "offered_words": [
    { "singular": "Person", "plural": "People" },
    { "singular": "Applicant", "plural": "Applicants" },
    { "singular": "Claimant", "plural": "Claimants" },
    { "singular": "Policyholder", "plural": "Policyholders" },
    { "singular": "Customer", "plural": "Customers" },
    { "singular": "Tenant", "plural": "Tenants" },
    { "singular": "Member", "plural": "Members" },
    { "singular": "Candidate", "plural": "Candidates" },
    { "singular": "Seller", "plural": "Sellers" }
  ],
  "match_rule": [
    "Your own reference, when one is given, decides: the same reference is always the same profile.",
    "Otherwise the email address, then the phone number, finds the profile, unless the two hold different references.",
    "A name alone never joins two profiles, however alike."
  ],
  "duplicate_signals": {
    "same_identity": true,
    "same_email": true,
    "identifier_conflict": true,
    "same_phone": true,
    "same_name_and_birth_date": true,
    "same_face": true
  },
  "auto_merge": false,
  "renewal_window_days": 30,
  "phone_country": "NL",
  "attach_compatible": true
}
```
