Edit a text file's content and reprocess it
curl --request PUT \
--url https://pria.praxislxp.com/api/user/files/{fileId}/content \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"content": "# Updated notes\n\nThe revised body of the document."
}
'import requests
url = "https://pria.praxislxp.com/api/user/files/{fileId}/content"
payload = { "content": "# Updated notes
The revised body of the document." }
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({content: '# Updated notes\n\nThe revised body of the document.'})
};
fetch('https://pria.praxislxp.com/api/user/files/{fileId}/content', 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://pria.praxislxp.com/api/user/files/{fileId}/content",
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([
'content' => '# Updated notes
The revised body of the document.'
]),
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://pria.praxislxp.com/api/user/files/{fileId}/content"
payload := strings.NewReader("{\n \"content\": \"# Updated notes\\n\\nThe revised body of the document.\"\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://pria.praxislxp.com/api/user/files/{fileId}/content")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"# Updated notes\\n\\nThe revised body of the document.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/user/files/{fileId}/content")
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 \"content\": \"# Updated notes\\n\\nThe revised body of the document.\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"reprocessing": true,
"message": "Content saved — re-indexing search and knowledge graph.",
"uploadId": "68566d7c4ec8e0cb02907997"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "This file type cannot be edited as text"
}{
"success": false,
"message": "<string>"
}IP Vault
Edit a text file's content and reprocess it
Replaces the content of an existing text-editable file (Markdown, plain
text, HTML, and common code/data formats) in place, then re-runs the
FULL ingestion pipeline (extract → chunk → sanitize → embed → finalize)
so search and the knowledge graph reflect the new text. The file’s id,
filename, and file_url stay byte-identical so any published links keep
resolving.
Only text-editable file types are accepted — non-text files (PDFs, images, office documents, etc.) return 415. The write is confined to the caller’s own vault.
PUT
/
api
/
user
/
files
/
{fileId}
/
content
Edit a text file's content and reprocess it
curl --request PUT \
--url https://pria.praxislxp.com/api/user/files/{fileId}/content \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"content": "# Updated notes\n\nThe revised body of the document."
}
'import requests
url = "https://pria.praxislxp.com/api/user/files/{fileId}/content"
payload = { "content": "# Updated notes
The revised body of the document." }
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({content: '# Updated notes\n\nThe revised body of the document.'})
};
fetch('https://pria.praxislxp.com/api/user/files/{fileId}/content', 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://pria.praxislxp.com/api/user/files/{fileId}/content",
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([
'content' => '# Updated notes
The revised body of the document.'
]),
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://pria.praxislxp.com/api/user/files/{fileId}/content"
payload := strings.NewReader("{\n \"content\": \"# Updated notes\\n\\nThe revised body of the document.\"\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://pria.praxislxp.com/api/user/files/{fileId}/content")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"# Updated notes\\n\\nThe revised body of the document.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/user/files/{fileId}/content")
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 \"content\": \"# Updated notes\\n\\nThe revised body of the document.\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"reprocessing": true,
"message": "Content saved — re-indexing search and knowledge graph.",
"uploadId": "68566d7c4ec8e0cb02907997"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "This file type cannot be edited as text"
}{
"success": false,
"message": "<string>"
}Authorizations
JWT token passed in x-access-token header
Path Parameters
The file ID to edit
Body
application/json
The new full text content for the file (non-empty).
Example:
"# Updated notes\n\nThe revised body of the document."
Was this page helpful?
⌘I