---
title: "Publicv1Emailsrouter.Search Emails"
method: GET
path: "/v1/emails"
tags: ["v1"]
---

# Publicv1Emailsrouter.Search Emails

`GET /v1/emails`

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

Get the emails of a matter, optionally filtered by externalMessageIds or threadId.

## 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` 'SENT_AT' | 'CREATED_AT' | 'LAST_UPDATED_AT'
- `externalMatterId` string, required: External ID of the matter
- `externalMessageIds` string[], nullable: List of externalMessageId values
- `threadId` string, nullable: Your ID of the thread

## Response `200`

Successful Response

- SearchEmailsResponse
  - `items` Email[], required: List of emails
    - `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
  - `hasNext` boolean, required: Whether there is a next page
  - `hasPrevious` boolean, required: Whether there is a previous page
  - `totalCount` integer, required: Total number of emails 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)
