> ## Documentation Index
> Fetch the complete documentation index at: https://eurusys-6c0957fa.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# API overview

> The complete MBKYC operation set, mapped across every SDK, with the shared semantics behind each call.

Every SDK exposes the same operations over the same [data types](/reference/data-types). This page is the cross-language map; each [SDK guide](/sdks/android) has the full, idiomatic signatures and examples for one platform.

## Operations across SDKs

| Operation                | Swift                    | C#                            | Kotlin / Java               | C                                            | TypeScript                        |
| ------------------------ | ------------------------ | ----------------------------- | --------------------------- | -------------------------------------------- | --------------------------------- |
| Create                   | `MBKYC.create(...)`      | `MBKYC.Create(...)`           | `MBKYC.create(...)`         | `mbkyc_create(...)`                          | `new MBKYCClient()` + `init(...)` |
| Destroy                  | `deinit`                 | `Dispose`                     | `close()` (`AutoCloseable`) | `mbkyc_destroy`                              | `deInit()`                        |
| List smart card readers  | `listSmartcardReaders`   | `ListSmartcardReadersAsync`   | `listSmartcardReaders`      | `mbkyc_list_smartcard_readers`               | `listSmartcardReaders`            |
| List fingerprint readers | `listFingerprintReaders` | `ListFingerprintReadersAsync` | `listFingerprintReaders`    | `mbkyc_list_fingerprint_readers`             | `listFingerprintReaders`          |
| Register device          | `registerDevice(name:)`  | `RegisterDeviceAsync`         | `registerDevice`            | `mbkyc_register_device`                      | `registerDevice`                  |
| Check registration       | `checkRegistration`      | `CheckRegistrationAsync`      | `checkRegistration`         | `mbkyc_check_registration`                   | `checkRegistration`               |
| Validate                 | `validate(_:)`           | `ValidateAsync`               | `validate`                  | `mbkyc_validate`                             | `validate`                        |
| Export logs              | `exportLogs(to:)`        | `ExportLogsAsync`             | `exportLogs`                | `mbkyc_export_logs`                          | `exportLogs`                      |
| Cancel in-flight op      | `Task` cancel            | `CancellationToken`           | coroutine cancel            | `CancellationTokenHandle` + `mbkyc_cancel_*` | `cancel()`                        |
| Host info (web only)     | —                        | —                             | —                           | —                                            | `getInfo()`                       |

## What each operation does

| Operation              | Returns                                                          | Notes                                                                                                                                      |
| ---------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| **Create**             | handle                                                           | Validates [config](/reference/data-types#config) and initializes the SDK. On the web, `getInfo()` is the only call usable before `init()`. |
| **List readers**       | [`ReaderInfo[]`](/reference/data-types#readerinfo)               | Enumerates connected smart card readers / fingerprint sensors.                                                                             |
| **Register device**    | void                                                             | Call **once** per device before validating. See [Devices](/dashboard/devices).                                                             |
| **Check registration** | [`RegistrationStatus`](/reference/data-types#registrationstatus) | `active` / `inactive` / `not_found`.                                                                                                       |
| **Validate**           | [`VerificationResult`](/reference/data-types#verificationresult) | Takes one [validation request](/reference/data-types#validation-requests); the shape selects the method.                                   |
| **Export logs**        | void                                                             | Bundles SDK + connected-service logs into a single `tar.zst` archive for support.                                                          |
| **Destroy**            | void                                                             | Releases resources. Always call it (or use the language's scoped form).                                                                    |

## Async model

| Platform   | Model                                                       |
| ---------- | ----------------------------------------------------------- |
| Swift      | `async/await` + callback overloads                          |
| C#         | `Task` (async/await), honours `CancellationToken`           |
| Kotlin     | suspend functions + coroutines                              |
| Java       | `CompletableFuture`                                         |
| C          | callback-based (`on_success` / `on_error` / `on_cancelled`) |
| TypeScript | Promises                                                    |

## Results & errors

* Kotlin / Java return an `MBKYCResult<T>` (`Ok` / `Err`); `getOrThrow()` converts to exceptions.
* Swift throws `MBKYCError`; C# throws `MBKYCException`; the web SDK rejects with `MBKYCError`.
* C returns/owns an `MBKYC_Error*` the caller must free.

All of them carry the same [error codes](/reference/error-codes).

## Cancellation

Every long-running operation can be cancelled:

* **Swift / Kotlin** — cancel the surrounding `Task` / coroutine.
* **C#** — pass a `CancellationToken`; cancelling resolves the task with `TaskCanceledException`.
* **C** — create an `MBKYC_CancellationTokenHandle`, pass it to the call, and `mbkyc_cancel_token_cancel(token)`.
* **Web** — call `client.cancel()`.
