> ## 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.

> [tab] 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] 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..."
> }
> ```

## 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

**size** `integer` (default: 300)

QR code size in pixels. Must be between 80 and 2000.

## Request Body (Optional)

**walletAddress** `string`

Wallet address that must be used for this session.

**originUrl** `string`

Absolute `https://` URL the user can return to after the verification flow (including while a manual review is pending).

> [!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]
>
> **Origin URL:** When you include `originUrl` in the request:
>
> * The verification screens show the user a button back to that destination once they finish (and while a manual review is pending, with a note that they are not yet authorized)
> * It must be an absolute `https://` URL
> * It is named `originUrl`, distinct from the response `redirectUrl` (the hosted verification link), so the value you send in is not confused with the value you get back
> * A value sent on a reused session updates the stored one

## 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

**sessionId** `string` *required*

Unique session identifier (UUID)

**redirectUrl** `string` *required*

URL where the user completes verification

**qrCode** `string` *required*

Base64-encoded PNG QR code with data URI prefix

## Authentication

```
Authorization: Bearer YOUR_API_KEY
```
