---
title: DELETE /user/api-keys
description: "Revoke an API key — Revokes one of your keys, so it stops authenticating immediately. The key stays in your list with status revoked."
full: true
---

**Auth:** required. Send a signed-in session token (`Authorization: Bearer …`) or the session cookie (browser sessions). See [Authentication](/docs/api/authentication).

Revokes one of your keys, so it stops authenticating immediately. The key stays in your list with status `revoked`. A key .bloom* manages for you cannot be revoked and returns `403` with code `MANAGED_CALLBACK_KEY`. Requires a signed-in session; an `ivy_` key is answered with `401`.

## Request

### Query parameters

- `keyId` (string (uuid)) —
The key's `id`.

## Responses

### `200` OK

The key was revoked

Response shape:

- `success` (boolean) —

- `message` (string) —

### `400` Bad Request

`keyId` is missing

Response shape: `object`

### `401` Unauthorized

A signed-in session is required

Response shape: `object`

### `403` Forbidden

The key is managed by .bloom* for job callbacks and cannot be revoked

Response shape: `object`

### `404` Not Found

No key with that id on your account

Response shape: `object`

### `429` Too Many Requests

Rate limit exceeded

Response shape: `object`

**curl**

```bash
curl -X DELETE 'https://ivybiosciences.com/api/user/api-keys' \
  -H "Authorization: Bearer $IVY_SESSION_TOKEN"
```

**JavaScript**

```js
const res = await fetch('https://ivybiosciences.com/api/user/api-keys', {
  method: 'DELETE',
  headers: {
    'Authorization': `Bearer ${process.env.IVY_SESSION_TOKEN}`,
  },
});
const data = await res.json();
```

**Python**

```python
import os, requests

res = requests.delete(
    "https://ivybiosciences.com/api/user/api-keys",
    headers={"Authorization": f"Bearer {os.environ['IVY_SESSION_TOKEN']}"},
)
data = res.json()
```
