curl --request PUT \
--url https://hiimpria.ai/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>"
}
'import requests
url = "https://hiimpria.ai/api/user/upload/{id}"
payload = {
"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>"
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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>'
})
};
fetch('https://hiimpria.ai/api/user/upload/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://hiimpria.ai/api/user/upload/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'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>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://hiimpria.ai/api/user/upload/{id}"
payload := strings.NewReader("{\n \"originalname\": \"markdown_render_with_error_boundary\",\n \"status\": \"selected\",\n \"is_public\": false,\n \"is_private\": true,\n \"institution\": \"<string>\",\n \"file_title\": \"<string>\",\n \"file_summary\": \"<string>\",\n \"file_authors\": \"<string>\",\n \"account_shared\": true,\n \"collection\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://hiimpria.ai/api/user/upload/{id}")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"originalname\": \"markdown_render_with_error_boundary\",\n \"status\": \"selected\",\n \"is_public\": false,\n \"is_private\": true,\n \"institution\": \"<string>\",\n \"file_title\": \"<string>\",\n \"file_summary\": \"<string>\",\n \"file_authors\": \"<string>\",\n \"account_shared\": true,\n \"collection\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hiimpria.ai/api/user/upload/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"originalname\": \"markdown_render_with_error_boundary\",\n \"status\": \"selected\",\n \"is_public\": false,\n \"is_private\": true,\n \"institution\": \"<string>\",\n \"file_title\": \"<string>\",\n \"file_summary\": \"<string>\",\n \"file_authors\": \"<string>\",\n \"account_shared\": true,\n \"collection\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Upload updated!"
}{
"success": false,
"message": "Invalid Upload id",
"error": {}
}{
"success": false,
"message": "Authentication Required"
}{
"success": false,
"message": "Cant update or delete a file that is not yours!"
}{
"success": false,
"message": "Upload not found!"
}Update an existing upload file's metadata
Updates the metadata of an uploaded file. Only whitelisted fields are accepted (originalname, file_title, file_summary, file_authors, file_url, source_url, status, is_private, is_public, institution, account_shared, collection, embeddings_model, summary_model, image_analysis_model, audio_analysis_model). Setting is_public to true automatically forces is_private to false. Sending institution or collection as empty string or null triggers $unset. Users with accountType user can only update their own files. Admins can update files within their own institution (with files.edit there), or files they originally uploaded (owner match) regardless of institution. Another user’s PERSONAL file (no Digital Twin) cannot be changed. Setting collection to an id places the file in that collection: the caller must be allowed to edit it (a personal collection: its owner; a Digital Twin collection: files.edit there) and the file, as it will be after this request, must be in the collection’s vault. A vault move (institution or account_shared changed) that does not send collection drops the file’s current collection when that collection is not in the file’s new vault (collections belong to a vault). account_shared is read strictly (true, ‘true’, 1, ‘1’, ‘yes’ mean true) for every check.
curl --request PUT \
--url https://hiimpria.ai/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>"
}
'import requests
url = "https://hiimpria.ai/api/user/upload/{id}"
payload = {
"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>"
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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>'
})
};
fetch('https://hiimpria.ai/api/user/upload/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://hiimpria.ai/api/user/upload/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'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>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://hiimpria.ai/api/user/upload/{id}"
payload := strings.NewReader("{\n \"originalname\": \"markdown_render_with_error_boundary\",\n \"status\": \"selected\",\n \"is_public\": false,\n \"is_private\": true,\n \"institution\": \"<string>\",\n \"file_title\": \"<string>\",\n \"file_summary\": \"<string>\",\n \"file_authors\": \"<string>\",\n \"account_shared\": true,\n \"collection\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://hiimpria.ai/api/user/upload/{id}")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"originalname\": \"markdown_render_with_error_boundary\",\n \"status\": \"selected\",\n \"is_public\": false,\n \"is_private\": true,\n \"institution\": \"<string>\",\n \"file_title\": \"<string>\",\n \"file_summary\": \"<string>\",\n \"file_authors\": \"<string>\",\n \"account_shared\": true,\n \"collection\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hiimpria.ai/api/user/upload/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"originalname\": \"markdown_render_with_error_boundary\",\n \"status\": \"selected\",\n \"is_public\": false,\n \"is_private\": true,\n \"institution\": \"<string>\",\n \"file_title\": \"<string>\",\n \"file_summary\": \"<string>\",\n \"file_authors\": \"<string>\",\n \"account_shared\": true,\n \"collection\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Upload updated!"
}{
"success": false,
"message": "Invalid Upload id",
"error": {}
}{
"success": false,
"message": "Authentication Required"
}{
"success": false,
"message": "Cant update or delete a file that is not yours!"
}{
"success": false,
"message": "Upload not found!"
}Path Parameters
Body
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.
Was this page helpful?