Skip to main content
POST
Create Knowledge Base
The response returns its kb_id with processing_status pending; poll Get knowledge base until status is completed, then attach it to an agent with the attach_kb operation of Edit agent settings.

Content

Send kb_name and any mix of files, urls and faqs; each FAQ is a {"question", "answer"} object. One request takes up to 10 files (2 MB each, 5 MB in total) and 20 URLs. Files are read by extension: PDF, DOCX, TXT, CSV (one entry per row) and JSON. Any other extension, such as .md, is read as plain text. Knowledge bases created with the API are not listed on the dashboard’s Knowledge Base page. They do appear in the agent editor’s knowledge base picker and in Get all knowledge bases, which also lists the ones made in the dashboard.

Authorizations

X-API-KEY
string
header
required

Headers

X-API-KEY
string
required

(Required) Your Ringg AI API key.

Example:

"rg_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Body

multipart/form-data
kb_name
string
required

(Required) Name of the knowledge base

Example:

"Product Documentation"

files
file[]

(Optional) Files to upload (max 10 files, 2 MB each, 5 MB total). PDF, DOCX, TXT, CSV and JSON are parsed; other files are read as plain text.

urls
string

(Optional) JSON string array of URLs to index (max 20 URLs)

Example:

"[\"https://example.com/docs\", \"https://example.com/faq\"]"

faqs
string

(Optional) JSON string array of FAQ objects

Example:

"[{\"question\": \"What is your return policy?\", \"answer\": \"30-day money back guarantee\"}]"

Response

Knowledge base created successfully.

message
string
Example:

"Knowledge Base creation initiated"

kb_id
string
Example:

"550e8400-e29b-41d4-a716-446655440000"

processing_status
string
Example:

"pending"

files_queued
integer
Example:

3