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_private": true,
  "institution": "<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

Accepts any fields to pass through to MongoDB updateOne. Common fields are listed below, but the endpoint does not restrict which fields can be sent.

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_private
boolean

Determines whether the file remains confidential when status is selected; will not be cited as source or its location will not be made available to users.

Example:

true

institution
string

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

Response

Upload successfully updated

success
boolean

Indicates if the operation was successful

Example:

true

message
string

Success message

Example:

"Upload updated!"