curl --request POST \
--url https://api.pardocs.com/v1/documents \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form file=@your/path/sample.pdf \
--form url=https://url_to_your_document.pdf
import requests
url = "https://api.pardocs.com/v1/documents"
headers = {"x-api-key": "<api-key>"}
files = {"file": open("your/path/sample.pdf", "rb")}
// files = {"url": (None, "https://url_to_your_document.pdf")}
response = requests.post(url, headers=headers, files=files)
print(response.json())
{
"document_id": "<string>",
"document_name": "<string>",
"document_created_at": 123
}{
"detail": "<string>"
}Documents API
Upload a Document
POST
/
v1
/
documents
curl --request POST \
--url https://api.pardocs.com/v1/documents \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form file=@your/path/sample.pdf \
--form url=https://url_to_your_document.pdf
import requests
url = "https://api.pardocs.com/v1/documents"
headers = {"x-api-key": "<api-key>"}
files = {"file": open("your/path/sample.pdf", "rb")}
// files = {"url": (None, "https://url_to_your_document.pdf")}
response = requests.post(url, headers=headers, files=files)
print(response.json())
{
"document_id": "<string>",
"document_name": "<string>",
"document_created_at": 123
}{
"detail": "<string>"
}The Upload a Document endpoint allows you to upload a document to the ParDocs API. You can submit the document either as a file or via a URL. This endpoint is used to add new documents for processing or storage.
Request Parameters:
- file (form-data, optional): The document file you want to upload. Provide this if you are uploading a file directly.
- url (form-data, optional): The URL of the document you want to upload. Provide this if you are uploading a document from a URL.
curl --request POST \
--url https://api.pardocs.com/v1/documents \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form file=@your/path/sample.pdf \
--form url=https://url_to_your_document.pdf
import requests
url = "https://api.pardocs.com/v1/documents"
headers = {"x-api-key": "<api-key>"}
files = {"file": open("your/path/sample.pdf", "rb")}
// files = {"url": (None, "https://url_to_your_document.pdf")}
response = requests.post(url, headers=headers, files=files)
print(response.json())
Authorizations
Body
multipart/form-data
The object can contain either a file or a URL pointing to the document to be analyzed. The properties are mutually exclusive, meaning you should provide either a file or a URL, but not both.
A binary file representing the document to be analyzed. This should be provided as a file upload, for example using a multipart/form-data request. The file can be in various formats such as .pdf, .docx, .eml, etc. Example usage: -F 'files=@path/to/your-document.extension'.
A URI pointing to the document to be analyzed. This should be used if the document is hosted at a specific URL and can be accessed directly from the web.
Minimum string length:
1
