Neuron Knowledge Bases API
Knowledge base CRUD, entries, uploads, search
Knowledge base CRUD, entries, uploads, search
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/neuron-ng:neuron-ng-knowledge-bases-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Neuron Knowledge Bases API
version: 1.0.0
description: 'API reference for Neuron — the AI-powered WhatsApp chatbot platform.
Neuron lets you build intelligent chatbots with tool integrations, knowledge bases, and human-in-the-loop monitoring.
## Authentication
Most endpoints require a JWT bearer token obtained from `POST /auth/login`.
Bot API endpoints use API keys prefixed with `nrn_`.
The **Social API** (`/social`) is organization-scoped — authenticate with an **account token** (`nrn_acc_`, from Dashboard → Settings → Account Tokens). Bot API keys are also accepted for backward compatibility but are legacy for this API.
## Response Format
All responses follow the envelope: `{ success: boolean, data?: any, error?: { message, code } }`'
servers:
- url: /api/v1
description: API v1
tags:
- name: Knowledge Bases
description: Knowledge base CRUD, entries, uploads, search
paths:
/knowledge-bases:
post:
tags:
- Knowledge Bases
summary: Create knowledge base
security:
- BearerAuth: []
requestBody:
content:
application/json:
schema:
type: object
required:
- name
properties:
name:
type: string
description:
type: string
rootInstruction:
type: string
required: true
responses:
'201':
description: Success
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
data:
$ref: '#/components/schemas/KnowledgeBase'
'400':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: postKnowledgeBases
x-operation-id-source: derived
get:
tags:
- Knowledge Bases
summary: List knowledge bases
security:
- BearerAuth: []
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
data:
type: array
items:
$ref: '#/components/schemas/KnowledgeBase'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: getKnowledgeBases
x-operation-id-source: derived
/knowledge-bases/{id}:
get:
tags:
- Knowledge Bases
summary: Get knowledge base details
security:
- BearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
description: ''
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
data:
$ref: '#/components/schemas/KnowledgeBase'
'400':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: getKnowledgeBasesById
x-operation-id-source: derived
put:
tags:
- Knowledge Bases
summary: Update knowledge base
security:
- BearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
description: ''
requestBody:
content:
application/json:
schema:
type: object
properties:
name:
type: string
description:
type: string
rootInstruction:
type: string
required: true
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
data:
$ref: '#/components/schemas/KnowledgeBase'
'400':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: putKnowledgeBasesById
x-operation-id-source: derived
delete:
tags:
- Knowledge Bases
summary: Delete knowledge base
security:
- BearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
description: ''
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
data:
type: object
'400':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: deleteKnowledgeBasesById
x-operation-id-source: derived
/knowledge-bases/{id}/entries:
post:
tags:
- Knowledge Bases
summary: Create knowledge entry
security:
- BearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
description: ''
requestBody:
content:
application/json:
schema:
type: object
required:
- title
- content
properties:
title:
type: string
content:
type: string
source:
type: string
folder:
type: string
required: true
responses:
'201':
description: Success
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
data:
$ref: '#/components/schemas/KnowledgeEntry'
'400':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: postKnowledgeBasesByIdEntries
x-operation-id-source: derived
get:
tags:
- Knowledge Bases
summary: List knowledge entries
security:
- BearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
description: ''
- name: folder
in: query
schema:
type: string
description: Filter by folder
- name: source
in: query
schema:
type: string
description: Filter by source
- name: page
in: query
schema:
type: string
description: Page
- name: limit
in: query
schema:
type: string
description: Limit
responses:
'200':
description: Paginated list
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
data:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/KnowledgeEntry'
total:
type: integer
page:
type: integer
limit:
type: integer
'400':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: getKnowledgeBasesByIdEntries
x-operation-id-source: derived
/knowledge-bases/{id}/entries/{eid}:
put:
tags:
- Knowledge Bases
summary: Update entry
security:
- BearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
description: ''
- name: eid
in: path
required: true
schema:
type: string
format: uuid
description: ''
requestBody:
content:
application/json:
schema:
type: object
required: true
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
data:
$ref: '#/components/schemas/KnowledgeEntry'
'400':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: putKnowledgeBasesByIdEntriesByEid
x-operation-id-source: derived
delete:
tags:
- Knowledge Bases
summary: Delete entry
security:
- BearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
description: ''
- name: eid
in: path
required: true
schema:
type: string
format: uuid
description: ''
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
data:
type: object
'400':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: deleteKnowledgeBasesByIdEntriesByEid
x-operation-id-source: derived
/knowledge-bases/{id}/upload:
post:
tags:
- Knowledge Bases
summary: Upload document to knowledge base
security:
- BearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
description: ''
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
responses:
'201':
description: Success
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
data:
type: object
'400':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: postKnowledgeBasesByIdUpload
x-operation-id-source: derived
/knowledge-bases/{id}/search:
get:
tags:
- Knowledge Bases
summary: Search knowledge base (hybrid)
security:
- BearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
description: ''
- name: q
in: query
schema:
type: string
description: Search query
- name: limit
in: query
schema:
type: string
description: Max results
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
data:
type: array
items:
$ref: '#/components/schemas/KnowledgeEntry'
'400':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: getKnowledgeBasesByIdSearch
x-operation-id-source: derived
/knowledge-bases/{id}/bots:
get:
tags:
- Knowledge Bases
summary: List bots using this knowledge base
security:
- BearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
description: ''
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
data:
type: array
items:
$ref: '#/components/schemas/Bot'
'400':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: getKnowledgeBasesByIdBots
x-operation-id-source: derived
/knowledge-bases/{id}/sync:
post:
tags:
- Knowledge Bases
summary: Sync embeddings for all entries
security:
- BearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
description: ''
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
data:
type: object
'400':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: postKnowledgeBasesByIdSync
x-operation-id-source: derived
components:
schemas:
Bot:
type: object
properties:
id:
type: string
format: uuid
name:
type: string
systemPrompt:
type: string
llmModel:
type: string
temperature:
type: number
maxTokens:
type: integer
isActive:
type: boolean
orgId:
type: string
format: uuid
assignment:
type: string
responsibilities:
type: string
greetingMessage:
type: string
welcomeMessage:
type: string
fallbackMessage:
type: string
escalationPrompt:
type: string
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
ErrorResponse:
type: object
properties:
success:
type: boolean
example: false
error:
type: object
properties:
message:
type: string
code:
type: string
KnowledgeEntry:
type: object
properties:
id:
type: string
format: uuid
knowledgeBaseId:
type: string
format: uuid
title:
type: string
content:
type: string
source:
type: string
enum:
- manual
- upload
- reflection
- conversation
folder:
type: string
enum:
- general
- faqs
- skills
- contexts
- policies
KnowledgeBase:
type: object
properties:
id:
type: string
format: uuid
name:
type: string
description:
type: string
rootInstruction:
type: string
orgId:
type: string
format: uuid
createdAt:
type: string
format: date-time
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: JWT access token from POST /auth/login
ApiKeyAuth:
type: http
scheme: bearer
description: Bot API key (nrn_xxx) from bot API keys management
AccountTokenAuth:
type: http
scheme: bearer
description: Account token (nrn_acc_xxx) from Dashboard > Settings > Account Tokens