Skip to main content
POST
/
api
/
v1
/
knowledge
Create knowledge document
curl --request POST \
  --url http://localhost:3001/api/v1/knowledge \
  --header 'Content-Type: application/json' \
  --cookie nut-session= \
  --data '
{
  "title": "<string>",
  "content": "<string>",
  "tags": [
    "<string>"
  ]
}
'
{
  "success": true,
  "data": {
    "document": {
      "filename": "<string>",
      "title": "<string>",
      "content": "<string>",
      "metadata": {
        "updated": "2023-11-07T05:31:56Z",
        "category": "<string>",
        "tags": [
          "<string>"
        ],
        "sources": [
          "<string>"
        ],
        "summary": "<string>"
      },
      "snippet": "<string>",
      "matchedIn": [
        "<string>"
      ],
      "score": 123
    }
  }
}

Authorizations

nut-session
string
cookie
required

Session cookie authentication

Body

application/json
title
string
required

Document title

content
string
required

Document content in Markdown

tags
string[]

Response

Knowledge document created

success
boolean
required
data
object