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

# List documents

> Retrieve all knowledge documents indexed for your organization

Returns a list of all active knowledge base documents uploaded for the authenticated organization, including file formats, original filenames, and upload timestamps.

***

### Authentication

This endpoint requires Bearer token authentication.

```http theme={null}
Authorization: Bearer <token>
```

| Header          | Type     | Required | Description                                     | Format           |
| :-------------- | :------- | :------- | :---------------------------------------------- | :--------------- |
| `Authorization` | `string` | **Yes**  | Scoped organization API key or Bearer JWT token | `Bearer <token>` |

***

### Input parameters

<ParamField header="Authorization" type="string" required>
  Bearer token for authentication. Format: `Bearer <token>`.
</ParamField>

***

### Response Fields

<ResponseField name="documents" type="KnowledgeDocumentResponse[]">
  Array of knowledge document objects:

  <Expandable title="Document attributes">
    <ResponseField name="id" type="string">Document unique UUID.</ResponseField>
    <ResponseField name="organization_id" type="string">Owning organization UUID.</ResponseField>
    <ResponseField name="document_type" type="string">Format type (`pdf`, `docx`, `txt`).</ResponseField>
    <ResponseField name="file_name" type="string">Original uploaded file name.</ResponseField>
    <ResponseField name="uploaded_at" type="string">ISO 8601 upload timestamp.</ResponseField>
    <ResponseField name="updated_at" type="string">ISO 8601 update timestamp.</ResponseField>
  </Expandable>
</ResponseField>

***

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.sayvy.ai/api/v1/knowledge-base" \
    -H "Authorization: Bearer <token>"
  ```

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

  url = "https://api.sayvy.ai/api/v1/knowledge-base"

  headers = {
      "Authorization": "Bearer <token>"
  }

  response = requests.get(url, headers=headers)
  print(response.status_code)
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.sayvy.ai/api/v1/knowledge-base", {
    method: "GET",
    headers: {
      "Authorization": "Bearer <token>"
    }
  });

  const data = await response.json();
  console.log(data);
  ```

  ```java Java theme={null}
  HttpRequest request = HttpRequest.newBuilder()
      .uri(URI.create("https://api.sayvy.ai/api/v1/knowledge-base"))
      .header("Authorization", "Bearer <token>")
      .GET()
      .build();

  HttpResponse<String> response =
      HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
  System.out.println(response.body());
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "documents": [
      {
        "id": "c5d1e2f3-4a5b-6c7d-8e9f-0123456789ab",
        "organization_id": "93f35dc2-5d46-4e58-a9ee-038c35d9bcf1",
        "document_type": "pdf",
        "file_name": "product_manual.pdf",
        "uploaded_at": "2026-09-07T12:00:00Z",
        "updated_at": "2026-09-07T12:00:00Z"
      },
      {
        "id": "d6e2f3a4-5b6c-7d8e-9f01-123456789abc",
        "organization_id": "93f35dc2-5d46-4e58-a9ee-038c35d9bcf1",
        "document_type": "docx",
        "file_name": "faqs_and_pricing_2026.docx",
        "uploaded_at": "2026-09-07T12:15:00Z",
        "updated_at": "2026-09-07T12:15:00Z"
      }
    ]
  }
  ```

  ```json 401 Unauthorized theme={null}
  {
    "detail": "Unauthorized"
  }
  ```
</ResponseExample>

***

<div
  style={{
display: "flex",
alignItems: "center",
justifyContent: "space-between",
backgroundColor: "rgba(255, 255, 255, 0.03)",
border: "1px solid rgba(255, 255, 255, 0.08)",
borderRadius: "16px",
padding: "10px 18px",
marginTop: "40px",
gap: "16px",
flexWrap: "wrap"
}}
>
  <a
    href="/api-reference/knowledge-base/upload-document"
    style={{
display: "inline-flex",
alignItems: "center",
gap: "6px",
color: "#94A3B8",
textDecoration: "none",
fontSize: "14px",
fontWeight: "500",
padding: "4px 8px"
}}
  >
    <span style={{ fontSize: "16px" }}>‹</span> Previous
  </a>

  <div
    style={{
display: "flex",
alignItems: "center",
gap: "16px",
backgroundColor: "rgba(255, 255, 255, 0.04)",
border: "1px solid rgba(255, 255, 255, 0.06)",
borderRadius: "12px",
padding: "8px 16px",
marginLeft: "auto"
}}
  >
    <div style={{ textAlign: "right" }}>
      <div style={{ fontSize: "13px", fontWeight: "700", color: "#F8FAFC" }}>Download document</div>

      <div style={{ fontSize: "11px", color: "#94A3B8", maxWidth: "260px", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }}>
        GET /api/v1/knowledge-base/\{document\_id}/download
      </div>
    </div>

    <div style={{ width: "1px", height: "24px", backgroundColor: "rgba(255, 255, 255, 0.1)" }} />

    <a
      href="/api-reference/knowledge-base/download-document"
      style={{
  display: "inline-flex",
  alignItems: "center",
  gap: "6px",
  color: "#94A3B8",
  textDecoration: "none",
  fontSize: "14px",
  fontWeight: "500"
}}
    >
      Next <span style={{ fontSize: "16px" }}>›</span>
    </a>
  </div>
</div>
