---
title: "Create Data Element"
method: POST
path: "/api/inventory/v2/data-elements"
tags: ["Personal Data"]
---

# Create Data Element

`POST /api/inventory/v2/data-elements`

## Request

- Base URL: `https://hostname`
- URL: `https://hostname/api/inventory/v2/data-elements`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://{hostname}/api/access/v1/oauth/token` scopes: `INVENTORY`, `INVENTORY_WRITE`

Use this API to create new Data Elements in Data Mapping Automation module.

## Query parameters

- `generator` string

## Request body

- DataElementCreateRequest
  - `value` string, required: Name of the personal data entity
  - `description` string: Description of the personal data entity
  - `status` 'Active' | 'Inactive' | 'Draft': Status of the personal data entity
  - `termId` string, uuid: ID of the associated term
  - `tagId` string, uuid: ID of the associated tag
  - `categories` ObjectReference[], required: List of data categories to associate with the data element
    - `id` string, uuid
    - `value` string
    - `valueKey` string
  - `classifications` ObjectReference[]: List of data classifications to associate with the data element
    - `id` string, uuid
    - `value` string
    - `valueKey` string
  - `subjects` ObjectReference[]: List of data subjects to associate with the data element
    - `id` string, uuid
    - `value` string
    - `valueKey` string
  - `assignToAllSubjects` boolean: Flag indicating whether to assign the data element to all subjects

## Response `201`

Created

- DataElementDetailedResponse
  - `id` string, uuid, required: Unique identifier of the entity
  - `name` string, required: Name of the entity
  - `nameKey` string, required: Translation key for the entity name
  - `description` string: Description of the entity
  - `descriptionKey` string: Translation key for the entity description
  - `source` 'SYSTEM' | 'USER' | 'IMPORTED': Source of the data element
  - `status` 'Active' | 'Inactive' | 'Draft': Status of the data element
  - `dataSubjectTypes` BasePersonalDataResponse[]: List of data subject types associated with this data element
    - `id` string, uuid, required: Unique identifier of the entity
    - `name` string, required: Name of the entity
    - `nameKey` string, required: Translation key for the entity name
    - `description` string: Description of the entity
    - `descriptionKey` string: Translation key for the entity description
  - `categories` DataCategoryResponse[], required: List of data categories associated with this data element
    - `id` string, uuid, required: Unique identifier of the entity
    - `name` string, required: Name of the entity
    - `nameKey` string, required: Translation key for the entity name
    - `description` string: Description of the entity
    - `descriptionKey` string: Translation key for the entity description
    - `source` 'SYSTEM' | 'USER' | 'IMPORTED': Source of the data category
  - `classifications` DataClassificationResponse[]: List of data classifications associated with this data element
    - `id` string, uuid, required: Unique identifier of the entity
    - `name` string, required: Name of the entity
    - `nameKey` string, required: Translation key for the entity name
    - `description` string: Description of the entity
    - `descriptionKey` string: Translation key for the entity description
    - `source` 'SYSTEM' | 'USER' | 'IMPORTED': Source of the data classification
  - `visible` boolean

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `429`: Too Many Requests. For more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).
- `500`: Internal Server Error

---

[API](https://skmtc.dev/onetrust/apis/privacy-automation-data-mapping-automation.md) - [All operations](https://skmtc.dev/onetrust/apis/privacy-automation-data-mapping-automation/llms.txt) - [OpenAPI document](https://skmtc.dev/onetrust/apis/privacy-automation-data-mapping-automation/revisions/daead5d9fad6?raw)
