# Delete Knowledge Base

`DELETE /api/v1/knowledge/{id}`

## Description
Soft-delete a knowledge base and all its documents.

## Parameters

- **id** (path) (required) — `string`: Knowledge base ID.

- **workspaceId** (query) (required) — `string`: The unique identifier of the workspace.

## Responses

### 200 — Knowledge base deleted successfully.

```json
{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "description": "Whether the request was successful."
    },
    "data": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Human-readable confirmation message."
        }
      },
      "description": "Response payload."
    }
  }
}
```

### 401 — Invalid or missing API key. Ensure the X-API-Key header is set with a valid key.

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Human-readable error message."
    }
  }
}
```

### 403 — Access denied. You do not have permission to access this resource. For audit log endpoints, this requires an Enterprise subscription and organization admin/owner role.

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Human-readable error message."
    }
  }
}
```

### 404 — The requested resource was not found. Verify the ID is correct and belongs to your workspace.

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Human-readable error message."
    }
  }
}
```

### 429 — Rate limit exceeded. Wait for the duration specified in the Retry-After header before retrying.

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Human-readable error message with rate limit details."
    }
  }
}
```
