---
title: Delete an API key
url: https://runapi.ai/docs/api/management/keys/delete.md
canonical: https://runapi.ai/docs/api/management/keys/delete
locale: en
---

# Delete an API key

Revoke a Standard API key without deleting historical usage records.

## Endpoint

DELETE /api/v1/keys/:id

Base URL: https://runapi.ai

API version: v1

Authentication: Authorization: Bearer YOUR_MANAGEMENT_API_KEY


Authorization: Requires an account-admin Management API key and permits only keys owned by its user.

## Request

Send values only in the listed request location.

### Path parameters

```json
{
  "id": {
    "description": "API key prefix ID, for example token_123.",
    "required": true,
    "type": "string"
  }
}
```

## Success response

HTTP 204 - DELETE /api/v1/keys/:id

This response has no body.

## Error response (401)

HTTP 401

```json
{
  "error": "Authentication required"
}
```

## Error response (403)

HTTP 403

```json
{
  "error": "Management API key required"
}
```

## Error response (403)

HTTP 403

```json
{
  "error": "Account admin required"
}
```

## Error response (404)

HTTP 404

```json
{
  "error": "Resource not found"
}
```

## cURL example



### curl

```curl
curl -X DELETE https://runapi.ai/api/v1/keys/token_123 \
  -H 'Authorization: Bearer YOUR_MANAGEMENT_API_KEY'
```

## Related reference

- [API Keys](/docs/api/management/keys)
- [API Key object](/docs/api/management/keys/object)
