---
title: "Create Knowledge Base"
method: POST
path: "/knowledge_bases"
tags: ["Knowledge Base"]
---

# Create Knowledge Base

`POST /knowledge_bases`

Create a new knowledge base entry for the HostGPT automation assistant. The entry defines AI content and the property/channel scope where it applies.

## 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 created 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.

---

[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/versions/a3fa555dee66/schema)
