Upload Source File
curl --request POST \
--url https://{tenant_id}.api.useago.com/api/v1/sources/{source_id}/upload \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-Key: <api-key>' \
--form file='@example-file' \
--form 'title=<string>' \
--form default_language=enimport requests
url = "https://{tenant_id}.api.useago.com/api/v1/sources/{source_id}/upload"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"title": "<string>",
"default_language": "en"
}
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('title', '<string>');
form.append('default_language', 'en');
const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
options.body = form;
fetch('https://{tenant_id}.api.useago.com/api/v1/sources/{source_id}/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"title": "<string>",
"object": "document",
"page_id": "<string>",
"content": "<string>",
"override_content": "<string>",
"related_questions": "<string>",
"status": "<string>",
"public_display": true,
"default_language": "en",
"source_id": "<string>",
"source_name": "<string>",
"parent_id": "<string>",
"position": 0,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Sources
Upload Source File
Upload a file to a knowledge source.
The file is extracted to markdown and stored as a new knowledge document. Supports PDF, Word, PowerPoint, Excel, images, and more.
POST
/
api
/
v1
/
sources
/
{source_id}
/
upload
Upload Source File
curl --request POST \
--url https://{tenant_id}.api.useago.com/api/v1/sources/{source_id}/upload \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-Key: <api-key>' \
--form file='@example-file' \
--form 'title=<string>' \
--form default_language=enimport requests
url = "https://{tenant_id}.api.useago.com/api/v1/sources/{source_id}/upload"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"title": "<string>",
"default_language": "en"
}
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('title', '<string>');
form.append('default_language', 'en');
const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
options.body = form;
fetch('https://{tenant_id}.api.useago.com/api/v1/sources/{source_id}/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"title": "<string>",
"object": "document",
"page_id": "<string>",
"content": "<string>",
"override_content": "<string>",
"related_questions": "<string>",
"status": "<string>",
"public_display": true,
"default_language": "en",
"source_id": "<string>",
"source_name": "<string>",
"parent_id": "<string>",
"position": 0,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Authorizations
Path Parameters
Response
201 - application/json
Created
Stripe-aligned document response.
