Skip to main content
POST
Upload file

Authorizations

better-auth.session_token
string
cookie
required

Session cookie set by Better Auth on sign-in.

x-workspace-id
string
header
required

Workspace UUID. Required on all /api/* endpoints.

Body

multipart/form-data

Upload a knowledge base file. Sent as multipart/form-data with a single file field.

file
file

PDF, TXT, MD, or DOCX (max 10 MB)

Response

File uploaded and indexing enqueued

id
string<uuid>
required
type
enum<string>
required
Available options:
file
title
string
required
slug
string
required
sourceFileKey
string | null
required
fileSize
integer | null
required
fileType
string | null
required
syncStatus
string | null
required
createdAt
string
required
updatedAt
string
required
{key}
any