Skip to main content
POST
/
knowledge
/
{knowledge_base_id}
/
add
cURL
curl --request POST \
  --url https://api.opper.ai/v2/knowledge/{knowledge_base_id}/add \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "<string>"
}
'
{
  "detail": "<unknown>",
  "type": "BadRequestError",
  "message": "The request is invalid"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

knowledge_base_id
string<uuid>
required

The id of the knowledge base to add the data to

Body

application/json
content
string
required
Minimum string length: 1
Example:

"The capital of France is Paris"

key
string | null

The key of the document

Example:

"paris_123"

metadata
Metadata · object

The metadata of the document

Example:
{ "category": "product", "price": 100 }
configuration
TextProcessingConfiguration · object

The configuration for the document

Response

Successful Response