---
type: api
title: Delete API keys of multiple users
description: Delete or invalidate the API keys for multiple users.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/cloud-enterprise/v4/operation/operation-delete-users-api-keys
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/cloud-enterprise/v4/operation/operation-delete-users-api-keys
products:
  - Elastic Cloud Enterprise
---

# Delete API keys of multiple users

## Paths

- `DELETE` `/users/auth/keys/_all`

## Description

Delete or invalidate the API keys for multiple users.

## Authentication

- Basic: `Authorization: Basic <credentials>`
- Api key: `Authorization: <value>`

## Request body

The request to delete API keys.

`application/json`

- `user_api_keys` (object[]) — required
  The list of API key IDs.
  - `user_id` (string) — required
    The user ID.
  - `api_key_id` (string) — required
    The API key ID.

## Response

The API keys are deleted.

`application/json`

Type: `object`

## Code examples

#### curl

```curl
curl -X DELETE "${API_URL}/users/auth/keys/_all" \
  -u "${USERNAME}:${PASSWORD}" \
  -H "Content-Type: application/json" \
  -d '{
    "user_api_keys": [
      {
        "user_id": "string",
        "api_key_id": "string"
      }
    ]
  }'
```

