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

# Get Lead Documents

> Fetch all documents associated with a specific lead

This endpoint fetches all documents associated with a specific lead.

## Path Parameters

<ParamField path="leadId" type="string" required>
  The unique identifier of the lead
</ParamField>

## Response

<ResponseField name="documents" type="array">
  Array of document objects

  <Expandable title="documents">
    <ResponseField name="id" type="string">
      Unique identifier for the document
    </ResponseField>

    <ResponseField name="filename" type="string">
      Original filename of the document
    </ResponseField>

    <ResponseField name="mimeType" type="string">
      MIME type of the document (e.g., "application/pdf", "image/jpeg")
    </ResponseField>

    <ResponseField name="size" type="number">
      File size in bytes
    </ResponseField>

    <ResponseField name="signedUrl" type="string">
      Pre-signed URL for accessing the document (expires after 1 hour)
    </ResponseField>

    <ResponseField name="metadata" type="object">
      Document metadata including processing status

      <Expandable title="metadata">
        <ResponseField name="extractionStatus" type="string">
          Status of the extraction (e.g., "completed")
        </ResponseField>

        <ResponseField name="Matched checklist items" type="array">
          Array of checklist items this document is matched to

          <Expandable title="Matched checklist items">
            <ResponseField name="leadChecklistItemId" type="string">
              ID of the matched checklist item
            </ResponseField>

            <ResponseField name="label" type="string">
              Label of the matched checklist item
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="leadChecklistItemDocument" type="array">
      Array of checklist item document associations with validation results

      <Expandable title="leadChecklistItemDocument">
        <ResponseField name="id" type="string">
          Unique identifier for the checklist item document association
        </ResponseField>

        <ResponseField name="leadChecklistItemId" type="string">
          ID of the checklist item this document is associated with
        </ResponseField>

        <ResponseField name="documentId" type="string">
          ID of the document
        </ResponseField>

        <ResponseField name="overallValid" type="boolean">
          Whether the document passed overall validation
        </ResponseField>

        <ResponseField name="validationResult" type="object" nullable>
          Detailed validation result for the document

          <Expandable title="validationResult">
            <ResponseField name="otherNotes" type="string">
              Additional notes about the validation
            </ResponseField>

            <ResponseField name="overallValid" type="boolean">
              Whether the document passed overall validation
            </ResponseField>

            <ResponseField name="validationResults" type="array">
              Array of individual validation rule results

              <Expandable title="validationResults">
                <ResponseField name="isValid" type="boolean">
                  Whether this validation rule passed
                </ResponseField>

                <ResponseField name="ruleName" type="string">
                  Name of the validation rule
                </ResponseField>

                <ResponseField name="isValidReason" type="string">
                  Reason explaining why the rule passed or failed
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<Note>
  Signed URLs expire after 1 hour. Use [Get Document API
  ](/api-reference/documents/get-document) to get a fresh signed URL.
</Note>

<RequestExample>
  ```javascript Node.js theme={null}
  const leadId = '4ef30123-90c2-4dc0-bd28-b43eee8664ea';
  const options = {
    method: 'GET',
    headers: {
      'x-api-key': '<your-api-key>',
    },
  };

  fetch(`https://api-v2.getomni.ai/api/v1/leads/${leadId}/documents`, options)
    .then((response) => response.json())
    .then((response) => console.log(response))
    .catch((err) => console.error(err));
  ```

  ```python Python theme={null}
  import requests

  lead_id = '4ef30123-90c2-4dc0-bd28-b43eee8664ea'
  url = f"https://api-v2.getomni.ai/api/v1/leads/{lead_id}/documents"
  headers = {
      "x-api-key": "<your-api-key>"
  }

  response = requests.request("GET", url, headers=headers)
  print(response.json())
  ```

  ```bash cURL theme={null}
  curl --request GET \
    --url https://api-v2.getomni.ai/api/v1/leads/4ef30123-90c2-4dc0-bd28-b43eee8664ea/documents \
    --header 'x-api-key: <your-api-key>'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  [
    {
      "id": "4fa0d0de-6958-4d1f-9468-ebb8629eae8c",
      "filename": "vital-checking-june-25.pdf",
      "mimeType": "application/pdf",
      "size": 153143,
      "metadata": {
        "extractionStatus": "completed",
        "Matched checklist items": [
          {
            "leadChecklistItemId": "fb6c17f3-4d7e-4979-a262-9c287ae0e6dd",
            "label": "Bank Statements"
          }
        ]
      },
      "signedUrl": "https://omniai-server-v2-prod.s3.us-east-2.amazonaws.com/...",
      "leadChecklistItemDocument": [
        {
          "id": "0e66ab12-af87-4dbc-956a-2063b4ecb552",
          "leadChecklistItemId": "fb6c17f3-4d7e-4979-a262-9c287ae0e6dd",
          "documentId": "4fa0d0de-6958-4d1f-9468-ebb8629eae8c",
          "overallValid": true,
          "validationResult": {
            "otherNotes": "",
            "overallValid": true,
            "validationResults": [
              {
                "isValid": true,
                "ruleName": "Files must be business bank statements",
                "isValidReason": "The document is a business bank statement..."
              }
            ]
          }
        }
      ]
    }
  ]
  ```
</ResponseExample>
