> ## Documentation Index
> Fetch the complete documentation index at: https://docs.compliance.legaltalent.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Reference

> LegalTalentFlowView parameters, callbacks, errors, environments and versioning

## LegalTalentFlowView

| Parameter                                             | iOS | Android | Default     | Description                                                                |
| ----------------------------------------------------- | --- | ------- | ----------- | -------------------------------------------------------------------------- |
| `accessToken`                                         | ✓   | ✓       | required    | Session `access_token` from `POST /kyc/sessions`                           |
| `environment`                                         | ✓   | ✓       | `dev`       | `dev`, `staging` or `production`. Must match where the session was created |
| `baseURL` / `baseUrl`                                 | ✓   | ✓       | `nil`       | Override the API host (private deployments)                                |
| `requestTimeout` / `requestTimeoutSeconds`            | ✓   | ✓       | `120`       | Network timeout in seconds                                                 |
| `livenessConfiguration`                               | ✓   | ✓       | `nil`       | Dedicated Cognito Identity Pool for liveness                               |
| `colorMode`                                           | ✓   | ✓       | system      | Light, dark or follow the device                                           |
| `brandingMode`                                        | ✓   | ✓       | automatic   | See [Branding](/mobile-sdk/customization#branding)                         |
| `showsThemeToggle`                                    | ✓   | ✓       | `false`     | Light/dark switch in the header                                            |
| `showsLanguageSwitcher`                               | ✓   | ✓       | workflow    | Force the language picker on or off                                        |
| `documentCaptureOptions`                              | ✓   | ✓       | `.standard` | See [Document capture](/mobile-sdk/customization#document-capture)         |
| `selfieCaptureOptions` / `selfieCaptureConfiguration` | ✓   | ✓       | standard    | See [Selfie capture](/mobile-sdk/customization#selfie-capture)             |
| `privacyPolicyURL`, `termsOfServiceURL`, `tosOptions` | ✓   |         | `nil`       | Terms shown on the entry gate                                              |
| `autoDismissOnComplete`                               | ✓   |         | `false`     | Dismiss the presented flow automatically when it finishes                  |
| `showsHeader`                                         | ✓   |         | `true`      | Hide the SDK header                                                        |
| `showsAttribution`                                    | ✓   |         | `true`      | Hide the "Powered by Legal Talent" footer                                  |
| `showsSingleSubmitOutcome`                            | ✓   |         | `false`     | Show the verdict in [zero-retention](/mobile-sdk/zero-retention) sessions  |

## Callbacks

| Callback                        | Platforms    | When it fires                                                                                        |
| ------------------------------- | ------------ | ---------------------------------------------------------------------------------------------------- |
| `onComplete(KYCSession)`        | iOS, Android | Once, after the last step is submitted. A UX signal, not a decision                                  |
| `onExit()`                      | iOS          | The applicant closed the flow and confirmed. The session stays open                                  |
| `onSingleSubmitResult(outcome)` | iOS          | Zero-retention sessions only, right before `onComplete`. Carries the decision and the extracted data |

There is no error callback. Errors during the flow (expired token, network loss, rejected upload) are shown to the applicant inside the flow with a retry where it makes sense.

### KYCSession

The session passed to `onComplete`. Useful fields:

| Field                        | Description                                                              |
| ---------------------------- | ------------------------------------------------------------------------ |
| `sessionID` / `sessionId`    | Session ID, the same one your backend received from `POST /kyc/sessions` |
| `workflowID`, `workflowName` | The workflow that ran                                                    |
| `status`                     | Session status at completion, usually `completed`                        |
| `stepsData`                  | Per-step status                                                          |

To get the decision, read the session on your backend by `session_id`.

## Errors

The headless client throws `LegalTalentError`. Every error exposes a stable `code`:

| Code                                         | Meaning                                              | What to do                           |
| -------------------------------------------- | ---------------------------------------------------- | ------------------------------------ |
| `configurationError` / `CONFIGURATION_ERROR` | No access token                                      | Check the token you pass             |
| `tokenExpired` / `TOKEN_EXPIRED`             | `401` or the session expired                         | Create a new session on your backend |
| `networkError` / `NETWORK_ERROR`             | No connectivity                                      | Retry                                |
| `timeout` / `TIMEOUT`                        | The request exceeded `requestTimeout`                | Retry                                |
| `uploadError` / `UPLOAD_ERROR`               | The captured file could not be read                  | Capture again                        |
| `httpError` / `HTTP_ERROR`                   | The API returned an error (`httpStatus`, API `code`) | Inspect the status and API code      |
| `unknown` / `UNKNOWN`                        | Unexpected response                                  | Report it with the session ID        |

Zero-retention sessions add `singleSubmitCode`; see [Zero-retention errors](/mobile-sdk/zero-retention#errors).

## Environments

| Environment  | API                              |
| ------------ | -------------------------------- |
| `dev`        | `https://dev.kyc.legaltalent.ai` |
| `staging`    | `https://stg.kyc.legaltalent.ai` |
| `production` | `https://kyc.legaltalent.ai`     |

A token only works against the environment where the session was created.

## Versioning

One SemVer for both platforms: tag `v1.2.3` is SPM `from: "1.2.3"` and Maven `1.2.3`. Published versions are immutable; fixes ship as a new patch version. Production apps must not consume `-SNAPSHOT` builds.
