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

# Create KYC Link

> Create or reuse an investor and return a Sumsub verification link.

This endpoint always requires `x-api-key`. The email is normalized before lookup, and `needKyc` defaults to `true`.

> [!TIP]
>
> **Testing in Sandbox?** Pass `needKyc: false` and skip identity verification entirely. The KYC flow
> is a Sumsub verification with document upload, not something you need to prove your integration
> works, and every test investor you create without it is one less manual step in your loop.
>
> Rehearse the real KYC flow once before you go live, since `needKyc: false` is rejected in
> production with `needKyc=false is only available in the sandbox environment`.

> [!WARNING]
>
> This operation can create an investor account and send an invitation email. The returned Sumsub URL grants access to a verification flow; do not log it, commit it, or expose it to another user.

When `needKyc` is `false`, the investor is created without a KYC requirement and `url` is `null`.

## Fields

| Field | Required | Notes |
| - | - | - |
| `email` | yes | Normalized to lowercase before lookup |
| `needKyc` | no | Defaults to `true`. `false` creates the investor with no KYC requirement, and is accepted in Sandbox only |
| `walletAddress` | no | The investor's wallet, as a valid EVM address |
| `tokenSymbol` | no | Scopes the investor to a tokenized asset |

### Attach the wallet address

An investor record with no wallet address cannot invest. Pass `walletAddress` here so the record is
complete from the start:

```json theme={null}
{
  "email": "investor@example.com",
  "needKyc": false,
  "walletAddress": "0x1111111111111111111111111111111111111111"
}
```

