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

# Delete All User Data

> Remove All User data from Velt.

Use this API to remove all user data from Velt. This will:

* remove their access from all the documents and data in the organization.
* remove them from @mention contact dropdown list.
* remove them from @mentions where they were tagged.
* remove all feature data created by the user. eg: comments, reactions etc.

<Warning>
  - This API may take up to 5 minutes to return a 202 response since it runs an asynchronous job to delete user data across the system.
  - To speed up this process, you can optionally provide the organizationIds where the user belongs.
  - The actual deletion of data can take upto 24 hours to complete.
</Warning>

# Endpoint

`POST https://api.velt.dev/v2/users/data/delete`

# Headers

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="userIds" type="string[]" required>
      Array of user Ids.
    </ParamField>

    <ParamField body="organizationIds" type="string[]">
      Array of organization Ids. These are the organizations that the user is part of.
    </ParamField>
  </Expandable>
</ParamField>

## **Example Request**

```JSON theme={null}
{
  "data": {
    "userIds": [
      "yourUserId1",
      "yourUserId2"
    ],
    "organizationIds": [
      "yourOrganizationId1",
      "yourOrganizationId2"
    ]
  }
}
```

# Response

#### Success Response

```JSON theme={null}
{
  "status": "success",
  "message": "Data deletion process has been initiated.",
  "data": {
    "jobId": "dsQuvPmIynANgPLLEhCm",
    "tasksCount": 5
  },
  "statusCode": 202
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}
```

<ResponseExample>
  ```js theme={null}
  {
    "status": "success",
    "message": "Data deletion process has been initiated.",
    "data": {
      "jobId": "dsQuvPmIynANgPLLEhCm",
      "tasksCount": 5
    },
    "statusCode": 202
  }
  ```
</ResponseExample>
