> For the complete documentation index, see [llms.txt](https://developer.mediarithmics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.mediarithmics.io/data-ingestion/bulk-processing/deletions/identifiers.md).

# User identifiers deletion

This document import allows you to mark [user identifiers](/user-points.md#user-identifiers) for deletion. Each line in the document represents a different object to remove from the platform.&#x20;

{% hint style="info" %}
This is only supported for datamarts using a UserPoint system version of `v201901` or later.&#x20;

**It only deletes the user identifier but not the associated UserPoint.**
{% endhint %}

## How-to

1. Use the [bulk import ](/data-ingestion/bulk-processing.md)endpoints to create a [document import](/data-ingestion/bulk-processing.md#document-import) with the`USER_IDENTIFIERS_DELETION`document type and `APPLICATION_X_NDJSON` mime type. Only `ndjson` data is supported for user activities.
2. Create an[ execution ](/data-ingestion/bulk-processing.md#create-an-execution)with your commands formatted in `ndjson`. Each command can either be a user account deletion, a user email deletion or a user agent deletion.

### Example

```bash
# Create the document import
curl -X POST \
  https://api.mediarithmics.com/v1/datamarts/<DATAMART_ID>/document_imports \
  -H 'Authorization: <YOUR_API_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{
	"document_type": "USER_IDENTIFIERS_DELETION",
	"mime_type": "APPLICATION_X_NDJSON",
	"encoding": "utf-8",
	"name": "<YOUR_DOCUMENT_IMPORT_NAME>"
}'
```

```bash
# Create the execution
curl -X POST \
  https://api.mediarithmics.com/v1/datamarts/1162/document_imports/<DOCUMENT_IMPORT_ID>/executions \
  -H 'Authorization: <API_TOKEN>' \
  -H 'Content-Type: application/x-ndjson' \
  -d '
    {
      "type": "USER_ACCOUNT",
      "compartment_id": "1000",
      "user_account_id": "8541254132"
    }
    {
      "type": "USER_EMAIL",
      "hash": "982f50d88d437d13bdbd541edfv4fe5176cc8d862f8cbe7ca4f0dc8ea"
    }
    { "type": "USER_AGENT", "user_agent_id": "vec:89998434" }
  '
```

{% hint style="success" %}
You can, of course, remove different identifier types at the same time. Please note that the uploaded data is in `ndjson` and not `json`. That means the different deletions are not separated by commas, but by a line separator `\n`
{% endhint %}

## User Account deletion command

| field             | type              | description                                             |
| ----------------- | ----------------- | ------------------------------------------------------- |
| type              | String            | USER\_ACCOUNT                                           |
| user\_account\_id | String            | The User Account Id.                                    |
| compartment\_id   | Number (Optional) | The Compartment Id associated with the User Account Id. |

### **Example:**&#x20;

```javascript
{
  "type": "USER_ACCOUNT",
  "compartment_id": "1000",
  "user_account_id": "8541254132"
}
```

## User Email deletion command

| field | type   | description                |
| ----- | ------ | -------------------------- |
| type  | String | USER\_EMAIL                |
| hash  | String | Hash of the Email address. |

### &#x20;Example:

```javascript
{
  "type": "USER_EMAIL",
  "hash": "982f50d88d437d13bdbd541edfv4fe5176cc8d862f8cbe7ca4f0dc8ea"
}
```

## User Agent deletion command

| field           | type   | description                                                                                                                                                                          |
| --------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| type            | String | USER\_AGENT                                                                                                                                                                          |
| user\_agent\_id | String | A [user agent id](https://developer.mediarithmics.io/user-points/user-identifiers/device-identifiers#user_agent_id) other than a device point id. Ex: "vec:123456" or "net:9:12345". |

{% hint style="warning" %}
User device point ids ("udp:123456") are not supported by this document import job and will cause the job to be rejected.

Use the [Device points deletion](/data-ingestion/bulk-processing/deletions/device-points-deletion.md)job type if you want to delete device points along with all their associated technical ids.
{% endhint %}

\
Example:

```javascript
{ "type": "USER_AGENT", "user_agent_id": "vec:89998434" }
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.mediarithmics.io/data-ingestion/bulk-processing/deletions/identifiers.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
