Upload Document Attachment
curl --request POST \
--url https://{tenant_id}.api.useago.com/api/v1/documents/{document_id}/attachments \
--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/documents/{document_id}/attachments"
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/documents/{document_id}/attachments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"url": "<string>",
"name": "<string>",
"content_type": "<string>",
"object": "attachment"
}Documents
Upload Document Attachment
Upload an image attachment to a knowledge document.
POST
/
api
/
v1
/
documents
/
{document_id}
/
attachments
Upload Document Attachment
curl --request POST \
--url https://{tenant_id}.api.useago.com/api/v1/documents/{document_id}/attachments \
--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/documents/{document_id}/attachments"
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/documents/{document_id}/attachments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"url": "<string>",
"name": "<string>",
"content_type": "<string>",
"object": "attachment"
}