---
title: "Unmap Knowledge Base Collection"
method: DELETE
path: "/knowledge-bases/{kbId}/map"
tags: ["Knowledge Base"]
---

# Unmap Knowledge Base Collection

`DELETE /knowledge-bases/{kbId}/map`

## Request

- Base URL: `https://api.speakai.co/v1`
- URL: `https://api.speakai.co/v1/knowledge-bases/{kbId}/map`
- Auth: API key in header `x-speakai-key` and API key in header `x-access-token`

### Detach a Collection

Requires the OWNER or ADMIN role. Removes one mapping row. ownerType and ownerId are sent as query parameters on this DELETE, not a request body.

## Path parameters

- `kbId` string, required

## Query parameters

- `ownerType` 'folder' | 'agent', required
- `ownerId` string, required

## Response `200`

OK

- object
  - `status` 'success'
  - `data` object
    - `knowledgeBaseId` string
    - `ownerType` string
    - `ownerId` string
    - `unmapped` true

## Other responses

- `403`: Forbidden
- `404`: Not Found

---

[API](https://skmtc.dev/speakai/apis/speak-ai-api.md) · [All operations](https://skmtc.dev/speakai/apis/speak-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/speakai/apis/speak-ai-api/revisions/52d777e6d46e?raw)
