> For the complete documentation index, see [llms.txt](https://anunzi-ai.gitbook.io/anunzi-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://anunzi-ai.gitbook.io/anunzi-docs/api-widgets/trabajar-con-la-api-de-llamadas/knowledge-bases/detach-knowledge-base.md).

# Desasignar base de conocimiento

**POST**\
`https://api.anunzi.net/v2/knowledge_base/{knowledge_base_id}/detach`

Detach a knowledge base from an AI assistant in your Anunzi environment. This removes the assistant’s ability to reference that knowledge base during conversations.

***

#### **Path Parameters**

| Parameter           | Type   | Required | Description                                    |
| ------------------- | ------ | -------- | ---------------------------------------------- |
| `knowledge_base_id` | string | Yes      | The unique ID of the knowledge base to detach. |

***

#### **Body Parameters**

| Parameter  | Type   | Required | Description                                                                       |
| ---------- | ------ | -------- | --------------------------------------------------------------------------------- |
| `model_id` | string | Yes      | The unique ID of the AI assistant from which the knowledge base will be detached. |

***

#### **Example Request (cURL)**

```bash
curl --request POST \
     --url https://api.anunzi.net/v2/knowledge_base/1739253053024x397207388602947460/detach \
     --header 'accept: application/json' \
     --header 'Authorization: Bearer API_KEY' \
     --data '
{
  "model_id": "161681681x1861668"
}
'
```

***

#### **Example Response (200 OK)**

```json
{
  "status": "success",
  "response": {
    "body": "Knowledge Base detached",
    "model_id": "1738862886874x680573723187741300"
  }
}
```

***

#### **Response Fields**

| Field      | Type   | Description                                                    |
| ---------- | ------ | -------------------------------------------------------------- |
| `body`     | string | Confirmation message that the knowledge base was detached.     |
| `model_id` | string | The AI assistant ID from which the knowledge base was removed. |

***

#### **Status Codes**

| Code | Description                                 |
| ---- | ------------------------------------------- |
| 200  | Knowledge base detached successfully.       |
| 400  | Bad Request. Invalid or missing parameters. |
