Skip to main content
POST
/
knowledge-bases
Endpoint
POST https://gateway.orkeia.ai/knowledge-bases
Authentication
Requires header authorization: <your_token>.

Request body

The service expects a wrapper with knowledgeBase and filename.
{
  "knowledgeBase": {
    "name": "Internal Policies",
    "description": "Official corporate documents",
    "enabled": true,
    "sectors": ["hr", "legal"],
    "content": "https://storage.orkeia.ai/kb/policies.pdf",
    "type": "file",
    "multimodal": false,
    "tags": ["compliance", "contracts"]
  },
  "filename": "policies.pdf"
}
Notes
  • For type: "file", send the corresponding filename to the stored content.
  • For type: "url" or type: "text", filename can be ignored/left empty, but the field exists in the payload for endpoint consistency.
  • content:
    • file: storage path/URL of the file (e.g., S3/Storage).
    • url: public/private link to be referenced.
    • text: direct textual content.

Example (cURL)

curl -X POST "https://gateway.orkeia.ai/knowledge-bases"   -H "Authorization: Bearer <your_token>"   -H "Content-Type: application/json"   -d '{
    "knowledgeBase": {
      "name": "Internal Policies",
      "description": "Official corporate documents",
      "enabled": true,
      "sectors": ["hr", "legal"],
      "content": "https://storage.orkeia.ai/kb/policies.pdf",
      "type": "file",
      "multimodal": false,
      "tags": ["compliance", "contracts"]
    },
    "filename": "policies.pdf",
  }'

Reference Interface:

export interface KnowledgeBase {
  id?: string;
  name: string;
  description: string;
  enabled: boolean;
  sectors: string[];
  content: string;
  type: 'file' | 'url' | 'text';
  multimodal: boolean;
  tags: string[];
}
NameTypeRequiredDescriptionExample
idstringNoUnique identifier of the knowledge base (returned by the backend).”KB_123456”
namestringYesName of the knowledge base.”Internal Policies”
descriptionstringYesBrief description of the content/usage.”Official corporate documents”
enabledbooleanYesIndicates whether the base will be active in the environment.true
sectorsstring[]YesSectors that can consume this base (access governance).[“hr”, “legal”]
contentstringYesSource of the content: file path/URL, external link, or literal text (according to type).https://storage.orkeia.ai/kb/policies.pdf
type”file” | “url” | “text”YesType of the content.”file”
multimodalbooleanYesWhether the base contains modalities beyond text (images/audio/video).false
tagsstring[]YesMetadata/tags for search and organization.[“compliance”,“contracts”]

Responses

Response - Success

response
{
  "status": "OK",
  "data": { "id": "KB_123456" }
}

500 — Bad Request

{
  "status": "ERROR",
  "code": "server/error",
  "data": null
}

400 — Client Error

{
  "status": "ERROR",
  "code": "client/error",
  "data": null
}