---
title: "Attach a knowledge base to a chat widget"
method: POST
path: "/chat-widgets/{id}/attach-knowledge-base"
tags: ["Chat widgets"]
---

# Attach a knowledge base to a chat widget

`POST /chat-widgets/{id}/attach-knowledge-base`

## Request

- Base URL: `https://api.flogpt.com/api/v1`
- URL: `https://api.flogpt.com/api/v1/chat-widgets/{id}/attach-knowledge-base`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

## Path parameters

- `id` string, required

## Request body

- ResourceInput

## Response `200`

Updated chat widget

## Other responses

- `404`: The resource does not exist in the API key's organization.

---

[API](https://skmtc.dev/flogpt/apis/flogpt-organization-api.md) · [All operations](https://skmtc.dev/flogpt/apis/flogpt-organization-api/llms.txt) · [OpenAPI document](https://skmtc.dev/flogpt/apis/flogpt-organization-api/revisions/c3a6cff76797?raw)
