Skip to main content
POST
/
api
/
user
/
url
Upload content from URL
curl --request POST \
  --url http://localhost:3000/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
}
'
{
  "success": true,
  "message": "Content uploaded successfully",
  "upload": {
    "_id": "<string>",
    "filename": "<string>",
    "originalname": "<string>",
    "mimetype": "<string>",
    "created": "2023-11-07T05:31:56Z",
    "filesize": 123,
    "status": "active",
    "thumbnail": "<string>",
    "user": "<string>",
    "institution": "<string>",
    "file_summary": "<string>",
    "file_title": "<string>",
    "file_url": "<string>",
    "tokens_used": 123,
    "is_private": true,
    "file_dimensions": "<string>",
    "file_authors": "<string>",
    "owner_data": {
      "email": "[email protected]",
      "fname": "<string>",
      "lname": "<string>"
    },
    "index": 123
  }
}

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

scrape
boolean
default:false

Whether to scrape the webpage content

Response

Content uploaded successfully

success
boolean
Example:

true

message
string
Example:

"Content uploaded successfully"

upload
object