---
title: "Publicv1Documentsrouter.Search Documents"
method: GET
path: "/v1/documents"
tags: ["v1"]
---

# Publicv1Documentsrouter.Search Documents

`GET /v1/documents`

## Request

- Base URL: `https://app.eve.legal` (the document declares no server; this is the origin it was published from)
- URL: `https://app.eve.legal/v1/documents`
- Auth: OAuth 2
  - Password
  - Token URL: `token`

Get documents by matter or external IDs.

## Query parameters

- `afterId` string, uuid, nullable: After id for paginated query
- `beforeId` string, uuid, nullable: Before id for paginated query
- `limit` integer: Number of items to return
- `sortOrder` 'Asc' | 'Desc'
- `sortBy` 'CREATED_AT' | 'LAST_UPDATED_AT'
- `externalMatterId` string, nullable: External ID of the matter. Either external_matter_id or external_lead_id can be provided for filtering (mutually exclusive, both optional)
- `externalLeadId` string, nullable: External ID of the lead. Either external_matter_id or external_lead_id can be provided for filtering (mutually exclusive, both optional)
- `externalDocumentIds` string[], nullable: List of external document IDs
- `statuses` DocumentStatus[], nullable: Status of the documents

## Response `200`

Successful Response

- SearchDocumentsResponse
  - `items` Document[], required: List of documents
    - `id` string, uuid, required: ID of the document
    - `externalId` string, required: External ID of the document
    - `fileName` string, required: Name of the document
    - `folderPath` string, nullable: Path to the folder containing the document
    - `displayName` string, nullable: Display name of the document
    - `createdAt` string, required: ISO timestamp of when the document was created
    - `updatedAt` string, required: ISO timestamp of when the document was last updated
    - `status` 'UPLOADING' | 'INDEXING' | 'READY' | 'FAILED_UPLOADING' | 'FAILED_INDEXING' | 'UNSUPPORTED', required: Tracks the status of a copilot document
    - `contentVersion` string, required: Version of the content of the document
    - `mimeType` string, required: MIME type of the document
    - `failedReason` string, nullable: Reason the document failed to upload
  - `hasNext` boolean, required: Whether there is a next page
  - `hasPrevious` boolean, required: Whether there is a previous page
  - `totalCount` integer, required: Total number of documents for search query

## Other responses

- `401`: Unauthorized
- `422`: Validation Error

---

[API](https://skmtc.dev/eve/apis/eve-public-api.md) - [All operations](https://skmtc.dev/eve/apis/eve-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/eve/apis/eve-public-api/revisions/1a108b551ef3?raw)
