---
title: Capture API
canonical: https://developer.unico.io/developers/sdks-and-tools/ios/api-reference/capture-api
locale: en
generated_by: markdown-export
---

- [/](/)
- [SDKs and Tools](/developers/sdks-and-tools/overview)
- [iOS SDK](/developers/sdks-and-tools/ios/requirements)
- API Reference
- Capture API

# Capture API

Methods to start a session
| Method | Description |
| --- | --- |
| `prepareSelfieCamera(_:config:)` | Prepares the selfie camera |
| `prepareSelfieCamera(_:config:prepareInfo:)` | Prepares the selfie camera with `PrepareInfo` metadata |
| `prepareDocumentCamera(_:config:)` | Prepares the document camera |
| `open(_:webAppToken:)` | Opens the prepared selfie camera, passing the `process.webAppToken` returned by Create Process |
| `openDocument(_:delegate:)` | Opens the prepared document camera with a `DocumentEnums` |

Capture options / parameters
**`PrepareInfo`** — metadata to identify the user session.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `externalUserId` | `String` | yes | User identifier within your system. Hashed with SHA-256 before transmission. |
| `useCase` | `String` | no | Identifier for the context or flow currently running. Transmitted in plain text. |

**`DocumentEnums`** — see [Enums](/developers/sdks-and-tools/ios/api-reference/enums).

Result types and fields
**`SelfieResult`** — object returned on successful selfie capture.

| Field | Type | Description |
| --- | --- | --- |
| `base64` | `String` | Captured image in Base64 |
| `encrypted` | `String` | JWT to be sent to the backend |

**`SuccessResult`** — object returned by `onSuccess` in a Unico API integration.

| Field | Type | Description |
| --- | --- | --- |
| `processId` | `String` | Process identifier used to query the validation result via the REST API |

**`DocumentResult`** — object returned on successful document capture. Same fields as `SelfieResult`.

Last updated on **Oct 15, 2026**