Upload Pdf
curl --request POST \
--url https://{tenant_id}.api.useago.com/api/v1/custom-data-sources/{id_or_slug}/upload \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-Key: <api-key>' \
--form file='@example-file'import requests
url = "https://{tenant_id}.api.useago.com/api/v1/custom-data-sources/{id_or_slug}/upload"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
options.body = form;
fetch('https://{tenant_id}.api.useago.com/api/v1/custom-data-sources/{id_or_slug}/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"external_id": "<string>",
"data": {},
"tags": [
"<string>"
],
"searchable_text": "<string>",
"content": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"score": 123
}Custom Data Sources
Upload Pdf
Upload a PDF; an LLM extracts the schema’s fields and inserts a new row.
POST
/
api
/
v1
/
custom-data-sources
/
{id_or_slug}
/
upload
Upload Pdf
curl --request POST \
--url https://{tenant_id}.api.useago.com/api/v1/custom-data-sources/{id_or_slug}/upload \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-Key: <api-key>' \
--form file='@example-file'import requests
url = "https://{tenant_id}.api.useago.com/api/v1/custom-data-sources/{id_or_slug}/upload"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
options.body = form;
fetch('https://{tenant_id}.api.useago.com/api/v1/custom-data-sources/{id_or_slug}/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"external_id": "<string>",
"data": {},
"tags": [
"<string>"
],
"searchable_text": "<string>",
"content": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"score": 123
}Authorizations
Path Parameters
Body
multipart/form-data
