curl --request POST \
--url https://pria.praxislxp.com/api/user/url \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"url": "https://example.com/document.pdf",
"confidential": false,
"skipIndexing": false,
"scrape": false,
"institution": "6631915765bb0a94cfd6ca99",
"selectedCourse": {
"course_id": 123,
"course_name": "<string>",
"assistant": {
"_id": "<string>"
}
},
"selectedAssistant": "6856fa89cbafcff8d98680f5",
"collection": "6631915765bb0a94cfd6ca99",
"account_shared": false
}
'import requests
url = "https://pria.praxislxp.com/api/user/url"
payload = {
"url": "https://example.com/document.pdf",
"confidential": False,
"skipIndexing": False,
"scrape": False,
"institution": "6631915765bb0a94cfd6ca99",
"selectedCourse": {
"course_id": 123,
"course_name": "<string>",
"assistant": { "_id": "<string>" }
},
"selectedAssistant": "6856fa89cbafcff8d98680f5",
"collection": "6631915765bb0a94cfd6ca99",
"account_shared": False
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com/document.pdf',
confidential: false,
skipIndexing: false,
scrape: false,
institution: '6631915765bb0a94cfd6ca99',
selectedCourse: {course_id: 123, course_name: '<string>', assistant: {_id: '<string>'}},
selectedAssistant: '6856fa89cbafcff8d98680f5',
collection: '6631915765bb0a94cfd6ca99',
account_shared: false
})
};
fetch('https://pria.praxislxp.com/api/user/url', 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/url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://example.com/document.pdf',
'confidential' => false,
'skipIndexing' => false,
'scrape' => false,
'institution' => '6631915765bb0a94cfd6ca99',
'selectedCourse' => [
'course_id' => 123,
'course_name' => '<string>',
'assistant' => [
'_id' => '<string>'
]
],
'selectedAssistant' => '6856fa89cbafcff8d98680f5',
'collection' => '6631915765bb0a94cfd6ca99',
'account_shared' => false
]),
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/url"
payload := strings.NewReader("{\n \"url\": \"https://example.com/document.pdf\",\n \"confidential\": false,\n \"skipIndexing\": false,\n \"scrape\": false,\n \"institution\": \"6631915765bb0a94cfd6ca99\",\n \"selectedCourse\": {\n \"course_id\": 123,\n \"course_name\": \"<string>\",\n \"assistant\": {\n \"_id\": \"<string>\"\n }\n },\n \"selectedAssistant\": \"6856fa89cbafcff8d98680f5\",\n \"collection\": \"6631915765bb0a94cfd6ca99\",\n \"account_shared\": false\n}")
req, _ := http.NewRequest("POST", 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.post("https://pria.praxislxp.com/api/user/url")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/document.pdf\",\n \"confidential\": false,\n \"skipIndexing\": false,\n \"scrape\": false,\n \"institution\": \"6631915765bb0a94cfd6ca99\",\n \"selectedCourse\": {\n \"course_id\": 123,\n \"course_name\": \"<string>\",\n \"assistant\": {\n \"_id\": \"<string>\"\n }\n },\n \"selectedAssistant\": \"6856fa89cbafcff8d98680f5\",\n \"collection\": \"6631915765bb0a94cfd6ca99\",\n \"account_shared\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/user/url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com/document.pdf\",\n \"confidential\": false,\n \"skipIndexing\": false,\n \"scrape\": false,\n \"institution\": \"6631915765bb0a94cfd6ca99\",\n \"selectedCourse\": {\n \"course_id\": 123,\n \"course_name\": \"<string>\",\n \"assistant\": {\n \"_id\": \"<string>\"\n }\n },\n \"selectedAssistant\": \"6856fa89cbafcff8d98680f5\",\n \"collection\": \"6631915765bb0a94cfd6ca99\",\n \"account_shared\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "URL ingested successfully",
"code": 1
}{
"success": false,
"message": "Invalid url",
"error": "<unknown>"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"success": false,
"message": "Google authorization is required to read this document.",
"consentUrl": "https://pria.praxislxp.com/api/auth/google/services/authorize?scopes=drive,document&token=..."
}Upload content from URL
Downloads or scrapes content from a URL and ingests it into the user’s IP Vault via RAG. Google document URLs (Docs, Sheets, Slides) are automatically detected and read via Google OAuth instead of plain HTTP download. The URL is validated against SSRF in non-dev mode. When an institution is provided, the user’s membership is verified before proceeding.
curl --request POST \
--url https://pria.praxislxp.com/api/user/url \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"url": "https://example.com/document.pdf",
"confidential": false,
"skipIndexing": false,
"scrape": false,
"institution": "6631915765bb0a94cfd6ca99",
"selectedCourse": {
"course_id": 123,
"course_name": "<string>",
"assistant": {
"_id": "<string>"
}
},
"selectedAssistant": "6856fa89cbafcff8d98680f5",
"collection": "6631915765bb0a94cfd6ca99",
"account_shared": false
}
'import requests
url = "https://pria.praxislxp.com/api/user/url"
payload = {
"url": "https://example.com/document.pdf",
"confidential": False,
"skipIndexing": False,
"scrape": False,
"institution": "6631915765bb0a94cfd6ca99",
"selectedCourse": {
"course_id": 123,
"course_name": "<string>",
"assistant": { "_id": "<string>" }
},
"selectedAssistant": "6856fa89cbafcff8d98680f5",
"collection": "6631915765bb0a94cfd6ca99",
"account_shared": False
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com/document.pdf',
confidential: false,
skipIndexing: false,
scrape: false,
institution: '6631915765bb0a94cfd6ca99',
selectedCourse: {course_id: 123, course_name: '<string>', assistant: {_id: '<string>'}},
selectedAssistant: '6856fa89cbafcff8d98680f5',
collection: '6631915765bb0a94cfd6ca99',
account_shared: false
})
};
fetch('https://pria.praxislxp.com/api/user/url', 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/url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://example.com/document.pdf',
'confidential' => false,
'skipIndexing' => false,
'scrape' => false,
'institution' => '6631915765bb0a94cfd6ca99',
'selectedCourse' => [
'course_id' => 123,
'course_name' => '<string>',
'assistant' => [
'_id' => '<string>'
]
],
'selectedAssistant' => '6856fa89cbafcff8d98680f5',
'collection' => '6631915765bb0a94cfd6ca99',
'account_shared' => false
]),
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/url"
payload := strings.NewReader("{\n \"url\": \"https://example.com/document.pdf\",\n \"confidential\": false,\n \"skipIndexing\": false,\n \"scrape\": false,\n \"institution\": \"6631915765bb0a94cfd6ca99\",\n \"selectedCourse\": {\n \"course_id\": 123,\n \"course_name\": \"<string>\",\n \"assistant\": {\n \"_id\": \"<string>\"\n }\n },\n \"selectedAssistant\": \"6856fa89cbafcff8d98680f5\",\n \"collection\": \"6631915765bb0a94cfd6ca99\",\n \"account_shared\": false\n}")
req, _ := http.NewRequest("POST", 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.post("https://pria.praxislxp.com/api/user/url")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/document.pdf\",\n \"confidential\": false,\n \"skipIndexing\": false,\n \"scrape\": false,\n \"institution\": \"6631915765bb0a94cfd6ca99\",\n \"selectedCourse\": {\n \"course_id\": 123,\n \"course_name\": \"<string>\",\n \"assistant\": {\n \"_id\": \"<string>\"\n }\n },\n \"selectedAssistant\": \"6856fa89cbafcff8d98680f5\",\n \"collection\": \"6631915765bb0a94cfd6ca99\",\n \"account_shared\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/user/url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com/document.pdf\",\n \"confidential\": false,\n \"skipIndexing\": false,\n \"scrape\": false,\n \"institution\": \"6631915765bb0a94cfd6ca99\",\n \"selectedCourse\": {\n \"course_id\": 123,\n \"course_name\": \"<string>\",\n \"assistant\": {\n \"_id\": \"<string>\"\n }\n },\n \"selectedAssistant\": \"6856fa89cbafcff8d98680f5\",\n \"collection\": \"6631915765bb0a94cfd6ca99\",\n \"account_shared\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "URL ingested successfully",
"code": 1
}{
"success": false,
"message": "Invalid url",
"error": "<unknown>"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"success": false,
"message": "Google authorization is required to read this document.",
"consentUrl": "https://pria.praxislxp.com/api/auth/google/services/authorize?scopes=drive,document&token=..."
}Authorizations
JWT token passed in x-access-token header
Body
URL to download and ingest content from
"https://example.com/document.pdf"
Whether the content is confidential. Only applied when institution is provided; ignored for personal uploads.
When true, the file is stored in the vault but RAG embedding generation is skipped. The file is set to status 'active' (visible in vault) with no embeddings. Default: false.
When true, scrapes webpage content. When false, downloads the file directly.
Institution ID to associate the upload with. Must match the user's institution for regular users.
"6631915765bb0a94cfd6ca99"
Course context for the upload history record
Show child attributes
Show child attributes
Assistant ID for the upload history record (used as fallback if selectedCourse.assistant._id is not set)
"6856fa89cbafcff8d98680f5"
Collection ID to associate the uploaded file with. When provided, the Upload record is linked to this collection.
"6631915765bb0a94cfd6ca99"
When true and institution is set, marks the file as shared across the institution's account
Was this page helpful?