Upload a Brain document
curl --request POST \
--url https://app.hookie.ai/admin/api/data-workspace/documents \
--header 'Content-Type: application/json' \
--data '
{
"pipeline_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"text": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
pipeline_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
text: '<string>'
})
};
fetch('https://app.hookie.ai/admin/api/data-workspace/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/data-workspace/documents"
payload = {
"pipeline_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"text": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}Data workspace
Upload a Brain document
Requires write access and the Ultimate plan or the Brain add-on. Send either JSON or the raw file with ?pipeline_id=&name= and its Content-Type. The pipeline must be an enabled documents pipeline with an upload source. ASCII plain text only, at most 1 MiB; other bytes answer 415 rather than being truncated. Returns 202 with the document in state processing (it is chunked, embedded and indexed in the background), or 200 with duplicate: true when the same bytes were already uploaded through that pipeline. 429 means a storage, embedding or job allowance is exhausted; 503 means document storage is not configured.
POST
/
admin
/
api
/
data-workspace
/
documents
Upload a Brain document
curl --request POST \
--url https://app.hookie.ai/admin/api/data-workspace/documents \
--header 'Content-Type: application/json' \
--data '
{
"pipeline_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"text": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
pipeline_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
text: '<string>'
})
};
fetch('https://app.hookie.ai/admin/api/data-workspace/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/data-workspace/documents"
payload = {
"pipeline_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"text": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}