---
title: "Publicv1Documentsrouter.Batch Sync Documents"
method: POST
path: "/v1/documents/batch-sync"
tags: ["v1"]
---

# Publicv1Documentsrouter.Batch Sync Documents

`POST /v1/documents/batch-sync`

## 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/batch-sync`
- Auth: OAuth 2
  - Password
  - Token URL: `token`

Batch sync multiple documents with the system for a matter. If the documents don't exist, they will be created.
If they exist, they will be updated.
Does not delete documents, use the batch delete endpoint for that operation.
Maximum of 100 documents per request.

## Request body

- BatchSyncDocumentRequest
  - `externalMatterId` string, nullable: External ID of the matter. Exactly one of external_matter_id or external_lead_id must be provided (mutually exclusive)
  - `externalLeadId` string, nullable: External ID of the lead. Exactly one of external_matter_id or external_lead_id must be provided (mutually exclusive)
  - `syncDocuments` SyncDocumentRequest[], required: List of sync document requests
    - `externalId` string, required: External ID of the document
    - `fileName` string, required: Name of the document
    - `mimeType` string, required: MIME type of the document. Changing this requires content version to also be updated.
    - `displayName` string, nullable: Display name of the document
    - `folderPath` string, nullable: Path to the folder containing the document
    - `contentVersion` string, nullable: Version of the content of the document. If not set, defaults to 1. If changed from the current version, will invalidate the current content and require a re-upload.

## Response `200`

Successful Response

- BatchSyncDocumentResponse
  - `syncDocuments` SyncDocumentResponse[], required: List of sync document responses
    - `signedUploadUrl` string, nullable: Signed upload URL for the document, returned if document should be uploaded
    - `document` Document, required
      - `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

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