---
title: "Revoke an API token"
description: "Revokes a token at once."
canonical_url: https://docs.markdrop.in/api/account/revoke-an-api-token
last_updated: 2026-10-30
site: "Markdrop Docs"
index: https://docs.markdrop.in/llms.txt
---

# Revoke an API token

`DELETE https://api.markdrop.in/api/v1/me/tokens/{token_id}`

Revokes a token at once. Requests with it get `401` from then on.

- **Authentication:** API token required: `Authorization: Bearer mdk_…`.

## Path parameters

- `token_id` (string, required)

## Responses

- `204`: No content.
- `401`: No token, or the token is revoked or mistyped.
- `422`: The request didn't validate. `detail` lists each problem, with where it is (`loc`) and why (`msg`).

## Examples

**curl**

```bash
curl -X DELETE https://api.markdrop.in/api/v1/me/tokens/TOKEN_ID \
  -H "Authorization: Bearer $MARKDROP_TOKEN"
```

**JavaScript**

```javascript
const res = await fetch("https://api.markdrop.in/api/v1/me/tokens/TOKEN_ID", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.MARKDROP_TOKEN}`,
  },
});
if (!res.ok) throw new Error(`${res.status}`);
```

**Python**

```python
import os

import requests

r = requests.delete(
    "https://api.markdrop.in/api/v1/me/tokens/TOKEN_ID",
    headers={"Authorization": f"Bearer {os.environ['MARKDROP_TOKEN']}"},
)
r.raise_for_status()
```
