The API reference moved here from eksis.io/developers.
AI Agents

Add a source

POST
/v1/ai-agents/library/knowledge/{knowledgeBaseId}/sources

Adds one source, up to 30 per knowledge set. A website is read before the answer comes back, then again every 7 days while an agent uses it. Text, FAQ, and files are ready right away. Needs the admin role. Needs AI Agent on the workspace's account; without it the endpoint answers 404 feature.unavailable.

Authorization

headerAuthorizationBearer <token>

Send your key as Authorization: Bearer eksis_sk_....

Path Parameters

knowledgeBaseId*string

Request Body

application/json
  1. body

website takes title and url. text takes title and body. faq takes title and faq. file takes fileName and data.

type*string
Value in"website""text""faq""file"
title?string

Up to 60 characters on a website.

Length1 <= length <= 120
url?string
Formaturi
Lengthlength <= 500
body?string
Length1 <= length <= 10000
faq?array<>
Items1 <= items <= 50
fileName?string

With the extension: pdf, docx, csv, txt, md.

Lengthlength <= 200
data?string

The file as base64, up to 1.4 MB before encoding.

Response Body

The new source.

application/json
  1. response
data?

Fields depend on type: url, readAt, and chars on a website, body on text, faq on an FAQ, and the file details on a file.

curl -X POST 'https://api.eksis.io/v1/ai-agents/library/knowledge/string/sources' \  -H 'Authorization: Bearer eksis_sk_...' \  -H 'Content-Type: application/json' \  -d '{  "type": "website"}'
{  "data": {    "id": "string",    "type": "website",    "title": "string",    "url": "string",    "body": "string",    "faq": [      {        "question": "string",        "answer": "string"      }    ],    "fileName": "string",    "fileType": "pdf",    "fileSize": 0,    "status": "pending",    "error": "string",    "readAt": "2019-08-24T14:15:22Z",    "chars": 0,    "createdAt": "2019-08-24T14:15:22Z"  }}