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

# Register Session

> Create a new KYC or KYB verification session

Create a verification session for individual (KYC) or business (KYB) verification. Returns a session ID, redirect URL, and QR code.

<Warning>
  This endpoint requires your API key and **must** only be called from your backend server. Never expose your API key in frontend code.
</Warning>

<Tabs>
  <Tab title="Individual (KYC)">
    #### Request

    ```bash cURL theme={null}
    curl -X POST "https://api.identity.predicate.io/api/v1/register/individual?size=300" \
      -H "Authorization: Bearer $PREDICATE_KYC_API_KEY"
    ```

    #### Request (with wallet constraint)

    ```bash cURL theme={null}
    curl -X POST "https://api.identity.predicate.io/api/v1/register/individual?size=300" \
      -H "Authorization: Bearer $PREDICATE_KYC_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"walletAddress": "0x1234567890abcdef1234567890abcdef12345678"}'
    ```

    #### Response

    ```json theme={null}
    {
      "sessionId": "550e8400-e29b-41d4-a716-446655440000",
      "redirectUrl": "https://identity.predicate.io/session/550e8400-e29b-41d4-a716-446655440000",
      "qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSU..."
    }
    ```
  </Tab>

  <Tab title="Business (KYB)">
    #### Request

    ```bash cURL theme={null}
    curl -X POST "https://api.identity.predicate.io/api/v1/register/business?size=300" \
      -H "Authorization: Bearer $PREDICATE_KYC_API_KEY"
    ```

    #### Request (with wallet constraint)

    ```bash cURL theme={null}
    curl -X POST "https://api.identity.predicate.io/api/v1/register/business?size=300" \
      -H "Authorization: Bearer $PREDICATE_KYC_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"walletAddress": "0x1234567890abcdef1234567890abcdef12345678"}'
    ```

    #### Response

    ```json theme={null}
    {
      "sessionId": "550e8400-e29b-41d4-a716-446655440000",
      "redirectUrl": "https://identity.predicate.io/session/550e8400-e29b-41d4-a716-446655440000",
      "qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSU..."
    }
    ```
  </Tab>
</Tabs>

## Endpoints

| Type             | Endpoint                                                            |
| ---------------- | ------------------------------------------------------------------- |
| Individual (KYC) | `POST https://api.identity.predicate.io/api/v1/register/individual` |
| Business (KYB)   | `POST https://api.identity.predicate.io/api/v1/register/business`   |

## Query Parameters

<ParamField query="size" type="integer" default="300">
  QR code size in pixels. Must be between 80 and 2000.
</ParamField>

## Request Body (Optional)

<ParamField body="walletAddress" type="string">
  Wallet address that must be used for this session.
</ParamField>

<Note>
  **Wallet Constraint:** When you include `walletAddress` in the request:

  * The user can **only** connect and verify with that specific wallet address
  * If a session (`pending`, `retry`, or `completed`) already exists for that wallet with the same verification type, the existing session is returned (session reuse)
  * Sessions are only reused within the same check type (KYC sessions for `/register/individual`, KYB for `/register/business`)
  * Useful for pre-registering known wallet addresses or enforcing wallet constraints
</Note>

## HTTP Status Codes

| Status Code   | Description                                                                                |
| ------------- | ------------------------------------------------------------------------------------------ |
| `201 Created` | A new session was created                                                                  |
| `200 OK`      | An existing session was reused (when `walletAddress` matched an existing reusable session) |

## Response Fields

<ResponseField name="sessionId" type="string" required>
  Unique session identifier (UUID)
</ResponseField>

<ResponseField name="redirectUrl" type="string" required>
  URL where the user completes verification
</ResponseField>

<ResponseField name="qrCode" type="string" required>
  Base64-encoded PNG QR code with data URI prefix
</ResponseField>

## Authentication

```
Authorization: Bearer YOUR_API_KEY
```
