---
title: "Create device mapping"
method: POST
path: "/endpoints/v1/devicemappings"
tags: ["Endpoints"]
---

# Create device mapping

`POST /endpoints/v1/devicemappings`

Creates a secure user-to-device mapping to perform a mass deployment in a non-AD/LDAP environment or perform bulk replace of devices. The user-to-device mapping ensures controlled device and user activation of inSync client and prevents addition of rogue or unauthorized devices to inSync.

## Request body

- object — Device Mapping
  - `emailID` string, required — Specify the email address of the user. Example - ernie.carter@druva.com
  - `userName` string, required — Specify the username of the user in Druva inSync. Example - Ernie Carter
  - `deviceName` string, required — Specify the name of the device that is registered with the user. Example - Ernie Carter's Macbook
  - `deviceIdentifierType` 'serial-number' | 'uuid' | 'hostname', required — Specify the unique device identifier type of the device.(serial-number, uuid, or hostname)
  - `deviceIdentifier` string, required — Specify the unique device identifier for the selected type. (serial-number, uuid, or hostname).
  - `oldDeviceName` string — Name of the user's old device in Druva inSync that is to be replaced with a new device. :fa-info-circle: Note: Specify the value for this parameter only if you want to replace the device for the user, else keep this field blank.
  - `restoreData` 'ALL' | 'DATA' | 'SYSTEM' — The type of data restore to be performed.(ALL, SYSTEM, OR DATA) Type of data to be restored on the new device.Specify one of the following value: 1) All - To restore both, the data and the system settings from the existing device on the new device. 2) SYSTEM - To restore only the system settings from the existing device on the new device. 3)DATA - To restore only the data from the existing device on the new device. :fa-info-circle: Note: Specify the value for this parameter only if you want to replace the device for the user, else keep this field blank.

## Response `200`

OK

- DeviceMappingCreate
  - `mappingID` string — The id of the device mapping in inSync. Example - 3452rw6
  - `emailID` string — The email address of the user. Example - ernie.carter@druva.com
  - `userName` string — The username of the user in inSync. Example - Ernie Carter
  - `deviceName` string — The device name linked to the user in inSync.
  - `deviceIdentifierType` string — The unique id type of the device in inSync. Example - Serial Number
  - `deviceIdentifier` string — The unique id of the device in inSync. Example - Po3XF
  - `oldDeviceName` string — The old device name linked to the user in inSync. Example - Ernie Carter's Old Macbook
  - `restoreData` string — The type of data restore performed on the new device. Example - SYSTEM

## Other responses

- `400` — Bad Request
- `401` — The request did not include an authentication token or an expired authentication token was supplied.
- `404` — The requested resource was not found.
- `422` — The request was well-formed but was not processed due to semantic errors.
- `500` — The request was not processed due to an internal error in inSync GovCloud.
- `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)
