# Collect 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-collect

What end customers see and receive, and how often: the brand kits their pages and messages wear, the defaults every collection and request starts from (languages, channels, how long a link stays open, reminders and quiet hours), and which earlier documents and checks a new case may reuse, so a person is asked only for what is missing. A collection that sets its own value keeps it.

Updated November 30, 2026

## Contents

- [Brand kits](https://kontiga.com/docs/settings-collect#brand-kits)
- [List brand kits](https://kontiga.com/docs/settings-collect#list-brand-kits)
- [Create a brand kit](https://kontiga.com/docs/settings-collect#create-a-brand-kit)
- [Change a brand kit](https://kontiga.com/docs/settings-collect#change-a-brand-kit)
- [Delete a brand kit](https://kontiga.com/docs/settings-collect#delete-a-brand-kit)
- [Collection defaults](https://kontiga.com/docs/settings-collect#collection-defaults)
- [Read Collect's settings](https://kontiga.com/docs/settings-collect#read-collect-settings)
- [Change Collect's settings](https://kontiga.com/docs/settings-collect#change-collect-settings)
- [Reuse and validity](https://kontiga.com/docs/settings-collect#reuse-and-validity)
- [Read reuse and validity](https://kontiga.com/docs/settings-collect#read-reuse-settings)
- [Change reuse and validity](https://kontiga.com/docs/settings-collect#change-reuse-settings)
- [List the validity rules](https://kontiga.com/docs/settings-collect#list-the-validity-rules)
- [Set a validity rule](https://kontiga.com/docs/settings-collect#set-a-validity-rule)

## Brand kits

A brand kit is a customer's logo, colours, sender and texts for everything an end customer sees: the portal, the widget and every message. A collection or a request names its kit; the rest use the default. A workspace may hold several, as many as its plan allows.

- `id` (string): The kit's id, starting with `bk_`.
- `brand_color` (string): The colour of the kit's highlights: the portal's header and links, as `#` and six hex digits.
- `accent_color` (string): The colour of the main button on every page the end customer sees.
- `sender_name` (string): The From name of every message.
- `reply_to` (string): Where an end customer's reply goes.
- `support_email` (string): How an end customer reaches you with a question, in the portal's footer and at the foot of every message. With none, the reply-to address is shown.
- `texts` (object): The end customer's texts per language. A text left out uses Kontiga's standard one.
- `is_default` (boolean): Used unless a collection or a request names another kit.

**A brand kit**

```json
{
  "id": "bk_4Hm7Rw2",
  "object": "brand_kit",
  "name": "Brightwater Lending",
  "logo": null,
  "icon": null,
  "brand_color": "#14374F",
  "accent_color": "#1E4D6B",
  "sender_name": "Brightwater Lending",
  "reply_to": "applications@brightwater.example",
  "support_email": "help@brightwater.example",
  "support_phone": "+31 20 794 1180",
  "support_url": null,
  "support_address": "Keizersgracht 214, 1016 DZ Amsterdam",
  "privacy_url": "https://brightwater.example/privacy",
  "terms_url": null,
  "portal_domain": null,
  "show_via_kontiga": true,
  "texts": {
    "en": { "portal_welcome": "Upload what Brightwater Lending asked for. It takes a few minutes, and you can stop and come back." }
  },
  "is_default": true,
  "collections_using": 3,
  "created_at": "2026-09-14T08:12:00Z",
  "updated_at": "2026-11-12T10:05:00Z"
}
```

- The logo is a JPEG or PNG of at most 512 KB and the icon a square PNG of at most 128 KB, each sent as a data URL. Their type is read from the file itself: a file whose content is not the image it is named as is refused.
- The default kit is the one Collect's settings name (`default_brand_kit`), else the workspace's first. It cannot be deleted while it is the default. Deleting another kit moves the collections and requests that used it to the default.
- Each kit has its own name in the workspace. A custom portal domain belongs to one kit. A workspace holds up to 50 kits.
- The sender name is the From name of every message: a name, never an address, so it holds no `@`, `<`, `>`, `"` or `\`. The reply-to and support addresses are your own, never a Kontiga address. Links start with `https://`.
- A custom portal domain and hiding "via Kontiga" are on the Growth plan and above.

What a brand kit call refuses

| Status | Code | When |
| --- | --- | --- |
| 400 | `invalid_input` | A field is not valid. `issues[0].path` names it, such as `sender_name`, `reply_to` or `texts.en.portal_welcome`. |
| 403 | `plan_required` | A custom portal domain or hiding "via Kontiga" on a plan without them. `details.plan` names the lowest plan with them. |
| 404 | `not_found` | No such kit in this workspace. |
| 409 | `name_taken` | Another kit has the name. |
| 409 | `domain_taken` | Another kit uses the portal domain. |
| 409 | `brand_kit_is_default` | The kit is the default. Make another kit the default first. |
| 409 | `too_many_brand_kits` | The workspace holds 50 kits already. |

## List brand kits

Every brand kit of the workspace: logo, icon, colours, sender, the support contact end customers see, links, the end customer's texts per language, and which kit is the default.

`GET /v1/brand_kits`. Who may: Owner, Admin, Analyst, Developer and Viewer. CLI: `kontiga brand-kits list`. MCP tool: `list_brand_kits`.

**Parameters**

**Returns** list of brand kits: The workspace's brand kits, the default first.

API:

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

CLI:

```bash
kontiga brand-kits list
```

MCP tool `list_brand_kits`:

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

TypeScript:

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

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

Python:

```python
from kontiga import Kontiga

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

Go:

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

Java:

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

.NET:

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

PHP:

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

Ruby:

```ruby
require "kontiga"

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

Rust:

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

Response, 200 OK:

```json
{
  "items": [
    { "id": "bk_4Hm7Rw2", "object": "brand_kit", "name": "Brightwater Lending", "brand_color": "#14374F", "accent_color": "#1E4D6B", "sender_name": "Brightwater Lending", "is_default": true, "collections_using": 3 },
    { "id": "bk_9Tc2Ls6", "object": "brand_kit", "name": "Brightwater Home Loans", "brand_color": "#1D4A3F", "accent_color": "#24584A", "sender_name": "Brightwater Home Loans", "is_default": false, "collections_using": 1 }
  ],
  "next_cursor": null
}
```

## Create a brand kit

Adds a brand kit with a name, colours and a sender; everything else can be filled in after. A workspace may hold several.

`POST /v1/brand_kits`. Who may: Owner and Admin. CLI: `kontiga brand-kits create --name <text> --brand-color <#rrggbb> --accent-color <#rrggbb> --sender-name <text> --reply-to <email> [--logo <file.png>]`. MCP tool: `create_brand_kit`.

**Parameters**
- `name` (string, required): The kit's name, as members see it. At most 60 characters.
- `brand_color` (string, required): The highlights' colour, as `#` and six hex digits.
- `accent_color` (string, required): The main button's colour, as `#` and six hex digits.
- `sender_name` (string, required): The From name of every message. At most 60 characters.
- `reply_to` (email, required): Where an end customer's reply goes.
- `logo` (string): The logo as a data URL, a JPEG or PNG of at most 512 KB. Its type is read from the file itself. `null` clears it.

**Returns** brand kit: The new brand kit.

API:

```bash
curl -X POST https://api.kontiga.com/v1/brand_kits \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Brightwater Home Loans",
    "brand_color": "#1D4A3F",
    "accent_color": "#24584A",
    "sender_name": "Brightwater Home Loans",
    "reply_to": "homeloans@brightwater.example"
  }'
```

CLI:

```bash
kontiga brand-kits create \
  --name 'Brightwater Home Loans' \
  --brand-color '#1D4A3F' \
  --accent-color '#24584A' \
  --sender-name 'Brightwater Home Loans' \
  --reply-to homeloans@brightwater.example
```

MCP tool `create_brand_kit`:

```json
{
  "name": "create_brand_kit",
  "arguments": {
    "name": "Brightwater Home Loans",
    "brand_color": "#1D4A3F",
    "accent_color": "#24584A",
    "sender_name": "Brightwater Home Loans",
    "reply_to": "homeloans@brightwater.example"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.brandKits.create({
  name: "Brightwater Home Loans",
  brand_color: "#1D4A3F",
  accent_color: "#24584A",
  sender_name: "Brightwater Home Loans",
  reply_to: "homeloans@brightwater.example",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.brand_kits.create(
    name="Brightwater Home Loans",
    brand_color="#1D4A3F",
    accent_color="#24584A",
    sender_name="Brightwater Home Loans",
    reply_to="homeloans@brightwater.example",
)
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.BrandKits.Create(ctx, &kontiga.BrandKitsCreateParams{
	Name:        "Brightwater Home Loans",
	BrandColor:  "#1D4A3F",
	AccentColor: "#24584A",
	SenderName:  "Brightwater Home Loans",
	ReplyTo:     "homeloans@brightwater.example",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.brandKits().create(BrandKitsCreateParams.builder()
    .name("Brightwater Home Loans")
    .brandColor("#1D4A3F")
    .accentColor("#24584A")
    .senderName("Brightwater Home Loans")
    .replyTo("homeloans@brightwater.example")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.BrandKits.CreateAsync(new BrandKitsCreateOptions
{
    Name = "Brightwater Home Loans",
    BrandColor = "#1D4A3F",
    AccentColor = "#24584A",
    SenderName = "Brightwater Home Loans",
    ReplyTo = "homeloans@brightwater.example",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->brandKits->create([
    'name' => 'Brightwater Home Loans',
    'brand_color' => '#1D4A3F',
    'accent_color' => '#24584A',
    'sender_name' => 'Brightwater Home Loans',
    'reply_to' => 'homeloans@brightwater.example',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.brand_kits.create(
  name: "Brightwater Home Loans",
  brand_color: "#1D4A3F",
  accent_color: "#24584A",
  sender_name: "Brightwater Home Loans",
  reply_to: "homeloans@brightwater.example"
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .brand_kits()
    .create(kontiga::brand_kits::CreateParams {
        name: "Brightwater Home Loans".into(),
        brand_color: "#1D4A3F".into(),
        accent_color: "#24584A".into(),
        sender_name: "Brightwater Home Loans".into(),
        reply_to: "homeloans@brightwater.example".into(),
        ..Default::default()
    })
    .await?;
```

Response, 201 Created:

```json
{
  "id": "bk_9Tc2Ls6",
  "object": "brand_kit",
  "name": "Brightwater Home Loans",
  "logo": null,
  "icon": null,
  "brand_color": "#1D4A3F",
  "accent_color": "#24584A",
  "sender_name": "Brightwater Home Loans",
  "reply_to": "homeloans@brightwater.example",
  "support_email": null,
  "support_phone": null,
  "support_url": null,
  "support_address": null,
  "privacy_url": null,
  "terms_url": null,
  "portal_domain": null,
  "show_via_kontiga": true,
  "texts": {},
  "is_default": false,
  "collections_using": 0,
  "created_at": "2026-11-26T09:30:00Z",
  "updated_at": "2026-11-26T09:30:00Z"
}
```

## Change a brand kit

Changes the fields you give: the look (logo, icon, colours), the sender, the support contact the portal and every message show, the links, the portal's address and the texts. Texts are merged per language; an empty text goes back to Kontiga's standard one.

`PATCH /v1/brand_kits/{brand_kit_id}`. Who may: Owner and Admin. CLI: `kontiga brand-kits update <brand_kit_id> [--name <text>] [--logo <file.png>] [--icon <file.png>] [--brand-color <#rrggbb>] [--accent-color <#rrggbb>] [--sender-name <text>] [--reply-to <email>] [--support-email <email>] [--support-phone <+country number>] [--support-url <https://...>] [--support-address <text>] [--privacy-url <https://...>] [--terms-url <https://...>] [--portal-domain <domain>] [--show-via-kontiga <true|false>] [--texts '{"sv":{"request_subject":"..."}}']`. MCP tool: `update_brand_kit`.

**Parameters**
- `brand_kit_id` (id (bk_), required): The kit to change. In the path.
- `name` (string): Its new name. At most 60 characters.
- `logo` (string): The logo as a data URL, a JPEG or PNG of at most 512 KB. An empty value removes it. `null` clears it.
- `icon` (string): The small square mark of the browser tab and the portal on a phone, a square PNG of at most 128 KB. `null` clears it.
- `brand_color` (string): The highlights' colour.
- `accent_color` (string): The main button's colour.
- `sender_name` (string): The From name of every message. At most 60 characters.
- `reply_to` (email): Where an end customer's reply goes.
- `support_email` (email): The support address end customers see. `null` clears it.
- `support_phone` (string): The support phone number, in the international form. `null` clears it.
- `support_url` (string): A help page, starting with `https://`. At most 500 characters. `null` clears it.
- `support_address` (string): A postal address, on one line as it is printed. At most 200 characters. `null` clears it.
- `privacy_url` (string): Your privacy notice, starting with `https://`. At most 500 characters. `null` clears it.
- `terms_url` (string): Your terms, starting with `https://`. At most 500 characters. `null` clears it.
- `portal_domain` (string): The portal's own address, on the plans that offer one. `null` clears it.
- `show_via_kontiga` (boolean): Show "via Kontiga" in footers. The plans with a custom domain may hide it.
- `texts` (record): Texts by language and key, such as `{"en": {"portal_welcome": "..."}}`. They are merged per language; an empty text goes back to the standard one.

**Returns** brand kit: The brand kit, changed and audited.

API:

```bash
curl -X PATCH https://api.kontiga.com/v1/brand_kits/bk_4Hm7Rw2 \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "support_email": "help@brightwater.example",
    "support_phone": "+31 20 794 1180"
  }'
```

CLI:

```bash
kontiga brand-kits update bk_4Hm7Rw2 \
  --support-email help@brightwater.example \
  --support-phone '+31 20 794 1180'
```

MCP tool `update_brand_kit`:

```json
{
  "name": "update_brand_kit",
  "arguments": {
    "brand_kit_id": "bk_4Hm7Rw2",
    "support_email": "help@brightwater.example",
    "support_phone": "+31 20 794 1180"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.brandKits.update("bk_4Hm7Rw2", {
  file: await openAsBlob("bk_4Hm7Rw2"),
  support_email: "help@brightwater.example",
  support_phone: "+31 20 794 1180",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.brand_kits.update(
    "bk_4Hm7Rw2",
    file=open("bk_4Hm7Rw2", "rb"),
    support_email="help@brightwater.example",
    support_phone="+31 20 794 1180",
)
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.BrandKits.Update(ctx, "bk_4Hm7Rw2", &kontiga.BrandKitsUpdateParams{
	File:         kontiga.FileFromPath("bk_4Hm7Rw2"),
	SupportEmail: "help@brightwater.example",
	SupportPhone: "+31 20 794 1180",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.brandKits().update("bk_4Hm7Rw2", BrandKitsUpdateParams.builder()
    .file(Path.of("bk_4Hm7Rw2"))
    .supportEmail("help@brightwater.example")
    .supportPhone("+31 20 794 1180")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.BrandKits.UpdateAsync("bk_4Hm7Rw2", new BrandKitsUpdateOptions
{
    File = File.OpenRead("bk_4Hm7Rw2"),
    SupportEmail = "help@brightwater.example",
    SupportPhone = "+31 20 794 1180",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->brandKits->update('bk_4Hm7Rw2', [
    'file' => fopen('bk_4Hm7Rw2', 'r'),
    'support_email' => 'help@brightwater.example',
    'support_phone' => '+31 20 794 1180',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.brand_kits.update(
  "bk_4Hm7Rw2",
  file: File.open("bk_4Hm7Rw2"),
  support_email: "help@brightwater.example",
  support_phone: "+31 20 794 1180"
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .brand_kits()
    .update("bk_4Hm7Rw2".into(), kontiga::brand_kits::UpdateParams {
        file: kontiga::File::open("bk_4Hm7Rw2").await?,
        support_email: "help@brightwater.example".into(),
        support_phone: "+31 20 794 1180".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "id": "bk_4Hm7Rw2",
  "object": "brand_kit",
  "name": "Brightwater Lending",
  "logo": null,
  "icon": null,
  "brand_color": "#14374F",
  "accent_color": "#1E4D6B",
  "sender_name": "Brightwater Lending",
  "reply_to": "applications@brightwater.example",
  "support_email": "help@brightwater.example",
  "support_phone": "+31 20 794 1180",
  "support_url": null,
  "support_address": "Keizersgracht 214, 1016 DZ Amsterdam",
  "privacy_url": "https://brightwater.example/privacy",
  "terms_url": null,
  "portal_domain": null,
  "show_via_kontiga": true,
  "texts": {
    "en": { "portal_welcome": "Upload what Brightwater Lending asked for. It takes a few minutes, and you can stop and come back." }
  },
  "is_default": true,
  "collections_using": 3,
  "created_at": "2026-09-14T08:12:00Z",
  "updated_at": "2026-11-12T10:05:00Z"
}
```

## Delete a brand kit

Removes a brand kit. The default kit cannot be deleted; collections that used this kit use the default from then on.

`DELETE /v1/brand_kits/{brand_kit_id}`. Who may: Owner and Admin. CLI: `kontiga brand-kits delete <brand_kit_id>`. MCP tool: `delete_brand_kit`.

**Parameters**
- `brand_kit_id` (id (bk_), required): The kit to delete. The default kit cannot be deleted. In the path.

**Returns** brand kit, deleted: The brand kit is gone; its collections use the default kit.

API:

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

CLI:

```bash
kontiga brand-kits delete bk_9Tc2Ls6
```

MCP tool `delete_brand_kit`:

```json
{
  "name": "delete_brand_kit",
  "arguments": {
    "brand_kit_id": "bk_9Tc2Ls6"
  }
}
```

TypeScript:

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

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

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.brand_kits.delete("bk_9Tc2Ls6")
```

Go:

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

Java:

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

.NET:

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

PHP:

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

Ruby:

```ruby
require "kontiga"

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

Rust:

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

Response, 200 OK:

```json
{
  "id": "bk_9Tc2Ls6",
  "object": "brand_kit",
  "deleted": true
}
```

## Collection defaults

The values every collection and request starts from. Reminders never go out in quiet hours, which are read in the end customer's own time zone. A workspace that has changed nothing reads the defaults: English, the 12 languages, email, SMS and your own delivery, links open 30 days, reminders after 2 and 5 days then weekly up to 6, and quiet hours from 21:00 to 08:00.

Allowed channels, and how a request goes

| A request's channel | Needs these allowed |
| --- | --- |
| `email` | `email` |
| `sms` | `sms` |
| `email_and_sms` | `email` and `sms` |
| `link` (you deliver the link yourself) | `own` |

A request whose channel the allowed channels do not cover (the collection's own, else these) is refused with `422 channel_not_allowed`; `details` names the channel, the allowed channels and the ones missing. WhatsApp can be allowed once a WhatsApp sender is connected in Integrations.

A sending domain of your own is on the Growth plan and above. Once set, it is `pending` until its DNS records, listed in `sending_domain_records`, are in place; messages leave from it only once it is `verified`, and from Kontiga's domain until then. `default_brand_kit` is `null` until the workspace has a brand kit.

## Read Collect's settings

The defaults every collection and request starts from: brand kit, languages, channels, expiry, reminders, quiet hours and the portal's helper.

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

**Parameters**

**Returns** collect settings: Collect's settings for this workspace.

API:

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

CLI:

```bash
kontiga settings get collect
```

MCP tool `get_collect_settings`:

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

TypeScript:

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

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

Python:

```python
from kontiga import Kontiga

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

Go:

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

Java:

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

.NET:

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

PHP:

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

Ruby:

```ruby
require "kontiga"

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

Rust:

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

Response, 200 OK:

```json
{
  "object": "collect_settings",
  "default_brand_kit": "bk_4Hm7Rw2",
  "default_language": "en",
  "languages": ["en", "sv", "de", "fr", "es"],
  "channels": ["email", "sms"],
  "default_channel": "email",
  "expiry_days": 30,
  "reminders": { "first_after_days": [2, 5], "then_every_days": 7, "before_expiry": true, "max": 6 },
  "quiet_hours": { "from": "21:00", "to": "08:00" },
  "uploader_helper": true,
  "email_intake": false,
  "sending_domain": null,
  "sending_domain_state": null,
  "sending_domain_records": [],
  "plan": { "name": "Growth", "custom_domain": true, "whatsapp_ready": false },
  "updated_at": "2026-11-05T09:00:00Z",
  "updated_by": { "kind": "member", "id": "mem_9Wd2Hc5", "name": "Maria Lind" }
}
```

## Change Collect's settings

Changes the fields you give. Collections that set their own value keep it; the rest follow at their next request.

`PATCH /v1/settings/collect`. Who may: Owner and Admin. CLI: `kontiga settings set collect [--default-brand-kit <bk_id>] [--default-language <locale>] [--languages <locale>,...] [--channels <email|sms|whatsapp|own>,...] [--default-channel <channel>] [--expiry-days <1-90>] [--reminders '{"first_after_days":[2,5],"then_every_days":7,"before_expiry":true,"max":6}'] [--quiet-hours '{"from":"21:00","to":"08:00"}'] [--uploader-helper <true|false>] [--email-intake <true|false>] [--sending-domain <domain>]`. MCP tool: `update_collect_settings`.

**Parameters**
- `default_brand_kit` (id (bk_)): The kit used unless a collection or a request names another.
- `default_language` (enum): The language texts fall back to. Otherwise the end customer's own language is used. One of `en`, `pt`, `es`, `ar`, `zht`, `zhs`, `fr`, `de`, `ja`, `hi`, `ru`, `sv`.
- `languages` (array of enum): The languages the portal offers, codes of the 12 (`request_locales.list`). The default language stays among them. One of `en`, `pt`, `es`, `ar`, `zht`, `zhs`, `fr`, `de`, `ja`, `hi`, `ru`, `sv`.
- `channels` (array of enum): The ways a request may reach an end customer. One of `email`, `sms`, `whatsapp`, `own`.
- `default_channel` (enum): The way a request goes when none is named, one of the allowed channels. When the allowed channels change without it, it becomes the first of them. One of `email`, `sms`, `whatsapp`, `own`.
- `expiry_days` (integer): Days a request's link stays open, 1 to 90.
- `reminders` (object): `first_after_days` (up to three), `then_every_days` (0 for no repeat), `before_expiry` and `max` reminders a request, at most 10.
- `quiet_hours` (object): `from` and `to` as `HH:MM`, in the end customer's time zone, or `null` for none. `null` clears it.
- `uploader_helper` (boolean): Offer Help on every step of the portal, which answers what to upload and never says what the checks found.
- `email_intake` (boolean): Parties may email documents: each case gets its own address, and a document emailed there is added to the case and checked like an upload.
- `sending_domain` (string): A domain of your own your messages come from once it is verified. `null` sends from Kontiga's. `null` clears it.

**Returns** collect settings: Collect's settings, changed and audited.

API:

```bash
curl -X PATCH https://api.kontiga.com/v1/settings/collect \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "expiry_days": 21,
    "reminders": {
      "first_after_days": [
        2,
        5
      ],
      "then_every_days": 7,
      "before_expiry": true,
      "max": 6
    }
  }'
```

CLI:

```bash
kontiga settings set collect \
  --expiry-days 21 \
  --reminders '{"first_after_days":[2,5],"then_every_days":7,"before_expiry":true,"max":6}'
```

MCP tool `update_collect_settings`:

```json
{
  "name": "update_collect_settings",
  "arguments": {
    "expiry_days": 21,
    "reminders": {
      "first_after_days": [
        2,
        5
      ],
      "then_every_days": 7,
      "before_expiry": true,
      "max": 6
    }
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.collectSettings.update({
  expiry_days: 21,
  reminders: { first_after_days: [2, 5], then_every_days: 7, before_expiry: true, max: 6 },
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.collect_settings.update(expiry_days=21, reminders={"first_after_days": [2, 5], "then_every_days": 7, "before_expiry": True, "max": 6})
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.CollectSettings.Update(ctx, &kontiga.CollectSettingsUpdateParams{
	ExpiryDays: 21,
	Reminders:  map[string]any{"first_after_days": []any{2, 5}, "then_every_days": 7, "before_expiry": true, "max": 6},
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.collectSettings().update(CollectSettingsUpdateParams.builder()
    .expiryDays(21)
    .reminders(Map.of("first_after_days", List.of(2, 5), "then_every_days", 7, "before_expiry", true, "max", 6))
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.CollectSettings.UpdateAsync(new CollectSettingsUpdateOptions
{
    ExpiryDays = 21,
    Reminders = new Dictionary<string, object> { ["first_after_days"] = new object[] { 2, 5 }, ["then_every_days"] = 7, ["before_expiry"] = true, ["max"] = 6 },
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->collectSettings->update([
    'expiry_days' => 21,
    'reminders' => ['first_after_days' => [2, 5], 'then_every_days' => 7, 'before_expiry' => true, 'max' => 6],
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.collect_settings.update(expiry_days: 21, reminders: { first_after_days: [2, 5], then_every_days: 7, before_expiry: true, max: 6 })
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .collect_settings()
    .update(kontiga::collect_settings::UpdateParams {
        expiry_days: 21,
        reminders: serde_json::json!({"first_after_days":[2,5],"then_every_days":7,"before_expiry":true,"max":6}),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "collect_settings",
  "default_brand_kit": "bk_4Hm7Rw2",
  "default_language": "en",
  "languages": ["en", "sv", "de", "fr", "es"],
  "channels": ["email", "sms"],
  "default_channel": "email",
  "expiry_days": 30,
  "reminders": { "first_after_days": [2, 5], "then_every_days": 7, "before_expiry": true, "max": 6 },
  "quiet_hours": { "from": "21:00", "to": "08:00" },
  "uploader_helper": true,
  "email_intake": false,
  "sending_domain": null,
  "sending_domain_state": null,
  "sending_domain_records": [],
  "plan": { "name": "Growth", "custom_domain": true, "whatsapp_ready": false },
  "updated_at": "2026-11-05T09:00:00Z",
  "updated_by": { "kind": "member", "id": "mem_9Wd2Hc5", "name": "Maria Lind" }
}
```

## Reuse and validity

A new case reuses a person's earlier documents and checks that are still valid, so they are asked only for what is missing. Each document type and each check has its rule: until it expires, for a period from its date or from its completion, with no time limit, or never reused. A document is reused only while its file is kept, so a validity longer than your retention ends when the file is deleted.

## Read reuse and validity

Whether valid earlier documents and checks are reused, how long each type stays valid, and the rules for reuse after retention.

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

**Parameters**

**Returns** reuse settings: Reuse and validity for this workspace.

API:

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

CLI:

```bash
kontiga settings get reuse
```

MCP tool `get_reuse_settings`:

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

TypeScript:

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

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

Python:

```python
from kontiga import Kontiga

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

Go:

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

Java:

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

.NET:

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

PHP:

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

Ruby:

```ruby
require "kontiga"

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

Rust:

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

Response, 200 OK:

```json
{
  "object": "reuse_settings",
  "reuse": true,
  "documents": [
    { "kind": "passport", "label": "Passport", "rule": "until_expiry", "period": null, "margin_days": 30 },
    { "kind": "birth_certificate", "label": "Birth Certificate", "rule": "no_time_limit", "period": null, "margin_days": 0 },
    { "kind": "bank_statements", "label": "Bank Statements", "rule": "from_document_date", "period": { "value": 3, "unit": "months" }, "margin_days": 0 },
    { "kind": "payslip", "label": "Payslip", "rule": "from_document_date", "period": { "value": 2, "unit": "months" }, "margin_days": 0 },
    { "kind": "invoice", "label": "Invoice", "rule": "not_reusable", "period": null, "margin_days": 0 }
  ],
  "checks": [
    { "kind": "identity", "label": "Identity verification", "rule": "until_expiry", "period": { "value": 12, "unit": "months" }, "margin_days": 30 },
    { "kind": "screening", "label": "Screening", "rule": "from_completion", "period": { "value": 30, "unit": "days" }, "margin_days": 0 },
    { "kind": "proof_of_address", "label": "Proof of address", "rule": "from_document_date", "period": { "value": 3, "unit": "months" }, "margin_days": 0 },
    { "kind": "proof_of_funds", "label": "Proof of funds", "rule": "from_document_date", "period": { "value": 3, "unit": "months" }, "margin_days": 0 },
    { "kind": "one_time_code", "label": "One-time code", "rule": "no_time_limit", "period": null, "margin_days": 0 }
  ],
  "recheck_reused": true,
  "reuse_after_deletion": true,
  "retention_days": 90,
  "updated_at": "2026-09-27T10:00:00Z",
  "updated_by": { "kind": "member", "id": "mem_9Wd2Hc5", "name": "Maria Lind" }
}
```

## Change reuse and validity

Changes the fields you give. A validity row is given whole; rows left out stay as they are.

`PATCH /v1/settings/reuse`. Who may: Owner and Admin. CLI: `kontiga settings set reuse [--reuse <true|false>] [--documents '[{"kind":"payslip",...}]'] [--checks '[{"kind":"screening",...}]'] [--recheck-reused <true|false>] [--reuse-after-deletion <true|false>]`. MCP tool: `update_reuse_settings`.

**Parameters**
- `reuse` (boolean): Reuse valid earlier documents and checks at all.
- `documents` (array of object): Validity rows for document types, each given whole: `kind` (the type, such as `payslip`), `label`, `rule`, `period` (`value` and `unit`, or `null`) and `margin_days` before expiry it stops being reused. Rows left out stay as they are. The answer lists every one of the 84 types. At most 84 items.
- `checks` (array of object): Validity rows for checks, in the same shape: `identity`, `screening`, `proof_of_address`, `proof_of_funds` and `one_time_code`. At most 10 items.
- `recheck_reused` (boolean): Check a reused document again against what is known today.
- `reuse_after_deletion` (boolean): Reuse a check after its files are deleted under retention. A document is never reused once its file is gone.

**Returns** reuse settings: Reuse and validity, changed and audited.

API:

```bash
curl -X PATCH https://api.kontiga.com/v1/settings/reuse \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "documents": [
      {
        "kind": "payslip",
        "label": "Payslip",
        "rule": "from_document_date",
        "period": {
          "value": 2,
          "unit": "months"
        },
        "margin_days": 0
      }
    ]
  }'
```

CLI:

```bash
kontiga settings set reuse \
  --documents '[{"kind":"payslip","label":"Payslip","rule":"from_document_date","period":{"value":2,"unit":"months"},"margin_days":0}]'
```

MCP tool `update_reuse_settings`:

```json
{
  "name": "update_reuse_settings",
  "arguments": {
    "documents": [
      {
        "kind": "payslip",
        "label": "Payslip",
        "rule": "from_document_date",
        "period": {
          "value": 2,
          "unit": "months"
        },
        "margin_days": 0
      }
    ]
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.reuseSettings.update({
  documents: [{ kind: "payslip", label: "Payslip", rule: "from_document_date", period: { value: 2, unit: "months" }, margin_days: 0 }],
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.reuse_settings.update(documents=[{"kind": "payslip", "label": "Payslip", "rule": "from_document_date", "period": {"value": 2, "unit": "months"}, "margin_days": 0}])
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.ReuseSettings.Update(ctx, &kontiga.ReuseSettingsUpdateParams{
	Documents: []any{map[string]any{"kind": "payslip", "label": "Payslip", "rule": "from_document_date", "period": map[string]any{"value": 2, "unit": "months"}, "margin_days": 0}},
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.reuseSettings().update(ReuseSettingsUpdateParams.builder()
    .documents(List.of(Map.of("kind", "payslip", "label", "Payslip", "rule", "from_document_date", "period", Map.of("value", 2, "unit", "months"), "margin_days", 0)))
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.ReuseSettings.UpdateAsync(new ReuseSettingsUpdateOptions
{
    Documents = new object[] { new Dictionary<string, object> { ["kind"] = "payslip", ["label"] = "Payslip", ["rule"] = "from_document_date", ["period"] = new Dictionary<string, object> { ["value"] = 2, ["unit"] = "months" }, ["margin_days"] = 0 } },
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->reuseSettings->update([
    'documents' => [['kind' => 'payslip', 'label' => 'Payslip', 'rule' => 'from_document_date', 'period' => ['value' => 2, 'unit' => 'months'], 'margin_days' => 0]],
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.reuse_settings.update(documents: [{ kind: "payslip", label: "Payslip", rule: "from_document_date", period: { value: 2, unit: "months" }, margin_days: 0 }])
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .reuse_settings()
    .update(kontiga::reuse_settings::UpdateParams {
        documents: vec![serde_json::json!({"kind":"payslip","label":"Payslip","rule":"from_document_date","period":{"value":2,"unit":"months"},"margin_days":0})],
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "reuse_settings",
  "reuse": true,
  "documents": [
    { "kind": "passport", "label": "Passport", "rule": "until_expiry", "period": null, "margin_days": 30 },
    { "kind": "birth_certificate", "label": "Birth Certificate", "rule": "no_time_limit", "period": null, "margin_days": 0 },
    { "kind": "bank_statements", "label": "Bank Statements", "rule": "from_document_date", "period": { "value": 3, "unit": "months" }, "margin_days": 0 },
    { "kind": "payslip", "label": "Payslip", "rule": "from_document_date", "period": { "value": 2, "unit": "months" }, "margin_days": 0 },
    { "kind": "invoice", "label": "Invoice", "rule": "not_reusable", "period": null, "margin_days": 0 }
  ],
  "checks": [
    { "kind": "identity", "label": "Identity verification", "rule": "until_expiry", "period": { "value": 12, "unit": "months" }, "margin_days": 30 },
    { "kind": "screening", "label": "Screening", "rule": "from_completion", "period": { "value": 30, "unit": "days" }, "margin_days": 0 },
    { "kind": "proof_of_address", "label": "Proof of address", "rule": "from_document_date", "period": { "value": 3, "unit": "months" }, "margin_days": 0 },
    { "kind": "proof_of_funds", "label": "Proof of funds", "rule": "from_document_date", "period": { "value": 3, "unit": "months" }, "margin_days": 0 },
    { "kind": "one_time_code", "label": "One-time code", "rule": "no_time_limit", "period": null, "margin_days": 0 }
  ],
  "recheck_reused": true,
  "reuse_after_deletion": true,
  "retention_days": 90,
  "updated_at": "2026-09-27T10:00:00Z",
  "updated_by": { "kind": "member", "id": "mem_9Wd2Hc5", "name": "Maria Lind" }
}
```

### Validity rules

The same rules are read and set one subject at a time as validity rules: a document type, such as `passport` or `payslip`, or a check (`identity`, `screening`, `proof_of_address`, `proof_of_funds`, `one_time_code`). Each rule says where it was set, its `level`: `default` (Kontiga's, until you change it), `workspace`, `collection` or `requirement`. The rule that applies to a request is its requirement's, else its collection's, else the workspace's, else the default. A rule set back to the default is the default again.

Kontiga's defaults: identity documents until 30 days before they expire; birth, marriage and death certificates, divorce decrees, social security cards, diplomas and transcripts with no time limit; bank statements, payslips, investment statements, account confirmations and credit reports 3 months from their date; tax returns, financial statements and company registration papers 12 months from their date; licences until they expire; every other type, and every custom document, not reused. An identity verification is reused until its document expires less 30 days, and at most 12 months after it was done; a screening for 30 days, or for as long as the person is monitored; a proof of address or of funds 3 months from its date. Months are calendar months: a day past the end of the month falls on its last day, so 30 November and 3 months is the last day of February.

## List the validity rules

How long each kind of document and each check stays reusable for a returning person: the rule, its period and its margin, and where it was set. The same rules as reuse and validity in Settings. Name a collection, and one of its requirements, to see the rules in force there.

`GET /v1/validity_rules`. Who may: Owner, Admin, Analyst, Developer and Viewer. CLI: `kontiga validity-rules list [--collection-id <col_id>] [--requirement-id <rqm_id>]`. MCP tool: `list_validity_rules`.

**Parameters**
- `collection_id` (id (col_)): Optional. The rules in force for this collection's requests, its own where it set one.
- `requirement_id` (id (rqm_)): Optional, with `collection_id`. The rules in force for this requirement, a custom document's rule (`custom`) included.

**Returns** list of validity rules: Every rule in force, documents first, then checks, each with the level it was set at.

API:

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

CLI:

```bash
kontiga validity-rules list
```

MCP tool `list_validity_rules`:

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

TypeScript:

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

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

Python:

```python
from kontiga import Kontiga

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

Go:

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

Java:

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

.NET:

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

PHP:

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

Ruby:

```ruby
require "kontiga"

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

Rust:

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

Response, 200 OK:

```json
[{
  "id": "vrl_8Kt3Wm5",
  "object": "validity_rule",
  "level": "workspace",
  "subject": "payslip",
  "label": "Payslip",
  "group": "document",
  "kind": "from_document_date",
  "period": {
    "value": 3,
    "unit": "months"
  },
  "margin_days": 0,
  "updated_at": "2026-11-20T10:00:00Z",
  "updated_by": {
    "kind": "member",
    "id": "mem_4Rt8Jw2",
    "name": "Ines Moreau"
  }
}]
```

## Set a validity rule

Change how long one kind of document or one check stays reusable: for the whole workspace, or for one collection or one of its requirements, whose own rule wins over the workspace's. Requests already sent keep what they reused; the next request follows the new rule.

`PUT /v1/validity_rules/{subject}`. Who may: Owner and Admin. CLI: `kontiga validity-rules set <subject> --kind <until_expiry|from_document_date|from_completion|no_time_limit|not_reusable|inherit> [--period '{"value":3,"unit":"months"}'] [--margin-days <0-365>] [--collection-id <col_id>] [--requirement-id <rqm_id>]`. MCP tool: `set_validity_rule`.

**Parameters**
- `subject` (string, required): A document type, such as `payslip`, a check, such as `screening`, or `custom` for a custom document's requirement. In the path.
- `kind` (enum, required): `until_expiry`, `from_document_date`, `from_completion`, `no_time_limit` or `not_reusable`; or `inherit`, which removes a collection's or a requirement's own rule.
- `period` (object): How long it stays valid, `value` (1 to 120) and `unit` (`days` or `months`), for `from_document_date` and `from_completion`. For `until_expiry`, an outer limit: from completion for a check, from its date for a document. `null` clears it.
- `margin_days` (integer): For `until_expiry`: how many days before the expiry it stops being reused, 0 to 365.
- `collection_id` (id (col_)): Optional. Sets the collection's own rule instead of the workspace's. A check's rule is set for the workspace or a collection.
- `requirement_id` (id (rqm_)): Optional, with `collection_id`. Sets that requirement's own rule.

**Returns** validity rule: The rule, changed and audited.

API:

```bash
curl -X PUT https://api.kontiga.com/v1/validity_rules/payslip \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "from_document_date",
    "period": {
      "value": 2,
      "unit": "months"
    }
  }'
```

CLI:

```bash
kontiga validity-rules set payslip \
  --kind from_document_date \
  --period '{"value":2,"unit":"months"}'
```

MCP tool `set_validity_rule`:

```json
{
  "name": "set_validity_rule",
  "arguments": {
    "subject": "payslip",
    "kind": "from_document_date",
    "period": {
      "value": 2,
      "unit": "months"
    }
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.validityRules.set("payslip", {
  kind: "from_document_date",
  period: { value: 2, unit: "months" },
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.validity_rules.set(
    "payslip",
    kind="from_document_date",
    period={"value": 2, "unit": "months"},
)
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.ValidityRules.Set(ctx, "payslip", &kontiga.ValidityRulesSetParams{
	Kind:   "from_document_date",
	Period: map[string]any{"value": 2, "unit": "months"},
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.validityRules().set("payslip", ValidityRulesSetParams.builder()
    .kind("from_document_date")
    .period(Map.of("value", 2, "unit", "months"))
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.ValidityRules.SetAsync("payslip", new ValidityRulesSetOptions
{
    Kind = "from_document_date",
    Period = new Dictionary<string, object> { ["value"] = 2, ["unit"] = "months" },
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->validityRules->set('payslip', [
    'kind' => 'from_document_date',
    'period' => ['value' => 2, 'unit' => 'months'],
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.validity_rules.set(
  "payslip",
  kind: "from_document_date",
  period: { value: 2, unit: "months" }
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .validity_rules()
    .set("payslip".into(), kontiga::validity_rules::SetParams {
        kind: "from_document_date".into(),
        period: serde_json::json!({"value":2,"unit":"months"}),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "id": "vrl_8Kt3Wm5",
  "object": "validity_rule",
  "level": "workspace",
  "subject": "payslip",
  "label": "Payslip",
  "group": "document",
  "kind": "from_document_date",
  "period": {
    "value": 2,
    "unit": "months"
  },
  "margin_days": 0,
  "updated_at": "2026-11-27T09:00:00Z",
  "updated_by": {
    "kind": "member",
    "id": "mem_4Rt8Jw2",
    "name": "Ines Moreau"
  }
}
```
