---
title: "Restore a OneDrive Account or Exchange Online Mailbox"
method: POST
path: "/insync/cloudapp/v1/restores"
tags: ["Restore OneDrive/Exchange Online data"]
---

# Restore a OneDrive Account or Exchange Online Mailbox

`POST /insync/cloudapp/v1/restores`

Performs a restore of a OneDrive account or an Exchange Online mailbox to a new or existing account.

## Request body

- object
  - `retainShareSettings` boolean — Specify the flag indicating whether the sharing settings of the restored items should be retained during the restore operation. - Set it to `true` to apply the original sharing settings or - `false` to apply the default sharing settings to the restored items.
  - `inplaceRestoreDeletedOnly` boolean — Specify the flag indicating whether the in-place restore operation should restore deleted items. - Set it to `true` to restore deleted items or - `false` to exclude deleted items.
  - `sources` string[] — Specify the paths of files or folders that you want to restore. ⓘ Note: The length of the sources array should match the length of the source_types array. The format for each path or file is as follows:`/backup_date/folder_or_library_name/file_or_folder_name`
  - `destination` string — Specify the destination where you want to restore the data. ⓘ Note: This field is required for Exchange Online device restore operations.
  - `storage` integer — Specify the storage flag to identify if the provided storageId refers to a primary or secondary storage. Set the storage flag to 0 for primary storage and 1 for secondary storage.
  - `sourceTypes` integer[] — Specify the types of sources (files or folders) to be restored. Set it to `32768` for files or `16384` for folders. ⓘ Note: The length of the sourceTypes array should match the length of the sources array.
  - `storageId` integer — Specify the ID of the storage assigned. Get the ID of storage using the `List all storages API`. Refer This API returns the list of all storage that the customer is using. The list will provide the ID - Storage name mapping for each region that the customer is using.
  - `restoreOption` string — Specify the type of restore operation. - Set it to `inplacerestore` to restore data to the original location from which the backup was taken or - Set it to `restorecopy` to restore to a new or different location.
  - `isCloudapp` boolean — Specify the flag indicating whether the restore operation is for a cloud application. - Set it to `true` for cloud applications or - `false` for non-cloud applications such as on-premises systems, local servers, or other non-cloud environments.
  - `includeExchangeInplaceArchive` boolean — Specify the flag indicating whether the restore operation should include the Exchange In-Place Archive. - Set it to `true` to restore operation and include the Exchange In-Place Archive data. Any archived emails or data stored in the user's In-Place Archive will be restored along with the primary mailbox data. - Set it to `false` for the restore operation to exclude the Exchange In-Place Archive data and only restore the data from the primary mailbox.
  - `selectiveRestore` boolean — Specify the flag indicating whether the restore operation should be a selective restore or a full restore. - Set to `true` for a selective restore or - `false` to indicate that the restore operation will be a full restore, where the entire backup set or data source will be restored.
  - `fromDeviceId` integer — Specify the source device ID from which the data needs to be restored.
  - `deviceId` integer — Specify the destination device ID to which the data should be restored.
  - `appType` string — Specify the application for which the restore operation is being performed. - Set to `O365 OneDrive` to Indicate that the restore operation is for Microsoft Office 365 OneDrive or - Set to `O365 Exchange Online` if the restore operation is for Microsoft Office 365 Exchange Online.
  - `version` integer — Specify the version number or identifier for the Exchange Online device restore operation. ⓘ Note: This field is required only for Exchange Online device restore operations.
  - `pathDetails` string[] — Specify the path or locations of the data to be restored in an Exchange Online device restore operation. Example: the pathDetails array contains three strings: `inSync-Mails-root` Represents the path or location of the mailbox or mail data to be restored. ⓘ Note: This field is required only for Exchange Online device restore operations.

## Response `200`

success

- 200TriggerRestoreResp
  - `status` string

## Other responses

- `400` — Bad Request
- `401` — The request did not include an authentication token or an expired authentication token was supplied.
- `403` — Access denied: Insufficient permissions. User requires specific access rights and minimum permissions. Details: https://help.druva.com/en/articles/15069296
- `404` — The requested resource was not found.
- `500` — The request was not processed due to an internal error on server.
- `501` — Requested HTTP method is not implemented.

---

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