---
title: "Update Knowledge Base"
method: PATCH
path: "/knowledge_bases/{id}"
tags: ["Knowledge Base"]
---

# Update Knowledge Base

`PATCH /knowledge_bases/{id}`

Replace an existing knowledge base entry. This endpoint performs a **full replacement** — `scope_property`, `scope_channel`, `contents` and `is_enable` must all be supplied. Use `GET /knowledge_bases/{id}` first if you only want to change one field.

## Path parameters

- `id` integer, required

## Request body

- object
  - `scope_property` object, required — The property scope configuration.
    - `type` 'all' | 'by_property' | 'by_group' | 'by_room_type', required — The type of property scope.
    - `ids` integer[], required — Scope IDs interpreted according to `type`: property IDs for `by_property`, group IDs for `by_group`, room type IDs for `by_room_type`. Use `[-1]` for `all`.
  - `scope_channel` object, required — The channel scope configuration.
    - `type` 'all' | 'by_channel', required — Channel scope type: all or by_channel.
    - `channels` string[], required — Channel names this knowledge base applies to (e.g. `['airbnb', 'booking.com']`). Use `['unlimited']` for `all`. See [Supported Channels](/reference/supported-channels).
  - `contents` object[], required — The content entries of the knowledge base.
    - `text` string, required — The content text.
    - `sub_title` string, required — The subtitle for this content block.
  - `title` string — Optional title for the knowledge base entry.
  - `is_enable` boolean, required — Whether the entry is enabled.

## Response `200`

The knowledge base entry has been updated successfully.

- CommonResponse
  - `request_id` string, required — Unique identifier for the request.
  - `error_code` integer, required — Numeric error code representing the status of the response. A value of `200` indicates success. <br> See the [Error Codes](/reference/error-manual#error-codes) section for more information.
  - `error_msg` string, required — Message detailing the status of the response.

## Other responses

- `404` — The knowledge base entry does not exist or does not belong to the operator.

---

[API](https://skmtc.net/hostex/apis/hostex-api.md) · [All operations](https://skmtc.net/hostex/apis/hostex-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hostex/hostex-api/revisions/a3fa555dee66/schema)
