---
title: "Add documents to a deployment's knowledge base"
method: POST
path: "/v1/deployments/{deploymentId}/knowledge-base"
tags: ["Deployments"]
---

# Add documents to a deployment's knowledge base

`POST /v1/deployments/{deploymentId}/knowledge-base`

## Request

- Base URL: `https://api.auxen.ai`
- URL: `https://api.auxen.ai/v1/deployments/{deploymentId}/knowledge-base`
- Auth: HTTP bearer

Either upload files (multipart/form-data, field `files`, up to 50 × 25 MB) — they're added to your library and attached — or send JSON `{ document_ids: [...] }` to attach documents already in your library. Indexing runs in the background.

## Path parameters

- `deploymentId` string, required

## Request body

- object
  - `document_ids` string[]

## Response `202`

Accepted

## Other responses

- `400`: No files or document_ids.

---

[API](https://skmtc.dev/auxen/apis/auxen-headless-api.md) · [All operations](https://skmtc.dev/auxen/apis/auxen-headless-api/llms.txt) · [OpenAPI document](https://skmtc.dev/auxen/apis/auxen-headless-api/revisions/164be65f5ce8?raw)
