---
title: "Search for emails"
method: GET
path: "/search/mds/v1/user/emails"
tags: ["Federated Search"]
---

# Search for emails

`GET /search/mds/v1/user/emails`

Search for backed-up emails using the email attachments’ SHA1 checksum value and view their details. 
While using this API, ensure the following: 
1. Make repeated API calls until the next page token is empty 
2. For each response, append the previous search results into the list until the next page token yields empty results
3. This list is the final search result across the entire dataset 

 Note :
 SaaS Apps such as SharePoint Online and Shared Drive are not supported

## Query parameters

- `attachmentSha1Checksum` string, required
- `minReceiveTime` string
- `maxReceiveTime` string
- `attachmentType` string[]
- `minAttachmentSize` integer
- `maxAttachmentSize` integer
- `dataSource` string[]
- `userID` integer[]
- `pageToken` string

## Response `200`

List of emails.

- object
  - `results` object[]
    - `deviceID` integer — The device ID of the device from which the email is backed up
    - `userID` integer — The user ID of the user to which the email belongs.
    - `storageID` integer — The storage ID of the storage associated with the user.
    - `attachments` object[] — The attachments of the email.
      - `attachmentName` string
      - `attachmentSize` integer
      - `attachmentSha1Checksum` string — The checksum (SHA1) value of the email attachment.
    - `recieveTime` string — The date on which the email was received (in UTC timezone).
    - `messagePath` string — The absolute path of the email on the user device.
    - `objectID` string — The unique identifier of the email to take further action based on the result.
  - `nextPageToken` string — The token to access the next page of results. This parameter will be empty for the last page of results.

## Other responses

- `400` — Bad Request
- `401` — The request did not include an authentication token or an expired authentication token was supplied.
- `403` — Unauthorized
- `404` — The requested resource was not found.
- `500` — Internal Server Error

---

[API](https://skmtc.net/druva/apis/authentication.md) · [All operations](https://skmtc.net/druva/apis/authentication/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/druva/authentication/revisions/2af2bf148b25/schema)
