Skip to main content
POST
/
api
/
knowledge-bases
Create knowledge base
curl --request POST \
  --url https://api.upon-ai.com/api/knowledge-bases \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "workspaceId": 123,
  "name": "<string>",
  "description": "<string>",
  "sources": [
    {
      "type": "text",
      "text": "<string>",
      "url": "<string>",
      "filename": "<string>",
      "contentType": "<string>",
      "base64": "<string>"
    }
  ]
}
'
{
  "knowledgeBaseId": "<string>",
  "name": "<string>",
  "status": "<string>",
  "description": "<string>",
  "sources": [
    {
      "source_id": "<string>",
      "source_type": "<string>",
      "filename": "<string>"
    }
  ],
  "workspaceId": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
workspaceId
integer
required
name
string
required
description
string
sources
object[]

Response

201 - application/json

Newly created knowledge base.

knowledgeBaseId
string
required
name
string
required
status
string
required
description
string | null
sources
object[]
workspaceId
integer | null