Add text or a .txt/.md file to the knowledge base
POST/api/v1/chatbots/:chatbotId/text
Adds text or Markdown straight into the chatbot's knowledge base — no file upload needed. Send a single text string (with an optional fileName) or a batch of items (for example curated question/answer pairs). Each entry becomes its own searchable, listable, deletable knowledge source. Processing is synchronous — the response reports per-entry results. Long entries are split automatically. Required scope: documents:write.
Request
Responses
- 200
- 207
- 400
- 401
- 403
- 404
- 413
- 429
- 500
All entries were added.
Partial success — some entries were added and some failed (see documents[].success).
Bad Request — invalid input
Unauthorized — missing or invalid API key
Forbidden — key lacks required scope
Not Found
An entry or the batch exceeds the size limit, or the account storage limit.
Too Many Requests — rate limit exceeded
Every entry failed to be added (see documents[].error for per-entry reasons).