# Revoke API Key

Revoke an API key so it stops working immediately. Revoking a key that is already revoked changes nothing.

`DELETE https://connect.mindcloud.co/v2/api-keys/:apiKeyId`

Permissions: `api_key:manage`.

## Parameters

### Path

- `apiKeyId` (string, required): The key's id, from List API Keys.

### Headers

- `X-Company-Id` (string): Optional. The id of the organization to act in. Leave it out to act in the API key's own organization. Here a key acts in another organization only as one of its members: with "Use this key across all of your organizations" on, in an organization its creator belongs to with a role. Child organizations and MindCloud staff access do not reach this endpoint. Every response's X-Company-Id header names the organization it acted in. See [Organizations](https://mindcloud.co/docs/api/rest/introduction/organizations).

## Example request

```bash
curl --request DELETE \
  --url 'https://connect.mindcloud.co/v2/api-keys/apikey_K7dM2qP9xL4s' \
  --header 'Authorization: Bearer $MINDCLOUD_API_TOKEN'
```

## Response fields

- `id` (string): The id of the resource that was deleted.

## Example response

```json
{
  "success": true,
  "data": {
    "id": "apikey_K7dM2qP9xL4s"
  }
}
```
