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

# Upload Document

> Upload an identity document (front and optionally back) for verification.

<Note>
  **Multipart form data** -- This endpoint accepts `multipart/form-data`, not JSON. Send files using form fields.
</Note>

## Path Parameters

<ParamField path="id" type="string" required>
  The session ID
</ParamField>

## Form Parameters

<ParamField body="front" type="file" required>
  Front side of the identity document (JPEG, PNG, PDF; max 10 MB)
</ParamField>

<ParamField body="back" type="file">
  Back side of the identity document (required for ID cards and driving licenses)
</ParamField>

<ParamField body="type" type="string" required>
  Document type: `passport`, `id_card`, `driving_license`, `residence_permit`
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST \
    "https://verilock.io/api/v1/sessions/ses_a1b2c3d4-e5f6-7890-abcd-ef1234567890/documents" \
    -H "Authorization: Bearer qi_live_your_api_key_here" \
    -H "Accept: application/json" \
    -F "front=@/path/to/passport_front.jpg" \
    -F "back=@/path/to/passport_back.jpg" \
    -F "type=passport"
  ```

  ```php PHP (Guzzle) theme={null}
  $client = new \GuzzleHttp\Client();
  $response = $client->post(
    'https://verilock.io/api/v1/sessions/ses_a1b2c3d4-.../documents',
    [
      'headers' => [
        'Authorization' => 'Bearer qi_live_your_api_key_here',
        'Accept' => 'application/json',
      ],
      'multipart' => [
        [
          'name' => 'front',
          'contents' => fopen('/path/to/front.jpg', 'r'),
        ],
        [
          'name' => 'back',
          'contents' => fopen('/path/to/back.jpg', 'r'),
        ],
        [
          'name' => 'type',
          'contents' => 'passport',
        ],
      ],
    ]
  );
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "id": "doc_c3d4e5f6-a7b8-9012-cdef-345678901234",
    "session_id": "ses_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "type": "passport",
    "status": "uploaded",
    "files": {
      "front": "passport_front.jpg",
      "back": "passport_back.jpg"
    },
    "created_at": "2026-03-15T10:35:12Z"
  }
  ```
</ResponseExample>
