curl --request POST \
--url https://hiimpria.ai/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://hiimpria.ai/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://hiimpria.ai/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://hiimpria.ai/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://hiimpria.ai/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://hiimpria.ai/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://hiimpria.ai/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,
"code": "GOOGLE_AUTH_REQUIRED",
"message": "Google authorization is required to read this document.",
"consentUrl": "https://pria.praxislxp.com/api/auth/google/services/authorize?scopes=drive,document&token=..."
}{
"success": false,
"message": "<string>",
"error": "<string>"
}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://hiimpria.ai/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://hiimpria.ai/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://hiimpria.ai/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://hiimpria.ai/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://hiimpria.ai/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://hiimpria.ai/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://hiimpria.ai/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,
"code": "GOOGLE_AUTH_REQUIRED",
"message": "Google authorization is required to read this document.",
"consentUrl": "https://pria.praxislxp.com/api/auth/google/services/authorize?scopes=drive,document&token=..."
}{
"success": false,
"message": "<string>",
"error": "<string>"
}Body
Collection ID to associate the uploaded file with. When provided, the Upload record is linked to this collection. The collection must be one this upload may land in: a 24-character id string (400 otherwise), an existing collection (404), one the caller may add to (a personal collection: its owner; a Digital Twin collection: files.add in that twin, or the account-vault rule for an account-shared one; 403 otherwise), and in the vault the new file will be in (personal / this twin / this account; 400 otherwise).
"6631915765bb0a94cfd6ca99"
Was this page helpful?