Skip to main content
PUT
/
api
/
user
/
upload
/
{id}
Update an existing upload file's metadata
curl --request PUT \
  --url https://pria.praxislxp.com/api/user/upload/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "originalname": "markdown_render_with_error_boundary",
  "status": "selected",
  "is_public": false,
  "is_private": true,
  "institution": "<string>",
  "file_title": "<string>",
  "file_summary": "<string>",
  "file_authors": "<string>",
  "account_shared": true,
  "collection": "<string>"
}
'
{
  "success": true,
  "message": "Upload updated!"
}

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Path Parameters

id
string
required

The unique identifier of the upload to update (must be a valid ObjectId)

Body

application/json

Only whitelisted fields are accepted. Fields not in the allowed list are silently ignored. Setting is_public to true automatically forces is_private to false.

originalname
string

The original name of the uploaded file

Example:

"markdown_render_with_error_boundary"

status
enum<string>

The new status for the upload. active: default status. selected: file will be included in RAG searches. deleted: soft deleted, hidden from lists and RAG.

Available options:
active,
selected,
deleted
Example:

"selected"

is_public
boolean

When true, anyone with the link can access the file without authentication. Setting to true automatically clears is_private.

Example:

false

is_private
boolean

When true, marks the file as confidential (owner-only access, hidden from citations). Cannot be true when is_public is true.

Example:

true

institution
string

Institution ID to share the file with. Send an empty string "" or null to unset (remove) the institution field via $unset.

file_title
string

Title for the file

file_summary
string

Summary of the file content

file_authors
string

Authors of the content

account_shared
boolean

Whether the file is shared across the institution account

collection
string

Collection ID. Send an empty string "" or null to remove from collection.

Response

Upload successfully updated

success
boolean

Indicates if the operation was successful

Example:

true

message
string

Success message

Example:

"Upload updated!"