Skip to main content
POST
/
api
/
v1
/
context
/
knowledge
Create knowledge document
curl --request POST \
  --url http://localhost:3000/api/v1/context/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>",
      "tags": [
        "<string>"
      ],
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  }
}

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