> [!NOTE]
>
> A wallet address is set once. If the investor already has a different address on file, the call is
> rejected with `Investor <email> is already associated with a different wallet address` rather than
> overwriting it. Preparing a [`whitelist`](https://docs.brickken.com/api-reference/endpoint/prepare-whitelist) transaction
> also attaches the address when the record does not yet have one.

Confirm the result with `GET /get-investor-info`, which returns `walletAddress` and
`complianceStatus`. A `complianceStatus` of `NOT_REQUIRED` together with a non-null `walletAddress`
is a ready-to-invest test investor.

> [!WARNING]
>
> `needKyc` is only applied when the investor record is created. For an email that already has an
> account, the stored value wins and cannot be downgraded — use a fresh address, such as a `+` alias.

## Client examples

`walletAddress` and `tokenSymbol` are currently available through the API only; the CLI, MCP and SDK
clients still accept `email` and `needKyc`.

> [tab] CLI
>
> ```bash theme={null}
> brickken kyc create-link \
>   --email investor@example.com \
>   --need-kyc true \
>   --json
> ```

> [tab] MCP
>
> ```json theme={null}
> {
>   "name": "create_kyc_link",
>   "arguments": {
>     "email": "investor@example.com",
>     "needKyc": true
>   }
> }
> ```

> [tab] SDK
>
> ```ts theme={null}
> const result = await bkn.kyc.createLink({
>   email: 'investor@example.com',
>   needKyc: true,
> })
> ```

## Response

```json theme={null}
{
  "email": "investor@example.com",
  "needKyc": true,
  "userCreated": true,
  "invitationSent": true,
  "tokenSymbol": null,
  "walletAddress": "0x1111111111111111111111111111111111111111",
  "url": "https://in.sumsub.com/..."
}
```


## OpenAPI

````yaml POST /create-kyc-link
openapi: 3.1.0
info:
  title: Brickken API V2
  description: >-
    Welcome to the Brickken API documentation. This API allows customers to
    create and manage tokenization processes, including creating new
    tokenizations, minting/burning/transferring tokens, whitelisting users,
    manage tokens approvals. This documentation provides detailed information on
    how to use the API, including the necessary endpoints, request formats, and
    expected
    responses.</details><details><summary>**Authentication**</summary>All API
    requests require an API key for authentication. Include your API key in the
    `x-api-key` header of each request:<pre><code>```
      x-api-key: YOUR_API_KEY
    ```</code></pre>Ensure that your API key is kept secure and not shared
    publicly. A common parameter for all requests is the `signerAddress`. Such
    address must be whitelisted in our factory. Brickken performs that
    whitelisting; you do not request it per address. To request an API key for
    the sandbox or production environment, or if a prepare call reports that
    your signer is not authorized, contact tech@brickken.com. Once a
    `signerAddress` performs a `newTokenization` we refer to that address as the
    tokenizer. The tokenizer will be the only one allowed to mint such token,
    distribute dividends on such token and whitelist/blacklist investors of such
    token. Regarding actions like transferring tokens or burning tokens, the
    `signerAddress` can be any user and not only the
    tokenizer.</details><details><summary>**Supported Networks &
    Addresses**</summary><details><summary>Sepolia (sandbox environment
    only)</summary><pre><code>```
      Chain Id: "aa36a7"
      Factory Address: "0x933ABAA95a7Fd0Bc683bDe2adB89f4C5EA64897b"
      BKN Address: "0x2458fB1620ff84019d73216fF20aA1F82Bc8E4CC"
      USDT Address: "0x28d2B01854D0aBec267a3DDcad9163580E6E8604"
      USDC Address: "0xb10cE8e28aEb1ae27b968Fb3bfed2FD7dd52daCb"
    ```</code></pre></details><details><summary>Base Sepolia (sandbox /
    testing)</summary><pre><code>```
      Chain Id: "84532" (hex "14a34")
      x402 USDC (Circle, EIP-3009): "0x036CbD53842c5426634e7929541eC2318f3dCF7e"
      ERC-8004 Identity Registry: "0x8004A818BFB912233c491871b3d84c89A494BD9e"
      ERC-8004 Reputation Registry: "0x8004B663056A597Dffe9eCcC1965A193B7388713"
    ```</code></pre></details><details><summary>Ethereum mainnet (production
    environment only)</summary><pre><code>```
      Chain Id: "1"
      Factory Address: "0x91af681C85Ca98Efc5D69C1B62E6F435030969Db"
      BKN Address: "0x0A638F07ACc6969abF392bB009f216D22aDEa36d"
      USDT Address: "0xdac17f958d2ee523a2206206994597c13d831ec7"
      USDC Address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
    ```</code></pre></details><details><summary>Base mainnet (production
    environment only)</summary><pre><code>```
      Chain Id: "2105"
      Factory Address: "0x278D7bdc2451B0Fa4087A68ce084a86cB91D4d83"
      BKN Address: "0xddB293BB5C5258F7484A94a0fBd5c8B2F6E4e376"
      USDT Address: N/A
      USDC Address: "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
    ```</code></pre></details><details><summary>BNB Smart Chain mainnet
    (production environment only)</summary><pre><code>```
      Chain Id: "38"
      Factory Address: "0xCe4529Fe88df480BD777d3e32dfD7032e6C685ff"
      BKN Address: "0x0e28bC9B03971E95acF9ae1326E51ecF9C55B498"
      USDT Address: "0x55d398326f99059fF775485246999027B3197955"
      USDC Address: "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"
    ```</code></pre></details><details><summary>Avalance C Chain mainnet
    (production environment only)</summary><pre><code>```
      Chain Id: "a86a"
      Factory Address: "0xc6c230FA8F40022dE997727436Fae01caAbcDe61"
      BKN Address: "0xd44E4Dc8bdF7C1c62CfDBb182022097BA42Ac6bC"
      USDT Address: "0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7"
      USDC Address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"
    ```</code></pre></details></details><details><summary>**Usage
    Workflow**</summary><details><summary>1. **Prepare
    Transactions:**</summary>- Use the `POST /prepare-transactions` endpoint
    with the desired method (e.g., `newTokenization`, `mintToken`, etc...) to
    prepare the transaction(s).

    - The response will include an array of unsigned transactions that needs to
    be signed.<details><summary>**Example Of An Endpoint
    Response:**</summary>```json
      {
        "transactions": [
          {
            "from": "0xSignerAddress",
            "to": "0xTargetAddress",
            "value": "0x00",
            "nonce": 1,
            "chainId": 11155111,
            "data": "0x...",
            "type": 2,
            "maxPriorityFeePerGas": "1150000",
            "maxFeePerGas": "1156037",
            "gasLimit": "0xccef"
          }
        ]
      }
    ```</details></details><details><summary>2. **Sign the
    Transactions:**</summary>- Use your preferred method or wallet to sign the
    transaction data provided in the response.

    - Ensure that the signer address matches the `signerAddress` provided in the
    initial request.<details><summary>**Example Of signing a transaction with
    typescript and `ethers-js`:**</summary>```typescript
      const tx = {...} // One of the object in the array returned by the `/prepare-transactions` endpoint
      const privateKey = process.env.PRIVATE_KEY;
      const wallet = new ethers.Wallet(privateKey);
      const signedTx = await wallet.signTransaction(tx);
      console.log('Signed Transaction:', signedTx);
    ```</details>**NOTE:** Be sure to have enough funds in the signer wallet to
    cover for the transaction cost</details><details><summary>3. **Submit Signed
    Transactions:**</summary>- Use the `POST /send-transactions` endpoint to
    submit the signed transaction(s) along with the required parameters.

    - The API will process the transactions, send them to the blockchain, and
    update the Brickken database accordingly.</details><details><summary>4.
    **Check Transaction Status:**</summary>- Use the `GET
    /get-transaction-status` endpoint to check the status of your transaction.

    - Provide either the on-chain transaction hash (`hash`) or the internal
    transaction ID (`txId`) to retrieve the
    status.</details></details><details><summary>**Environments**</summary>The
    API is available in several environments for testing and production
    purposes:- Sandbox: `https://api.sandbox.brickken.com/`

    - Master (Production): `https://api.brickken.com/`</details>


    The API also exposes x402scan discovery facade endpoints under /x402/... The
    public discovery target is https://api.brickken.com, with /.well-known/x402
    returning resource URLs and /openapi.json returning the generated OpenAPI
    3.1 document.
  version: 2.0.0
servers:
  - url: https://api.sandbox.brickken.com
    description: Sandbox Environment
  - url: https://api.brickken.com
    description: Production Environment
security:
  - apiKeyAuth: []
paths:
  /create-kyc-link:
    post:
      tags:
        - KYC
      summary: Create a KYC link
      description: >-
        Creates or reuses an investor scoped to the API client, sends the
        invitation when needed, and returns a Sumsub verification URL when KYC
        is required. This endpoint always requires an API key.
      operationId: createKycLink
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - email
              properties:
                email:
                  type: string
                  format: email
                needKyc:
                  type: boolean
                  default: true
                walletAddress:
                  type: string
                  pattern: ^0x[a-fA-F0-9]{40}$
                  description: >-
                    Optional. Investor wallet address. It is attached to the
                    investor record when that record does not already have one.
                    A different stored address is rejected rather than replaced.
                tokenSymbol:
                  type: string
                  description: Optional. Tokenized asset the investor is scoped to.
            example:
              email: investor@example.com
              needKyc: true
              walletAddress: '0x1111111111111111111111111111111111111111'
      responses:
        '200':
          description: Investor access resolved and invitation state returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KycLinkResult'
        '400':
          description: Invalid email, invalid needKyc value, or unsupported user.
        '401':
          description: Missing or invalid API key.
        '403':
          description: The API key is not authorized to access an existing user.
      security:
        - apiKeyAuth: []
components:
  schemas:
    KycLinkResult:
      type: object
      additionalProperties: true
      required:
        - email
        - needKyc
        - userCreated
        - invitationSent
        - tokenSymbol
        - walletAddress
        - url
      properties:
        email:
          type: string
          format: email
        needKyc:
          type: boolean
        userCreated:
          type: boolean
        invitationSent:
          type: boolean
        tokenSymbol:
          type:
            - string
            - 'null'
          description: Tokenized asset the investor is scoped to, or null.
        walletAddress:
          type:
            - string
            - 'null'
          description: Investor wallet address on record, or null when none is set.
        url:
          type:
            - string
            - 'null'
          format: uri
          description: >-
            Sumsub verification URL. Null when KYC is not required. Treat this
            value as sensitive.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

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