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

# Create Session

> Create a new verification session to begin the KYC process for an applicant.

## Request Body Parameters

<ParamField body="profile_id" type="string" required>
  UUID of the verification profile to use. Profiles define the steps, thresholds, and document types for the session.
</ParamField>

<ParamField body="applicant_email" type="string">
  Applicant's email address
</ParamField>

<ParamField body="applicant_name" type="string">
  Applicant's full name
</ParamField>

<ParamField body="external_id" type="string">
  Your internal reference ID for this session
</ParamField>

<ParamField body="redirect_url" type="string">
  URL to redirect the applicant after completing the hosted flow
</ParamField>

<ParamField body="expires_in" type="integer">
  Session expiration in seconds (min: 300, max: 86400, default: 3600)
</ParamField>

<ParamField body="metadata" type="object">
  Arbitrary key-value pairs attached to the session
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST \
    "https://verilock.io/api/v1/sessions" \
    -H "Authorization: Bearer qi_live_your_api_key_here" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{
    "profile_id": "01234567-89ab-cdef-0123-456789abcdef",
    "applicant_email": "jean.dupont@example.com",
    "applicant_name": "Jean Dupont",
    "external_id": "usr_12345",
    "redirect_url": "https://example.com/kyc/complete",
    "metadata": {
      "plan": "premium"
    }
  }'
  ```

  ```php PHP (Guzzle) theme={null}
  $client = new \GuzzleHttp\Client();
  $response = $client->post(
    'https://verilock.io/api/v1/sessions',
    [
      'headers' => [
        'Authorization' => 'Bearer qi_live_your_api_key_here',
        'Accept' => 'application/json',
      ],
      'json' => [
        'profile_id' => '01234567-89ab-cdef-0123-456789abcdef',
        'applicant_email' => 'jean.dupont@example.com',
        'applicant_name' => 'Jean Dupont',
        'external_id' => 'usr_12345',
        'redirect_url' => 'https://example.com/kyc/complete',
        'metadata' => ['plan' => 'premium'],
      ],
    ]
  );
  ```
</RequestExample>

<ResponseExample>
  ```json 201 Created theme={null}
  {
    "id": "ses_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "session_token": "tok_abc123def456...",
    "session_url": "https://verilock.io/verify/tok_abc123def456...",
    "status": "created",
    "expires_at": "2026-03-15T11:30:00Z"
  }
  ```
</ResponseExample>

<Info>
  Use `session_token` to initialize the Web, Flutter, or React Native SDK. Use `session_url` to redirect the user to the hosted verification flow.
</Info>
