curl --request POST \
--url https://api.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"content": {
"text": "<string>",
"source": "<string>",
"base64": "<string>",
"uri": "<string>",
"ext": "<string>",
"name": "<string>",
"source_info": {},
"extras": {}
},
"category_id": ""
}
'import requests
url = "https://api.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents"
payload = {
"title": "<string>",
"content": {
"text": "<string>",
"source": "<string>",
"base64": "<string>",
"uri": "<string>",
"ext": "<string>",
"name": "<string>",
"source_info": {},
"extras": {}
},
"category_id": ""
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
content: {
text: '<string>',
source: '<string>',
base64: '<string>',
uri: '<string>',
ext: '<string>',
name: '<string>',
source_info: {},
extras: {}
},
category_id: ''
})
};
fetch('https://api.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'content' => [
'text' => '<string>',
'source' => '<string>',
'base64' => '<string>',
'uri' => '<string>',
'ext' => '<string>',
'name' => '<string>',
'source_info' => [
],
'extras' => [
]
],
'category_id' => ''
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"content\": {\n \"text\": \"<string>\",\n \"source\": \"<string>\",\n \"base64\": \"<string>\",\n \"uri\": \"<string>\",\n \"ext\": \"<string>\",\n \"name\": \"<string>\",\n \"source_info\": {},\n \"extras\": {}\n },\n \"category_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"content\": {\n \"text\": \"<string>\",\n \"source\": \"<string>\",\n \"base64\": \"<string>\",\n \"uri\": \"<string>\",\n \"ext\": \"<string>\",\n \"name\": \"<string>\",\n \"source_info\": {},\n \"extras\": {}\n },\n \"category_id\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"content\": {\n \"text\": \"<string>\",\n \"source\": \"<string>\",\n \"base64\": \"<string>\",\n \"uri\": \"<string>\",\n \"ext\": \"<string>\",\n \"name\": \"<string>\",\n \"source_info\": {},\n \"extras\": {}\n },\n \"category_id\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"data": {
"status": "queued",
"task_id": "",
"id": "<string>"
}
}{}{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{}{}Upload a document
Upload a document for ingest.
Ingest is asynchronous at the gateway: it answers 202 with status “queued” and a task_id, and the document id is minted downstream. Poll GET /api/v2/tasks/, then resolve the id from GET …/documents. Ingest is only truly complete once that document reports topic_count greater than 0.
contentis one content object: inline text, or a file already uploaded through POST /api/v2/object/sign and referenced by its object key as the content’suri.category_idis optional — omit it to let the server classify the document into this base’s taxonomy.
curl --request POST \
--url https://api.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"content": {
"text": "<string>",
"source": "<string>",
"base64": "<string>",
"uri": "<string>",
"ext": "<string>",
"name": "<string>",
"source_info": {},
"extras": {}
},
"category_id": ""
}
'import requests
url = "https://api.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents"
payload = {
"title": "<string>",
"content": {
"text": "<string>",
"source": "<string>",
"base64": "<string>",
"uri": "<string>",
"ext": "<string>",
"name": "<string>",
"source_info": {},
"extras": {}
},
"category_id": ""
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
content: {
text: '<string>',
source: '<string>',
base64: '<string>',
uri: '<string>',
ext: '<string>',
name: '<string>',
source_info: {},
extras: {}
},
category_id: ''
})
};
fetch('https://api.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'content' => [
'text' => '<string>',
'source' => '<string>',
'base64' => '<string>',
'uri' => '<string>',
'ext' => '<string>',
'name' => '<string>',
'source_info' => [
],
'extras' => [
]
],
'category_id' => ''
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"content\": {\n \"text\": \"<string>\",\n \"source\": \"<string>\",\n \"base64\": \"<string>\",\n \"uri\": \"<string>\",\n \"ext\": \"<string>\",\n \"name\": \"<string>\",\n \"source_info\": {},\n \"extras\": {}\n },\n \"category_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"content\": {\n \"text\": \"<string>\",\n \"source\": \"<string>\",\n \"base64\": \"<string>\",\n \"uri\": \"<string>\",\n \"ext\": \"<string>\",\n \"name\": \"<string>\",\n \"source_info\": {},\n \"extras\": {}\n },\n \"category_id\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"content\": {\n \"text\": \"<string>\",\n \"source\": \"<string>\",\n \"base64\": \"<string>\",\n \"uri\": \"<string>\",\n \"ext\": \"<string>\",\n \"name\": \"<string>\",\n \"source_info\": {},\n \"extras\": {}\n },\n \"category_id\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"data": {
"status": "queued",
"task_id": "",
"id": "<string>"
}
}{}{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{}{}Authorizations
API key issued by EverOS, sent as Authorization: Bearer <api_key>.
Path Parameters
Body
Public POST/PUT documents request body (design §3.2 / §3.3). content is the
object to ingest (its uri = the SMM object_key). On PUT the doc_id rides the
path, not the body; on POST no id is supplied — the engine mints it.
Human-readable name for the document. Until the async ingest finishes this is the only handle the caller has — the document id is minted downstream, so GET .../documents is resolved by title.
1The object to ingest (its uri = the SMM object_key)
Show child attributes
Show child attributes
Category id in this kb; omit for LLM auto-classify
Was this page helpful?

