Skip to main content
POST
/
knowledge
/
{knowledge_base_id}
/
register_file
Register File Upload
curl --request POST \
  --url https://api.opper.ai/v2/knowledge/{knowledge_base_id}/register_file \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filename": "<string>",
  "file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "content_type": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "key": "<string>",
  "original_filename": "<string>",
  "document_id": 123,
  "metadata": {}
}

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 register the file for

Body

application/json
filename
string
required

The filename of the file to register

Example:

"example.pdf"

file_id
string<uuid>
required

The id of the file to register

content_type
string
required

The content type of the file to register

Example:

"application/pdf"

configuration
TextProcessingConfiguration · object

The configuration for the file to register

metadata
Metadata · object

Optional metadata to attach to the file

Example:
{ "category": "legal", "client": "acme" }

Response

Successful Response

id
string<uuid>
required
key
string
required
original_filename
string
required
document_id
integer
required
metadata
Metadata · object