---
title: "Add"
method: POST
path: "/knowledge/{knowledge_base_id}/add"
tags: ["knowledge"]
---

# Add

`POST /knowledge/{knowledge_base_id}/add`

Add data to a knowledge base

## Path parameters

- `knowledge_base_id` string, uuid, required — The id of the knowledge base to add the data to

## Request body

- AddRequest
  - `key` string, nullable — The key of the document
  - `content` string, required
  - `metadata` object — The metadata of the document
  - `configuration` TextProcessingConfiguration
    - `text_processing.chunk_size` integer — The chunk size to use for the document. This is the number of characters to use for the chunk. The default is 2000 characters.
    - `text_processing.chunk_overlap` integer — The chunk overlap to use for the document. This is the number of characters to overlap between chunks. The default is 200 characters.

## Response `201`

Successful Response

- unknown

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `402` — Payment Required (out of credits)
- `404` — Not Found
- `422` — Request Validation Error

---

[API](https://skmtc.dev/opper/apis/opper-api-v2.md) · [All operations](https://skmtc.dev/opper/apis/opper-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/opper/opper-api-v2/revisions/d3ccdaa15678/schema)
