Skip to main content
POST
/
api
/
knowledge-bases
/
{knowledgeBaseId}
/
sources
Add knowledge base sources
curl --request POST \
  --url https://api.upon-ai.com/api/knowledge-bases/{knowledgeBaseId}/sources \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "workspaceId": 123,
  "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.

Path Parameters

knowledgeBaseId
string
required

Knowledge base identifier.

Body

application/json
workspaceId
integer
required
sources
object[]
required

Response

200 - application/json

Knowledge base with updated source list.

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