Skip to main content
POST
/
v1
/
knowledge
/
groups
/
{id}
/
documents
upload knowledge group document
curl --request POST \
  --url https://api.anam.ai/v1/knowledge/groups/{id}/documents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form chunkSize=1000 \
  --form chunkOverlap=200
{
  "id": "00000000-0000-0000-0000-000000000000",
  "knowledgeFolderId": "00000000-0000-0000-0000-000000000000",
  "filename": "getting-started.pdf",
  "fileType": "application/pdf",
  "fileSize": 248320,
  "fileUrl": "https://cdn.anam.ai/knowledge/getting-started.pdf",
  "status": "READY",
  "errorMessage": null,
  "createdAt": "2026-04-20T10:00:00.000Z",
  "updatedAt": "2026-04-20T10:01:12.000Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Unique identifier of the knowledge group

Body

multipart/form-data

Document file to upload into the knowledge group. Supported formats are PDF, TXT, MD, DOCX, and CSV, up to 50MB. Must be sent as multipart/form-data. Documents are processed asynchronously — the returned record starts in PROCESSING state and becomes searchable once it reaches READY.

file
file
required

Document file (PDF, TXT, MD, DOCX, or CSV, max 50MB).

chunkSize
integer
default:1000
chunkOverlap
integer
default:200

Response

Successfully uploaded document

A single file uploaded into a knowledge group. Retrieved chunks reference it by ID.

id
string<uuid>

Unique identifier for the document.

knowledgeFolderId
string<uuid>

ID of the knowledge group this document belongs to.

filename
string

Original filename as uploaded.

fileType
string

MIME type or extension-derived file type.

fileSize
integer

Size of the file in bytes.

fileUrl
string<uri>

Internal URL at which the file is stored.

status
enum<string>

Current processing state. Only READY documents are searchable.

Available options:
UPLOADED,
PROCESSING,
READY,
FAILED
errorMessage
string | null

Failure reason when status is FAILED, otherwise null.

createdAt
string<date-time>

Timestamp when the document was uploaded.

updatedAt
string<date-time> | null

Timestamp when the document record was last updated.

Last modified on April 22, 2026