# Revoke a key

> Revokes (soft-deletes) the key. Revoked keys fail authentication immediately on their next request, there is no grace period, and revocation cannot be undone.

Source: https://warmerly.com/docs/keys/revoke-a-key

```text
DELETE /keys/{id}
```

Revokes (soft-deletes) the key. Revoked keys fail authentication immediately on their next request, there is no grace period, and revocation cannot be undone.

```bash
curl -X DELETE https://app.warmerly.com/api/v1/keys/3b1f6e2a-9c4d-4e2a-8b5f-6a2c1d9e0f7b \
  -H "X-Api-Key: wmv_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
```

```json
{ "revoked": true }
```

If the key doesn't exist, doesn't belong to you, or has already been revoked, this returns `404`:

```json
{ "error": { "code": "not_found", "message": "not_found", "details": null } }
```

You can revoke the key you're currently authenticating with. The revocation takes effect immediately, so any subsequent request with that key (including further calls in the same script) will fail with `401 unauthorized`.

## More from API Keys

- [List keys](https://warmerly.com/docs/keys/list-keys): Returns all of your active (non-revoked) keys, newest first. The raw secret is never returned, only the id,…
- [Create a key](https://warmerly.com/docs/keys/create-a-key): Each user can hold at most 10 active keys; creating an 11th (without revoking one first) returns 400 with…
