---
title: "Remove an API key"
description: "Requires a verified session and current workspace membership; metadata roles never authorize key access. Existing key ownership and operation checks remain in force."
---

> Documentation Index
> Fetch the complete documentation index at: https://developer.channelautomations.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Channel Automation API › Workspaces

`DELETE /api/api-keys/{id}`

Requires a verified session and current workspace membership; metadata roles never authorize key access. Existing key ownership and operation checks remain in force.

## Authentication

- `BearerAuth`, http, header `Authorization`, format `JWT`

## Path parameters

- `id` (`delete/api/api-keys/id.path.id`; string, required)

## Header parameters

- `X-Workspace-Id` (`delete/api/api-keys/id.header.X-Workspace-Id`; string, optional)

## Code samples

### cURL

```bash
curl --request DELETE \
  --url 'https://api.channelautomation.com/api/api-keys/<id>' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/api-keys/<id>';
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.channelautomation.com/api/api-keys/<id>"

headers = {"Authorization": "Bearer <token>"}

response = requests.delete(url, headers=headers)

print(response.text)
```

## Responses

### 200

Operation completed

### 201

Key created

### 400

Invalid input or workspace missing

### 401

Verified session required

### 403

Membership or key authority denied

### 404

Key not found

### 503

Authority verification unavailable


Source: https://developer.channelautomations.com/api/delete-api-api-keys-id/index.md
