> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-en/rest-api/identity-api/identity-api-reference/authentication/delete-users.md).

# Delete Users

Allows batch deletion of users registered in the authentication system.

### Endpoint

```
DELETE /services/authenticateUser
```

### Headers

| Name          | Type   | Required | Description                                                    |
| ------------- | ------ | -------- | -------------------------------------------------------------- |
| **x-api-key** | string | **Yes**  | API Key for access authorization.                              |
| **family**    | string | No       | Value: **Authentication**. Required with the tracking service. |

{% hint style="info" %}
All calls to the tracking Endpoints with **Identity Platform** must contain the header `family`.
{% endhint %}

### Request body

**Content-Type:** `application/json`

#### Parameters

| Parameter | Type      | Required | Description                                            |
| --------- | --------- | -------- | ------------------------------------------------------ |
| `userIds` | string\[] | **Yes**  | List of unique identifiers of the users to be deleted. |

#### Request example

```json
{
  "userIds": ["001"]
}
```

### Responses

#### `200` Success

#### Response parameters

| Parameter           | Type    | Description                                                                                                          |
| ------------------- | ------- | -------------------------------------------------------------------------------------------------------------------- |
| `serviceResultCode` | integer | Code that indicates the **overall result** of the service execution. See [Service Result Code](#service-result-code) |
| `serviceResultLog`  | string  | Descriptive field of the result of the service execution. Includes details when there is an error or exception.      |
| `timestamp`         | string  | Timestamp (UTC) of the response in format YYYY-MM-DDThh:flag\_mm:ssZ                                                 |
| `transactionId`     | string  | Transaction identifier associated with the request processed by the API.                                             |

#### Service Result Code

The `serviceResultCode` indicates the overall result of the service execution:

| serviceResultCode | Description                                                                       | HTTP code |
| ----------------- | --------------------------------------------------------------------------------- | --------- |
| 0                 | The service execution was successful, the module processed the request correctly. | 200       |

#### Response example

```json
{
  "serviceResultCode": 0,
  "serviceResultLog": "Service request successfully processed",
  "timestamp": "2024-10-29T20:29:24Z",
  "transactionId": "531ecbb1-de3d-4907-a737-0db236674e9a"
}
```

#### `400` Bad Request

```json
{
  "status": 400,
  "title": "Bad Request",
  "detail": "Invalid request.",
  "type": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400",
  "errors": []
}
```

#### `401` Unauthorized

```json
{
  "message": "Unauthorized"
}
```

#### `403` Forbidden

```json
{
  "Message": "User is not authorized to access this resource with an explicit deny"
}
```

#### `502` Bad Gateway

```json
{
  "status": 502,
  "title": "Bad Gateway",
  "detail": "Server got an invalid response.",
  "type": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502"
}
```

#### `504` Gateway Timeout

```json
{
  "message": "Endpoint request timed out"
}
```
