Skip to main content
POST
/
api
/
user
/
url
Upload content from URL
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,
  "scrape": false,
  "institution": "6631915765bb0a94cfd6ca99",
  "selectedCourse": {
    "course_id": 123,
    "course_name": "<string>",
    "assistant": {
      "_id": "<string>"
    }
  },
  "selectedAssistant": "6856fa89cbafcff8d98680f5"
}
'
{
  "success": true,
  "message": "URL ingested successfully",
  "code": 1
}

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Body

application/json
url
string<uri>
required

URL to download and ingest content from

Example:

"https://example.com/document.pdf"

confidential
boolean
default:false

Whether the content is confidential. Only applied when institution is provided; ignored for personal uploads.

scrape
boolean
default:false

When true, scrapes webpage content. When false, downloads the file directly.

institution
string

Institution ID to associate the upload with. Must match the user's institution for regular users.

Example:

"6631915765bb0a94cfd6ca99"

selectedCourse
object

Course context for the upload history record

selectedAssistant
string

Assistant ID for the upload history record (used as fallback if selectedCourse.assistant._id is not set)

Example:

"6856fa89cbafcff8d98680f5"

Response

URL content ingested successfully

success
boolean
Example:

true

message
string
Example:

"URL ingested successfully"

code
integer

Status code (1 indicates success)

Example:

1