---
title: "Create a Knowledge Base"
method: POST
path: "/v1/hub/{hub_id}/knowledge-base"
tags: ["Hub"]
---

# Create a Knowledge Base

`POST /v1/hub/{hub_id}/knowledge-base`

Create a new knowledge base entry for a hub

## Path parameters

- `hub_id` string, uuid, required

## Request body

- CreateKnowledgeBase
  - `context` BaseRequestContext
    - `projectId` string, uuid
    - `processPublicId` string, uuid, nullable
    - `processSectionPublicId` string, uuid, nullable
    - `processResponsePublicId` string, uuid, nullable
  - `text` string, required
  - `source` string, required
  - `link` string, nullable

## Response `201`

Knowledge base created successfully

## Other responses

- `403` — Not authorized to create a knowledge base for this hub
- `404` — Hub not found

---

[API](https://skmtc.net/morta-technology/apis/morta-api-reference.md) · [All operations](https://skmtc.net/morta-technology/apis/morta-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/morta-technology/morta-api-reference/versions/9c58c1c1e7e8/schema)
