# Portal

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

What the end customer's side calls: the portal, the widget and the verification app all use these, and so can a front end of your own. The link is the only credential: a request's token, or a walk-in link's address word and the session it starts. None of the end customer's calls needs a key or an account. A plain fetch of a link, by a mail scanner or a chat preview, changes nothing; the person's own actions open it, pass its gate, upload, answer and send. Nothing here ever shows the person what the checks found.

Updated December 1, 2026

## Contents

- [The request and its link](https://kontiga.com/docs/portal#the-request-and-its-link)
- [Open a request's link](https://kontiga.com/docs/portal#open-a-requests-link)
- [Mark a link opened](https://kontiga.com/docs/portal#mark-a-link-opened)
- [List sample links](https://kontiga.com/docs/portal#list-sample-links)
- [Change the language](https://kontiga.com/docs/portal#change-the-language)
- [Give a way to be reached](https://kontiga.com/docs/portal#give-a-way-to-be-reached)
- [List the party's messages](https://kontiga.com/docs/portal#list-the-partys-messages)
- [The access gate](https://kontiga.com/docs/portal#the-access-gate)
- [Send a one-time code](https://kontiga.com/docs/portal#send-a-one-time-code)
- [Enter the one-time code](https://kontiga.com/docs/portal#enter-the-one-time-code)
- [Files and answers](https://kontiga.com/docs/portal#files-and-answers)
- [Upload a file](https://kontiga.com/docs/portal#upload-a-file)
- [Use a file anyway](https://kontiga.com/docs/portal#use-a-file-anyway)
- [Remove a file](https://kontiga.com/docs/portal#remove-a-file)
- [Answer a question](https://kontiga.com/docs/portal#answer-a-question)
- [Continue on a phone](https://kontiga.com/docs/portal#continue-on-a-phone)
- [Send everything](https://kontiga.com/docs/portal#send-everything)
- [Send the link again](https://kontiga.com/docs/portal#send-the-link-again)
- [Ask for more time](https://kontiga.com/docs/portal#ask-for-more-time)
- [Reply to the team](https://kontiga.com/docs/portal#reply-to-the-team)
- [Identity verification](https://kontiga.com/docs/portal#identity-verification)
- [Agree to the verification](https://kontiga.com/docs/portal#agree-to-the-verification)
- [Read the verification's next step](https://kontiga.com/docs/portal#read-the-verifications-next-step)
- [Capture an identity document](https://kontiga.com/docs/portal#capture-an-identity-document)
- [Read a verification session](https://kontiga.com/docs/portal#read-a-verification-session)
- [Follow a verification's next steps](https://kontiga.com/docs/portal#follow-a-verifications-next-steps)
- [Workflow steps](https://kontiga.com/docs/portal#workflow-steps)
- [Answer a workflow step](https://kontiga.com/docs/portal#answer-a-workflow-step)
- [Find a place](https://kontiga.com/docs/portal#find-a-place)
- [Live changes](https://kontiga.com/docs/portal#live-changes)
- [Follow a link's changes](https://kontiga.com/docs/portal#follow-a-links-changes)
- [Public links and previews](https://kontiga.com/docs/portal#public-links-and-previews)
- [Get a public start link](https://kontiga.com/docs/portal#get-a-public-start-link)
- [Open a public start link](https://kontiga.com/docs/portal#open-a-public-start-link)
- [Start from a public link](https://kontiga.com/docs/portal#start-from-a-public-link)
- [Get a link to run a workflow](https://kontiga.com/docs/portal#get-a-link-to-run-a-workflow)
- [Walk-in links](https://kontiga.com/docs/portal#walk-in-links)
- [Get a profile's walk-in link](https://kontiga.com/docs/portal#get-a-profiles-walk-in-link)
- [Try a verification profile](https://kontiga.com/docs/portal#try-a-verification-profile)
- [Open a walk-in link](https://kontiga.com/docs/portal#open-a-walk-in-link)
- [Start at a walk-in link](https://kontiga.com/docs/portal#start-at-a-walk-in-link)
- [Read a walk-in verification](https://kontiga.com/docs/portal#read-a-walk-in-verification)
- [Agree to a verification](https://kontiga.com/docs/portal#agree-to-a-verification)
- [Send a photo of the ID](https://kontiga.com/docs/portal#send-a-photo-of-the-id)
- [Send a code to a phone](https://kontiga.com/docs/portal#send-a-code-to-a-phone)
- [Check a phone code](https://kontiga.com/docs/portal#check-a-phone-code)
- [Send a code to an email address](https://kontiga.com/docs/portal#send-a-code-to-an-email-address)
- [Check an email code](https://kontiga.com/docs/portal#check-an-email-code)
- [Send a proof](https://kontiga.com/docs/portal#send-a-proof)
- [Correct the person's details](https://kontiga.com/docs/portal#correct-the-persons-details)
- [Stop a verification](https://kontiga.com/docs/portal#stop-a-verification)
- [Verifying on the device](https://kontiga.com/docs/portal#verifying-on-the-device)
- [Choose how to verify](https://kontiga.com/docs/portal#choose-how-to-verify)
- [Get a chip challenge](https://kontiga.com/docs/portal#get-a-chip-challenge)
- [Send what the chip gave](https://kontiga.com/docs/portal#send-what-the-chip-gave)
- [Send the selfie](https://kontiga.com/docs/portal#send-the-selfie)
- [Send a proof of funds](https://kontiga.com/docs/portal#send-a-proof-of-funds)
- [Continue on another device](https://kontiga.com/docs/portal#continue-on-another-device)
- [Open a verification on this device](https://kontiga.com/docs/portal#open-a-verification-on-this-device)
- [Continue with ZOREAL ID](https://kontiga.com/docs/portal#continue-with-zoreal-id)
- [Send an Aadhaar](https://kontiga.com/docs/portal#send-an-aadhaar)
- [Verify identity before the checklist](https://kontiga.com/docs/portal#verify-identity-before-the-checklist)
- [Sessions](https://kontiga.com/docs/portal#sessions)
- [Start a portal session](https://kontiga.com/docs/portal#start-a-portal-session)
- [Read the request in a session](https://kontiga.com/docs/portal#read-the-request-in-a-session)
- [Finalise an upload](https://kontiga.com/docs/portal#finalise-an-upload)
- [The portal in your page](https://kontiga.com/docs/portal#the-portal-in-your-page)

## The request and its link

- A request's link is `https://collect.kontiga.com/r/{token}`. The token is everything after `/r/`.
- Every call answers the request as the person sees it: who is asking and why, each requirement with its slots (one per document or answer asked for), what is in, what is missing, and the gate.
- The count counts items: `required` and `done` are the required items, optional ones are counted apart in `counts`. Send is possible once every required item is in and none is asked for again.
- A link that no longer works answers its `state` (`expired`, `cancelled`, `completed`), and a workspace that cannot take documents right now answers `unavailable`, each with the page to show. A withdrawn request carries the reason the team gave the person, as `cancel_reason`.
- Before a code gate is passed, the request names no one: `request_id`, `first_name` and `collection_name` are empty, so a forwarded link shows the brand and the purpose alone.
- The brand's `logo` is the image's address on the portal's host (`/api/portal/v1/portal/brand_assets/{kit}/{upload}`), public and kept by the browser: a new image is a new address. Null when the kit has none, and the page shows the brand's two letters.
- Refusals come in the person's language (the session's, the request's, or the browser's), with the same `code` and `details` whatever the language.

**A request, as the person sees it**

```json
{
  "object": "portal_request",
  "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  "request_id": "rqs_4Mb9Kt2",
  "state": "open",
  "brand": {
    "kit_id": "bk_4Hm7Rw2",
    "name": "Brightwater Lending",
    "monogram": "BL",
    "logo": null,
    "accent": "#1E4D6B",
    "highlight": "#14374F",
    "powered_by_kontiga": true,
    "reply_to": "applications@brightwater.example",
    "support": {
      "email": "help@brightwater.example",
      "phone": "+31 20 794 1180",
      "url": null,
      "address": null
    },
    "privacy_url": "https://brightwater.example/privacy",
    "terms_url": null,
    "what_next": "Brightwater Lending reads your documents within one working day and writes to you by email.",
    "texts": {
      "welcome": "Upload what Brightwater Lending asked for. It takes a few minutes, and you can stop and come back.",
      "done": "Thank you. Brightwater Lending has everything it asked for.",
      "expired": "This link has expired. Please ask Brightwater Lending for a new one."
    }
  },
  "purpose": "for your personal loan application",
  "collection_name": "Personal loan",
  "first_name": "Lotte",
  "expires_at": "2026-12-05T23:59:00Z",
  "completed_at": null,
  "gate": {
    "kind": "code",
    "passed": true,
    "contacts": [
      {
        "channel": "sms",
        "masked": "+31 6 •• •• •4 18"
      },
      {
        "channel": "email",
        "masked": "l•••@example.com"
      }
    ],
    "sent_to": null,
    "resend_in_seconds": 0,
    "tries_left": 5,
    "locked_until": null
  },
  "items": [
    {
      "id": "rqm_5Kw2Hd8",
      "kind": "document",
      "title": "Payslips, last two months",
      "instructions": "Your two most recent monthly payslips, as PDFs from your employer or clear photos of the paper copies.",
      "accepted": "A PDF or a photo (JPEG, PNG, HEIC, HEIF or WebP), up to 64 MB",
      "required": true,
      "strictness": "advise",
      "status": "to_do",
      "slots": [
        {
          "item_id": "itm_2Cw8Lr5",
          "state": "accepted",
          "label": "September 2026",
          "on_file": {
            "title": "Payslip, September 2026",
            "at": "2026-11-24T19:41:00Z",
            "reused": false
          },
          "redo": null
        },
        {
          "item_id": "itm_2Cw8Ls6",
          "state": "not_started",
          "label": "October 2026",
          "on_file": null,
          "redo": null
        }
      ],
      "have": 1,
      "needed": 2,
      "files": [],
      "redo": null,
      "question": null,
      "identity": null,
      "restrictions": {
        "pdf": true,
        "images": true,
        "camera_only": false,
        "words": "A PDF or a photo (JPEG, PNG, HEIC, HEIF or WebP), up to 64 MB",
        "max_files": 1
      },
      "asked": null
    },
    {
      "id": "rqm_9Tn4Bq2",
      "kind": "question",
      "title": "Monthly rent or mortgage payment",
      "instructions": "What you pay for your home each month.",
      "required": true,
      "status": "done",
      "slots": [
        {
          "item_id": "itm_6Lp1Vx3",
          "state": "accepted",
          "label": "Monthly rent or mortgage payment",
          "on_file": null,
          "redo": null
        }
      ],
      "have": 1,
      "needed": 1,
      "question": {
        "answer": "1450",
        "input": "amount",
        "currency": "EUR",
        "help": "In euros, before any housing benefit."
      }
    }
  ],
  "item_count": 5,
  "required": 5,
  "done": 4,
  "counts": {
    "required": 5,
    "required_in": 4,
    "optional": 0,
    "optional_in": 0,
    "to_come": 1,
    "needs_redo": 0,
    "reused": 1
  },
  "can_send": false,
  "missing": [
    "Payslip, October 2026"
  ],
  "locale": "en",
  "locale_chosen": false,
  "more_time_asked": false,
  "contacts": [
    {
      "channel": "sms",
      "masked": "+31 6 •• •• •4 18"
    },
    {
      "channel": "email",
      "masked": "l•••@example.com"
    }
  ],
  "run": null,
  "contact_needed": false,
  "follow_up": null,
  "conversation": []
}
```

## Open a request's link

The request as its party sees it, from the link: who is asking and why, the checklist with what each item asks for, what was sent and what is missing, the due date and the access gate. A link that no longer works says so, and so does a workspace that cannot take documents right now.

`GET /v1/portal/links/{token}`. Who may: Anyone, with no account yet. CLI: `kontiga portal get <token>`. MCP tool: `get_portal_request`.

**Parameters**
- `token` (string, required): The link's token, the part of the link after `/r/`. In the path.

**Returns** portal request: The request as the party sees it: the brand kit, the items, the gate and the state of the link.

API:

```bash
curl -X GET https://api.kontiga.com/v1/portal/links/mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc
```

CLI:

```bash
kontiga portal get mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc
```

MCP tool `get_portal_request`:

```json
{
  "name": "get_portal_request",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.link("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.link("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.Link(ctx, "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().link("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.LinkAsync("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->link('mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.link("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .link("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into())
    .await?;
```

Response, 200 OK:

```json
{
  "object": "portal_request",
  "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  "request_id": "rqs_4Mb9Kt2",
  "state": "open",
  "brand": {
    "kit_id": "bk_4Hm7Rw2",
    "name": "Brightwater Lending",
    "monogram": "BL",
    "logo": null,
    "accent": "#1E4D6B",
    "highlight": "#14374F",
    "powered_by_kontiga": true,
    "reply_to": "applications@brightwater.example",
    "support": {
      "email": "help@brightwater.example",
      "phone": "+31 20 794 1180",
      "url": null,
      "address": null
    },
    "privacy_url": "https://brightwater.example/privacy",
    "terms_url": null,
    "what_next": "Brightwater Lending reads your documents within one working day and writes to you by email.",
    "texts": {
      "welcome": "Upload what Brightwater Lending asked for. It takes a few minutes, and you can stop and come back.",
      "done": "Thank you. Brightwater Lending has everything it asked for.",
      "expired": "This link has expired. Please ask Brightwater Lending for a new one."
    }
  },
  "purpose": "for your personal loan application",
  "collection_name": "Personal loan",
  "first_name": "Lotte",
  "expires_at": "2026-12-05T23:59:00Z",
  "completed_at": null,
  "gate": {
    "kind": "code",
    "passed": true,
    "contacts": [
      {
        "channel": "sms",
        "masked": "+31 6 •• •• •4 18"
      },
      {
        "channel": "email",
        "masked": "l•••@example.com"
      }
    ],
    "sent_to": null,
    "resend_in_seconds": 0,
    "tries_left": 5,
    "locked_until": null
  },
  "items": [
    {
      "id": "rqm_5Kw2Hd8",
      "kind": "document",
      "title": "Payslips, last two months",
      "instructions": "Your two most recent monthly payslips, as PDFs from your employer or clear photos of the paper copies.",
      "accepted": "A PDF or a photo (JPEG, PNG, HEIC, HEIF or WebP), up to 64 MB",
      "required": true,
      "strictness": "advise",
      "status": "to_do",
      "slots": [
        {
          "item_id": "itm_2Cw8Lr5",
          "state": "accepted",
          "label": "September 2026",
          "on_file": {
            "title": "Payslip, September 2026",
            "at": "2026-11-24T19:41:00Z",
            "reused": false
          },
          "redo": null
        },
        {
          "item_id": "itm_2Cw8Ls6",
          "state": "not_started",
          "label": "October 2026",
          "on_file": null,
          "redo": null
        }
      ],
      "have": 1,
      "needed": 2,
      "files": [],
      "redo": null,
      "question": null,
      "identity": null,
      "restrictions": {
        "pdf": true,
        "images": true,
        "camera_only": false,
        "words": "A PDF or a photo (JPEG, PNG, HEIC, HEIF or WebP), up to 64 MB",
        "max_files": 1
      },
      "asked": null
    },
    {
      "id": "rqm_9Tn4Bq2",
      "kind": "question",
      "title": "Monthly rent or mortgage payment",
      "instructions": "What you pay for your home each month.",
      "required": true,
      "status": "done",
      "slots": [
        {
          "item_id": "itm_6Lp1Vx3",
          "state": "accepted",
          "label": "Monthly rent or mortgage payment",
          "on_file": null,
          "redo": null
        }
      ],
      "have": 1,
      "needed": 1,
      "question": {
        "answer": "1450",
        "input": "amount",
        "currency": "EUR",
        "help": "In euros, before any housing benefit."
      }
    }
  ],
  "item_count": 5,
  "required": 5,
  "done": 4,
  "counts": {
    "required": 5,
    "required_in": 4,
    "optional": 0,
    "optional_in": 0,
    "to_come": 1,
    "needs_redo": 0,
    "reused": 1
  },
  "can_send": false,
  "missing": [
    "Payslip, October 2026"
  ],
  "locale": "en",
  "locale_chosen": false,
  "more_time_asked": false,
  "contacts": [
    {
      "channel": "sms",
      "masked": "+31 6 •• •• •4 18"
    },
    {
      "channel": "email",
      "masked": "l•••@example.com"
    }
  ],
  "run": null,
  "contact_needed": false,
  "follow_up": null,
  "conversation": []
}
```

## Mark a link opened

Tells Kontiga the page was shown to a person. A plain fetch of the link, by a mail scanner or a chat preview, changes nothing.

`POST /v1/portal/sessions/opened`. Who may: Anyone, with no account yet. CLI: `kontiga portal open <token>`. MCP tool: `mark_portal_opened`.

**Parameters**
- `token` (string, required): The link's token. Call it when the page is shown to a person, not when it is fetched.

**Returns** portal request: The request, opened.

API:

```bash
curl -X POST https://api.kontiga.com/v1/portal/sessions/opened \
  -H "Content-Type: application/json" \
  -d '{
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"
  }'
```

CLI:

```bash
kontiga portal open mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc
```

MCP tool `mark_portal_opened`:

```json
{
  "name": "mark_portal_opened",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.open({
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.open(token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.Open(ctx, &kontiga.PortalOpenParams{
	Token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().open(PortalOpenParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.OpenAsync(new PortalOpenOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->open([
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.open(token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .open(kontiga::portal::OpenParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "portal_request",
  "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  "request_id": "rqs_4Mb9Kt2",
  "state": "open",
  "brand": {
    "kit_id": "bk_4Hm7Rw2",
    "name": "Brightwater Lending",
    "monogram": "BL",
    "logo": null,
    "accent": "#1E4D6B",
    "highlight": "#14374F",
    "powered_by_kontiga": true,
    "reply_to": "applications@brightwater.example",
    "support": {
      "email": "help@brightwater.example",
      "phone": "+31 20 794 1180",
      "url": null,
      "address": null
    },
    "privacy_url": "https://brightwater.example/privacy",
    "terms_url": null,
    "what_next": "Brightwater Lending reads your documents within one working day and writes to you by email.",
    "texts": {
      "welcome": "Upload what Brightwater Lending asked for. It takes a few minutes, and you can stop and come back.",
      "done": "Thank you. Brightwater Lending has everything it asked for.",
      "expired": "This link has expired. Please ask Brightwater Lending for a new one."
    }
  },
  "purpose": "for your personal loan application",
  "collection_name": "Personal loan",
  "first_name": "Lotte",
  "expires_at": "2026-12-05T23:59:00Z",
  "completed_at": null,
  "gate": {
    "kind": "code",
    "passed": true,
    "contacts": [
      {
        "channel": "sms",
        "masked": "+31 6 •• •• •4 18"
      },
      {
        "channel": "email",
        "masked": "l•••@example.com"
      }
    ],
    "sent_to": null,
    "resend_in_seconds": 0,
    "tries_left": 5,
    "locked_until": null
  },
  "items": [
    {
      "id": "rqm_5Kw2Hd8",
      "kind": "document",
      "title": "Payslips, last two months",
      "instructions": "Your two most recent monthly payslips, as PDFs from your employer or clear photos of the paper copies.",
      "accepted": "A PDF or a photo (JPEG, PNG, HEIC, HEIF or WebP), up to 64 MB",
      "required": true,
      "strictness": "advise",
      "status": "to_do",
      "slots": [
        {
          "item_id": "itm_2Cw8Lr5",
          "state": "accepted",
          "label": "September 2026",
          "on_file": {
            "title": "Payslip, September 2026",
            "at": "2026-11-24T19:41:00Z",
            "reused": false
          },
          "redo": null
        },
        {
          "item_id": "itm_2Cw8Ls6",
          "state": "not_started",
          "label": "October 2026",
          "on_file": null,
          "redo": null
        }
      ],
      "have": 1,
      "needed": 2,
      "files": [],
      "redo": null,
      "question": null,
      "identity": null,
      "restrictions": {
        "pdf": true,
        "images": true,
        "camera_only": false,
        "words": "A PDF or a photo (JPEG, PNG, HEIC, HEIF or WebP), up to 64 MB",
        "max_files": 1
      },
      "asked": null
    },
    {
      "id": "rqm_9Tn4Bq2",
      "kind": "question",
      "title": "Monthly rent or mortgage payment",
      "instructions": "What you pay for your home each month.",
      "required": true,
      "status": "done",
      "slots": [
        {
          "item_id": "itm_6Lp1Vx3",
          "state": "accepted",
          "label": "Monthly rent or mortgage payment",
          "on_file": null,
          "redo": null
        }
      ],
      "have": 1,
      "needed": 1,
      "question": {
        "answer": "1450",
        "input": "amount",
        "currency": "EUR",
        "help": "In euros, before any housing benefit."
      }
    }
  ],
  "item_count": 5,
  "required": 5,
  "done": 4,
  "counts": {
    "required": 5,
    "required_in": 4,
    "optional": 0,
    "optional_in": 0,
    "to_come": 1,
    "needs_redo": 0,
    "reused": 1
  },
  "can_send": false,
  "missing": [
    "Payslip, October 2026"
  ],
  "locale": "en",
  "locale_chosen": false,
  "more_time_asked": false,
  "contacts": [
    {
      "channel": "sms",
      "masked": "+31 6 •• •• •4 18"
    },
    {
      "channel": "email",
      "masked": "l•••@example.com"
    }
  ],
  "run": null,
  "contact_needed": false,
  "follow_up": null,
  "conversation": []
}
```

## List sample links

Test mode: a link to every sample request, each with what it shows (the checklist, the code first, an expired, withdrawn or finished request), to try the portal end to end. With no key, Kontiga's own samples; with a secret test key, your workspace's test requests. A publishable key never lists them: it sits in a public page.

`GET /v1/portal/samples`. Who may: Anyone, with no account yet. CLI: `kontiga portal samples`. MCP tool: `list_portal_samples`.

**Parameters**

**Returns** list of sample links: A link to each sample request, with its party, its case and what it shows.

API:

```bash
curl -X GET https://api.kontiga.com/v1/portal/samples
```

CLI:

```bash
kontiga portal samples
```

MCP tool `list_portal_samples`:

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

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.samples();
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.samples()
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.Samples(ctx)
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().samples();
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.SamplesAsync();
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->samples();
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.samples
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .samples()
    .await?;
```

Response, 200 OK:

```json
{
  "items": [
    {
      "request_id": "rqs_7Lc2Wq5",
      "url": "https://collect.kontiga.com/r/tS4kQ9vM2wL7xR8nB3dH6pZ1",
      "path": "/r/tS4kQ9vM2wL7xR8nB3dH6pZ1",
      "workspace_name": "Brightwater Lending",
      "person_name": "Lina Haugen",
      "party_role": "Applicant",
      "case_title": "Personal loan, sample",
      "collection_name": "Personal loan",
      "state": "sent",
      "shows": "The checklist",
      "runs": null
    },
    {
      "request_id": "rqs_3Hd8Kv1",
      "url": "https://collect.kontiga.com/r/pX7nB2kR9vL4mQ8wT3dS6hZ5",
      "path": "/r/pX7nB2kR9vL4mQ8wT3dS6hZ5",
      "workspace_name": "Brightwater Lending",
      "person_name": "Lina Haugen",
      "party_role": "Applicant",
      "case_title": "Mortgage application, sample",
      "collection_name": "Mortgage application",
      "state": "sent",
      "shows": "The code first",
      "runs": null
    },
    {
      "request_id": "rqs_5Nf1Tb9",
      "url": "https://collect.kontiga.com/r/zH3kW8qN5vR2mL9xT4bS7dP1",
      "path": "/r/zH3kW8qN5vR2mL9xT4bS7dP1",
      "workspace_name": "Brightwater Lending",
      "person_name": "Lina Haugen",
      "party_role": "Applicant",
      "case_title": "Car finance, sample",
      "collection_name": "Car finance",
      "state": "expired",
      "shows": "The expired page",
      "runs": null
    }
  ],
  "next_cursor": null
}
```

Called with a secret test key, from your server, the samples are your workspace's own test requests; called with no key, those of Kontiga's sample workspace. A publishable key is refused with `key_scope_denied`: it sits in a public page, and the samples are working links. A live key is refused with `live_key`. Each sample keeps one link however often it is listed.

## Change the language

Shows the portal in another of its 12 languages. The choice is kept on the request for the messages that follow, unless the customer set the language.

`PUT /v1/portal/request/locale`. Who may: Anyone, with no account yet. CLI: `kontiga portal language <token> --locale <en|pt|es|ar|zht|zhs|fr|de|ja|hi|ru|sv>`. MCP tool: `set_portal_language`.

**Parameters**
- `token` (string, required): The link's token.
- `locale` (enum, required): One of the portal's 12 languages.

**Returns** portal request: The request, in the language chosen.

API:

```bash
curl -X PUT https://api.kontiga.com/v1/portal/request/locale \
  -H "Content-Type: application/json" \
  -d '{
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "locale": "de"
  }'
```

CLI:

```bash
kontiga portal language mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc --locale de
```

MCP tool `set_portal_language`:

```json
{
  "name": "set_portal_language",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "locale": "de"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.setLanguage({
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  locale: "de",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.set_language(token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc", locale="de")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.SetLanguage(ctx, &kontiga.PortalSetLanguageParams{
	Token:  "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
	Locale: "de",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().setLanguage(PortalSetLanguageParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .locale("de")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.SetLanguageAsync(new PortalSetLanguageOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    Locale = "de",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->setLanguage([
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
    'locale' => 'de',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.set_language(token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc", locale: "de")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .set_language(kontiga::portal::SetLanguageParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        locale: "de".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "portal_request",
  "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  "request_id": "rqs_4Mb9Kt2",
  "state": "open",
  "locale": "de",
  "locale_chosen": true
}
```

## Give a way to be reached

Gives the request an email address or a phone number, or both, when the party has neither: the team's questions and the link again go there. Asked at the start of the visit.

`PUT /v1/portal/request/contact`. Who may: Anyone, with no account yet. CLI: `kontiga portal contact <token> [--email <address>] [--phone <+number>]`. MCP tool: `set_portal_contact`.

**Parameters**
- `token` (string, required): The link's token.
- `email` (email): An email address the team can write to. At most 255 characters.
- `phone` (string): A phone number in the international form, such as `+31 6 1234 5678`.

**Returns** portal request: The request, with the contact kept on it.

API:

```bash
curl -X PUT https://api.kontiga.com/v1/portal/request/contact \
  -H "Content-Type: application/json" \
  -d '{
    "token": "jT6mQ3vR8kL2xW9nB4dS7hZ5",
    "email": "jens.dekker@example.com"
  }'
```

CLI:

```bash
kontiga portal contact jT6mQ3vR8kL2xW9nB4dS7hZ5 \
  --email jens.dekker@example.com
```

MCP tool `set_portal_contact`:

```json
{
  "name": "set_portal_contact",
  "arguments": {
    "token": "jT6mQ3vR8kL2xW9nB4dS7hZ5",
    "email": "jens.dekker@example.com"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.setContact({
  token: "jT6mQ3vR8kL2xW9nB4dS7hZ5",
  email: "jens.dekker@example.com",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.set_contact(token="jT6mQ3vR8kL2xW9nB4dS7hZ5", email="jens.dekker@example.com")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.SetContact(ctx, &kontiga.PortalSetContactParams{
	Token: "jT6mQ3vR8kL2xW9nB4dS7hZ5",
	Email: "jens.dekker@example.com",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().setContact(PortalSetContactParams.builder()
    .token("jT6mQ3vR8kL2xW9nB4dS7hZ5")
    .email("jens.dekker@example.com")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.SetContactAsync(new PortalSetContactOptions
{
    Token = "jT6mQ3vR8kL2xW9nB4dS7hZ5",
    Email = "jens.dekker@example.com",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->setContact([
    'token' => 'jT6mQ3vR8kL2xW9nB4dS7hZ5',
    'email' => 'jens.dekker@example.com',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.set_contact(token: "jT6mQ3vR8kL2xW9nB4dS7hZ5", email: "jens.dekker@example.com")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .set_contact(kontiga::portal::SetContactParams {
        token: "jT6mQ3vR8kL2xW9nB4dS7hZ5".into(),
        email: "jens.dekker@example.com".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "portal_request",
  "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  "request_id": "rqs_4Mb9Kt2",
  "state": "open",
  "contact_needed": false,
  "contacts": [
    {
      "channel": "email",
      "masked": "j•••@example.com"
    }
  ]
}
```

## List the party's messages

Every message the request's party was sent, as they received it: the request, the reminders, the asks from the case, the codes, the identity message and a workflow's emails and texts, each with its subject, text and HTML, the sender, the language and its delivery.

`GET /v1/portal/messages`. Who may: Anyone, with no account yet. CLI: `kontiga portal messages <token>`. MCP tool: `list_portal_messages`.

**Parameters**
- `token` (string, required): The link's token.

**Returns** list of messages: The party's messages, newest first, each as it was rendered.

API:

```bash
curl -X GET "https://api.kontiga.com/v1/portal/messages?token=mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"
```

CLI:

```bash
kontiga portal messages mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc
```

MCP tool `list_portal_messages`:

```json
{
  "name": "list_portal_messages",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.messages({
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.messages(token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.Messages(ctx, &kontiga.PortalMessagesParams{
	Token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().messages(PortalMessagesParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.MessagesAsync(new PortalMessagesOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->messages([
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.messages(token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .messages(kontiga::portal::MessagesParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "items": [
    {
      "id": "msg_1Rc6Pv3",
      "kind": "reminder",
      "channel": "email",
      "sent_at": "2026-11-26T08:00:20Z",
      "delivery": "opened",
      "from": "Brightwater Lending <brightwater-lending@mail.kontiga.com>",
      "reply_to": "applications@brightwater.example",
      "to": "l•••@example.com",
      "locale": "en",
      "subject": "Reminder: Brightwater Lending is still waiting for 1 document",
      "text": "Hello Lotte,\n\nWe are still waiting for your payslip for October 2026. Open your link to upload it; it takes a couple of minutes.\n\nhttps://collect.kontiga.com/r/mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc\n\nBrightwater Lending",
      "html": "<!doctype html><html>…</html>",
      "origin": "A reminder"
    }
  ],
  "next_cursor": null
}
```

## The access gate

A collection may ask for a one-time code before the checklist opens. The code has six digits and goes to the phone or the email already on the request, never to another. Until the gate is passed, the request answers with no items.

The request's `gate.kind` names the gate: `link` (the link alone opens it), `code` (the one-time code below) or `identity` (the person verifies first, through `portal.identity_gate`). `gate.passed` says whether this visit is past it.

## Send a one-time code

Sends a six-digit code to the phone or the email on the request, for a collection that asks for one. A new code is allowed 60 seconds after the last.

`POST /v1/portal/gate/code`. Who may: Anyone, with no account yet. CLI: `kontiga portal send-code <token> --channel <sms|email>`. MCP tool: `send_portal_code`.

**Parameters**
- `token` (string, required): The link's token.
- `channel` (enum, required): Where the code goes: the phone or the email on the request. One of `sms`, `email`.

**Returns** portal request: The request, with where the code went and when a new one may be asked for.

API:

```bash
curl -X POST https://api.kontiga.com/v1/portal/gate/code \
  -H "Content-Type: application/json" \
  -d '{
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "channel": "sms"
  }'
```

CLI:

```bash
kontiga portal send-code mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc --channel sms
```

MCP tool `send_portal_code`:

```json
{
  "name": "send_portal_code",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "channel": "sms"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.sendCode({
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  channel: "sms",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.send_code(token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc", channel="sms")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.SendCode(ctx, &kontiga.PortalSendCodeParams{
	Token:   "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
	Channel: "sms",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().sendCode(PortalSendCodeParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .channel("sms")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.SendCodeAsync(new PortalSendCodeOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    Channel = "sms",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->sendCode([
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
    'channel' => 'sms',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.send_code(token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc", channel: "sms")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .send_code(kontiga::portal::SendCodeParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        channel: "sms".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "portal_request",
  "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  "request_id": "rqs_4Mb9Kt2",
  "state": "open",
  "gate": {
    "kind": "code",
    "passed": false,
    "contacts": [
      {
        "channel": "sms",
        "masked": "+31 6 •• •• •4 18"
      },
      {
        "channel": "email",
        "masked": "l•••@example.com"
      }
    ],
    "sent_to": {
      "channel": "sms",
      "masked": "+31 6 •• •• •4 18"
    },
    "resend_in_seconds": 60,
    "tries_left": 5,
    "locked_until": null
  },
  "items": []
}
```

## Enter the one-time code

Opens the checklist with the six-digit code. Five wrong tries void a code; three voided codes close the link for an hour.

`POST /v1/portal/gate/code/verify`. Who may: Anyone, with no account yet. CLI: `kontiga portal verify-code <token> --code <000000>`. MCP tool: `verify_portal_code`.

**Parameters**
- `token` (string, required): The link's token.
- `code` (string, required): The six-digit code the person received.

**Returns** portal request: The request with its checklist, or how many tries are left.

API:

```bash
curl -X POST https://api.kontiga.com/v1/portal/gate/code/verify \
  -H "Content-Type: application/json" \
  -d '{
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "code": "482913"
  }'
```

CLI:

```bash
kontiga portal verify-code mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc \
  --code 482913
```

MCP tool `verify_portal_code`:

```json
{
  "name": "verify_portal_code",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "code": "482913"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.verifyCode({
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  code: "482913",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.verify_code(token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc", code="482913")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.VerifyCode(ctx, &kontiga.PortalVerifyCodeParams{
	Token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
	Code:  "482913",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().verifyCode(PortalVerifyCodeParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .code("482913")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.VerifyCodeAsync(new PortalVerifyCodeOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    Code = "482913",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->verifyCode([
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
    'code' => '482913',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.verify_code(token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc", code: "482913")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .verify_code(kontiga::portal::VerifyCodeParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        code: "482913".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "portal_request",
  "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  "request_id": "rqs_4Mb9Kt2",
  "state": "open",
  "gate": {
    "kind": "code",
    "passed": false,
    "sent_to": {
      "channel": "sms",
      "masked": "+31 6 •• •• •4 18"
    },
    "resend_in_seconds": 12,
    "tries_left": 4,
    "locked_until": null
  },
  "items": []
}
```

The sample shows a wrong code: four tries are left. The right code answers the request with its checklist, as `portal.link` does.

- A code is good for 10 minutes. A new one may be asked for 60 seconds after the last (`cooldown_active`), at most five a day per request (`code_sends_used`).
- A wrong code answers `code_invalid` with `details.tries_left`. The fifth wrong try voids the code (`code_voided`), and the code is refused after that even when it is right. A code past its 10 minutes answers `code_expired`.
- Three voided codes close the gate for an hour (`gate_locked`, with `details.locked_until`), and the team that sent the request is told.
- A right code opens the checklist for this session, and for 24 hours on the same device when it sends its `visitor_id` at the start. A phone that takes over with a handoff keeps it too.

## Files and answers

Each file is checked at once, while the person is still there, and answered in plain words: got it, what to fix, or that it is still being checked. A file of the wrong type, too large, protected by a password or unreadable is refused and not kept. Where the requirement allows it, the person may keep a file the check had a problem with, with a note for the team.

- A file takes three calls. `portal.upload` answers an address to PUT the file's bytes to, straight into the workspace's storage, valid 5 minutes, with the headers the PUT must carry; it needs the file's MD5 in base64 as `checksum`, and takes its SHA-256 as `sha256`. The PUT sends the bytes. `portal.finalize` then names the upload and answers the file with its check, within 10 seconds. The CLI and the MCP tool make the three calls in one.
- The type is read from the file itself, whatever it was declared as: a PDF or a photo (JPEG, PNG, HEIC or HEIF). A file is at most 64 MB, a PDF at most 50 pages. An item takes the kinds of file and the number of files its requirement sets (`restrictions`: `pdf`, `images`, `max_files`, 1 to 10; `words` says it in the request's language). A type that is never taken or that the item does not take, or a size over 64 MB, is refused at the upload with `unsupported_type` or `too_large`, before any byte is sent.
- A file refused at the finalize answers `answer` `refused` with its `reason` (`unsupported_type`, `too_large`, `too_many_pages`, `password_protected`, `unreadable_file`, `duplicate_file`, `too_many_files`) and its message, and is not kept.
- `problem` comes with the message to show and, where keeping is offered, `can_keep`; such a file counts for its item only once kept. `still_checking` never holds the person back: the answer reaches the page on the live channel when it comes.
- A finalize is safe to repeat. A second call for an upload already filed answers the same file and the request, as the first did, so an answer lost on a phone's connection never asks for the file again. While the first call is still reading the file, a second gets `upload_in_progress` (409) with `Retry-After`. A file that could not be read just now (a busy moment) is `file_check_busy` (503) with `Retry-After`, and nothing is refused: call again.
- `upload_not_found` (422): the upload is not this item's, or is past its hour; choose the file again. `upload_not_received` (409): the bytes have not arrived yet. `item_done` (409): the item needs nothing more. `identity_step` (409): an identity item takes its photos in its own step.
- Every write of a session (`POST`, `PUT`) takes an `Idempotency-Key`: a repeat with the same key within 24 hours answers the first answer again.
- An item that is a question takes no file: its `restrictions` is null.
- `file_not_found` (422) and `cannot_keep` (409) for keep and remove; `invalid_answer` (422) with the field for an answer that fails its question's type, as the API refuses it for a member.
- Every call names one of the session's own items. Another party's item, on the same case or not, is `item_not_found` (404).

## Upload a file

Uploads one file for an item and answers in seconds with the instant check: got it, what to fix in plain words, or that it is still being checked. A file of the wrong type, too large, protected by a password or unreadable is refused and not kept.

`POST /v1/portal/items/{item_id}/uploads`. Who may: Anyone, with no account yet. CLI: `kontiga portal upload <token> <item_id> <file> [--part <front|back|selfie>] [--document <passport|card|licence>] [--capture-method <upload|camera|autocapture|manual_camera>] [--visitor-id <id>]`. MCP tool: `upload_portal_file`.

**Parameters**
- `token` (string, required): The link's token.
- `item_id` (id (itm_), required): The slot the file is for, from the requirement's `slots`. In the path.
- `file_name` (string, required): The file's name. At most 255 characters.
- `content_type` (string, required): The file's type, such as `application/pdf` or `image/jpeg`. At most 120 characters.
- `byte_size` (integer, required): The file's size in bytes.
- `checksum` (string): The file's MD5 in base64. The address to PUT the bytes to takes these bytes only.
- `sha256` (string): The file's SHA-256 in base64, when the device computes it.
- `part` (enum): For an identity item: the front, the back, or the selfie. One of `front`, `back`, `selfie`.
- `document` (enum): For an identity item: the kind of document. One of `passport`, `card`, `licence`.
- `capture_method` (enum): How the file was taken: picked from the device, a photo, an automatic capture, or a photo taken by hand in the camera view. One of `upload`, `camera`, `autocapture`, `manual_camera`.
- `visitor_id` (id (vis_)): The device's visitor id, when the page has one.

**Returns** portal upload: The file with the instant check's answer, and the request as it now stands. The API's own call answers the presigned PUT (PortalUploadTarget); portal.finalize answers this.

API:

```bash
curl -X POST https://api.kontiga.com/v1/portal/items/itm_2Cw8Ls6/uploads \
  -H "Content-Type: application/json" \
  -d '{
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "file_name": "payslip-october-2026.pdf",
    "content_type": "application/pdf",
    "byte_size": 184320,
    "checksum": "kQ3vT1mL8wR2nB6dH4pZ9w==",
    "capture_method": "upload"
  }'
```

CLI:

```bash
kontiga portal upload mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc itm_2Cw8Ls6 \
  --capture-method upload
```

MCP tool `upload_portal_file`:

```json
{
  "name": "upload_portal_file",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "item_id": "itm_2Cw8Ls6",
    "file_name": "payslip-october-2026.pdf",
    "content_type": "application/pdf",
    "byte_size": 184320,
    "checksum": "kQ3vT1mL8wR2nB6dH4pZ9w==",
    "capture_method": "upload"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.upload("itm_2Cw8Ls6", {
  file: await openAsBlob("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"),
  capture_method: "upload",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.upload(
    "itm_2Cw8Ls6",
    file=open("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc", "rb"),
    capture_method="upload",
)
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.Upload(ctx, "itm_2Cw8Ls6", &kontiga.PortalUploadParams{
	File:          kontiga.FileFromPath("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"),
	CaptureMethod: "upload",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().upload("itm_2Cw8Ls6", PortalUploadParams.builder()
    .file(Path.of("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"))
    .captureMethod("upload")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.UploadAsync("itm_2Cw8Ls6", new PortalUploadOptions
{
    File = File.OpenRead("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"),
    CaptureMethod = "upload",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->upload('itm_2Cw8Ls6', [
    'file' => fopen('mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc', 'r'),
    'capture_method' => 'upload',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.upload(
  "itm_2Cw8Ls6",
  file: File.open("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"),
  capture_method: "upload"
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .upload("itm_2Cw8Ls6".into(), kontiga::portal::UploadParams {
        file: kontiga::File::open("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc").await?,
        capture_method: "upload".into(),
        ..Default::default()
    })
    .await?;
```

Response, 201 Created:

```json
{
  "object": "portal_upload",
  "upload_id": "upl_3c8e1f6a9b2d4e7c8a1b3d5f7e9c2a4b",
  "item_id": "itm_2Cw8Ls6",
  "upload": {
    "url": "https://kontiga-eu-west-1.s3.eu-west-1.amazonaws.com/uploads/ws_8a1f/3c8e1f6a?X-Amz-Expires=300&X-Amz-Signature=5d2e",
    "method": "PUT",
    "headers": {
      "Content-Type": "application/pdf",
      "Content-MD5": "kQ3vT1mL8wR2nB6dH4pZ9w==",
      "If-None-Match": "*"
    },
    "expires_at": "2026-11-26T09:49:10Z"
  },
  "file": null
}
```

## Use a file anyway

Keeps a file the instant check had a problem with, where the requirement allows it, with an optional note for the team, after a change of name for example.

`POST /v1/portal/items/{item_id}/keep`. Who may: Anyone, with no account yet. CLI: `kontiga portal keep <token> <item_id> --file-id <pfl_id> [--note <text>]`. MCP tool: `keep_portal_file`.

**Parameters**
- `token` (string, required): The link's token.
- `item_id` (id (itm_), required): The slot. In the path.
- `file_id` (id (pfl_), required): The file to keep, from the upload's answer.
- `note` (string): A note for the team, in the person's own words. At most 500 characters.

**Returns** portal request: The request, with the file kept and marked for the team.

API:

```bash
curl -X POST https://api.kontiga.com/v1/portal/items/itm_2Cw8Ls6/keep \
  -H "Content-Type: application/json" \
  -d '{
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "file_id": "pfl_8Rd3Mw6",
    "note": "My employer pays on the 25th, so this is the latest one I have."
  }'
```

CLI:

```bash
kontiga portal keep mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc itm_2Cw8Ls6 \
  --file-id pfl_8Rd3Mw6 \
  --note 'My employer pays on the 25th, so this is the latest one I have.'
```

MCP tool `keep_portal_file`:

```json
{
  "name": "keep_portal_file",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "item_id": "itm_2Cw8Ls6",
    "file_id": "pfl_8Rd3Mw6",
    "note": "My employer pays on the 25th, so this is the latest one I have."
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.keep("itm_2Cw8Ls6", {
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  file_id: "pfl_8Rd3Mw6",
  note: "My employer pays on the 25th, so this is the latest one I have.",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.keep(
    "itm_2Cw8Ls6",
    token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    file_id="pfl_8Rd3Mw6",
    note="My employer pays on the 25th, so this is the latest one I have.",
)
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.Keep(ctx, "itm_2Cw8Ls6", &kontiga.PortalKeepParams{
	Token:  "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
	FileId: "pfl_8Rd3Mw6",
	Note:   "My employer pays on the 25th, so this is the latest one I have.",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().keep("itm_2Cw8Ls6", PortalKeepParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .fileId("pfl_8Rd3Mw6")
    .note("My employer pays on the 25th, so this is the latest one I have.")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.KeepAsync("itm_2Cw8Ls6", new PortalKeepOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    FileId = "pfl_8Rd3Mw6",
    Note = "My employer pays on the 25th, so this is the latest one I have.",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->keep('itm_2Cw8Ls6', [
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
    'file_id' => 'pfl_8Rd3Mw6',
    'note' => 'My employer pays on the 25th, so this is the latest one I have.',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.keep(
  "itm_2Cw8Ls6",
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  file_id: "pfl_8Rd3Mw6",
  note: "My employer pays on the 25th, so this is the latest one I have."
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .keep("itm_2Cw8Ls6".into(), kontiga::portal::KeepParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        file_id: "pfl_8Rd3Mw6".into(),
        note: "My employer pays on the 25th, so this is the latest one I have.".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "portal_request",
  "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  "request_id": "rqs_4Mb9Kt2",
  "state": "open",
  "done": 5,
  "can_send": true,
  "missing": [],
  "items": [
    {
      "id": "rqm_5Kw2Hd8",
      "kind": "document",
      "title": "Payslips, last two months",
      "instructions": "Your two most recent monthly payslips, as PDFs from your employer or clear photos of the paper copies.",
      "accepted": "A PDF or a photo (JPEG, PNG, HEIC, HEIF or WebP), up to 64 MB",
      "required": true,
      "strictness": "advise",
      "status": "done",
      "slots": [
        {
          "item_id": "itm_2Cw8Lr5",
          "state": "accepted",
          "label": "September 2026",
          "on_file": {
            "title": "Payslip, September 2026",
            "at": "2026-11-24T19:41:00Z",
            "reused": false
          },
          "redo": null
        },
        {
          "item_id": "itm_2Cw8Ls6",
          "state": "not_started",
          "label": "October 2026",
          "on_file": null,
          "redo": null
        }
      ],
      "have": 2,
      "needed": 2,
      "files": [
        {
          "id": "pfl_8Rd3Mw6",
          "file_name": "payslip-october-2026.pdf",
          "byte_size": 184320,
          "at": "2026-11-26T09:44:10Z",
          "label": "October 2026",
          "part": null,
          "answer": "problem",
          "reason": "wrong_period",
          "message": "This payslip is for August 2026. We need the one for October 2026.",
          "can_keep": true,
          "kept": true,
          "note": "My employer pays on the 25th, so this is the latest one I have.",
          "item_id": "itm_2Cw8Ls6"
        }
      ],
      "redo": null,
      "question": null,
      "identity": null,
      "restrictions": {
        "pdf": true,
        "images": true,
        "camera_only": false,
        "words": "A PDF or a photo (JPEG, PNG, HEIC, HEIF or WebP), up to 64 MB",
        "max_files": 1
      },
      "asked": null
    }
  ]
}
```

## Remove a file

Removes a file before Send: one the instant check had a problem with, to try again, or one sent by mistake.

`DELETE /v1/portal/items/{item_id}/documents/{file_id}`. Who may: Anyone, with no account yet. CLI: `kontiga portal remove-file <token> <item_id> --file-id <pfl_id>`. MCP tool: `remove_portal_file`.

**Parameters**
- `token` (string, required): The link's token.
- `item_id` (id (itm_), required): The slot. In the path.
- `file_id` (id (pfl_), required): The file to remove, before Send. In the path.

**Returns** portal request: The request, without the file.

API:

```bash
curl -X DELETE "https://api.kontiga.com/v1/portal/items/itm_2Cw8Ls6/documents/pfl_8Rd3Mw6?token=mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"
```

CLI:

```bash
kontiga portal remove-file mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc itm_2Cw8Ls6 \
  --file-id pfl_8Rd3Mw6
```

MCP tool `remove_portal_file`:

```json
{
  "name": "remove_portal_file",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "item_id": "itm_2Cw8Ls6",
    "file_id": "pfl_8Rd3Mw6"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.removeFile("itm_2Cw8Ls6", "pfl_8Rd3Mw6", {
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.remove_file(
    "itm_2Cw8Ls6",
    "pfl_8Rd3Mw6",
    token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
)
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.RemoveFile(ctx, "itm_2Cw8Ls6", "pfl_8Rd3Mw6", &kontiga.PortalRemoveFileParams{
	Token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().removeFile("itm_2Cw8Ls6", "pfl_8Rd3Mw6", PortalRemoveFileParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.RemoveFileAsync("itm_2Cw8Ls6", "pfl_8Rd3Mw6", new PortalRemoveFileOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->removeFile('itm_2Cw8Ls6', 'pfl_8Rd3Mw6', [
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.remove_file(
  "itm_2Cw8Ls6",
  "pfl_8Rd3Mw6",
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .remove_file("itm_2Cw8Ls6".into(), "pfl_8Rd3Mw6".into(), kontiga::portal::RemoveFileParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "portal_request",
  "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  "request_id": "rqs_4Mb9Kt2",
  "state": "open",
  "done": 4,
  "can_send": false,
  "missing": [
    "Payslip, October 2026"
  ],
  "items": [
    {
      "id": "rqm_5Kw2Hd8",
      "kind": "document",
      "title": "Payslips, last two months",
      "instructions": "Your two most recent monthly payslips, as PDFs from your employer or clear photos of the paper copies.",
      "accepted": "A PDF or a photo (JPEG, PNG, HEIC, HEIF or WebP), up to 64 MB",
      "required": true,
      "strictness": "advise",
      "status": "to_do",
      "slots": [
        {
          "item_id": "itm_2Cw8Lr5",
          "state": "accepted",
          "label": "September 2026",
          "on_file": {
            "title": "Payslip, September 2026",
            "at": "2026-11-24T19:41:00Z",
            "reused": false
          },
          "redo": null
        },
        {
          "item_id": "itm_2Cw8Ls6",
          "state": "not_started",
          "label": "October 2026",
          "on_file": null,
          "redo": null
        }
      ],
      "have": 1,
      "needed": 2,
      "files": [],
      "redo": null,
      "question": null,
      "identity": null,
      "restrictions": {
        "pdf": true,
        "images": true,
        "camera_only": false,
        "words": "A PDF or a photo (JPEG, PNG, HEIC, HEIF or WebP), up to 64 MB",
        "max_files": 1
      },
      "asked": null
    }
  ]
}
```

## Answer a question

Saves the answer to a question of the checklist. It is saved on every change, so nothing is lost if the person leaves.

`PUT /v1/portal/items/{item_id}/answer`. Who may: Anyone, with no account yet. CLI: `kontiga portal answer <token> <item_id> --answer <text>`. MCP tool: `answer_portal_question`.

**Parameters**
- `token` (string, required): The link's token.
- `item_id` (id (itm_), required): The question's slot. In the path.
- `answer` (string, required): The answer as typed. An amount is in the currency the question names. At most 500 characters.

**Returns** portal request: The request, with the answer saved.

API:

```bash
curl -X PUT https://api.kontiga.com/v1/portal/items/itm_6Lp1Vx3/answer \
  -H "Content-Type: application/json" \
  -d '{
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "answer": "1450"
  }'
```

CLI:

```bash
kontiga portal answer mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc itm_6Lp1Vx3 \
  --answer 1450
```

MCP tool `answer_portal_question`:

```json
{
  "name": "answer_portal_question",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "item_id": "itm_6Lp1Vx3",
    "answer": "1450"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.answer("itm_6Lp1Vx3", {
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  answer: "1450",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.answer(
    "itm_6Lp1Vx3",
    token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    answer="1450",
)
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.Answer(ctx, "itm_6Lp1Vx3", &kontiga.PortalAnswerParams{
	Token:  "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
	Answer: "1450",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().answer("itm_6Lp1Vx3", PortalAnswerParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .answer("1450")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.AnswerAsync("itm_6Lp1Vx3", new PortalAnswerOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    Answer = "1450",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->answer('itm_6Lp1Vx3', [
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
    'answer' => '1450',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.answer(
  "itm_6Lp1Vx3",
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  answer: "1450"
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .answer("itm_6Lp1Vx3".into(), kontiga::portal::AnswerParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        answer: "1450".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "portal_request",
  "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  "request_id": "rqs_4Mb9Kt2",
  "state": "open",
  "items": [
    {
      "id": "rqm_9Tn4Bq2",
      "kind": "question",
      "title": "Monthly rent or mortgage payment",
      "instructions": "What you pay for your home each month.",
      "required": true,
      "status": "done",
      "slots": [
        {
          "item_id": "itm_6Lp1Vx3",
          "state": "accepted",
          "label": "Monthly rent or mortgage payment",
          "on_file": null,
          "redo": null
        }
      ],
      "have": 1,
      "needed": 1,
      "question": {
        "answer": "1450",
        "input": "amount",
        "currency": "EUR",
        "help": "In euros, before any housing benefit."
      }
    }
  ]
}
```

## Continue on a phone

An address to open on a phone, to take the photos there: a code to scan, or, for an identity verification, a text message to a number the person types. It works once, for 10 minutes, and never skips the access gate for anyone who did not pass it. Text messages: one a minute and three a day per verification.

`POST /v1/portal/handoffs`. Who may: Anyone, with no account yet. CLI: `kontiga portal handoff <token> <item_id> [--kind <qr|sms>] [--phone-number <+number>]`. MCP tool: `create_portal_handoff`.

**Parameters**
- `token` (string, required): The link's token.
- `item_id` (id (itm_), required): The slot to take the photos for.
- `kind` (enum): A code to scan, or a text message to a number the person types (identity verification only). One of `qr`, `sms`.
- `phone_number` (string): The number to text, with `kind` `sms`.

**Returns** portal handoff: The address the code holds and when it stops working.

API:

```bash
curl -X POST https://api.kontiga.com/v1/portal/handoffs \
  -H "Content-Type: application/json" \
  -d '{
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "item_id": "itm_2Cw8Ls6",
    "kind": "qr"
  }'
```

CLI:

```bash
kontiga portal handoff mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc itm_2Cw8Ls6 \
  --kind qr
```

MCP tool `create_portal_handoff`:

```json
{
  "name": "create_portal_handoff",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "item_id": "itm_2Cw8Ls6",
    "kind": "qr"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.handoff({
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  item_id: "itm_2Cw8Ls6",
  kind: "qr",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.handoff(
    token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    item_id="itm_2Cw8Ls6",
    kind="qr",
)
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.Handoff(ctx, &kontiga.PortalHandoffParams{
	Token:  "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
	ItemId: "itm_2Cw8Ls6",
	Kind:   "qr",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().handoff(PortalHandoffParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .itemId("itm_2Cw8Ls6")
    .kind("qr")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.HandoffAsync(new PortalHandoffOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    ItemId = "itm_2Cw8Ls6",
    Kind = "qr",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->handoff([
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
    'item_id' => 'itm_2Cw8Ls6',
    'kind' => 'qr',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.handoff(
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  item_id: "itm_2Cw8Ls6",
  kind: "qr"
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .handoff(kontiga::portal::HandoffParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        item_id: "itm_2Cw8Ls6".into(),
        kind: "qr".into(),
        ..Default::default()
    })
    .await?;
```

Response, 201 Created:

```json
{
  "object": "portal_handoff",
  "url": "https://collect.kontiga.com/h/Vq4Lm8Rk2Tw9?item=itm_2Cw8Ls6",
  "expires_at": "2026-11-26T09:58:00Z",
  "sent_to": null
}
```

## Send everything

Sends the checklist to the customer once every required item is in. An item asked for again blocks it.

`POST /v1/portal/request/send`. Who may: Anyone, with no account yet. CLI: `kontiga portal send <token>`. MCP tool: `send_portal_request`.

**Parameters**
- `token` (string, required): The link's token.

**Returns** portal request: The request, completed.

API:

```bash
curl -X POST https://api.kontiga.com/v1/portal/request/send \
  -H "Content-Type: application/json" \
  -d '{
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"
  }'
```

CLI:

```bash
kontiga portal send mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc
```

MCP tool `send_portal_request`:

```json
{
  "name": "send_portal_request",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.send({
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.send(token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.Send(ctx, &kontiga.PortalSendParams{
	Token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().send(PortalSendParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.SendAsync(new PortalSendOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->send([
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.send(token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .send(kontiga::portal::SendParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "portal_request",
  "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  "request_id": "rqs_4Mb9Kt2",
  "state": "completed",
  "completed_at": "2026-11-26T09:47:30Z",
  "done": 5,
  "can_send": false,
  "missing": []
}
```

Send is refused with `items_missing` (409, `details.missing` the items) while a required item is not in or is asked for again. After Send nothing is removed: the files are the team's.

## Send the link again

Sends a new link to the same request, to the email or the phone already on it and never to another, so the person can come back later. At most 3 times an hour.

`POST /v1/portal/request/link_again`. Who may: Anyone, with no account yet. CLI: `kontiga portal link-again <token> --channel <sms|email>`. MCP tool: `send_portal_link_again`.

**Parameters**
- `token` (string, required): The link's token.
- `channel` (enum, required): The email or the phone already on the request. One of `sms`, `email`.

**Returns** portal request: The request; the new link is on its way.

API:

```bash
curl -X POST https://api.kontiga.com/v1/portal/request/link_again \
  -H "Content-Type: application/json" \
  -d '{
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "channel": "email"
  }'
```

CLI:

```bash
kontiga portal link-again mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc \
  --channel email
```

MCP tool `send_portal_link_again`:

```json
{
  "name": "send_portal_link_again",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "channel": "email"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.linkAgain({
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  channel: "email",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.link_again(token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc", channel="email")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.LinkAgain(ctx, &kontiga.PortalLinkAgainParams{
	Token:   "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
	Channel: "email",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().linkAgain(PortalLinkAgainParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .channel("email")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.LinkAgainAsync(new PortalLinkAgainOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    Channel = "email",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->linkAgain([
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
    'channel' => 'email',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.link_again(token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc", channel: "email")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .link_again(kontiga::portal::LinkAgainParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        channel: "email".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "portal_request",
  "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  "request_id": "rqs_4Mb9Kt2",
  "state": "open",
  "contacts": [
    {
      "channel": "email",
      "masked": "l•••@example.com"
    }
  ],
  "link_sent": {
    "channel": "email",
    "masked": "l•••@example.com",
    "at": "2026-11-26T09:48:00Z"
  }
}
```

## Ask for more time

On an expired link: tells the case owner the person needs more time, at most once a day.

`POST /v1/portal/request/more_time`. Who may: Anyone, with no account yet. CLI: `kontiga portal more-time <token>`. MCP tool: `ask_portal_more_time`.

**Parameters**
- `token` (string, required): The expired link's token.

**Returns** portal request: The request; the customer has been told.

API:

```bash
curl -X POST https://api.kontiga.com/v1/portal/request/more_time \
  -H "Content-Type: application/json" \
  -d '{
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"
  }'
```

CLI:

```bash
kontiga portal more-time mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc
```

MCP tool `ask_portal_more_time`:

```json
{
  "name": "ask_portal_more_time",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.moreTime({
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.more_time(token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.MoreTime(ctx, &kontiga.PortalMoreTimeParams{
	Token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().moreTime(PortalMoreTimeParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.MoreTimeAsync(new PortalMoreTimeOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->moreTime([
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.more_time(token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .more_time(kontiga::portal::MoreTimeParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "portal_request",
  "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  "request_id": "rqs_4Mb9Kt2",
  "state": "expired",
  "more_time_asked": true
}
```

- The link again goes to the request's own email or phone, never to one typed, at most 3 times an hour (`code_sends_used`, 429, with `Retry-After`); a channel with nothing on file is `contact_missing`.
- More time is asked on an expired link only (`not_expired`, 409, otherwise). The team is told at most once a day; `more_time_asked` says so.
- A way to be reached is given only while the request has neither an email nor a phone (`contact_present`, 409). The language is one of the workspace's (`language_not_offered`, 422), kept on the request for the messages that follow unless the team set one.
- A reply answers one of the team's messages to this party (`message_not_found`, 422, for any other) or starts a new question; it lands in the party's conversation.

## Reply to the team

Answers a question the team asked on the case, or asks them something back, in the party's own words. A reply to a clarification closes it; the reply lands on the case's timeline and in its conversation with the party.

`POST /v1/portal/conversation/replies`. Who may: Anyone, with no account yet. CLI: `kontiga portal reply <token> --text <words> [--reply-to <msg_id>]`. MCP tool: `reply_portal_conversation`.

**Parameters**
- `token` (string, required): The link's token.
- `reply_to` (id (msg_)): The team's message this answers. Left out, it is a new question to the team.
- `text` (string, required): The reply, in the person's own words. At most 2,000 characters.

**Returns** portal request: The request, with the reply in its conversation.

API:

```bash
curl -X POST https://api.kontiga.com/v1/portal/conversation/replies \
  -H "Content-Type: application/json" \
  -d '{
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "reply_to": "msg_5Hq2Wr8",
    "text": "No, it was a one-off bonus for a project that finished in August."
  }'
```

CLI:

```bash
kontiga portal reply mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc \
  --reply-to msg_5Hq2Wr8 \
  --text 'No, it was a one-off bonus for a project that finished in August.'
```

MCP tool `reply_portal_conversation`:

```json
{
  "name": "reply_portal_conversation",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "reply_to": "msg_5Hq2Wr8",
    "text": "No, it was a one-off bonus for a project that finished in August."
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.reply({
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  reply_to: "msg_5Hq2Wr8",
  text: "No, it was a one-off bonus for a project that finished in August.",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.reply(
    token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    reply_to="msg_5Hq2Wr8",
    text="No, it was a one-off bonus for a project that finished in August.",
)
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.Reply(ctx, &kontiga.PortalReplyParams{
	Token:   "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
	ReplyTo: "msg_5Hq2Wr8",
	Text:    "No, it was a one-off bonus for a project that finished in August.",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().reply(PortalReplyParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .replyTo("msg_5Hq2Wr8")
    .text("No, it was a one-off bonus for a project that finished in August.")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.ReplyAsync(new PortalReplyOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    ReplyTo = "msg_5Hq2Wr8",
    Text = "No, it was a one-off bonus for a project that finished in August.",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->reply([
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
    'reply_to' => 'msg_5Hq2Wr8',
    'text' => 'No, it was a one-off bonus for a project that finished in August.',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.reply(
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  reply_to: "msg_5Hq2Wr8",
  text: "No, it was a one-off bonus for a project that finished in August."
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .reply(kontiga::portal::ReplyParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        reply_to: "msg_5Hq2Wr8".into(),
        text: "No, it was a one-off bonus for a project that finished in August.".into(),
        ..Default::default()
    })
    .await?;
```

Response, 201 Created:

```json
{
  "object": "portal_request",
  "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  "request_id": "rqs_4Mb9Kt2",
  "state": "open",
  "conversation": [
    {
      "id": "msg_5Hq2Wr8",
      "at": "2026-11-25T15:10:00Z",
      "from": "team",
      "kind": "clarify",
      "author": "Elif Kaya",
      "text": "Your September payslip shows a bonus of €850. Is that paid every year?",
      "item": {
        "id": "itm_2Cw8Lr5",
        "title": "Payslip, September 2026"
      },
      "reply_to": null,
      "delivery": "opened",
      "open": false
    },
    {
      "id": "msg_5Hq2Ws1",
      "at": "2026-11-26T09:46:20Z",
      "from": "party",
      "kind": "reply",
      "author": "Lotte de Vries",
      "text": "No, it was a one-off bonus for a project that finished in August.",
      "item": {
        "id": "itm_2Cw8Lr5",
        "title": "Payslip, September 2026"
      },
      "reply_to": "msg_5Hq2Wr8",
      "delivery": null,
      "open": false
    }
  ]
}
```

## Identity verification

An identity item, or a workflow's identity step, asks for consent first, then the document's sides and a selfie. Each capture is answered with what to fix, if anything; the verification's result is never shown to the person. The next screen comes as a preflight, and the session's live channel pushes it after every change, so the page, the widget, the app and the SDKs move on without asking again.

## Agree to the verification

The person agrees, or not, to have their identity verified, before any photo is taken, on the words and the link of the workspace's verification profile. Agreeing is recorded with its time; saying no stops the verification and tells the team.

`POST /v1/portal/identity/consent`. Who may: Anyone, with no account yet. CLI: `kontiga portal consent <token> --gives-consent <true|false> [--item-id <itm_id>] [--node-id <step id>]`. MCP tool: `give_portal_identity_consent`.

**Parameters**
- `token` (string, required): The link's token.
- `item_id` (id (itm_)): The identity item, on a checklist.
- `node_id` (string): Or the identity step, in a workflow. At most 128 characters.
- `gives_consent` (boolean, required): Whether the person agrees. No stops the verification and tells the team.

**Returns** portal request: The request, with the answer on the verification.

API:

```bash
curl -X POST https://api.kontiga.com/v1/portal/identity/consent \
  -H "Content-Type: application/json" \
  -d '{
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "item_id": "itm_4Nx7Lc2",
    "gives_consent": true
  }'
```

CLI:

```bash
kontiga portal consent mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc \
  --item-id itm_4Nx7Lc2 \
  --gives-consent
```

MCP tool `give_portal_identity_consent`:

```json
{
  "name": "give_portal_identity_consent",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "item_id": "itm_4Nx7Lc2",
    "gives_consent": true
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.identityConsent({
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  item_id: "itm_4Nx7Lc2",
  gives_consent: true,
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.identity_consent(
    token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    item_id="itm_4Nx7Lc2",
    gives_consent=True,
)
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.IdentityConsent(ctx, &kontiga.PortalIdentityConsentParams{
	Token:        "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
	ItemId:       "itm_4Nx7Lc2",
	GivesConsent: true,
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().identityConsent(PortalIdentityConsentParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .itemId("itm_4Nx7Lc2")
    .givesConsent(true)
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.IdentityConsentAsync(new PortalIdentityConsentOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    ItemId = "itm_4Nx7Lc2",
    GivesConsent = true,
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->identityConsent([
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
    'item_id' => 'itm_4Nx7Lc2',
    'gives_consent' => true,
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.identity_consent(
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  item_id: "itm_4Nx7Lc2",
  gives_consent: true
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .identity_consent(kontiga::portal::IdentityConsentParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        item_id: "itm_4Nx7Lc2".into(),
        gives_consent: true,
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "portal_request",
  "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  "request_id": "rqs_4Mb9Kt2",
  "state": "open",
  "items": [
    {
      "id": "rqm_1Vd7Kc4",
      "kind": "identity",
      "title": "Your identity",
      "status": "to_do",
      "identity": {
        "document": "card",
        "consent": {
          "text": "I agree that Brightwater Lending checks my identity document and a selfie to confirm who I am.",
          "link": "https://brightwater.example/privacy",
          "given_at": "2026-11-26T09:45:02Z",
          "refused_at": null
        },
        "preflight": {
          "extra_data": {},
          "session": "idv_6Wk3Qn8",
          "session_id": "idv_6Wk3Qn8",
          "entity_id_state": "none_received",
          "entity_id_document_type": "id_card",
          "requirement": {
            "requirement_type": "identity_document",
            "status": "awaiting_receipt",
            "flow_order": 100
          },
          "screen": {
            "show": "scan_id_document_front_screen",
            "parameters": {
              "camera": "back"
            }
          }
        }
      }
    }
  ]
}
```

## Read the verification's next step

The identity verification's next step, in the copied preflight's shape: the screen to show (consent, the front, the back, the selfie, done), its parameters, the requirement it is for, and the feedback on the last photo.

`GET /v1/portal/items/{item_id}/preflight`. Who may: Anyone, with no account yet. CLI: `kontiga portal preflight <token> <item_id>`. MCP tool: `get_portal_preflight`.

**Parameters**
- `token` (string, required): The link's token.
- `item_id` (id (itm_), required): The identity item. In the path.

**Returns** preflight: The screen to show next, with its parameters and the feedback on the last image.

API:

```bash
curl -X GET "https://api.kontiga.com/v1/portal/items/itm_4Nx7Lc2/preflight?token=mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"
```

CLI:

```bash
kontiga portal preflight mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc itm_4Nx7Lc2
```

MCP tool `get_portal_preflight`:

```json
{
  "name": "get_portal_preflight",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "item_id": "itm_4Nx7Lc2"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.preflight("itm_4Nx7Lc2", {
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.preflight("itm_4Nx7Lc2", token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.Preflight(ctx, "itm_4Nx7Lc2", &kontiga.PortalPreflightParams{
	Token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().preflight("itm_4Nx7Lc2", PortalPreflightParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.PreflightAsync("itm_4Nx7Lc2", new PortalPreflightOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->preflight('itm_4Nx7Lc2', [
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.preflight("itm_4Nx7Lc2", token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .preflight("itm_4Nx7Lc2".into(), kontiga::portal::PreflightParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "preflight",
  "extra_data": {},
  "session": "idv_6Wk3Qn8",
  "session_id": "idv_6Wk3Qn8",
  "entity_id_state": "front_received_awaiting_back",
  "entity_id_document_type": "id_card",
  "requirement": {
    "requirement_type": "identity_document",
    "status": "awaiting_receipt",
    "flow_order": 100
  },
  "screen": {
    "show": "scan_id_document_back_screen",
    "parameters": {
      "camera": "back",
      "camera_quality": "ultra",
      "allow_manual_upload": false,
      "multipage": false,
      "title": null,
      "text": null
    }
  }
}
```

## Capture an identity document

Sends one capture for a workflow's identity step: the front or back of the document, or the selfie. It answers in seconds with what to fix, if anything, in plain words; the verification's result is never shown to the person.

`POST /v1/portal/steps/{node_id}/captures`. Who may: Anyone, with no account yet. CLI: `kontiga portal capture <token> <node_id> <file> --part <front|back|selfie> --document <passport|card|licence> [--capture-method <upload|camera|autocapture|manual_camera>] [--visitor-id <id>]`. MCP tool: `capture_portal_identity`.

**Parameters**
- `token` (string, required): The link's token.
- `node_id` (string, required): The workflow's identity step. At most 128 characters. In the path.
- `part` (enum, required): The front, the back, or the selfie. One of `front`, `back`, `selfie`.
- `document` (enum, required): The kind of document. One of `passport`, `card`, `licence`.
- `file_name` (string, required): The capture's file name. At most 255 characters.
- `content_type` (string, required): The capture's type, such as `image/jpeg`. At most 120 characters.
- `byte_size` (integer, required): The capture's size in bytes.
- `capture_method` (enum): How it was taken. One of `upload`, `camera`, `autocapture`, `manual_camera`.
- `visitor_id` (id (vis_)): The device's visitor id, when the page has one.

**Returns** portal upload: The capture with the instant check's answer, and the request as it now stands.

API:

```bash
curl -X POST https://api.kontiga.com/v1/portal/steps/id-1/captures \
  -H "Content-Type: application/json" \
  -d '{
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "part": "front",
    "document": "card",
    "file_name": "front.jpg",
    "content_type": "image/jpeg",
    "byte_size": 912384,
    "capture_method": "autocapture"
  }'
```

CLI:

```bash
kontiga portal capture mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc id-1 \
  --part front \
  --document card \
  --capture-method autocapture
```

MCP tool `capture_portal_identity`:

```json
{
  "name": "capture_portal_identity",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "node_id": "id-1",
    "part": "front",
    "document": "card",
    "file_name": "front.jpg",
    "content_type": "image/jpeg",
    "byte_size": 912384,
    "capture_method": "autocapture"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.captureIdentity("id-1", {
  file: await openAsBlob("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"),
  part: "front",
  document: "card",
  capture_method: "autocapture",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.capture_identity(
    "id-1",
    file=open("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc", "rb"),
    part="front",
    document="card",
    capture_method="autocapture",
)
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.CaptureIdentity(ctx, "id-1", &kontiga.PortalCaptureIdentityParams{
	File:          kontiga.FileFromPath("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"),
	Part:          "front",
	Document:      "card",
	CaptureMethod: "autocapture",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().captureIdentity("id-1", PortalCaptureIdentityParams.builder()
    .file(Path.of("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"))
    .part("front")
    .document("card")
    .captureMethod("autocapture")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.CaptureIdentityAsync("id-1", new PortalCaptureIdentityOptions
{
    File = File.OpenRead("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"),
    Part = "front",
    Document = "card",
    CaptureMethod = "autocapture",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->captureIdentity('id-1', [
    'file' => fopen('mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc', 'r'),
    'part' => 'front',
    'document' => 'card',
    'capture_method' => 'autocapture',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.capture_identity(
  "id-1",
  file: File.open("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"),
  part: "front",
  document: "card",
  capture_method: "autocapture"
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .capture_identity("id-1".into(), kontiga::portal::CaptureIdentityParams {
        file: kontiga::File::open("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc").await?,
        part: "front".into(),
        document: "card".into(),
        capture_method: "autocapture".into(),
        ..Default::default()
    })
    .await?;
```

Response, 201 Created:

```json
{
  "object": "portal_upload",
  "file": {
    "id": "pfl_2Bt9Hx5",
    "file_name": "front.jpg",
    "byte_size": 912384,
    "at": "2026-11-26T09:45:40Z",
    "label": "Front",
    "part": "front",
    "answer": "problem",
    "reason": "glare",
    "message": "Light is reflecting off the card. Tilt it a little away from the light and take the photo again.",
    "can_keep": false,
    "kept": false,
    "note": null,
    "item_id": null
  },
  "request": {
    "object": "portal_request",
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "request_id": "rqs_4Mb9Kt2"
  }
}
```

## Read a verification session

An identity verification's session read again by the device that holds it: the next screen, the brand kit and consent, whether anything still waits, when the token ends, and where its live channel is. With the portal's token it names the checklist's identity item or the workflow's identity step; with a session token it names neither. A verification that is finished, stopped or expired is refused in plain words.

`GET /v1/verify/session`. Who may: The end customer, with the verification's session. CLI: `kontiga portal session <token> [--item-id <itm_id>] [--node-id <step id>]`. MCP tool: `get_portal_verification_session`.

**Parameters**
- `token` (string, required): The session's token.
- `item_id` (id (itm_)): The identity item it belongs to.
- `node_id` (string): Or the workflow's identity step. At most 128 characters.

**Returns** verification session: With the portal's token: the place's session (its brand kit, link, expiry, language, the next screen, its live channel). With a session token: the device's own state (object verification_session_state: change, preflight, return_url, live, verification_id, status, mode, token_expires_at, brand_kit).

API:

```bash
curl -X GET "https://api.kontiga.com/v1/verify/session?item_id=itm_4Nx7Lc2" \
  -H "Authorization: Bearer mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"
```

CLI:

```bash
kontiga portal session mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc \
  --item-id itm_4Nx7Lc2
```

MCP tool `get_portal_verification_session`:

```json
{
  "name": "get_portal_verification_session",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "item_id": "itm_4Nx7Lc2"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.session({
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  item_id: "itm_4Nx7Lc2",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.session(token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc", item_id="itm_4Nx7Lc2")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.Session(ctx, &kontiga.PortalSessionParams{
	Token:  "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
	ItemId: "itm_4Nx7Lc2",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().session(PortalSessionParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .itemId("itm_4Nx7Lc2")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.SessionAsync(new PortalSessionOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    ItemId = "itm_4Nx7Lc2",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->session([
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
    'item_id' => 'itm_4Nx7Lc2',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.session(token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc", item_id: "itm_4Nx7Lc2")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .session(kontiga::portal::SessionParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        item_id: "itm_4Nx7Lc2".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "verification_session",
  "session_id": "ses_idv_6Wk3Qn8",
  "status": "open",
  "item_id": "itm_4Nx7Lc2",
  "node_id": null,
  "url": "https://verify.kontiga.com/s/ses_idv_6Wk3Qn8",
  "expires_at": "2026-11-27T09:45:00Z",
  "locale": "en",
  "brand_kit": {
    "name": "Brightwater Lending",
    "logo": null,
    "brand_color": "#14374F",
    "accent_color": "#1E4D6B",
    "privacy_url": "https://brightwater.example/privacy",
    "terms_url": null,
    "consent_text": "I agree that Brightwater Lending checks my identity document and a selfie to confirm who I am.",
    "consent_link": "https://brightwater.example/privacy"
  },
  "preflight": {
    "extra_data": {},
    "session": "idv_6Wk3Qn8",
    "session_id": "idv_6Wk3Qn8",
    "entity_id_state": "front_received_awaiting_back",
    "entity_id_document_type": "id_card",
    "requirement": {
      "requirement_type": "identity_document",
      "status": "awaiting_receipt",
      "flow_order": 100
    },
    "screen": {
      "show": "scan_id_document_back_screen",
      "parameters": {
        "camera": "back",
        "camera_quality": "ultra",
        "allow_manual_upload": false,
        "multipage": false,
        "title": null,
        "text": null
      }
    }
  },
  "live": "/v1/verify/session/live",
  "session_token": "kt_vst_4f1c9a7e2b6d8053c1e7a94b2d6f0c38e5a1b7d9f2c4e6a8b0d3f5a7c9e1b2d4",
  "token_expires_at": "2026-11-26T10:15:00Z"
}
```

A device reads the same with its session token (`kt_vst_`) in `Authorization: Bearer` and names neither an item nor a step. Its answer is `verification_session_state`: `change`, `preflight`, `return_url` and `live`, with `verification_id` (the verification's one id), `status`, `mode`, `token_expires_at` and `brand_kit`. The [client API guide](https://kontiga.com/docs/guides/verify-client-api) gives every answer.

## Follow a verification's next steps

An identity verification's live channel, as server-sent events: the next screen (the preflight) when the stream opens and after every change, a capture judged, consent given, a step done, so the page, the widget, the app and the SDKs move on without asking again.

`GET /v1/verify/session/live`. Who may: The end customer, with the verification's session. CLI: `kontiga portal session-live <token> [--item-id <itm_id>] [--node-id <step id>] [--last-event-id <change>]`. MCP tool: `follow_portal_verification`.

**Parameters**
- `token` (string, required): The session's token.
- `item_id` (id (itm_)): The identity item.
- `node_id` (string): Or the workflow's identity step. At most 128 characters.
- `last_event_id` (string): Resume after this event.

**Returns** page of verification events: The preflights pushed after last_event_id, oldest first; the stream itself keeps sending after every change.

API:

```bash
curl -X GET "https://api.kontiga.com/v1/verify/session/live?item_id=itm_4Nx7Lc2" \
  -H "Authorization: Bearer mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"
```

CLI:

```bash
kontiga portal session-live mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc \
  --item-id itm_4Nx7Lc2
```

MCP tool `follow_portal_verification`:

```json
{
  "name": "follow_portal_verification",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "item_id": "itm_4Nx7Lc2"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.sessionLive({
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  item_id: "itm_4Nx7Lc2",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.session_live(token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc", item_id="itm_4Nx7Lc2")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.SessionLive(ctx, &kontiga.PortalSessionLiveParams{
	Token:  "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
	ItemId: "itm_4Nx7Lc2",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().sessionLive(PortalSessionLiveParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .itemId("itm_4Nx7Lc2")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.SessionLiveAsync(new PortalSessionLiveOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    ItemId = "itm_4Nx7Lc2",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->sessionLive([
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
    'item_id' => 'itm_4Nx7Lc2',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.session_live(token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc", item_id: "itm_4Nx7Lc2")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .session_live(kontiga::portal::SessionLiveParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        item_id: "itm_4Nx7Lc2".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "events": [
    {
      "id": "4",
      "at": "2026-11-26T09:45:41Z",
      "preflight": {
        "extra_data": {},
        "session": "idv_6Wk3Qn8",
        "session_id": "idv_6Wk3Qn8",
        "entity_id_state": "front_received_awaiting_back",
        "entity_id_document_type": "id_card",
        "requirement": {
          "requirement_type": "identity_document",
          "status": "awaiting_receipt",
          "flow_order": 100
        },
        "screen": {
          "show": "scan_id_document_back_screen",
          "parameters": {
            "camera": "back",
            "camera_quality": "ultra",
            "allow_manual_upload": false,
            "multipage": false,
            "title": null,
            "text": null
          }
        }
      }
    },
    {
      "id": "5",
      "at": "2026-11-26T09:46:05Z",
      "preflight": {
        "extra_data": {},
        "session": "idv_6Wk3Qn8",
        "session_id": "idv_6Wk3Qn8",
        "entity_id_state": "id_received_awaiting_liveness",
        "entity_id_document_type": "id_card",
        "requirement": {
          "requirement_type": "liveness",
          "status": "awaiting_receipt",
          "flow_order": 300
        },
        "screen": {
          "show": "liveness_screen",
          "parameters": {}
        }
      }
    }
  ],
  "last_event_id": "5"
}
```

## Workflow steps

A request that runs a workflow walks the person through its steps one at a time: a screen, a form, a consent, the location, a place on a map, the identity step or a redirect. Only the step the person is on can be answered. The request's `run` says where they are, how many steps there are, and whether the run waits on a member or on time.

## Answer a workflow step

Answers the step of the request's workflow the person is on (a screen, a form, a consent, the location, a place on a map, the identity step or a redirect) and moves the run to its next step. Only the current step can be answered.

`POST /v1/portal/steps/{node_id}/submit`. Who may: Anyone, with no account yet. CLI: `kontiga portal submit-step <token> <node_id> [--action <confirm|cancel|submit|decline|granted|denied|success|skip|submitted|redirect>] [--form-data <json>] [--signature <full name>] [--items <json>] [--location <json>] [--place <json>]`. MCP tool: `submit_portal_step`.

**Parameters**
- `token` (string, required): The link's token.
- `node_id` (string, required): The step the person is on. At most 128 characters. In the path.
- `action` (enum): What the person did on it: confirm, submit, decline, grant or deny the location, and so on. One of `confirm`, `cancel`, `submit`, `decline`, `granted`, `denied`, `success`, `skip`, `submitted`, `redirect`.
- `form_data` (record): A form's answers, by field key.
- `signature` (string): A consent's drawn signature, as a data URL. At most 1,001 characters.
- `items` (record): A checklist step's answers, by item.
- `location` (object): The device's location, for a location step: `latitude`, `longitude` and `accuracy` in metres, as the browser gives them.
- `place` (object): The place chosen on a map step: `type` `point` with `lat` and `lng`, or `area` with its `coordinates`, and its `address`, as `portal.places` found it.

**Returns** portal request: The request, with the run on its next step, waiting on a background step, or at its end.

API:

```bash
curl -X POST https://api.kontiga.com/v1/portal/steps/form-income/submit \
  -H "Content-Type: application/json" \
  -d '{
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "action": "submit",
    "form_data": {
      "employer": "Noordhaven Logistics B.V.",
      "gross_monthly_income": "4250"
    }
  }'
```

CLI:

```bash
kontiga portal submit-step mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc form-income \
  --action submit \
  --form-data '{"employer":"Noordhaven Logistics B.V.","gross_monthly_income":"4250"}'
```

MCP tool `submit_portal_step`:

```json
{
  "name": "submit_portal_step",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "node_id": "form-income",
    "action": "submit",
    "form_data": {
      "employer": "Noordhaven Logistics B.V.",
      "gross_monthly_income": "4250"
    }
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.submitStep("form-income", {
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  action: "submit",
  form_data: { employer: "Noordhaven Logistics B.V.", gross_monthly_income: "4250" },
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.submit_step(
    "form-income",
    token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    action="submit",
    form_data={"employer": "Noordhaven Logistics B.V.", "gross_monthly_income": "4250"},
)
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.SubmitStep(ctx, "form-income", &kontiga.PortalSubmitStepParams{
	Token:    "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
	Action:   "submit",
	FormData: map[string]any{"employer": "Noordhaven Logistics B.V.", "gross_monthly_income": "4250"},
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().submitStep("form-income", PortalSubmitStepParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .action("submit")
    .formData(Map.of("employer", "Noordhaven Logistics B.V.", "gross_monthly_income", "4250"))
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.SubmitStepAsync("form-income", new PortalSubmitStepOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    Action = "submit",
    FormData = new Dictionary<string, object> { ["employer"] = "Noordhaven Logistics B.V.", ["gross_monthly_income"] = "4250" },
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->submitStep('form-income', [
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
    'action' => 'submit',
    'form_data' => ['employer' => 'Noordhaven Logistics B.V.', 'gross_monthly_income' => '4250'],
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.submit_step(
  "form-income",
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  action: "submit",
  form_data: { employer: "Noordhaven Logistics B.V.", gross_monthly_income: "4250" }
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .submit_step("form-income".into(), kontiga::portal::SubmitStepParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        action: "submit".into(),
        form_data: serde_json::json!({"employer":"Noordhaven Logistics B.V.","gross_monthly_income":"4250"}),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "portal_request",
  "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  "request_id": "rqs_4Mb9Kt2",
  "state": "open",
  "run": {
    "workflow_id": "wf_3Hp9Ld2",
    "workflow_name": "Personal loan intake",
    "title": "Apply for a personal loan",
    "subtitle": "Brightwater Lending",
    "status": "step",
    "waits_on": null,
    "total": 5,
    "step": {
      "id": "form-income",
      "type": "form",
      "label": "Your income"
    },
    "processing": null,
    "done": [
      {
        "id": "consent-1",
        "type": "consent",
        "label": "Consent"
      },
      {
        "id": "id-1",
        "type": "identity",
        "label": "Your identity"
      }
    ],
    "ahead": 2,
    "left": null
  }
}
```

## Find a place

The addresses a map step's search finds for what the person typed, or the nearest address to a point on the map. Kontiga looks them up itself, so the page calls no map service.

`GET /v1/portal/places`. Who may: Anyone, with no account yet. CLI: `kontiga portal places <token> [--query <text>] [--lat <latitude>] [--lng <longitude>]`. MCP tool: `find_portal_places`.

**Parameters**
- `token` (string, required): The link's token.
- `query` (string): What the person typed. At most 120 characters.
- `lat` (number): Or a point's latitude, for the nearest address. At least -90, at most 90.
- `lng` (number): The point's longitude. At least -180, at most 180.

**Returns** list of places: Up to five addresses, nearest or best first, each with its point.

API:

```bash
curl -X GET "https://api.kontiga.com/v1/portal/places?token=mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc&query=Keizersgracht+21"
```

CLI:

```bash
kontiga portal places mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc \
  --query 'Keizersgracht 21'
```

MCP tool `find_portal_places`:

```json
{
  "name": "find_portal_places",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "query": "Keizersgracht 21"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.places({
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  query: "Keizersgracht 21",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.places(token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc", query="Keizersgracht 21")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.Places(ctx, &kontiga.PortalPlacesParams{
	Token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
	Query: "Keizersgracht 21",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().places(PortalPlacesParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .query("Keizersgracht 21")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.PlacesAsync(new PortalPlacesOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    Query = "Keizersgracht 21",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->places([
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
    'query' => 'Keizersgracht 21',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.places(token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc", query: "Keizersgracht 21")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .places(kontiga::portal::PlacesParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        query: "Keizersgracht 21".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "items": [
    {
      "id": "plc_1",
      "label": "Keizersgracht 214",
      "address": "Keizersgracht 214, 1016 DZ Amsterdam",
      "lat": 52.3731,
      "lng": 4.8848
    },
    {
      "id": "plc_2",
      "label": "Keizersgracht 241",
      "address": "Keizersgracht 241, 1016 EA Amsterdam",
      "lat": 52.3737,
      "lng": 4.8853
    }
  ],
  "next_cursor": null
}
```

## Live changes

The link's own live channel, as server-sent events: each change the person should see at once, with the request as it now stands. A page reads the link again every few seconds only while the channel is down.

- The first event is `request_changed` with the request as it is now. After that, one event a change: `handoff_connected` when a phone opened a handoff made in this session (its `item_id`), else `item_updated` when items or their files changed (`item_ids` names each, `item_id` the first), else `request_changed` for anything else the page shows.
- The channel opens once the code gate is passed (`gate_required` before). A request's page, phone and their reconnects share a few streams; past them, `rate_limited` (429) with `Retry-After`: read the request every 30 seconds instead.
- Each event carries the whole request, so nothing has to be replayed: a page that reconnects starts again from the request as it is.
- The last event is `end`, with its `reason`: `hold` after 15 minutes or at the session's end (open the channel again), `cancelled` when the request was withdrawn, `session_gone`, `hub_gone` or `failures`. While the channel is down, read the request every 10 seconds while a check runs and every 30 seconds otherwise.

## Follow a link's changes

The link's live channel, as server-sent events: each change the person should see at once, as it happens: an item's instant check or state moved, the workflow moved on to another step or ended, the team asked for more or replied. One event a change, carrying the request once as it now stands (item_updated names every item that moved in item_ids). Open past the code gate only; a page, a phone and their reconnects share a few streams a request, and past them the 429 asks the page to poll. Resumed after a drop with the last event id, so none is missed; the page reads the link again every few seconds only while the channel is down.

`GET /v1/portal/live`. Who may: Anyone, with no account yet. CLI: `kontiga portal live <token> [--last-event-id <pev_id>]`. MCP tool: `follow_portal_link`.

**Parameters**
- `token` (string, required): The link's token.
- `last_event_id` (id (pev_)): Resume after this event, so none is missed.

**Returns** page of link events: The changes after last_event_id, oldest first, each with the request as it now stands; the stream itself keeps sending as they happen.

API:

```bash
curl -X GET "https://api.kontiga.com/v1/portal/live?token=mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc&last_event_id=pev_3Kd8Wl9"
```

CLI:

```bash
kontiga portal live mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc \
  --last-event-id pev_3Kd8Wl9
```

MCP tool `follow_portal_link`:

```json
{
  "name": "follow_portal_link",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "last_event_id": "pev_3Kd8Wl9"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.live({
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  last_event_id: "pev_3Kd8Wl9",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.live(token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc", last_event_id="pev_3Kd8Wl9")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.Live(ctx, &kontiga.PortalLiveParams{
	Token:       "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
	LastEventId: "pev_3Kd8Wl9",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().live(PortalLiveParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .lastEventId("pev_3Kd8Wl9")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.LiveAsync(new PortalLiveOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    LastEventId = "pev_3Kd8Wl9",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->live([
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
    'last_event_id' => 'pev_3Kd8Wl9',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.live(token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc", last_event_id: "pev_3Kd8Wl9")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .live(kontiga::portal::LiveParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        last_event_id: "pev_3Kd8Wl9".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "events": [
    {
      "id": "pev_3Kd8Wm1",
      "type": "item_updated",
      "at": "2026-11-26T09:44:12Z",
      "item_id": "itm_2Cw8Ls6",
      "step_id": null,
      "request": {
        "object": "portal_request",
        "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
        "done": 4,
        "can_send": false
      }
    },
    {
      "id": "pev_3Kd8Wm2",
      "type": "request_changed",
      "at": "2026-11-26T09:46:20Z",
      "item_id": null,
      "step_id": null,
      "request": {
        "object": "portal_request",
        "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
        "done": 5,
        "can_send": true
      }
    }
  ],
  "last_event_id": "pev_3Kd8Wm2"
}
```

## Public links and previews

A public link lets anyone start: they give their name and a way to be reached, and get their own case, checklist and request link. A preview link runs a workflow as an end customer meets it, on a test request, before it is published. These two links are read by a member with a key; opening and starting from a public link needs none.

## Get a public start link

The public link and QR code of a collection or of a workflow that begins by collecting: anyone who opens it gives their name and a way to be reached, and gets their own case and checklist. Bynn's Data Collection Link.

`GET /v1/portal/public_links`. Who may: Owner, Admin, Analyst, Developer and Viewer. CLI: `kontiga portal public-link [--collection-id <col_id>] [--workflow-id <workflow id>]`. MCP tool: `get_portal_public_link`.

**Parameters**
- `collection_id` (id (col_)): The collection to start from.
- `workflow_id` (string): Or a workflow that begins by collecting. At most 96 characters.

**Returns** portal link: The public link, its QR code, and whether it takes starts now.

API:

```bash
curl -X GET "https://api.kontiga.com/v1/portal/public_links?collection_id=col_5Gk3Tm7" \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga portal public-link --collection-id col_5Gk3Tm7
```

MCP tool `get_portal_public_link`:

```json
{
  "name": "get_portal_public_link",
  "arguments": {
    "collection_id": "col_5Gk3Tm7"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.portal.publicLink({
  collection_id: "col_5Gk3Tm7",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.portal.public_link(collection_id="col_5Gk3Tm7")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Portal.PublicLink(ctx, &kontiga.PortalPublicLinkParams{
	CollectionId: "col_5Gk3Tm7",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.portal().publicLink(PortalPublicLinkParams.builder()
    .collectionId("col_5Gk3Tm7")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Portal.PublicLinkAsync(new PortalPublicLinkOptions
{
    CollectionId = "col_5Gk3Tm7",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->portal->publicLink([
    'collection_id' => 'col_5Gk3Tm7',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.portal.public_link(collection_id: "col_5Gk3Tm7")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .portal()
    .public_link(kontiga::portal::PublicLinkParams {
        collection_id: "col_5Gk3Tm7".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "portal_link",
  "url": "https://collect.kontiga.com/r/start/cP4wN8kR2vL6mQ9xT3bH7sZ5yD1",
  "path": "/r/start/cP4wN8kR2vL6mQ9xT3bH7sZ5yD1",
  "qr": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciLz4=",
  "request_id": null,
  "open": true
}
```

## Open a public start link

What a public start link opens: whose it is, what it is for, and what the visitor gives first. A collection that is not open, or a workflow that is not active, says so in plain words.

`GET /v1/portal/starts/{start_token}`. Who may: Anyone, with no account yet. CLI: `kontiga portal start-page <start_token>`. MCP tool: `get_portal_start_page`.

**Parameters**
- `start_token` (string, required): The public link's token, the part after `/r/start/`. In the path.

**Returns** portal start page: The brand kit, the title and purpose, and the details asked first.

API:

```bash
curl -X GET https://api.kontiga.com/v1/portal/starts/cP4wN8kR2vL6mQ9xT3bH7sZ5yD1
```

CLI:

```bash
kontiga portal start-page cP4wN8kR2vL6mQ9xT3bH7sZ5yD1
```

MCP tool `get_portal_start_page`:

```json
{
  "name": "get_portal_start_page",
  "arguments": {
    "start_token": "cP4wN8kR2vL6mQ9xT3bH7sZ5yD1"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.startPage("cP4wN8kR2vL6mQ9xT3bH7sZ5yD1");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.start_page("cP4wN8kR2vL6mQ9xT3bH7sZ5yD1")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.StartPage(ctx, "cP4wN8kR2vL6mQ9xT3bH7sZ5yD1")
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().startPage("cP4wN8kR2vL6mQ9xT3bH7sZ5yD1");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.StartPageAsync("cP4wN8kR2vL6mQ9xT3bH7sZ5yD1");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->startPage('cP4wN8kR2vL6mQ9xT3bH7sZ5yD1');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.start_page("cP4wN8kR2vL6mQ9xT3bH7sZ5yD1")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .start_page("cP4wN8kR2vL6mQ9xT3bH7sZ5yD1".into())
    .await?;
```

Response, 200 OK:

```json
{
  "object": "portal_start_page",
  "start_token": "cP4wN8kR2vL6mQ9xT3bH7sZ5yD1",
  "open": true,
  "brand": {
    "kit_id": "bk_4Hm7Rw2",
    "name": "Brightwater Lending",
    "monogram": "BL",
    "logo": null,
    "accent": "#1E4D6B",
    "highlight": "#14374F",
    "powered_by_kontiga": true,
    "reply_to": "applications@brightwater.example",
    "support": {
      "email": "help@brightwater.example",
      "phone": "+31 20 794 1180",
      "url": null,
      "address": null
    },
    "privacy_url": "https://brightwater.example/privacy",
    "terms_url": null,
    "what_next": "Brightwater Lending reads your documents within one working day and writes to you by email.",
    "texts": {
      "welcome": "Upload what Brightwater Lending asked for. It takes a few minutes, and you can stop and come back.",
      "done": "Thank you. Brightwater Lending has everything it asked for.",
      "expired": "This link has expired. Please ask Brightwater Lending for a new one."
    }
  },
  "title": "Personal loan",
  "purpose": "Apply for a personal loan with Brightwater Lending.",
  "asks": {
    "name": true,
    "email": "required",
    "phone": "optional"
  },
  "locale": "en"
}
```

## Start from a public link

Starts a case from a public link: the person, the party, the request and, for a workflow, its run, then answers with the request's own link to carry on at. In the widget (with its publishable key, from an origin the key lists) the answer also carries the request's client secret, for one hour, to start the session in the frame. The case is named after the collection or the workflow and the time, as Bynn names it.

`POST /v1/portal/starts`. Who may: Anyone, with no account yet. CLI: `kontiga portal start <start_token> --first-name <name> --last-name <name> [--email <address>] [--phone <+number>]`. MCP tool: `start_portal_request`.

**Parameters**
- `start_token` (string, required): The public link's token.
- `first_name` (string, required): The visitor's first name. At most 80 characters.
- `last_name` (string, required): The visitor's last name. At most 80 characters.
- `email` (email): An email address, as the start page asks. At most 255 characters.
- `phone` (string): A phone number, as the start page asks.

**Returns** portal start: The case, the person and the request made, with the request's link.

API:

```bash
curl -X POST https://api.kontiga.com/v1/portal/starts \
  -H "Content-Type: application/json" \
  -d '{
    "start_token": "cP4wN8kR2vL6mQ9xT3bH7sZ5yD1",
    "first_name": "Jens",
    "last_name": "Dekker",
    "email": "jens.dekker@example.com"
  }'
```

CLI:

```bash
kontiga portal start cP4wN8kR2vL6mQ9xT3bH7sZ5yD1 \
  --first-name Jens \
  --last-name Dekker \
  --email jens.dekker@example.com
```

MCP tool `start_portal_request`:

```json
{
  "name": "start_portal_request",
  "arguments": {
    "start_token": "cP4wN8kR2vL6mQ9xT3bH7sZ5yD1",
    "first_name": "Jens",
    "last_name": "Dekker",
    "email": "jens.dekker@example.com"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.start({
  start_token: "cP4wN8kR2vL6mQ9xT3bH7sZ5yD1",
  first_name: "Jens",
  last_name: "Dekker",
  email: "jens.dekker@example.com",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.start(
    start_token="cP4wN8kR2vL6mQ9xT3bH7sZ5yD1",
    first_name="Jens",
    last_name="Dekker",
    email="jens.dekker@example.com",
)
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.Start(ctx, &kontiga.PortalStartParams{
	StartToken: "cP4wN8kR2vL6mQ9xT3bH7sZ5yD1",
	FirstName:  "Jens",
	LastName:   "Dekker",
	Email:      "jens.dekker@example.com",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().start(PortalStartParams.builder()
    .startToken("cP4wN8kR2vL6mQ9xT3bH7sZ5yD1")
    .firstName("Jens")
    .lastName("Dekker")
    .email("jens.dekker@example.com")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.StartAsync(new PortalStartOptions
{
    StartToken = "cP4wN8kR2vL6mQ9xT3bH7sZ5yD1",
    FirstName = "Jens",
    LastName = "Dekker",
    Email = "jens.dekker@example.com",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->start([
    'start_token' => 'cP4wN8kR2vL6mQ9xT3bH7sZ5yD1',
    'first_name' => 'Jens',
    'last_name' => 'Dekker',
    'email' => 'jens.dekker@example.com',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.start(
  start_token: "cP4wN8kR2vL6mQ9xT3bH7sZ5yD1",
  first_name: "Jens",
  last_name: "Dekker",
  email: "jens.dekker@example.com"
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .start(kontiga::portal::StartParams {
        start_token: "cP4wN8kR2vL6mQ9xT3bH7sZ5yD1".into(),
        first_name: "Jens".into(),
        last_name: "Dekker".into(),
        email: "jens.dekker@example.com".into(),
        ..Default::default()
    })
    .await?;
```

Response, 201 Created:

```json
{
  "object": "portal_start",
  "case_id": "case_3Wm7Rk1",
  "person_id": "per_8Qd2Hv5",
  "request_id": "rqs_6Pt9Lx2",
  "token": "kR5wN2xT8vL4mQ7bD3sH9pZ6",
  "path": "/r/kR5wN2xT8vL4mQ7bD3sH9pZ6",
  "url": "https://collect.kontiga.com/r/kR5wN2xT8vL4mQ7bD3sH9pZ6"
}
```

Started in the widget, with your publishable key from an origin it lists, the answer carries `client_secret` and `client_secret_expires_at` in place of the link (`token`, `path` and `url`): the new request's client secret, for one hour, from which the frame starts its session (`portal.start_session`). A start without a key never carries one. A key opens only its own workspace's public links, in its own mode; any other answers `start_link_not_found`. A public link of a paused workspace reads `open: false` and takes no start.

- One way to reach the person is needed: an email address or a phone number. A start with neither is refused with `invalid_input` on `email`, so nothing is asked again once the case exists.
- Send an `Idempotency-Key`: a repeat with the same key within 24 hours answers the first start again, never a second case.
- A public link takes at most 1,000 starts a day and one a second; a publishable key at most 200 public starts a day. Past either, the start is `rate_limited` with `Retry-After`.

## Get a link to run a workflow

A link that runs a workflow as its end customer meets it, on a test request of the workspace, the draft as it stands included: try it before it is published. The link works in test mode only and makes nothing live.

`GET /v1/workflows/{workflow_id}/preview_link`. Who may: Owner, Admin, Analyst, Developer and Viewer. CLI: `kontiga workflows preview-link <workflow_id>`. MCP tool: `get_workflow_preview_link`.

**Parameters**
- `workflow_id` (string, required): The workflow to try, its draft included. At most 96 characters. In the path.

**Returns** portal link: The link, its QR code and the test request it runs on.

API:

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

CLI:

```bash
kontiga workflows preview-link wf_3Hp9Ld2
```

MCP tool `get_workflow_preview_link`:

```json
{
  "name": "get_workflow_preview_link",
  "arguments": {
    "workflow_id": "wf_3Hp9Ld2"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.portal.previewLink("wf_3Hp9Ld2");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.portal.preview_link("wf_3Hp9Ld2")
```

Go:

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

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.portal().previewLink("wf_3Hp9Ld2");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Portal.PreviewLinkAsync("wf_3Hp9Ld2");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->portal->previewLink('wf_3Hp9Ld2');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.portal.preview_link("wf_3Hp9Ld2")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .portal()
    .preview_link("wf_3Hp9Ld2".into())
    .await?;
```

Response, 200 OK:

```json
{
  "object": "portal_link",
  "url": "https://collect.kontiga.com/r/wP2nK8vR5mL3xQ9tB4dH7sZ6",
  "path": "/r/wP2nK8vR5mL3xQ9tB4dH7sZ6",
  "qr": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciLz4=",
  "request_id": "rqs_8Wt4Hc6",
  "open": true
}
```

## Walk-in links

A verification profile can have a walk-in link, `https://verify.kontiga.com/w/{slug}`, that anyone can open to verify their identity: from a QR code at a branch desk, or from your own site. The visitor gives the details the profile asks for, then goes through its steps. Each start finds the person in People by your identifier, then by the email, or adds them. The profile's `per_hour` and `per_day` limit the starts, counted over every verification the workspace starts.

- The visitor's calls need no key: the address word opens the page, and the start answers a session token for this device (`kt_vst_` and 64 hex digits) with the verification's id. Every later call sends the token in the `Authorization` header, and the page goes on at `/w/{slug}/{verification_id}`.
- Each answer carries the preflight: the screen to show next (`screen.show`) with its parameters, and `change`, the verification's change counter. The live channel sends it again after every change. A device is never told a finding, a score or a decision.
- A phone or email code has six digits. One code a minute and three a day can be sent; more than three wrong codes close the step, and the person moves on.
- Getting a profile's link and trying a profile need a member's key, as Settings, Verify uses them.

## Get a profile's walk-in link

A verification profile's walk-in link as the end customer opens it, with its QR code to show at a desk or print, and whether it is on.

`GET /v1/verification_profiles/{profile_id}/walk_in_link`. Who may: Owner, Admin, Analyst, Developer and Viewer. CLI: `kontiga verification-profiles walk-in-link <profile_id>`. MCP tool: `get_walk_in_link`.

**Parameters**
- `profile_id` (id (vpr_), required): The verification profile whose walk-in link to get. In the path.

**Returns** walk-in link: The link, its QR code, its address word and whether it is on.

API:

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

CLI:

```bash
kontiga verification-profiles walk-in-link vpr_counter
```

MCP tool `get_walk_in_link`:

```json
{
  "name": "get_walk_in_link",
  "arguments": {
    "profile_id": "vpr_counter"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.portal.walkInLink("vpr_counter");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.portal.walk_in_link("vpr_counter")
```

Go:

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

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.portal().walkInLink("vpr_counter");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Portal.WalkInLinkAsync("vpr_counter");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->portal->walkInLink('vpr_counter');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.portal.walk_in_link("vpr_counter")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .portal()
    .walk_in_link("vpr_counter".into())
    .await?;
```

Response, 200 OK:

```json
{
  "object": "walk_in_link",
  "profile_id": "vpr_counter",
  "enabled": true,
  "url": "https://verify.kontiga.com/w/brightwater-counter",
  "path": "/w/brightwater-counter",
  "slug": "brightwater-counter",
  "qr": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciLz4=",
  "qr_png_base64": null
}
```

## Try a verification profile

Opens a profile's walk-in page in test mode for you to go through as the end customer would: every step of the profile, your own name filled in, a test case at the end. Never billed. The try link works for an hour, even while the walk-in link is off.

`POST /v1/verification_profiles/{profile_id}/try`. Who may: Owner, Admin and Analyst; Developer in test mode. CLI: `kontiga verification-profiles try <profile_id>`. MCP tool: `try_verification_profile`.

**Parameters**
- `profile_id` (id (vpr_), required): The profile to try. The answer is a test verification of it with its own link, which works for an hour, even while the walk-in link is off. Never billed. In the path.

**Returns** profile try: The test link to open, and until when it works.

API:

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

CLI:

```bash
kontiga verification-profiles try vpr_counter
```

MCP tool `try_verification_profile`:

```json
{
  "name": "try_verification_profile",
  "arguments": {
    "profile_id": "vpr_counter"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.portal.tryProfile("vpr_counter");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.portal.try_profile("vpr_counter")
```

Go:

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

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.portal().tryProfile("vpr_counter");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Portal.TryProfileAsync("vpr_counter");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->portal->tryProfile('vpr_counter');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.portal.try_profile("vpr_counter")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .portal()
    .try_profile("vpr_counter".into())
    .await?;
```

Response, 201 Created:

```json
{
  "object": "profile_try",
  "profile_id": "vpr_counter",
  "verification_id": "idv_8Fd2Kw6",
  "mode": "test",
  "url": "https://verify.kontiga.com/v/kt_vlt_1e262cd7d110812f5726055a6e672b92cde43648b76adff51a12441fbdf7e667",
  "path": "/v/kt_vlt_1e262cd7d110812f5726055a6e672b92cde43648b76adff51a12441fbdf7e667",
  "expires_at": "2026-11-26T11:05:00Z",
  "qr_png_base64": "iVBORw0KGgoAAAANSUhEUgAAAPAAAADwCAYAAAA9..."
}
```

## Open a walk-in link

What a verification profile's walk-in link opens: the customer, the page's title and description, the details asked first, and the steps of the verification. A link that is off, or that has had its hourly or daily number of starts, says so in plain words. With a member's try key it opens in test mode.

`GET /v1/walk_in/{slug}`. Who may: Anyone with the walk-in link. CLI: `kontiga portal walk-in-page <slug> [--trial <try_key>]`. MCP tool: `get_walk_in_page`.

**Parameters**
- `slug` (string, required): The link's address word, the part after `/w/`. In the path.
- `trial` (id (try_)): Not needed: a try link opens a test verification of its own.

**Returns** walk-in page: The brand kit, the title and description, the details asked, the steps, and whether it takes a start now.

API:

```bash
curl -X GET https://api.kontiga.com/v1/walk_in/brightwater-counter
```

CLI:

```bash
kontiga portal walk-in-page brightwater-counter
```

MCP tool `get_walk_in_page`:

```json
{
  "name": "get_walk_in_page",
  "arguments": {
    "slug": "brightwater-counter"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.walkInPage("brightwater-counter");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.walk_in_page("brightwater-counter")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.WalkInPage(ctx, "brightwater-counter")
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().walkInPage("brightwater-counter");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.WalkInPageAsync("brightwater-counter");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->walkInPage('brightwater-counter');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.walk_in_page("brightwater-counter")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .walk_in_page("brightwater-counter".into())
    .await?;
```

Response, 200 OK:

```json
{
  "object": "walk_in_page",
  "slug": "brightwater-counter",
  "title": "Verify your identity for Brightwater Lending",
  "description": "It takes about five minutes. Have your passport, ID card or driving licence ready.",
  "fields": {
    "first_name": true,
    "last_name": true,
    "email": true,
    "phone": true,
    "identifier": true
  },
  "identifier_label": "Customer number",
  "identifier_placeholder": "For example BL-104233",
  "organisation": "Brightwater Lending",
  "open": true
}
```

A link that was on and is now off answers `403 walk_in_off`; an address word whose link was never on, or that no profile has, `404`. `organisation` is the name the visitor reads, or `null` while the workspace has not named itself in its brand kit: the page then says who asks without a name.

## Start at a walk-in link

Starts an identity verification from a walk-in link: finds the person by the identifier, then the email, or adds them, opens a case for the verification and answers with the verification's own page. Within the profile's hourly and daily number of starts. A member's try starts it in test mode.

`POST /v1/walk_in/{slug}/sessions`. Who may: Anyone with the walk-in link. CLI: `kontiga portal walk-in-start <slug> [--first-name <name>] [--last-name <name>] [--email <address>] [--phone <+number>] [--identifier <text>] [--trial <try_key>]`. MCP tool: `start_walk_in_verification`.

**Parameters**
- `slug` (string, required): The link's address word. In the path.
- `trial` (id (try_)): Not taken: a try link opens a test verification of its own.
- `first_name` (string): The visitor's first name. Always asked. At most 80 characters.
- `last_name` (string): The visitor's last name. Always asked. At most 80 characters.
- `email` (email): Their email address, when the page asks for it. At most 255 characters.
- `phone` (string): Their phone number with its country code, such as `+31612345678`, when the page asks for it.
- `identifier` (string): Your own identifier for them, under the page's `identifier_label`, when the page asks for it. It finds a person already in People first. At most 100 characters.

**Returns** walk-in start: The person, the case and the verification made, with the verification's page.

API:

```bash
curl -X POST https://api.kontiga.com/v1/walk_in/brightwater-counter/sessions \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "Daan",
    "last_name": "Visser",
    "email": "daan.visser@example.com",
    "phone": "+31612345678",
    "identifier": "BL-104233"
  }'
```

CLI:

```bash
kontiga portal walk-in-start brightwater-counter \
  --first-name Daan \
  --last-name Visser \
  --email daan.visser@example.com \
  --phone +31612345678 \
  --identifier BL-104233
```

MCP tool `start_walk_in_verification`:

```json
{
  "name": "start_walk_in_verification",
  "arguments": {
    "slug": "brightwater-counter",
    "first_name": "Daan",
    "last_name": "Visser",
    "email": "daan.visser@example.com",
    "phone": "+31612345678",
    "identifier": "BL-104233"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.walkInStart("brightwater-counter", {
  first_name: "Daan",
  last_name: "Visser",
  email: "daan.visser@example.com",
  phone: "+31612345678",
  identifier: "BL-104233",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.walk_in_start(
    "brightwater-counter",
    first_name="Daan",
    last_name="Visser",
    email="daan.visser@example.com",
    phone="+31612345678",
    identifier="BL-104233",
)
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.WalkInStart(ctx, "brightwater-counter", &kontiga.PortalWalkInStartParams{
	FirstName:  "Daan",
	LastName:   "Visser",
	Email:      "daan.visser@example.com",
	Phone:      "+31612345678",
	Identifier: "BL-104233",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().walkInStart("brightwater-counter", PortalWalkInStartParams.builder()
    .firstName("Daan")
    .lastName("Visser")
    .email("daan.visser@example.com")
    .phone("+31612345678")
    .identifier("BL-104233")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.WalkInStartAsync("brightwater-counter", new PortalWalkInStartOptions
{
    FirstName = "Daan",
    LastName = "Visser",
    Email = "daan.visser@example.com",
    Phone = "+31612345678",
    Identifier = "BL-104233",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->walkInStart('brightwater-counter', [
    'first_name' => 'Daan',
    'last_name' => 'Visser',
    'email' => 'daan.visser@example.com',
    'phone' => '+31612345678',
    'identifier' => 'BL-104233',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.walk_in_start(
  "brightwater-counter",
  first_name: "Daan",
  last_name: "Visser",
  email: "daan.visser@example.com",
  phone: "+31612345678",
  identifier: "BL-104233"
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .walk_in_start("brightwater-counter".into(), kontiga::portal::WalkInStartParams {
        first_name: "Daan".into(),
        last_name: "Visser".into(),
        email: "daan.visser@example.com".into(),
        phone: "+31612345678".into(),
        identifier: "BL-104233".into(),
        ..Default::default()
    })
    .await?;
```

Response, 201 Created:

```json
{
  "object": "verification_session",
  "token": "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5",
  "expires_at": "2026-11-26T10:42:40Z",
  "verification_id": "idv_4Hq7Nc2",
  "active": true,
  "locale": "en",
  "right_to_left": false,
  "organisation": "Brightwater Lending",
  "live": "/v1/verify/session/live"
}
```

`locale` may be given too, as one of the portal's languages; left out, the browser's. Over the profile's limits the start answers `429 rate_limited` with `Retry-After`; a workspace that is paused, `403 workspace_suspended`.

## Read a walk-in verification

A walk-in verification as its page shows it: the steps of the profile in order, where each stands, the one that waits on the person, and what it needs (the ID document's photos, the selfie, a code by text message or email, a proof). Never the result.

`GET /v1/walk_in/sessions/{session}`. Who may: The end customer, with the verification's session. CLI: `kontiga portal walk-in-session <session>`. MCP tool: `get_walk_in_session`.

**Parameters**
- `session` (id (wks_), required): The verification's id from the start's answer, in the path. The session token goes in the `Authorization` header. In the path.

**Returns** walk-in session: The steps and where each stands, the current one, and what it needs.

API:

```bash
curl -X GET https://api.kontiga.com/v1/walk_in/sessions/wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc
```

CLI:

```bash
kontiga portal walk-in-session wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc
```

MCP tool `get_walk_in_session`:

```json
{
  "name": "get_walk_in_session",
  "arguments": {
    "session": "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.walkInSession("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.walk_in_session("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.WalkInSession(ctx, "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc")
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().walkInSession("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.WalkInSessionAsync("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->walkInSession('wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.walk_in_session("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .walk_in_session("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc".into())
    .await?;
```

Response, 200 OK:

```json
{
  "object": "walk_in_session",
  "verification_id": "idv_4Hq7Nc2",
  "change": 6,
  "preflight": {
    "extra_data": {},
    "session": "idv_4Hq7Nc2",
    "session_id": "idv_4Hq7Nc2",
    "entity_id_state": "completed",
    "entity_id_document_type": "id_card",
    "requirement": {
      "requirement_type": "phone_verification",
      "status": "awaiting_receipt",
      "flow_order": 400
    },
    "screen": {
      "show": "phone_verification_screen",
      "parameters": {}
    }
  },
  "return_url": "https://brightwater.example/branch/thanks",
  "live": "/v1/verify/session/live"
}
```

## Agree to a verification

Gives or refuses consent before the first photo, in the profile's own words. Saying no stops the verification and tells the team.

`POST /v1/verify/session/consent`. Who may: The end customer, with the verification's session. CLI: `kontiga portal verify-consent <session> --gives-consent <true|false>`. MCP tool: `give_verification_consent`.

**Parameters**
- `session` (string, required): The device's session token, from the start's answer. The API takes it in the `Authorization` header.
- `gives_consent` (boolean, required): Whether the person agrees, in the profile's consent words. No stops the verification and tells the team.

**Returns** walk-in session: The verification after the answer. With a session token (kt_vst_): the receipt, status accepted with the change counter and the next screen.

API:

```bash
curl -X POST https://api.kontiga.com/v1/verify/session/consent \
  -H "Authorization: Bearer wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc" \
  -H "Content-Type: application/json" \
  -d '{
    "gives_consent": true
  }'
```

CLI:

```bash
kontiga portal verify-consent wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc \
  --gives-consent
```

MCP tool `give_verification_consent`:

```json
{
  "name": "give_verification_consent",
  "arguments": {
    "session": "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
    "gives_consent": true
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.verifyConsent({
  session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
  gives_consent: true,
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.verify_consent(session="wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc", gives_consent=True)
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.VerifyConsent(ctx, &kontiga.PortalVerifyConsentParams{
	Session:      "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
	GivesConsent: true,
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().verifyConsent(PortalVerifyConsentParams.builder()
    .session("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc")
    .givesConsent(true)
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.VerifyConsentAsync(new PortalVerifyConsentOptions
{
    Session = "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
    GivesConsent = true,
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->verifyConsent([
    'session' => 'wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc',
    'gives_consent' => true,
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.verify_consent(session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc", gives_consent: true)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .verify_consent(kontiga::portal::VerifyConsentParams {
        session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc".into(),
        gives_consent: true,
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "status": "accepted",
  "change": 2,
  "preflight": {
    "extra_data": {},
    "session": "idv_4Hq7Nc2",
    "session_id": "idv_4Hq7Nc2",
    "entity_id_state": "none_received",
    "entity_id_document_type": "unknown",
    "requirement": {
      "requirement_type": "identity_document",
      "status": "awaiting_receipt",
      "flow_order": 100
    },
    "screen": {
      "show": "scan_id_document_front_screen",
      "parameters": {
        "camera": "back",
        "camera_quality": "ultra",
        "allow_manual_upload": false,
        "multipage": false,
        "title": null,
        "text": null
      }
    }
  },
  "return_url": "https://brightwater.example/branch/thanks"
}
```

## Send a photo of the ID

One photo for a verification: a side of the ID document (on the walk-in page, or the selfie). Answered with the instant check in plain words: taken, or what to change and try again. With a session token (kt_vst_) the selfie is portal.liveness.

`POST /v1/verify/session/id_document`. Who may: The end customer, with the verification's session. CLI: `kontiga portal verify-id-document <session> <file> --part <front|back|selfie> [--document <passport|card|licence>] [--capture-method <auto|manual|upload>] [--visitor-id <id>] [--idempotency-key <key>]`. MCP tool: `send_verification_photo`.

**Parameters**
- `session` (string, required): The device's session token, from the start's answer. The API takes it in the `Authorization` header.
- `part` (enum, required): The side the preflight's screen asks for, the front or the back. The selfie is `portal.liveness`. One of `front`, `back`, `selfie`.
- `document` (enum): The kind of ID document. It is read from the photo. One of `passport`, `card`, `licence`.
- `file_name` (string, required): The photo's file name, sent as the form's `file`. At most 255 characters.
- `content_type` (string, required): A JPEG, PNG or PDF. The type is read from the file's own bytes. At most 100 characters.
- `byte_size` (integer, required): The photo's size in bytes, up to 20 MB.
- `capture_method` (enum): How it was taken. One of `upload`, `camera`, `autocapture`, `manual_camera`, `auto`, `manual`.
- `visitor_id` (id (vis_)): The device's visitor id, when the page has one.
- `idempotency_key` (string): The idempotency key.

**Returns** walk-in photo: The photo with its answer, and the verification after it. With a session token (kt_vst_) the file is sent as multipart (file, capture_method, visitor_id): the receipt, status received (202) or duplicate_ignored (200), with the next screen, which says checking while the photo is judged.

API:

```bash
curl -X POST https://api.kontiga.com/v1/verify/session/id_document \
  -H "Authorization: Bearer wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc" \
  -H "Content-Type: application/json" \
  -d '{
    "part": "front",
    "document": "card",
    "file_name": "front.jpg",
    "content_type": "image/jpeg",
    "byte_size": 884736,
    "capture_method": "upload"
  }'
```

CLI:

```bash
kontiga portal verify-id-document wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc \
  --part front \
  --document card \
  --capture-method upload
```

MCP tool `send_verification_photo`:

```json
{
  "name": "send_verification_photo",
  "arguments": {
    "session": "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
    "part": "front",
    "document": "card",
    "file_name": "front.jpg",
    "content_type": "image/jpeg",
    "byte_size": 884736,
    "capture_method": "upload"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.verifyIdDocument({
  file: await openAsBlob("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc"),
  part: "front",
  document: "card",
  capture_method: "upload",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.verify_id_document(
    file=open("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc", "rb"),
    part="front",
    document="card",
    capture_method="upload",
)
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.VerifyIdDocument(ctx, &kontiga.PortalVerifyIdDocumentParams{
	File:          kontiga.FileFromPath("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc"),
	Part:          "front",
	Document:      "card",
	CaptureMethod: "upload",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().verifyIdDocument(PortalVerifyIdDocumentParams.builder()
    .file(Path.of("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc"))
    .part("front")
    .document("card")
    .captureMethod("upload")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.VerifyIdDocumentAsync(new PortalVerifyIdDocumentOptions
{
    File = File.OpenRead("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc"),
    Part = "front",
    Document = "card",
    CaptureMethod = "upload",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->verifyIdDocument([
    'file' => fopen('wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc', 'r'),
    'part' => 'front',
    'document' => 'card',
    'capture_method' => 'upload',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.verify_id_document(
  file: File.open("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc"),
  part: "front",
  document: "card",
  capture_method: "upload"
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .verify_id_document(kontiga::portal::VerifyIdDocumentParams {
        file: kontiga::File::open("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc").await?,
        part: "front".into(),
        document: "card".into(),
        capture_method: "upload".into(),
        ..Default::default()
    })
    .await?;
```

Response, 202 Accepted:

```json
{
  "status": "received",
  "change": 3,
  "preflight": {
    "extra_data": {},
    "session": "idv_4Hq7Nc2",
    "session_id": "idv_4Hq7Nc2",
    "entity_id_state": "front_received_awaiting_back",
    "entity_id_document_type": "id_card",
    "requirement": {
      "requirement_type": "identity_document",
      "status": "awaiting_receipt",
      "flow_order": 100
    },
    "screen": {
      "show": "scan_id_document_back_screen",
      "parameters": {
        "camera": "back",
        "camera_quality": "ultra",
        "allow_manual_upload": false,
        "multipage": false,
        "title": null,
        "text": null
      }
    }
  },
  "return_url": "https://brightwater.example/branch/thanks"
}
```

The photo goes as `multipart/form-data`: `file`, with `capture_method` (`auto`, `manual` for the shutter, or `upload` for a file), `visitor_id` and `camera_failed` (`true` when the camera could not be used and the profile takes a file then). The answer says it was received. Within seconds the live channel brings the next side or step, or the same screen again with what to change about the photo in `extra_data`.

## Send a code to a phone

Sends a six-digit code by text message for the phone step, in the person's language. One a minute and three a day; a second code within the minute is refused with how long to wait and the step stays open.

`POST /v1/verify/session/phone`. Who may: The end customer, with the verification's session. CLI: `kontiga portal verify-phone <session> [--phone-number <+number>] [--country-code <GB>] [--use-given]`. MCP tool: `send_verification_phone_code`.

**Parameters**
- `session` (string, required): The device's session token, from the start's answer. The API takes it in the `Authorization` header.
- `phone_number` (string): The number to send the code to, with its country code, or with `country_code`. At most 24 characters.
- `country_code` (string): The number's country, as two letters such as `NL`, for a number typed without its country code.
- `use_given` (boolean): Send `phone_number` itself: the number given at the start is not filled in for you.

**Returns** walk-in session: The verification with the code sent, and when another may be asked. With a session token (kt_vst_): status sent with the change counter and the next screen.

API:

```bash
curl -X POST https://api.kontiga.com/v1/verify/session/phone \
  -H "Authorization: Bearer wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+31612345678"
  }'
```

CLI:

```bash
kontiga portal verify-phone wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc \
  --phone-number +31612345678
```

MCP tool `send_verification_phone_code`:

```json
{
  "name": "send_verification_phone_code",
  "arguments": {
    "session": "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
    "phone_number": "+31612345678"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.verifyPhone({
  session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
  phone_number: "+31612345678",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.verify_phone(session="wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc", phone_number="+31612345678")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.VerifyPhone(ctx, &kontiga.PortalVerifyPhoneParams{
	Session:     "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
	PhoneNumber: "+31612345678",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().verifyPhone(PortalVerifyPhoneParams.builder()
    .session("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc")
    .phoneNumber("+31612345678")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.VerifyPhoneAsync(new PortalVerifyPhoneOptions
{
    Session = "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
    PhoneNumber = "+31612345678",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->verifyPhone([
    'session' => 'wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc',
    'phone_number' => '+31612345678',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.verify_phone(session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc", phone_number: "+31612345678")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .verify_phone(kontiga::portal::VerifyPhoneParams {
        session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc".into(),
        phone_number: "+31612345678".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "status": "sent",
  "change": 7,
  "preflight": {
    "extra_data": {},
    "session": "idv_4Hq7Nc2",
    "session_id": "idv_4Hq7Nc2",
    "entity_id_state": "completed",
    "entity_id_document_type": "id_card",
    "requirement": {
      "requirement_type": "phone_verification",
      "status": "awaiting_receipt",
      "flow_order": 400
    },
    "screen": {
      "show": "phone_verification_screen",
      "parameters": {}
    }
  }
}
```

## Check a phone code

Checks the code the person typed. A wrong code says so and counts; after more than three wrong codes the step closes and the person moves on, as built.

`POST /v1/verify/session/phone/check`. Who may: The end customer, with the verification's session. CLI: `kontiga portal verify-phone-check <session> --code <123456>`. MCP tool: `check_verification_phone_code`.

**Parameters**
- `session` (string, required): The device's session token, from the start's answer. The API takes it in the `Authorization` header.
- `code` (string, required): The six digits from the text message. A wrong code answers `400 code_invalid` and counts; after more than three, the step closes, the answer is `failed` and the person moves on.

**Returns** walk-in session: The verification after the check. With a session token (kt_vst_): the receipt with the next screen.

API:

```bash
curl -X POST https://api.kontiga.com/v1/verify/session/phone/check \
  -H "Authorization: Bearer wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "614208"
  }'
```

CLI:

```bash
kontiga portal verify-phone-check wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc \
  --code 614208
```

MCP tool `check_verification_phone_code`:

```json
{
  "name": "check_verification_phone_code",
  "arguments": {
    "session": "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
    "code": "614208"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.verifyPhoneCheck({
  session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
  code: "614208",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.verify_phone_check(session="wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc", code="614208")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.VerifyPhoneCheck(ctx, &kontiga.PortalVerifyPhoneCheckParams{
	Session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
	Code:    "614208",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().verifyPhoneCheck(PortalVerifyPhoneCheckParams.builder()
    .session("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc")
    .code("614208")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.VerifyPhoneCheckAsync(new PortalVerifyPhoneCheckOptions
{
    Session = "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
    Code = "614208",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->verifyPhoneCheck([
    'session' => 'wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc',
    'code' => '614208',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.verify_phone_check(session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc", code: "614208")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .verify_phone_check(kontiga::portal::VerifyPhoneCheckParams {
        session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc".into(),
        code: "614208".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "status": "accepted",
  "change": 8,
  "preflight": {
    "extra_data": {},
    "session": "idv_4Hq7Nc2",
    "session_id": "idv_4Hq7Nc2",
    "entity_id_state": "completed",
    "entity_id_document_type": "id_card",
    "requirement": {
      "requirement_type": "email_verification",
      "status": "awaiting_receipt",
      "flow_order": 500
    },
    "screen": {
      "show": "email_verification_screen",
      "parameters": {}
    }
  }
}
```

## Send a code to an email address

Sends a six-digit code by email for the email step, in the person's language. The address is checked as it is typed (format, at most 255 characters, and a domain one letter away from a common one is offered back: "Did you mean gmail.com?"). One a minute and three a day.

`POST /v1/verify/session/email`. Who may: The end customer, with the verification's session. CLI: `kontiga portal verify-email <session> [--email-address <address>] [--use-given]`. MCP tool: `send_verification_email_code`.

**Parameters**
- `session` (string, required): The device's session token, from the start's answer. The API takes it in the `Authorization` header.
- `email_address` (string): The address to send the code to. A domain one letter away from a common one is refused with the fix, such as "Did you mean gmail.com?". At most 320 characters.
- `use_given` (boolean): Send `email_address` itself: the address given at the start is not filled in for you.

**Returns** walk-in session: The verification with the code sent. With a session token (kt_vst_): status sent with the change counter and the next screen.

API:

```bash
curl -X POST https://api.kontiga.com/v1/verify/session/email \
  -H "Authorization: Bearer wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc" \
  -H "Content-Type: application/json" \
  -d '{
    "email_address": "daan.visser@example.com"
  }'
```

CLI:

```bash
kontiga portal verify-email wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc \
  --email-address daan.visser@example.com
```

MCP tool `send_verification_email_code`:

```json
{
  "name": "send_verification_email_code",
  "arguments": {
    "session": "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
    "email_address": "daan.visser@example.com"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.verifyEmail({
  session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
  email_address: "daan.visser@example.com",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.verify_email(session="wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc", email_address="daan.visser@example.com")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.VerifyEmail(ctx, &kontiga.PortalVerifyEmailParams{
	Session:      "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
	EmailAddress: "daan.visser@example.com",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().verifyEmail(PortalVerifyEmailParams.builder()
    .session("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc")
    .emailAddress("daan.visser@example.com")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.VerifyEmailAsync(new PortalVerifyEmailOptions
{
    Session = "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
    EmailAddress = "daan.visser@example.com",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->verifyEmail([
    'session' => 'wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc',
    'email_address' => 'daan.visser@example.com',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.verify_email(session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc", email_address: "daan.visser@example.com")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .verify_email(kontiga::portal::VerifyEmailParams {
        session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc".into(),
        email_address: "daan.visser@example.com".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "status": "sent",
  "change": 9,
  "preflight": {
    "extra_data": {},
    "session": "idv_4Hq7Nc2",
    "session_id": "idv_4Hq7Nc2",
    "entity_id_state": "completed",
    "entity_id_document_type": "id_card",
    "requirement": {
      "requirement_type": "email_verification",
      "status": "awaiting_receipt",
      "flow_order": 500
    },
    "screen": {
      "show": "email_verification_screen",
      "parameters": {}
    }
  }
}
```

## Check an email code

Checks the code from the email, with the same rules as the phone: a wrong code counts, and more than three closes the step.

`POST /v1/verify/session/email/check`. Who may: The end customer, with the verification's session. CLI: `kontiga portal verify-email-check <session> --code <123456>`. MCP tool: `check_verification_email_code`.

**Parameters**
- `session` (string, required): The device's session token, from the start's answer. The API takes it in the `Authorization` header.
- `code` (string, required): The six digits from the email. A wrong code answers `400 code_invalid` and counts; after more than three, the step closes, the answer is `failed` and the person moves on.

**Returns** walk-in session: The verification after the check. With a session token (kt_vst_): the receipt with the next screen.

API:

```bash
curl -X POST https://api.kontiga.com/v1/verify/session/email/check \
  -H "Authorization: Bearer wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "290531"
  }'
```

CLI:

```bash
kontiga portal verify-email-check wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc \
  --code 290531
```

MCP tool `check_verification_email_code`:

```json
{
  "name": "check_verification_email_code",
  "arguments": {
    "session": "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
    "code": "290531"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.verifyEmailCheck({
  session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
  code: "290531",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.verify_email_check(session="wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc", code="290531")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.VerifyEmailCheck(ctx, &kontiga.PortalVerifyEmailCheckParams{
	Session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
	Code:    "290531",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().verifyEmailCheck(PortalVerifyEmailCheckParams.builder()
    .session("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc")
    .code("290531")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.VerifyEmailCheckAsync(new PortalVerifyEmailCheckOptions
{
    Session = "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
    Code = "290531",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->verifyEmailCheck([
    'session' => 'wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc',
    'code' => '290531',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.verify_email_check(session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc", code: "290531")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .verify_email_check(kontiga::portal::VerifyEmailCheckParams {
        session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc".into(),
        code: "290531".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "status": "accepted",
  "change": 10,
  "preflight": {
    "extra_data": {},
    "session": "idv_4Hq7Nc2",
    "session_id": "idv_4Hq7Nc2",
    "entity_id_state": "completed",
    "entity_id_document_type": "id_card",
    "requirement": {
      "requirement_type": "proof_of_address",
      "status": "awaiting_receipt",
      "flow_order": 600
    },
    "screen": {
      "show": "proof_of_address_screen",
      "parameters": {
        "camera": "back",
        "camera_quality": "ultra",
        "allow_manual_upload": true,
        "multipage": true,
        "title": null,
        "text": null
      }
    }
  }
}
```

## Send a proof

A proof of address or a proof of funds for its step: a PDF or a photo (JPG or PNG). Answered "checking" at once, then received, or asked again with the reason (not a valid proof, or too old). The third proof not accepted closes the step and the person moves on.

`POST /v1/verify/session/proof_of_address`. Who may: The end customer, with the verification's session. CLI: `kontiga portal verify-proof <session> <file> --kind <address|funds> [--idempotency-key <key>]`. MCP tool: `send_verification_proof`.

**Parameters**
- `session` (string, required): The device's session token, from the start's answer. The API takes it in the `Authorization` header.
- `kind` (enum, required): `address`. A proof of funds goes to `portal.proof_of_funds`. One of `address`, `funds`.
- `file_name` (string, required): The file's name, sent as the form's `file` in `multipart/form-data`. At most 255 characters.
- `content_type` (string, required): A PDF, or a JPG or PNG photo. At most 100 characters.
- `byte_size` (integer, required): The file's size in bytes, up to 20 MB.
- `idempotency_key` (string): The idempotency key.

**Returns** walk-in proof: The file with its answer, and the verification after it. With a session token (kt_vst_) the file is sent as multipart: status analyzing (202) or duplicate_ignored (200), with the next screen; the answer arrives on the live channel.

API:

```bash
curl -X POST https://api.kontiga.com/v1/verify/session/proof_of_address \
  -H "Authorization: Bearer wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "address",
    "file_name": "energy-bill-october.pdf",
    "content_type": "application/pdf",
    "byte_size": 312448
  }'
```

CLI:

```bash
kontiga portal verify-proof wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc \
  --kind address
```

MCP tool `send_verification_proof`:

```json
{
  "name": "send_verification_proof",
  "arguments": {
    "session": "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
    "kind": "address",
    "file_name": "energy-bill-october.pdf",
    "content_type": "application/pdf",
    "byte_size": 312448
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.verifyProof({
  file: await openAsBlob("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc"),
  kind: "address",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.verify_proof(file=open("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc", "rb"), kind="address")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.VerifyProof(ctx, &kontiga.PortalVerifyProofParams{
	File: kontiga.FileFromPath("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc"),
	Kind: "address",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().verifyProof(PortalVerifyProofParams.builder()
    .file(Path.of("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc"))
    .kind("address")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.VerifyProofAsync(new PortalVerifyProofOptions
{
    File = File.OpenRead("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc"),
    Kind = "address",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->verifyProof([
    'file' => fopen('wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc', 'r'),
    'kind' => 'address',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.verify_proof(file: File.open("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc"), kind: "address")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .verify_proof(kontiga::portal::VerifyProofParams {
        file: kontiga::File::open("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc").await?,
        kind: "address".into(),
        ..Default::default()
    })
    .await?;
```

Response, 202 Accepted:

```json
{
  "status": "analyzing",
  "change": 11,
  "preflight": {
    "extra_data": {},
    "session": "idv_4Hq7Nc2",
    "session_id": "idv_4Hq7Nc2",
    "entity_id_state": "completed",
    "entity_id_document_type": "id_card",
    "requirement": {
      "requirement_type": "proof_of_address",
      "status": "awaiting_receipt",
      "flow_order": 600
    },
    "screen": {
      "show": "proof_of_address_screen",
      "parameters": {
        "camera": "back",
        "camera_quality": "ultra",
        "allow_manual_upload": true,
        "multipage": true,
        "title": null,
        "text": null
      }
    }
  },
  "return_url": "https://brightwater.example/branch/thanks"
}
```

A proof is answered `analyzing` at once. A few seconds later the live channel's preflight carries `proof_of_address`: `received`, or `rejected` with the reason in words, such as not a valid proof or too old. The third proof not accepted closes the step, and the person moves on.

## Correct the person's details

The person corrects their own first and last name, identifier, phone (with its country code) or email. The email is checked as on the email step, "Did you mean gmail.com?" included. Five changes a minute.

`PATCH /v1/verify/session`. Who may: The end customer, with the verification's session. CLI: `kontiga portal verify-details <session> [--first-name <name>] [--last-name <name>] [--identifier <text>] [--phone <number>] [--country-code <GB>] [--email <address>]`. MCP tool: `update_verification_details`.

**Parameters**
- `session` (string, required): The device's session token, from the start's answer. The API takes it in the `Authorization` header.
- `first_name` (string): The corrected first name. At most 80 characters.
- `last_name` (string): The corrected last name. At most 80 characters.
- `identifier` (string): The corrected identifier. At most 100 characters.
- `phone` (string): The corrected phone number. At most 24 characters.
- `country_code` (string): The number's country, as two letters, for a number without its country code.
- `email` (string): The corrected email address, checked as on the email step. At most 320 characters.

**Returns** walk-in session: The verification with the details as corrected. With a session token (kt_vst_): the device's state (verification_session_state).

API:

```bash
curl -X PATCH https://api.kontiga.com/v1/verify/session \
  -H "Authorization: Bearer wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "06 98765432",
    "country_code": "NL"
  }'
```

CLI:

```bash
kontiga portal verify-details wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc \
  --phone '06 98765432' \
  --country-code NL
```

MCP tool `update_verification_details`:

```json
{
  "name": "update_verification_details",
  "arguments": {
    "session": "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
    "phone": "06 98765432",
    "country_code": "NL"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.verifyDetails({
  session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
  phone: "06 98765432",
  country_code: "NL",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.verify_details(
    session="wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
    phone="06 98765432",
    country_code="NL",
)
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.VerifyDetails(ctx, &kontiga.PortalVerifyDetailsParams{
	Session:     "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
	Phone:       "06 98765432",
	CountryCode: "NL",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().verifyDetails(PortalVerifyDetailsParams.builder()
    .session("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc")
    .phone("06 98765432")
    .countryCode("NL")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.VerifyDetailsAsync(new PortalVerifyDetailsOptions
{
    Session = "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
    Phone = "06 98765432",
    CountryCode = "NL",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->verifyDetails([
    'session' => 'wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc',
    'phone' => '06 98765432',
    'country_code' => 'NL',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.verify_details(
  session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
  phone: "06 98765432",
  country_code: "NL"
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .verify_details(kontiga::portal::VerifyDetailsParams {
        session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc".into(),
        phone: "06 98765432".into(),
        country_code: "NL".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "verification_session_state",
  "change": 3,
  "preflight": {
    "extra_data": {},
    "session": "idv_4Hq7Nc2",
    "session_id": "idv_4Hq7Nc2",
    "entity_id_state": "none_received",
    "entity_id_document_type": "unknown",
    "requirement": {
      "requirement_type": "identity_document",
      "status": "awaiting_receipt",
      "flow_order": 100
    },
    "screen": {
      "show": "scan_id_document_front_screen",
      "parameters": {
        "camera": "back",
        "camera_quality": "ultra",
        "allow_manual_upload": false,
        "multipage": false,
        "title": null,
        "text": null
      }
    }
  },
  "return_url": "https://brightwater.example/branch/thanks",
  "live": "/v1/verify/session/live"
}
```

## Stop a verification

The person stops: the verification is stopped, the team is told, and nothing more is asked.

`POST /v1/verify/session/cancel`. Who may: The end customer, with the verification's session. CLI: `kontiga portal verify-cancel <session>`. MCP tool: `stop_verification_session`.

**Parameters**
- `session` (string, required): The device's session token, from the start's answer. The API takes it in the `Authorization` header.

**Returns** walk-in session: The verification, stopped. With a session token (kt_vst_): status cancelled, with no screen to show.

API:

```bash
curl -X POST https://api.kontiga.com/v1/verify/session/cancel \
  -H "Authorization: Bearer wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc"
```

CLI:

```bash
kontiga portal verify-cancel wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc
```

MCP tool `stop_verification_session`:

```json
{
  "name": "stop_verification_session",
  "arguments": {
    "session": "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.verifyCancel({
  session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.verify_cancel(session="wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.VerifyCancel(ctx, &kontiga.PortalVerifyCancelParams{
	Session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().verifyCancel(PortalVerifyCancelParams.builder()
    .session("wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.VerifyCancelAsync(new PortalVerifyCancelOptions
{
    Session = "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->verifyCancel([
    'session' => 'wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.verify_cancel(session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .verify_cancel(kontiga::portal::VerifyCancelParams {
        session: "wks_Rk4Tn8Wq2Lm6Hd9Bv3Xc".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "status": "cancelled",
  "change": 12,
  "preflight": {
    "extra_data": {},
    "session": "idv_4Hq7Nc2",
    "session_id": "idv_4Hq7Nc2",
    "entity_id_state": "completed",
    "entity_id_document_type": "id_card",
    "requirement": {
      "requirement_type": "proof_of_address",
      "status": "awaiting_receipt",
      "flow_order": 600
    },
    "screen": {
      "show": "proof_of_address_screen",
      "parameters": {
        "camera": "back",
        "camera_quality": "ultra",
        "allow_manual_upload": true,
        "multipage": true,
        "title": null,
        "text": null
      }
    }
  },
  "return_url": "https://brightwater.example/branch/thanks"
}
```

## Verifying on the device

The calls the portal, the widget, the Kontiga app and the SDKs make while the person verifies, on the device's own session token (`kt_vst_`), sent in the `Authorization` header (the CLI and the MCP tools take it as `session`). Each capture is answered at once with the preflight; what comes next arrives on the live channel. No answer carries a decision, a finding or a score. The contract, with its headers, limits and errors: [The verification client API](https://kontiga.com/docs/guides/verify-client-api).

## Choose how to verify

The person chooses how to prove who they are, among the ways the verification profile offers: their ID document and a selfie, ZOREAL ID, or Aadhaar. The next screen follows from the choice.

`POST /v1/verify/session/method`. Who may: The end customer, with the verification's session. CLI: `kontiga portal verify-method <session> --method <document|zoreal_id|aadhaar>`. MCP tool: `choose_verification_method`.

**Parameters**
- `session` (string, required): The device's session token: a start's, a link's, a handoff's, or the one `identity_verifications.session_token` gave your app. The API takes it in the `Authorization` header.
- `method` (enum, required): `document` (the ID document and a selfie), `zoreal_id` or `aadhaar`, among the ways the profile offers.

**Returns** verification method: The way chosen, and the verification with its next step. With a session token (kt_vst_): the receipt with the change counter and the next screen.

API:

```bash
curl -X POST https://api.kontiga.com/v1/verify/session/method \
  -H "Authorization: Bearer kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "document"
  }'
```

CLI:

```bash
kontiga portal verify-method kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5 \
  --method document
```

MCP tool `choose_verification_method`:

```json
{
  "name": "choose_verification_method",
  "arguments": {
    "session": "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5",
    "method": "document"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.verifyMethod({
  session: "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5",
  method: "document",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.verify_method(session="kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5", method="document")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.VerifyMethod(ctx, &kontiga.PortalVerifyMethodParams{
	Session: "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5",
	Method:  "document",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().verifyMethod(PortalVerifyMethodParams.builder()
    .session("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5")
    .method("document")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.VerifyMethodAsync(new PortalVerifyMethodOptions
{
    Session = "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5",
    Method = "document",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->verifyMethod([
    'session' => 'kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5',
    'method' => 'document',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.verify_method(session: "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5", method: "document")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .verify_method(kontiga::portal::VerifyMethodParams {
        session: "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5".into(),
        method: "document".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "status": "accepted",
  "change": 3,
  "preflight": {
    "extra_data": {},
    "session": "idv_4Hq7Nc2",
    "session_id": "idv_4Hq7Nc2",
    "entity_id_state": "none_received",
    "entity_id_document_type": "unknown",
    "requirement": {
      "requirement_type": "identity_document",
      "status": "awaiting_receipt",
      "flow_order": 100
    },
    "screen": {
      "show": "scan_id_document_front_screen",
      "parameters": {
        "camera": "back",
        "camera_quality": "ultra",
        "allow_manual_upload": false,
        "multipage": false,
        "title": null,
        "text": null
      }
    }
  },
  "return_url": "https://brightwater.example/branch/thanks"
}
```

On a phone's browser, when the profile reads the chip, the preflight may offer Kontiga's app first (`app_handoff_screen`). The same call answers it with `app_offer`, `accept` or `decline`, in place of `method`.

## Get a chip challenge

Before the ID document's chip is read on the phone, a fresh challenge for that one read. It works once, for 5 minutes; each new read asks for a new one.

`POST /v1/verify/session/chip/challenge`. Who may: The end customer, with the verification's session. CLI: `kontiga portal chip-challenge <session>`. MCP tool: `get_chip_challenge`.

**Parameters**
- `session` (string, required): The device's session token: a start's, a link's, a handoff's, or the one `identity_verifications.session_token` gave your app. The API takes it in the `Authorization` header.

**Returns** chip challenge: The challenge, base64, and when it stops working.

API:

```bash
curl -X POST https://api.kontiga.com/v1/verify/session/chip/challenge \
  -H "Authorization: Bearer kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"
```

CLI:

```bash
kontiga portal chip-challenge kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5
```

MCP tool `get_chip_challenge`:

```json
{
  "name": "get_chip_challenge",
  "arguments": {
    "session": "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.chipChallenge({
  session: "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.chip_challenge(session="kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.ChipChallenge(ctx, &kontiga.PortalChipChallengeParams{
	Session: "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().chipChallenge(PortalChipChallengeParams.builder()
    .session("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.ChipChallengeAsync(new PortalChipChallengeOptions
{
    Session = "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->chipChallenge([
    'session' => 'kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.chip_challenge(session: "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .chip_challenge(kontiga::portal::ChipChallengeParams {
        session: "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5".into(),
        ..Default::default()
    })
    .await?;
```

Response, 201 Created:

```json
{
  "object": "chip_challenge",
  "challenge": "q3V9xL2bT8k=",
  "expires_at": "2026-11-26T10:20:41Z"
}
```

## Send what the chip gave

What the phone read from the ID document's chip, with the challenge it was read for. The answer says the chip was read and what comes next; whether it was trusted is never told to the person.

`POST /v1/verify/session/chip/evidence`. Who may: The end customer, with the verification's session. CLI: `kontiga portal chip-evidence <session> <file> --challenge <base64>`. MCP tool: `send_chip_evidence`.

**Parameters**
- `session` (string, required): The device's session token: a start's, a link's, a handoff's, or the one `identity_verifications.session_token` gave your app. The API takes it in the `Authorization` header.
- `challenge` (string, required): The challenge this read was made for. It works once.
- `evidence` (string, required): What the phone read from the chip, in base64, as the Kontiga app and the SDKs give it. At most 400,000 characters.

**Returns** chip evidence: Whether the chip was read, and the verification with its next step.

API:

```bash
curl -X POST https://api.kontiga.com/v1/verify/session/chip/evidence \
  -H "Authorization: Bearer kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5" \
  -H "Content-Type: application/json" \
  -d '{
    "challenge": "q3V9xL2bT8k=",
    "evidence": "omdkYXRhX2dyb3Vwc6..."
  }'
```

CLI:

```bash
kontiga portal chip-evidence kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5 \
  --challenge q3V9xL2bT8k=
```

MCP tool `send_chip_evidence`:

```json
{
  "name": "send_chip_evidence",
  "arguments": {
    "session": "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5",
    "challenge": "q3V9xL2bT8k=",
    "evidence": "omdkYXRhX2dyb3Vwc6..."
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.chipEvidence({
  file: await openAsBlob("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"),
  challenge: "q3V9xL2bT8k=",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.chip_evidence(file=open("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5", "rb"), challenge="q3V9xL2bT8k=")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.ChipEvidence(ctx, &kontiga.PortalChipEvidenceParams{
	File:      kontiga.FileFromPath("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"),
	Challenge: "q3V9xL2bT8k=",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().chipEvidence(PortalChipEvidenceParams.builder()
    .file(Path.of("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"))
    .challenge("q3V9xL2bT8k=")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.ChipEvidenceAsync(new PortalChipEvidenceOptions
{
    File = File.OpenRead("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"),
    Challenge = "q3V9xL2bT8k=",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->chipEvidence([
    'file' => fopen('kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5', 'r'),
    'challenge' => 'q3V9xL2bT8k=',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.chip_evidence(file: File.open("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"), challenge: "q3V9xL2bT8k=")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .chip_evidence(kontiga::portal::ChipEvidenceParams {
        file: kontiga::File::open("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5").await?,
        challenge: "q3V9xL2bT8k=".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "read": true,
  "change": 5,
  "preflight": {
    "extra_data": {},
    "session": "idv_4Hq7Nc2",
    "session_id": "idv_4Hq7Nc2",
    "entity_id_state": "id_received_awaiting_liveness",
    "entity_id_document_type": "id_card",
    "requirement": {
      "requirement_type": "liveness",
      "status": "awaiting_receipt",
      "flow_order": 300
    },
    "screen": {
      "show": "liveness_screen",
      "parameters": {}
    }
  }
}
```

A device that cannot read the chip sends `not_read: true` alone, and the profile's `chip_failure` says what follows. A used, expired or another verification's challenge answers `410 challenge_expired`, and a value that is not a challenge `400 invalid_input` on `challenge`: ask for a new one. A chip that could not be checked just now answers `503 chip_unavailable` with `Retry-After`; the step still waits, so read it again. A browser reads no chip: its challenge is `426 client_outdated`.

## Send the selfie

The selfie capture: one to five stills and the short video taken around them, with the face's position on each and the device's details. Answered at once; the result is never told to the person, and the next screen arrives on the live channel.

`POST /v1/verify/session/liveness`. Who may: The end customer, with the verification's session. CLI: `kontiga portal liveness <session> <folder> [--visitor-id <vis_id>] [--landmarks <json>] [--face-bounds <json>] [--image-face-bounds <json>] [--device-info <json>] [--idempotency-key <key>]`. MCP tool: `send_selfie_capture`.

**Parameters**
- `session` (string, required): The device's session token: a start's, a link's, a handoff's, or the one `identity_verifications.session_token` gave your app. The API takes it in the `Authorization` header.
- `visitor_id` (id (vis_)): Sent by the Kontiga portal and SDKs when they have one.
- `images` (array of object, required): One to five stills, each up to 4 MB.
- `video` (object): The short video taken around them, up to 50 MB. The whole request is at most 80 MB.
- `landmarks` (string): What the capture recorded of the face, as JSON, as the Kontiga portal and SDKs send it. At most 200,000 characters.
- `face_bounds` (string): Where the face is, as JSON `{x, y, width, height}`. At most 2,000 characters.
- `image_face_bounds` (string): Where the face is on each still, as JSON. At most 10,000 characters.
- `device_info` (string): The device's user agent, platform and screen, as JSON. At most 2,000 characters.
- `idempotency_key` (string): The idempotency key.

**Returns** liveness capture: received with the number of stills and whether the video was kept, or duplicate_ignored for the same capture sent again within 5 minutes.

API:

```bash
curl -X POST https://api.kontiga.com/v1/verify/session/liveness \
  -H "Authorization: Bearer kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5" \
  -H "Content-Type: application/json" \
  -d '{
    "images": [
      {
        "file_name": "still-1.jpg",
        "content_type": "image/jpeg",
        "byte_size": 412000
      }
    ],
    "video": {
      "file_name": "capture.webm",
      "content_type": "video/webm",
      "byte_size": 6120000
    }
  }'
```

CLI:

```bash
kontiga portal liveness kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5
```

MCP tool `send_selfie_capture`:

```json
{
  "name": "send_selfie_capture",
  "arguments": {
    "session": "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5",
    "images": [
      {
        "file_name": "still-1.jpg",
        "content_type": "image/jpeg",
        "byte_size": 412000
      }
    ],
    "video": {
      "file_name": "capture.webm",
      "content_type": "video/webm",
      "byte_size": 6120000
    }
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.liveness({
  file: await openAsBlob("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"),
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.liveness(file=open("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5", "rb"))
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.Liveness(ctx, &kontiga.PortalLivenessParams{
	File: kontiga.FileFromPath("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"),
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().liveness(PortalLivenessParams.builder()
    .file(Path.of("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"))
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.LivenessAsync(new PortalLivenessOptions
{
    File = File.OpenRead("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"),
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->liveness([
    'file' => fopen('kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5', 'r'),
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.liveness(file: File.open("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"))
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .liveness(kontiga::portal::LivenessParams {
        file: kontiga::File::open("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5").await?,
        ..Default::default()
    })
    .await?;
```

Response, 202 Accepted:

```json
{
  "verification": "received",
  "biometric_verification_token": "vfl_17b7bb301cacc98e43339906ba15b106",
  "image_count": 5,
  "video_stored": true
}
```

The capture goes as `multipart/form-data`: each still as an `images` part, the `video` part, and `landmarks`, `face_bounds`, `image_face_bounds` and `device_info` as JSON text. Above a limit it answers `413` with `image_too_large`, `video_too_large` or `request_too_large`. The same capture sent again within 5 minutes answers `200` and `duplicate_ignored` with the first one's token.

## Send a proof of funds

A proof of funds for its step: a bank or savings statement, or a payslip, as a PDF or a photo (JPG or PNG). Answered "checking" at once; received, or asked again with the reason, arrives on the live channel.

`POST /v1/verify/session/proof_of_funds`. Who may: The end customer, with the verification's session. CLI: `kontiga portal proof-of-funds <session> <file> [--idempotency-key <key>]`. MCP tool: `send_proof_of_funds`.

**Parameters**
- `session` (string, required): The device's session token: a start's, a link's, a handoff's, or the one `identity_verifications.session_token` gave your app. The API takes it in the `Authorization` header.
- `file_name` (string, required): The file's name, sent as the form's `file` in `multipart/form-data`. At most 255 characters.
- `content_type` (string, required): A PDF, or a JPG or PNG photo. At most 100 characters.
- `byte_size` (integer, required): The file's size in bytes, up to 20 MB.
- `idempotency_key` (string): The idempotency key.

**Returns** proof received: analyzing, with the change counter and the next screen; the answer arrives on the live channel.

API:

```bash
curl -X POST https://api.kontiga.com/v1/verify/session/proof_of_funds \
  -H "Authorization: Bearer kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5" \
  -H "Content-Type: application/json" \
  -d '{
    "file_name": "bank-statement-october.pdf",
    "content_type": "application/pdf",
    "byte_size": 284112
  }'
```

CLI:

```bash
kontiga portal proof-of-funds kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5
```

MCP tool `send_proof_of_funds`:

```json
{
  "name": "send_proof_of_funds",
  "arguments": {
    "session": "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5",
    "file_name": "bank-statement-october.pdf",
    "content_type": "application/pdf",
    "byte_size": 284112
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.proofOfFunds({
  file: await openAsBlob("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"),
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.proof_of_funds(file=open("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5", "rb"))
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.ProofOfFunds(ctx, &kontiga.PortalProofOfFundsParams{
	File: kontiga.FileFromPath("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"),
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().proofOfFunds(PortalProofOfFundsParams.builder()
    .file(Path.of("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"))
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.ProofOfFundsAsync(new PortalProofOfFundsOptions
{
    File = File.OpenRead("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"),
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->proofOfFunds([
    'file' => fopen('kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5', 'r'),
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.proof_of_funds(file: File.open("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"))
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .proof_of_funds(kontiga::portal::ProofOfFundsParams {
        file: kontiga::File::open("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5").await?,
        ..Default::default()
    })
    .await?;
```

Response, 202 Accepted:

```json
{
  "status": "analyzing",
  "change": 13,
  "preflight": {
    "extra_data": {},
    "session": "idv_4Hq7Nc2",
    "session_id": "idv_4Hq7Nc2",
    "entity_id_state": "completed",
    "entity_id_document_type": "id_card",
    "requirement": {
      "requirement_type": "proof_of_funds",
      "status": "awaiting_receipt",
      "flow_order": 700
    },
    "screen": {
      "show": "proof_of_funds_screen",
      "parameters": {
        "camera": "back",
        "camera_quality": "ultra",
        "allow_manual_upload": true,
        "multipage": true,
        "title": null,
        "text": null
      }
    }
  },
  "return_url": "https://brightwater.example/branch/thanks"
}
```

As with a proof of address, the live channel's preflight then carries `proof_of_funds`: `received`, or `rejected` with the reason in words.

## Continue on another device

A code to carry on the verification on another device: a QR code to scan with the phone, or a text message with the link. It works once, for 10 minutes; the device that opens it becomes the one the person continues on.

`POST /v1/verify/session/handoff`. Who may: The end customer, with the verification's session. CLI: `kontiga portal verify-handoff <session> --kind <qr|sms> [--phone-number <+number>]`. MCP tool: `hand_off_verification`.

**Parameters**
- `session` (string, required): The device's session token: a start's, a link's, a handoff's, or the one `identity_verifications.session_token` gave your app. The API takes it in the `Authorization` header.
- `kind` (enum, required): `qr` for a QR code to scan, `sms` to text the link.
- `phone_number` (string): With `sms`: the number, with its country code.

**Returns** verification handoff: The link, its QR code or where the text message went, and when it stops working.

API:

```bash
curl -X POST https://api.kontiga.com/v1/verify/session/handoff \
  -H "Authorization: Bearer kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "qr"
  }'
```

CLI:

```bash
kontiga portal verify-handoff kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5 \
  --kind qr
```

MCP tool `hand_off_verification`:

```json
{
  "name": "hand_off_verification",
  "arguments": {
    "session": "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5",
    "kind": "qr"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.verifyHandoff({
  session: "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5",
  kind: "qr",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.verify_handoff(session="kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5", kind="qr")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.VerifyHandoff(ctx, &kontiga.PortalVerifyHandoffParams{
	Session: "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5",
	Kind:    "qr",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().verifyHandoff(PortalVerifyHandoffParams.builder()
    .session("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5")
    .kind("qr")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.VerifyHandoffAsync(new PortalVerifyHandoffOptions
{
    Session = "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5",
    Kind = "qr",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->verifyHandoff([
    'session' => 'kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5',
    'kind' => 'qr',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.verify_handoff(session: "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5", kind: "qr")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .verify_handoff(kontiga::portal::VerifyHandoffParams {
        session: "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5".into(),
        kind: "qr".into(),
        ..Default::default()
    })
    .await?;
```

Response, 201 Created:

```json
{
  "object": "verification_handoff",
  "url": "https://verify.kontiga.com/v/h/kt_vho_249215fed826e1cff9368c2c7490760a16f7bd49f875d39a9f23eaf1505d076d",
  "expires_at": "2026-11-26T10:25:12Z",
  "sent": false,
  "qr_png_base64": "iVBORw0KGgoAAAANSUhEUgAAAPAAAADwCAYAAAA9..."
}
```

`sent` is `true` when the link went by text message. A device that only follows (`continues_elsewhere_screen`) takes the verification over with `kind: "here"`, answered with the preflight.

## Open a verification on this device

The new device opens the handoff code from the QR code or the text message and gets its own session; the device before follows each step as it finishes. A code works once, for 10 minutes.

`POST /v1/verify/sessions/handoff/{code}`. Who may: The end customer, with the handoff code. CLI: `kontiga portal redeem-handoff <code>`. MCP tool: `redeem_verification_handoff`.

**Parameters**
- `code` (string, required): The code at the end of the handoff link (`kt_vho_` and 64 hex digits). It works once, for 10 minutes. In the path.

**Returns** verification session: The grant (object verification_session): the new device's session token, when it stops working unless used, active, the brand kit, the live channel's path and the verification on its next step.

API:

```bash
curl -X POST https://api.kontiga.com/v1/verify/sessions/handoff/Hx7Lq2Wv9Tk4Rm8B
```

CLI:

```bash
kontiga portal redeem-handoff Hx7Lq2Wv9Tk4Rm8B
```

MCP tool `redeem_verification_handoff`:

```json
{
  "name": "redeem_verification_handoff",
  "arguments": {
    "code": "Hx7Lq2Wv9Tk4Rm8B"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.redeemHandoff("Hx7Lq2Wv9Tk4Rm8B");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.redeem_handoff("Hx7Lq2Wv9Tk4Rm8B")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.RedeemHandoff(ctx, "Hx7Lq2Wv9Tk4Rm8B")
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().redeemHandoff("Hx7Lq2Wv9Tk4Rm8B");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.RedeemHandoffAsync("Hx7Lq2Wv9Tk4Rm8B");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->redeemHandoff('Hx7Lq2Wv9Tk4Rm8B');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.redeem_handoff("Hx7Lq2Wv9Tk4Rm8B")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .redeem_handoff("Hx7Lq2Wv9Tk4Rm8B".into())
    .await?;
```

Response, 201 Created:

```json
{
  "object": "verification_session",
  "token": "kt_vst_45569da57f4b7bf472d7a864ef4781451cae6383fee9fb0ae40c59aa1ce475b7",
  "expires_at": "2026-11-26T10:47:30Z",
  "verification_id": "idv_4Hq7Nc2",
  "active": true,
  "locale": "en",
  "right_to_left": false,
  "organisation": "Brightwater Lending",
  "live": "/v1/verify/session/live"
}
```

## Continue with ZOREAL ID

Starts the sign-in with ZOREAL ID, when the profile offers it: a link that opens the ZOREAL ID app on a phone, or a QR code to scan on a computer. When the person approves there, their ID steps are done and the verification goes on.

`POST /v1/verify/session/zoreal`. Who may: The end customer, with the verification's session. CLI: `kontiga portal zoreal-start <session>`. MCP tool: `start_zoreal_id_sign_in`.

**Parameters**
- `session` (string, required): The device's session token: a start's, a link's, a handoff's, or the one `identity_verifications.session_token` gave your app. The API takes it in the `Authorization` header.

**Returns** ZOREAL ID sign-in: The link to open, its QR code, and when it stops working.

API:

```bash
curl -X POST https://api.kontiga.com/v1/verify/session/zoreal \
  -H "Authorization: Bearer kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"
```

CLI:

```bash
kontiga portal zoreal-start kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5
```

MCP tool `start_zoreal_id_sign_in`:

```json
{
  "name": "start_zoreal_id_sign_in",
  "arguments": {
    "session": "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.zorealStart({
  session: "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.zoreal_start(session="kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.ZorealStart(ctx, &kontiga.PortalZorealStartParams{
	Session: "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().zorealStart(PortalZorealStartParams.builder()
    .session("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.ZorealStartAsync(new PortalZorealStartOptions
{
    Session = "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->zorealStart([
    'session' => 'kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.zoreal_start(session: "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .zoreal_start(kontiga::portal::ZorealStartParams {
        session: "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5".into(),
        ..Default::default()
    })
    .await?;
```

Response, 201 Created:

```json
{
  "object": "zoreal_sign_in",
  "url": "https://id.zoreal.com/pair/Kd3Rv8Lm2Tq6",
  "expires_at": "2026-11-26T10:22:00Z",
  "qr_png_base64": "iVBORw0KGgoAAAANSUhEUgAAAPAAAADwCAYAAAA9..."
}
```

`surface`, `qr` or `link`, says how the sign-in is shown; left out, a QR code on a desktop and a link on a phone. The person approves in ZOREAL ID, and the live channel brings the next step.

## Send an Aadhaar

When the profile offers Aadhaar: a photo of the side of the Aadhaar card with its QR code, or the e-Aadhaar PDF. Answered "checking" at once; the next screen arrives on the live channel, and the person can still use their ID document instead.

`POST /v1/verify/session/aadhaar`. Who may: The end customer, with the verification's session. CLI: `kontiga portal aadhaar <session> <file> [--idempotency-key <key>]`. MCP tool: `send_aadhaar`.

**Parameters**
- `session` (string, required): The device's session token: a start's, a link's, a handoff's, or the one `identity_verifications.session_token` gave your app. The API takes it in the `Authorization` header.
- `file_name` (string, required): The file's name, sent as the form's `file` in `multipart/form-data`. At most 255 characters.
- `content_type` (string, required): A JPG or PNG photo of the card's side with the QR code, or the e-Aadhaar PDF. At most 100 characters.
- `byte_size` (integer, required): The file's size in bytes, up to 20 MB.
- `idempotency_key` (string): The idempotency key.

**Returns** Aadhaar received: analyzing, with the change counter and the next screen (electronic_identity_screen, checking); the next step arrives on the live channel. The same file again within 5 minutes is duplicate_ignored.

API:

```bash
curl -X POST https://api.kontiga.com/v1/verify/session/aadhaar \
  -H "Authorization: Bearer kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5" \
  -H "Content-Type: application/json" \
  -d '{
    "file_name": "aadhaar.jpg",
    "content_type": "image/jpeg",
    "byte_size": 918220
  }'
```

CLI:

```bash
kontiga portal aadhaar kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5
```

MCP tool `send_aadhaar`:

```json
{
  "name": "send_aadhaar",
  "arguments": {
    "session": "kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5",
    "file_name": "aadhaar.jpg",
    "content_type": "image/jpeg",
    "byte_size": 918220
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.aadhaar({
  file: await openAsBlob("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"),
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.aadhaar(file=open("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5", "rb"))
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.Aadhaar(ctx, &kontiga.PortalAadhaarParams{
	File: kontiga.FileFromPath("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"),
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().aadhaar(PortalAadhaarParams.builder()
    .file(Path.of("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"))
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.AadhaarAsync(new PortalAadhaarOptions
{
    File = File.OpenRead("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"),
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->aadhaar([
    'file' => fopen('kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5', 'r'),
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.aadhaar(file: File.open("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5"))
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .aadhaar(kontiga::portal::AadhaarParams {
        file: kontiga::File::open("kt_vst_263a4dbe41488fb87214b0032339dbb9f0c8da14c16dfcf13084bf3c2552eca5").await?,
        ..Default::default()
    })
    .await?;
```

Response, 202 Accepted:

```json
{
  "status": "analyzing",
  "change": 4,
  "preflight": {
    "extra_data": {},
    "session": "idv_4Hq7Nc2",
    "session_id": "idv_4Hq7Nc2",
    "entity_id_state": "none_received",
    "entity_id_document_type": "unknown",
    "requirement": {
      "requirement_type": "identity_document",
      "status": "awaiting_receipt",
      "flow_order": 100
    },
    "screen": {
      "show": "electronic_identity_screen",
      "parameters": {
        "method": "aadhaar",
        "state": "checking"
      }
    }
  },
  "return_url": "https://brightwater.example/branch/thanks"
}
```

## Verify identity before the checklist

On a request whose link asks for identity first: opens, or reads again, the identity verification the person passes before the checklist, in every new visit. It passes once the selfie matches the ID document; the checklist opens then.

`POST /v1/portal/gate/identity`. Who may: Anyone, with no account yet. CLI: `kontiga portal identity-gate <token>`. MCP tool: `open_portal_identity_gate`.

**Parameters**
- `token` (string, required): The request's link token, on a request whose link asks for identity first.

**Returns** identity gate: to_do with the session the capture screens open, checking, passed, or failed with what the person reads.

API:

```bash
curl -X POST https://api.kontiga.com/v1/portal/gate/identity \
  -H "Content-Type: application/json" \
  -d '{
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"
  }'
```

CLI:

```bash
kontiga portal identity-gate mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc
```

MCP tool `open_portal_identity_gate`:

```json
{
  "name": "open_portal_identity_gate",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.identityGate({
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.identity_gate(token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.IdentityGate(ctx, &kontiga.PortalIdentityGateParams{
	Token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().identityGate(PortalIdentityGateParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.IdentityGateAsync(new PortalIdentityGateOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->identityGate([
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.identity_gate(token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .identity_gate(kontiga::portal::IdentityGateParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "state": "to_do",
  "session_token": "vst_Bn5Xr2Kq8Wm4Ld7Tc9",
  "expires_at": "2026-11-26T10:48:00Z",
  "message": null
}
```

The gate passes once the selfie matches the ID document, usually within seconds; the checklist opens then. Asked again in the same visit, it answers the same session.

## Sessions

The portal and the widget work in a session: one request, one device. It starts from the link's token, from a handoff token when the person moves to their phone, or from a client secret your server made for the widget, and its token goes with every later call. A session ends after 2 hours without a step, or 24 hours in all; the person opens their link again to carry on, and nothing they sent is lost. A publishable key only starts a session: it reads no case, document or result.

- Every call of a session carries its token as `Authorization: Bearer kt_pst_...`. The token is shown once, in the start's answer, and kept only as a hash.
- A client secret starts a session only with your publishable key, from an origin the key lists. A key from another origin is refused with `origin_not_allowed` before anything else happens.
- Starting a session changes nothing on the request. Marking it opened is a call of its own, made when the page is shown to a person.
- A secret key or a member's token is refused on every portal call with `key_scope_denied`. A session token is refused on every call outside the portal.
- `session_required` (401): no session token. `session_expired` (401): a session that ended or was revoked; start a new one from the link. `request_cancelled` (410): every token of a withdrawn request stops working, and its link shows the withdrawn page.
- `link_not_found`, `handoff_invalid` and `invalid_secret` (404) say nothing about the request. `secret_expired` (401): a client secret past its hour; make a new one on your server for each time the page is shown. `rate_limited` (429) comes with `Retry-After` and `details.reason`: too many calls from one address or on one request, or a day used up (`daily_starts` for your publishable key's public starts, `address_day` for one visitor's share of a day, `link_day` for a public link's), which opens again at 00:00 UTC.

## Start a portal session

Start the end customer's session on one request, from the link's token, a handoff token from another device, or a client secret your server made for the widget. Every later call of the portal carries the session token it answers. A publishable key only starts a session; it reads nothing else.

`POST /v1/portal/sessions`. Who may: Anyone, with no account yet. CLI: `kontiga portal start-session [--token <token>] [--handoff-token <token>] [--client-secret <secret>] [--visitor-id <id>]`. MCP tool: `start_portal_session`.

**Parameters**
- `token` (string): The link's token: the part of the link after `/r/`.
- `handoff_token` (string): The token of a QR code the person opened on another device: the part of its address after `/h/`, before any `?`. Single use, 10 minutes. The address's `item` names the item the computer was on, for the phone to open.
- `client_secret` (id (rqs_)): A client secret your server made for this request, for the widget. One hour.
- `visitor_id` (id (vis_)): The device's visitor id, when the page has one.

**Returns** portal session: The session token, its request, its language, and when it ends: after 2 hours without a step, or 24 hours in all.

API:

```bash
curl -X POST https://api.kontiga.com/v1/portal/sessions \
  -H "Content-Type: application/json" \
  -d '{
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"
  }'
```

CLI:

```bash
kontiga portal start-session --token mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc
```

MCP tool `start_portal_session`:

```json
{
  "name": "start_portal_session",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.startSession({
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.start_session(token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.StartSession(ctx, &kontiga.PortalStartSessionParams{
	Token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().startSession(PortalStartSessionParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.StartSessionAsync(new PortalStartSessionOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->startSession([
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.start_session(token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .start_session(kontiga::portal::StartSessionParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        ..Default::default()
    })
    .await?;
```

Response, 201 Created:

```json
{
  "object": "portal_session",
  "session_token": "kt_pst_Vx8Lm2Qd7Rk4Tn9Hb3Wc6Pz1Fy5Ns0Jg",
  "request_id": "rqs_4Mb9Kt2",
  "mode": "live",
  "locale": "en",
  "started_from": "link",
  "idle_expires_at": "2026-11-26T11:41:00Z",
  "expires_at": "2026-11-27T09:41:00Z"
}
```

## Read the request in a session

The request as the person sees it inside their session: who is asking and why, the checklist with what each item asks and its state, what is missing, the conversation with the team, the due date and the gate.

`GET /v1/portal/request`. Who may: Anyone, with no account yet. CLI: `kontiga portal request <token>`. MCP tool: `get_portal_session_request`.

**Parameters**
- `token` (string, required): The session's request, by its link token.

**Returns** portal request: The request as the party sees it, the brand kit, the items, the conversation and the state of the link.

API:

```bash
curl -X GET "https://api.kontiga.com/v1/portal/request?token=mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"
```

CLI:

```bash
kontiga portal request mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc
```

MCP tool `get_portal_session_request`:

```json
{
  "name": "get_portal_session_request",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.request({
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.request(token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.Request(ctx, &kontiga.PortalRequestParams{
	Token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().request(PortalRequestParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.RequestAsync(new PortalRequestOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->request([
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.request(token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .request(kontiga::portal::RequestParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "portal_request",
  "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  "request_id": "rqs_4Mb9Kt2",
  "state": "open",
  "brand": {
    "kit_id": "bk_4Hm7Rw2",
    "name": "Brightwater Lending",
    "monogram": "BL",
    "logo": null,
    "accent": "#1E4D6B",
    "highlight": "#14374F",
    "powered_by_kontiga": true,
    "reply_to": "applications@brightwater.example",
    "support": {
      "email": "help@brightwater.example",
      "phone": "+31 20 794 1180",
      "url": null,
      "address": null
    },
    "privacy_url": "https://brightwater.example/privacy",
    "terms_url": null,
    "what_next": "Brightwater Lending reads your documents within one working day and writes to you by email.",
    "texts": {
      "welcome": "Upload what Brightwater Lending asked for. It takes a few minutes, and you can stop and come back.",
      "done": "Thank you. Brightwater Lending has everything it asked for.",
      "expired": "This link has expired. Please ask Brightwater Lending for a new one."
    }
  },
  "purpose": "for your personal loan application",
  "collection_name": "Personal loan",
  "first_name": "Lotte",
  "expires_at": "2026-12-05T23:59:00Z",
  "completed_at": null,
  "gate": {
    "kind": "code",
    "passed": true,
    "contacts": [
      {
        "channel": "sms",
        "masked": "+31 6 •• •• •4 18"
      },
      {
        "channel": "email",
        "masked": "l•••@example.com"
      }
    ],
    "sent_to": null,
    "resend_in_seconds": 0,
    "tries_left": 5,
    "locked_until": null
  },
  "items": [
    {
      "id": "rqm_5Kw2Hd8",
      "kind": "document",
      "title": "Payslips, last two months",
      "instructions": "Your two most recent monthly payslips, as PDFs from your employer or clear photos of the paper copies.",
      "accepted": "A PDF or a photo (JPEG, PNG, HEIC, HEIF or WebP), up to 64 MB",
      "required": true,
      "strictness": "advise",
      "status": "to_do",
      "slots": [
        {
          "item_id": "itm_2Cw8Lr5",
          "state": "accepted",
          "label": "September 2026",
          "on_file": {
            "title": "Payslip, September 2026",
            "at": "2026-11-24T19:41:00Z",
            "reused": false
          },
          "redo": null
        },
        {
          "item_id": "itm_2Cw8Ls6",
          "state": "not_started",
          "label": "October 2026",
          "on_file": null,
          "redo": null
        }
      ],
      "have": 1,
      "needed": 2,
      "files": [],
      "redo": null,
      "question": null,
      "identity": null,
      "restrictions": {
        "pdf": true,
        "images": true,
        "camera_only": false,
        "words": "A PDF or a photo (JPEG, PNG, HEIC, HEIF or WebP), up to 64 MB",
        "max_files": 1
      },
      "asked": null
    },
    {
      "id": "rqm_9Tn4Bq2",
      "kind": "question",
      "title": "Monthly rent or mortgage payment",
      "instructions": "What you pay for your home each month.",
      "required": true,
      "status": "done",
      "slots": [
        {
          "item_id": "itm_6Lp1Vx3",
          "state": "accepted",
          "label": "Monthly rent or mortgage payment",
          "on_file": null,
          "redo": null
        }
      ],
      "have": 1,
      "needed": 1,
      "question": {
        "answer": "1450",
        "input": "amount",
        "currency": "EUR",
        "help": "In euros, before any housing benefit."
      }
    }
  ],
  "item_count": 5,
  "required": 5,
  "done": 4,
  "counts": {
    "required": 5,
    "required_in": 4,
    "optional": 0,
    "optional_in": 0,
    "to_come": 1,
    "needs_redo": 0,
    "reused": 1
  },
  "can_send": false,
  "missing": [
    "Payslip, October 2026"
  ],
  "locale": "en",
  "locale_chosen": false,
  "more_time_asked": false,
  "contacts": [
    {
      "channel": "sms",
      "masked": "+31 6 •• •• •4 18"
    },
    {
      "channel": "email",
      "masked": "l•••@example.com"
    }
  ],
  "run": null,
  "contact_needed": false,
  "follow_up": null,
  "conversation": []
}
```

## Finalise an upload

After the file's bytes went straight to storage, tell Kontiga the upload is complete: its type is read from the bytes, and the instant check answers within seconds (got it, what to fix in plain words, or still checking). A file of the wrong type, too large, protected by a password or unreadable is refused and not kept. Safe to repeat: a second call for the same upload answers the same file (409 upload_in_progress while the first is still reading it, retry after Retry-After), and a file that could not be read just now is the 503 file_check_busy, never a refusal.

`POST /v1/portal/items/{item_id}/uploads/{upload_id}/finalize`. Who may: Anyone, with no account yet. CLI: `kontiga portal finalize <token> <item_id> <upload_id> [--part <front|back|selfie>] [--document <passport|card|licence>] [--capture-method <upload|camera|autocapture|manual_camera>] [--visitor-id <id>]`. MCP tool: `finalize_portal_upload`.

**Parameters**
- `token` (string, required): The link's token.
- `item_id` (id (itm_), required): The slot the file is for. In the path.
- `upload_id` (id (upl_), required): The upload whose bytes the device put into storage. In the path.
- `part` (enum): For an identity item: the front, the back, or the selfie. One of `front`, `back`, `selfie`.
- `document` (enum): For an identity item: the kind of document. One of `passport`, `card`, `licence`.
- `capture_method` (enum): How the file was taken. One of `upload`, `camera`, `autocapture`, `manual_camera`.
- `visitor_id` (id (vis_)): The device's visitor id, when the page has one.

**Returns** portal upload: The file with the instant check's answer, and the request as it now stands.

API:

```bash
curl -X POST https://api.kontiga.com/v1/portal/items/itm_2Cw8Ls6/uploads/upl_3c8e1f6a9b2d4e7c8a1b3d5f7e9c2a4b/finalize \
  -H "Content-Type: application/json" \
  -d '{
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "capture_method": "upload"
  }'
```

CLI:

```bash
kontiga portal finalize mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc itm_2Cw8Ls6 upl_3c8e1f6a9b2d4e7c8a1b3d5f7e9c2a4b \
  --capture-method upload
```

MCP tool `finalize_portal_upload`:

```json
{
  "name": "finalize_portal_upload",
  "arguments": {
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "item_id": "itm_2Cw8Ls6",
    "upload_id": "upl_3c8e1f6a9b2d4e7c8a1b3d5f7e9c2a4b",
    "capture_method": "upload"
  }
}
```

TypeScript:

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

const kontiga = new Kontiga(); // no key needed
const result = await kontiga.portal.finalize("itm_2Cw8Ls6", "upl_3c8e1f6a9b2d4e7c8a1b3d5f7e9c2a4b", {
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  capture_method: "upload",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # no key needed
result = kontiga.portal.finalize(
    "itm_2Cw8Ls6",
    "upl_3c8e1f6a9b2d4e7c8a1b3d5f7e9c2a4b",
    token="mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    capture_method="upload",
)
```

Go:

```go
client := kontiga.NewClient() // no key needed
result, err := client.Portal.Finalize(ctx, "itm_2Cw8Ls6", "upl_3c8e1f6a9b2d4e7c8a1b3d5f7e9c2a4b", &kontiga.PortalFinalizeParams{
	Token:         "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
	CaptureMethod: "upload",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // no key needed
var result = kontiga.portal().finalize("itm_2Cw8Ls6", "upl_3c8e1f6a9b2d4e7c8a1b3d5f7e9c2a4b", PortalFinalizeParams.builder()
    .token("mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc")
    .captureMethod("upload")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // no key needed
var result = await kontiga.Portal.FinalizeAsync("itm_2Cw8Ls6", "upl_3c8e1f6a9b2d4e7c8a1b3d5f7e9c2a4b", new PortalFinalizeOptions
{
    Token = "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    CaptureMethod = "upload",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // no key needed
$result = $kontiga->portal->finalize('itm_2Cw8Ls6', 'upl_3c8e1f6a9b2d4e7c8a1b3d5f7e9c2a4b', [
    'token' => 'mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc',
    'capture_method' => 'upload',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # no key needed
result = kontiga.portal.finalize(
  "itm_2Cw8Ls6",
  "upl_3c8e1f6a9b2d4e7c8a1b3d5f7e9c2a4b",
  token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
  capture_method: "upload"
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // no key needed
let result = kontiga
    .portal()
    .finalize("itm_2Cw8Ls6".into(), "upl_3c8e1f6a9b2d4e7c8a1b3d5f7e9c2a4b".into(), kontiga::portal::FinalizeParams {
        token: "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc".into(),
        capture_method: "upload".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "object": "portal_upload",
  "file": {
    "id": "pfl_8Rd3Mw6",
    "file_name": "payslip-october-2026.pdf",
    "byte_size": 184320,
    "at": "2026-11-26T09:44:10Z",
    "label": "October 2026",
    "part": null,
    "answer": "problem",
    "reason": "wrong_period",
    "message": "This payslip is for August 2026. We need the one for October 2026.",
    "can_keep": true,
    "kept": false,
    "note": null,
    "item_id": null
  },
  "request": {
    "object": "portal_request",
    "token": "mQ7vR2kLp9Xw4Tn8Bd3Zs6Hc",
    "request_id": "rqs_4Mb9Kt2",
    "done": 4,
    "can_send": false,
    "missing": [
      "Payslip, October 2026"
    ]
  }
}
```

## The portal in your page

The widget is the portal itself, in a frame on your page, so the person never leaves your site. The widget's loader mounts it for you; a page may also frame it directly. The frame opens one of two ways, always with your publishable key: a request your server made, by the client secret it got for it, or a public link, where the person starts with their name.

- A request your server made: `https://collect.kontiga.com/r/embed?key={publishable key}#client_secret={client secret}`. The client secret goes in the fragment, after `#`, never in the query: it never reaches a server's log, and the frame takes it off the address as soon as it has read it.
- A public link: `https://collect.kontiga.com/r/embed?key={publishable key}&start={start token}`, the start token being the part of the public link after `/r/start/`. The form, then the person's own checklist, open in the frame. A start made with your publishable key answers the new request's `client_secret` too, and the frame runs on it, as for a request your server made: the person's files come in with the source `widget`.
- Its look: add `&theme=light` (the default), `dark`, or `auto` for the visitor's own setting, so the frame matches your page.
- Only a page at an origin your publishable key lists may hold the frame. The frame is served with a `frame-ancestors` policy of those origins, so the browser refuses it inside any other page, and inside a listed page held in a frame of another site. The frame's session is refused with `origin_not_allowed` from anywhere else before anything is shown, and the frame says only that it can't be shown there. A key also opens only its own workspace's public links, in its own mode. Give the frame `allow="camera"` so a photo can be taken in it.
- Make a client secret for each time your page is shown, on your server (`requests.client_secret`, or `client_secret: true` when you make the request), and never keep it. Its answer names when it stops working as `client_secret_expires_at`, on every call that makes one.
- A public start in the widget spends your publishable key's starts of the day (200 by default) only when it makes a case: a refused or malformed call, and a retried submit sent with the same `Idempotency-Key`, spend nothing. One visitor's starts are also held to a share of the day, so one address never uses up the day your other visitors share.
- The frame's session is held in the frame's memory, never in a cookie, so it works where your page's visitors block third-party cookies. The hosted portal, at its own address, keeps the session in a cookie no script on the page can read.

**Frame the portal and listen to it**

```typescript
const PORTAL = "https://collect.kontiga.com";
const frame = document.querySelector("#kontiga-collect");
// the client secret goes in the fragment: it never reaches a server's log
frame.src = `${PORTAL}/r/embed?key=${publishableKey}#client_secret=${clientSecret}`;

let ready = false;
window.addEventListener("message", (event) => {
  if (event.origin !== PORTAL || event.data?.source !== "kontiga-collect") return;
  const { type, data } = event.data;
  if (type === "ready") ready = true;
  if (type === "resize") frame.style.height = `${data.height}px`;
  if (type === "completed") showThanks(data.request_id);
  if (type === "error") showFallback(data.code);
});
// a page the key does not list never gets the frame, so no event comes: no ready within 10 s is a refusal
setTimeout(() => ready || showFallback("origin_not_allowed"), 10_000);
```

### Events

The frame posts its events with `postMessage` to the origin of the page that holds it, and to no other. Each is `{ source: "kontiga-collect", version: 1, type, data }`. None carries what the checks found, a verdict or a value read from a document: they say what the person did, by id. Your server reads the request by the API or receives its webhooks before it decides anything.

- `ready`, with `request_id`, `stage` and `state`: the frame is shown. On a public link it comes first with `stage: "start"` and `request_id: null` when the form shows, then again with `stage: "request"` once the request opens. `state` says where the request stands: `open`, `completed`, `expired`, `cancelled` or `unavailable`.
- `resize`, with `height`, the page's height in CSS `px`, once it has settled: size the frame to the page.
- `item_received`, with `request_id`, `item_id` and `requirement_key`, the requirement's key in its collection: a document or an answer came in.
- `item_needs_redo`, the same and `reasons`, the reason codes: an item is asked for again.
- `saved`, with `request_id`: the person chose to finish later.
- Until the frame's first call is answered, only an `error` is posted. A page at an origin your key does not list, or a listed page held in a frame of another site, never gets the frame at all: the browser refuses it before it runs, so no event comes. Treat no `ready` within 10 seconds as refused; the widget's loader does, and raises `error` with `origin_not_allowed` itself.
- `completed`, with `request_id`: the person sent everything.
- `closed`, with `request_id`: the frame went away.
- `error`, with `code`, posted once, each code with its own fix: `invalid_key` (no publishable key in the frame's address, or a key of another kind: use the publishable key), `missing_secret` (neither `#client_secret=` nor `start=` in the address), `invalid_secret` (a client secret not of your key's workspace), `secret_expired` (a client secret past its hour: make one for each time the page is shown), `origin_not_allowed` (the frame's session refused for the page's origin), `expired` or `cancelled` (the request is past its due date or withdrawn), `rate_limited`, or `unavailable` (no longer served).

**The events, as your page receives them**

```json
[
  {
    "source": "kontiga-collect",
    "version": 1,
    "type": "ready",
    "data": {
      "request_id": "rqs_4Mb9Kt2",
      "stage": "request",
      "state": "open"
    }
  },
  {
    "source": "kontiga-collect",
    "version": 1,
    "type": "item_received",
    "data": {
      "request_id": "rqs_4Mb9Kt2",
      "item_id": "itm_2Cw8Ls6",
      "requirement_key": "proof_of_address"
    }
  },
  {
    "source": "kontiga-collect",
    "version": 1,
    "type": "item_needs_redo",
    "data": {
      "request_id": "rqs_4Mb9Kt2",
      "item_id": "itm_2Cw8Ls6",
      "requirement_key": "proof_of_address",
      "reasons": [
        "blurry"
      ]
    }
  },
  {
    "source": "kontiga-collect",
    "version": 1,
    "type": "completed",
    "data": {
      "request_id": "rqs_4Mb9Kt2"
    }
  },
  {
    "source": "kontiga-collect",
    "version": 1,
    "type": "error",
    "data": {
      "code": "secret_expired"
    }
  }
]
```
