# Exercise of user rights

Users have the right to access their data and erase it. All of these operations can be manually, or be automatized with your centralized systems via API.

## Retrieve all data related to a user

You can retrieve all data related to a UserPoint via the Navigator Interface (see [Monitoring](https://userguides.mediarithmics.io/audience/monitoring)), or via the different UserPoint APIs (see the pages of [section "UserPoint"](https://developer.mediarithmics.io/user-points))

## Delete all data related to a user

In order to delete a UserPoint and all documents related (User identifiers, UserActivity, UserProfile, etc.), you can use one of the following APIs (depending on the identifier you are using):

### Via a UserPoint identifier

## Delete a UserPoint by id

<mark style="color:red;">`DELETE`</mark> `https://api.mediarithmics.com/v1/datamarts/:datamartId/user_points/:userPointId`

#### Path Parameters

| Name        | Type    | Description                       |
| ----------- | ------- | --------------------------------- |
| datamartId  | integer | The ID of the datamart            |
| userPointId | integer | The ID of the UserPoint to delete |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

### Via an email hash

## Delete a UserPoint by email hash

<mark style="color:red;">`DELETE`</mark> `https://api.mediarithmics.com/v1/datamarts/:datamartId/user_points/email_hash=:emailHash`

#### Path Parameters

| Name       | Type    | Description                    |
| ---------- | ------- | ------------------------------ |
| datamartId | integer | The ID of the datamart         |
| emailHash  | string  | The email hash of the datamart |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

### Via a user account identifier

## Delete a UserPoint by account id

<mark style="color:red;">`DELETE`</mark> `https://api.mediarithmics.com/v1/datamarts/:datamartId/user_points/compartment_id=:compartmentId,user_account_id=:user_accountId`

#### Path Parameters

| Name            | Type    | Description                            |
| --------------- | ------- | -------------------------------------- |
| datamartId      | integer | The ID of the datamart                 |
| compartmentId   | integer | The compartment id of the user account |
| user\_accountId | integer | The ID of the user account             |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

### Via a user agent

## Delete a UserPoint by user agent id

<mark style="color:red;">`DELETE`</mark> `https://api.mediarithmics.com/v1/datamarts/:datamartId/user_points/user_agent_id=:userAgentId`

#### Path Parameters

| Name        | Type    | Description                            |
| ----------- | ------- | -------------------------------------- |
| datamartId  | integer | The ID of the datamart                 |
| userAgentId | string  | The ID of the user agent, like vec:xxx |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
It is also possible to bulk delete UserPoint via [Document Import](https://developer.mediarithmics.io/data-streams/data-ingestion/bulk-processing/deletions/userpoint-deletion)
{% endhint %}
