Skip to main content
POST
Add an uploaded file to a knowledge collection

Authorizations

x-api-key
string
header
required

Project API key. Create and manage keys in the dashboard under Project → API Keys. Send as header: x-api-key:

Headers

x-username
string
default:(project default user)

External user (end user) to act as. Optional — if omitted, Flowra uses the project’s default external user. Send a stable username (e.g. customer_alice) only when you need another end-user context.

Path Parameters

id
string
required

Collection ID

Example:

"755ab29c-2864-5cfd-9c2b-4953f7314b21"

Body

application/json
fileId
string
required

File id from POST /file/upload/single/chat

Minimum string length: 1
Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

chunkSize
number

Split size in characters (default 1000)

Required range: 100 <= x <= 4000
Example:

1000

chunkOverlap
number

Overlap between splits in characters (default 100)

Required range: 0 <= x <= 500
Example:

100

Response

200 - application/json

File added to collection

success
boolean
required

Success status

Example:

true

message
string
required

Success message

Example:

"Operation completed successfully"

data
object
required
Example: