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

# Create KYB Session

> Create a KYB session by generating a business verification token via the iDenfy API with custom flow, settings, and finance options.

> [!NOTE]
>
> **Requirements**
>
> * **API** key pair
> * [**Custom flow**](https://documentation.idenfy.com/guides/dashboard/kyb/identity-verification-on-kyb-custom-flow.md) created via dashboard
> * Session creation via API **enabled** (done by iDenfy staff)
> * **Finances**

***

![KYB Integration Schema](https://mintcdn.com/idenfy/K_tRuchpbv9NvRL_/images/kyb/Documentation_Flowcharts-kybToken.drawio.png?fit=max\&auto=format\&n=K_tRuchpbv9NvRL_\&q=85\&s=e695911a8eb49b0aa8782cb05ae544b8)

## Step 1: Create Business Verification Form Session

> [!NOTE]
>
> For full request and response details, see the **API Reference** tab for the `kybTokensCreate` endpoint.

* If you omit `flow`, iDenfy uses your account's default KYB flow.
* iDenfy refuses token creation if your account lacks finances for the flow.

The response contains the `tokenString` for the client's link and the `companyId` used in every form endpoint. It also includes the session settings: `expiration`, `isValid`, `clientId`, `externalRef`, `locale`, `flow`, `theme`, `tags` and `scanRefs`.

> [!TIP]
>
> Pass one or more existing identity verification `scanRef`s in the `scanRefs` field to link already-verified individuals (Directors, Representatives, Beneficial Owners) to this company without requiring them to re-verify. The same `scanRef` can be reused across any number of companies — see [KYC Integration](https://documentation.idenfy.com/kyb/kyc-integration.md#reusing-an-identity-verification-across-companies).

***

## Step 2: Create Company

After you generate the token, you can:

* [Create a company via **API**](https://documentation.idenfy.com/kyb/collect-information.md)
* [**Pre-fill** the data you already hold](https://documentation.idenfy.com/kyb/pre-fill.md), then hand the form to the client
* [Create a **redirection** link to the Web UI](#create-redirection-link-to-web-ui)

> [!NOTE]
>
> ### Create Redirection Link to Web UI
>
> To redirect the user to the iDenfy Business verification UI, construct the redirect **URL** as follows:
>
> 1. Start with the base URL
> 2. Obtain the `tokenString` value from the **new Business verification token response**
> 3. Append this `tokenString` value directly to the end of the base URL: `https://kyb.ui.idenfy.com/?authToken=`
>
> **Example:**
>
> If the `tokenString` received from the API is `9TIMoX4oSVmWDJ8qS7zeFUMTh5hi1EcqqLTrPR9r`, the complete redirect URL will be:
>
> ```
> https://kyb.ui.idenfy.com/?authToken=9TIMoX4oSVmWDJ8qS7zeFUMTh5hi1EcqqLTrPR9r
> ```
>
> If a custom KYB URL is configured for your account, use that instead — the `tokenString` goes where your URL has the `{{token_string}}` placeholder.
>
> > [!NOTE]
> >
> > The token response contains no ready-made link. Build it from the `tokenString` as shown above. A `/welcome` path is not needed.


## Related topics

- [Generate KYB form token](https://documentation.idenfy.com/api-reference/kyb-token/generate-kyb-form-token.md)
- [KYB API – Business Verification](https://documentation.idenfy.com/kyb/overview.md)
- [Pre-Fill and Update](https://documentation.idenfy.com/kyb/pre-fill.md)
- [Creating a KYB Session](https://documentation.idenfy.com/guides/dashboard/kyb/creating-session.md)
- [Create a Session](https://documentation.idenfy.com/age-estimation/create-session.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.