Skip to main content
POST
/
api
/
user
/
files
Upload files
curl --request POST \
  --url https://pria.praxislxp.com/api/user/files \
  --header 'Content-Type: multipart/form-data' \
  --header 'x-access-token: <api-key>' \
  --form 'files=<string>' \
  --form confidential=false \
  --form 'fileConfidential={"report.pdf": true, "notes.txt": false}' \
  --form institution=6631915765bb0a94cfd6ca99 \
  --form account_shared=false \
  --form 'selectedCourse={"course_id": 1750532703472, "course_name": "Research"}' \
  --form selectedAssistant=6856fa89cbafcff8d98680f5 \
  --form files.items='@example-file'
{
  "success": true,
  "message": "Upload completed",
  "files": [
    {
      "fieldname": "files",
      "originalname": "<string>",
      "filename": "<string>",
      "mimetype": "<string>",
      "size": 123,
      "success": true,
      "message": "<string>",
      "usage": 123,
      "uploadId": "<string>",
      "file_url": "<string>",
      "file_title": "<string>",
      "file_summary": "<string>",
      "summary_model": "<string>",
      "image_analysis_model": "<string>",
      "embeddings_model": "<string>",
      "is_private": true,
      "status": "<string>",
      "thumbnail": "<string>"
    }
  ]
}

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Body

multipart/form-data
files
file[]
required

File(s) to upload. Audio files limited to 25MB, non-audio limited to 150MB.

confidential
string

Legacy global confidential flag (string 'true'/'false'). Only applied when institution is provided. Overridden per-file by fileConfidential.

Example:

"false"

fileConfidential
string

JSON string mapping original filenames to per-file confidential booleans. Example: '{"report.pdf": true, "notes.txt": false}'. Overrides the global confidential flag.

Example:

"{\"report.pdf\": true, \"notes.txt\": false}"

institution
string

Institution ID to associate the uploads with

Example:

"6631915765bb0a94cfd6ca99"

account_shared
string

When 'true' and institution is set, marks files as shared across the institution's account

Example:

"false"

selectedCourse
string

JSON string with course context for the upload history record. Example: '{"course_id": 1750532703472, "course_name": "Research"}'

Example:

"{\"course_id\": 1750532703472, \"course_name\": \"Research\"}"

selectedAssistant
string

Assistant ID for the upload history record (used as fallback if selectedCourse.assistant._id is not set)

Example:

"6856fa89cbafcff8d98680f5"

Response

Upload completed. Individual file results are in the files array; each file has its own success/message.

success
boolean
Example:

true

message
string
Example:

"Upload completed"

files
object[]

Array of per-file processing results