> ## Documentation Index
> Fetch the complete documentation index at: https://developer.onetrust.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Data Subjects

Use this API to delete data subjects. Deleting data subjects is a permanent action that should be exercised with caution.

> 🗒 Things to Know
> 
> - Data subjects can be deleted using any of the following values at a time:
>      - List of Identifiers
>      - List of Data Subject Identifier GUIDs
>      - Date range between `fromCreatedDate` and `toCreatedDate` (the timespan must be 24 hours or less).
>      - Date range between `fromInteractionDate` and `toInteractionDate` (the timespan must be 24 hours or less).
> - When filtering by date range, created date and interaction date should be used separately. They should not be used at the same time.
> - Up to 999 data subject identifiers can be deleted per API call.
> - If a new data subject has to be deleted, it is recommended to wait at least 24 hours after its creation to ensure that all the data has been properly stored and synchronized before removal.
> - Requests will be processed asynchronously and can be monitored in the View Activity option in the Data Subject list view within the OneTrust Platform. If multiple calls are required, wait until each request processes before making another call.
> - By default, related data subject receipts and transactions will be removed from the database and will no longer appear in the OneTrust Platform UI after calling this API. However, the receipts and transactions can still be retrieved using the [Get List of Receipts API](https://developer.onetrust.com/onetrust/reference/getreceiptlistdetailsusingpost). To maintain data subject receipts and transactions in the database and OneTrust Platform UI, set the `retainReceiptsTransactions` parameter to `true`.

> 👍 
> 
> The **Enable Data Subject Deletion** setting must be enabled within Global Settings in the OneTrust application in order to use this API. For more information, see [Deleting Data Subject Records](https://my.onetrust.com/s/article/UUID-73ac74f6-edc7-3344-e86e-e810660154e9?topicId=0TO1Q000000ItSSWA0).

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Consent & Preferences - Universal Consent & Preference Management (OAS)",
    "version": "1.0",
    "contact": {
      "name": "OneTrust Support",
      "url": "https://my.onetrust.com/s/contactsupport"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "description": "The Universal Consent & Preference Management APIs are used to integrate external systems and streamline the flow of data with Universal Consent & Preference Management in the OneTrust Platform."
  },
  "servers": [
    {
      "url": "https://{hostname}",
      "variables": {
        "hostname": {
          "default": "hostname",
          "description": "The OneTrust hostname such as app.onetrust.com, app-eu.onetrust.com, app-de.onetrust.com, app-uk.onetrust.com, app-apac.onetrust.com, trial.onetrust.com, or uat.onetrust.com."
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Data Subjects V2",
      "description": "The Data Subjects V2 APIs are used to manage data subjects using version 2 of the API.",
      "externalDocs": {
        "description": "OpenAPI 3.1.0 - Download Definition",
        "url": "https://developer.onetrust.com/onetrust/openapi/consent-preferences-universal-consent-preference-management-oas.json"
      },
      "x-displayName": "Data Subjects V2"
    }
  ],
  "paths": {
    "/api/consent/v2/datasubjects": {
      "delete": {
        "operationId": "DeleteDataSubjectProfileUsingDELETE",
        "summary": "Delete Data Subjects",
        "description": "Use this API to delete data subjects. Deleting data subjects is a permanent action that should be exercised with caution.\n\n> 🗒 Things to Know\n> \n> - Data subjects can be deleted using any of the following values at a time:\n>      - List of Identifiers\n>      - List of Data Subject Identifier GUIDs\n>      - Date range between `fromCreatedDate` and `toCreatedDate` (the timespan must be 24 hours or less).\n>      - Date range between `fromInteractionDate` and `toInteractionDate` (the timespan must be 24 hours or less).\n> - When filtering by date range, created date and interaction date should be used separately. They should not be used at the same time.\n> - Up to 999 data subject identifiers can be deleted per API call.\n> - If a new data subject has to be deleted, it is recommended to wait at least 24 hours after its creation to ensure that all the data has been properly stored and synchronized before removal.\n> - Requests will be processed asynchronously and can be monitored in the View Activity option in the Data Subject list view within the OneTrust Platform. If multiple calls are required, wait until each request processes before making another call.\n> - By default, related data subject receipts and transactions will be removed from the database and will no longer appear in the OneTrust Platform UI after calling this API. However, the receipts and transactions can still be retrieved using the [Get List of Receipts API](https://developer.onetrust.com/onetrust/reference/getreceiptlistdetailsusingpost). To maintain data subject receipts and transactions in the database and OneTrust Platform UI, set the `retainReceiptsTransactions` parameter to `true`.\n\n> 👍 \n> \n> The **Enable Data Subject Deletion** setting must be enabled within Global Settings in the OneTrust application in order to use this API. For more information, see [Deleting Data Subject Records](https://my.onetrust.com/s/article/UUID-73ac74f6-edc7-3344-e86e-e810660154e9?topicId=0TO1Q000000ItSSWA0).",
        "tags": [
          "Data Subjects V2"
        ],
        "x-onetrust": {
          "spec-label": "https://developer.onetrust.com/onetrust/openapi/consent-preferences-universal-consent-preference-management-oas.json"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsentAPI_DataSubjectDeleteRequestV2"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Data Subjects deletion request processed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "example": "Deletion Request has been accepted"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests. \nFor more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).",
            "headers": {
              "Retry-After": {
                "schema": {
                  "description": "The number of seconds after which requests will be allowed again.",
                  "format": "int32"
                }
              },
              "ot-period": {
                "schema": {
                  "description": "The unit of time for which the rate limit applies",
                  "enum": [
                    "HOUR",
                    "MINUTE"
                  ]
                }
              },
              "ot-ratelimit-event-id": {
                "schema": {
                  "description": "The unique identifier for the rate-limiting event.",
                  "format": "uuid"
                }
              },
              "ot-request-made": {
                "schema": {
                  "description": "The number of requests made within the specified period.",
                  "format": "int32"
                }
              },
              "ot-requests-allowed": {
                "schema": {
                  "description": "The number of requests allowed within the specified period.",
                  "format": "int32"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "ConsentAPI_OAUTH2": [
              "CONSENT"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ConsentAPI_DataSubjectDeleteRequestV2": {
        "type": "object",
        "properties": {
          "identifiers": {
            "description": "The list of data subject identifiers for the data subjects.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": "user1@otprivacy.com"
          },
          "dataSubjectGuids": {
            "description": "The list of GUIDS for the data subject identifiers.",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "example": "550e8400-e29b-41d4-a716-446655440000"
          },
          "fromCreatedDate": {
            "description": "The start of a date and time range for the data subject creation date.",
            "type": "string",
            "format": "date-time",
            "example": "2022-02-01T12:33:40.000"
          },
          "toCreatedDate": {
            "description": "The end of a date and time range for the data subject creation date.",
            "type": "string",
            "format": "date-time",
            "example": "2022-02-01T10:04:59.000"
          },
          "fromInteractionDate": {
            "description": "The start of a date and time range for the data subject interaction date.",
            "type": "string",
            "format": "date-time",
            "example": "2022-02-01T08:10:11.000"
          },
          "toInteractionDate": {
            "description": "The end of a date and time range for the data subject interaction date.",
            "type": "string",
            "format": "date-time",
            "example": "2022-02-02T08:10:11.000"
          },
          "retainReceiptsTransactions": {
            "description": "This flag indicates whether receipts and transactions will be retained while deleting data subjects. When set to `false`, receipts and transactions are removed from the database and no longer appear in the OneTrust Platform UI. However, these receipts and transactions are not permanently deleted and can still be retrieved using the [Get List of Receipts API](https://developer.onetrust.com/onetrust/reference/getreceiptlistdetailsusingpost).",
            "type": "boolean",
            "example": false
          },
          "removePIInfo": {
            "description": "This flag indicates whether to remove PII data element values from receipts and transactions. This parameter must be used in conjunction with the `retainReceiptsTransactions` parameter.",
            "type": "boolean",
            "example": false
          }
        }
      }
    },
    "securitySchemes": {
      "ConsentAPI_OAUTH2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://{hostname}/api/access/v1/oauth/token",
            "scopes": {
              "CONSENT": "Consent Scope gives the user access to read/write operations",
              "CONSENT_READ": "Consent Read Scope gives the user read-only access"
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false,
    "proxy-enabled": false,
    "metrics-enabled": false
  },
  "x-onetrust": {
    "spec-label": "OpenAPI 3.1.0"
  }
}
```