> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ariacompute.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload Document - POST /v1/workspaces/:workspace_id/kbs/:kb_id/documents

> Upload a document to a KB via multipart POST /v1/workspaces/:workspace_id/kbs/:kb_id/documents. Minimum role contributor.

Upload a document to a knowledge base as `multipart/form-data`. After upload the document is parsed asynchronously into chunks, and on completion candidate memory nodes are auto-extracted into the "自动抽取记忆" (auto-extract) cube.

## Endpoint

```http theme={null}
POST /v1/workspaces/:workspace_id/kbs/:kb_id/documents
```

## Authentication

`Authorization: Bearer <jwt>` or `X-API-Key <sk_...>`. Minimum role: **contributor**.

## Path parameters

**workspace\_id** `string` *required*

Workspace id.

**kb\_id** `string` *required*

Target KB id.

## Request body (multipart)

**file** `file` *required*

The uploaded file (form field name `file`).

## Response

**id** `string`

Document id (`doc_...`).

**kb\_id** `string`

Owning KB id.

**workspace\_id** `string`

Owning workspace id.

**name** `string`

File name.

**path** `string`

Storage path.

**mime** `string`

File MIME type.

**status** `string`

Parse status (`parsing` / `parsed` / `failed`).

**created\_at** `string`

Upload time (RFC3339).

## Example

```bash cURL theme={null}
curl -X POST https://memo.ariacompute.com/v1/workspaces/ws_01a2b3c4d5e6/kbs/kb_01a2b3c4d5e6/documents \
  -H "Authorization: Bearer <jwt>" \
  -F "file=@./product.pdf"
```

```json 200 theme={null}
{
  "id": "doc_01a2b3c4d5e6",
  "kb_id": "kb_01a2b3c4d5e6",
  "workspace_id": "ws_01a2b3c4d5e6",
  "name": "product.pdf",
  "path": "kb_01a2b3c4d5e6/product.pdf",
  "mime": "application/pdf",
  "status": "parsing",
  "created_at": "2026-10-12T08:02:00Z"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.