---
title: "Publicv1Emailsrouter.Batch Sync Emails"
method: POST
path: "/v1/emails/batch-sync"
tags: ["v1"]
---

# Publicv1Emailsrouter.Batch Sync Emails

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

Batch sync multiple emails with the system for a matter. If the emails do not exist, they will be created.
If they exist, they will be updated, and a deleted email is restored.
Sync each attachment through the documents API first, then list it in externalDocumentIds.
A document links to one email: when two emails list the same document, the first email keeps it.
Maximum of 100 emails per request.

## Request body

- BatchSyncEmailRequest
  - `externalMatterId` string, required: External ID of the matter
  - `syncEmails` SyncEmailRequest[], required: List of sync email requests
    - `externalMessageId` string, required: Your ID of the email. Unique in the matter. Send the RFC 5322 Message-ID when you have one.
    - `threadId` string, nullable: Your ID of the thread of the email
    - `inReplyTo` string, nullable: externalMessageId of the email that this email replies to
    - `referenceIds` string[]: externalMessageId values of the earlier emails in the thread, oldest first
    - `direction` 'INBOUND' | 'OUTBOUND': Which way an email moved relative to the firm mailbox.
    - `fromAddress` string, required: Sender email address
    - `toAddresses` string[], required: Recipient email addresses. At least one.
    - `ccAddresses` string[]: CC email addresses
    - `bccAddresses` string[]: BCC email addresses. Only outbound emails have them.
    - `subject` string, nullable: Subject of the email
    - `body` string, required: Plain-text body of the email. Eve does not accept HTML.
    - `sentAt` string, date-time, required: ISO timestamp of when the email was sent. A time without an offset is UTC.
    - `externalDocumentIds` string[]: External IDs of the attachments. Sync each one through the documents API first.

## Response `200`

Successful Response

- BatchSyncEmailResponse
  - `emails` Email[], required: List of emails, in request order
    - `id` string, uuid, required: ID of the email
    - `externalMessageId` string, required: Your ID of the email. Unique in the matter.
    - `threadId` string, nullable, required: Your ID of the thread of the email
    - `inReplyTo` string, nullable, required: externalMessageId of the email that this email replies to
    - `referenceIds` string[], required: externalMessageId values of the earlier emails in the thread
    - `direction` 'INBOUND' | 'OUTBOUND', required: Which way an email moved relative to the firm mailbox.
    - `fromAddress` string, required: Sender email address
    - `toAddresses` string[], required: Recipient email addresses
    - `ccAddresses` string[], required: CC email addresses
    - `bccAddresses` string[], required: BCC email addresses
    - `subject` string, nullable, required: Subject of the email
    - `body` string, required: Plain-text body of the email
    - `sentAt` string, required: ISO timestamp of when the email was sent
    - `externalDocumentIds` string[], required: External IDs of the documents linked to the email. A document that another email already holds is not linked again, so it is not in this list.
    - `createdAt` string, required: ISO timestamp of when the email was created in Eve
    - `updatedAt` string, required: ISO timestamp of when the email was last updated in Eve

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