---
title: "Add Document"
method: POST
path: "/agent/knowledge-base/add-document"
---

# Add Document

`POST /agent/knowledge-base/add-document`

## Request

- Base URL: `https://api.phonely.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.phonely.ai/agent/knowledge-base/add-document`
- Auth: none declared. Required headers: `authorization`

Add a document to the knowledge base.

Args:
    document: DocumentRequest

## Headers

- `authorization` string, required

## Request body

- DocumentRequest
  - `id` string, required
  - `type` string, nullable
  - `editable` boolean, nullable

## Response `200`

Successful Response

- DocumentResponse
  - `status` string, required
  - `message` string, required
  - `data` object, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/phonely/apis/phonely-api.md) - [All operations](https://skmtc.dev/phonely/apis/phonely-api/llms.txt) - [OpenAPI document](https://skmtc.dev/phonely/apis/phonely-api/revisions/9bfd5599d479?raw)
