Notir provides a powerful API for ingesting documents, querying your knowledge base, and building intelligent applications. Our API is RESTful and returns JSON responses.
https://api.notir.ioGo to Settings → Connections in your dashboard to create an API key.
Use the ingestion API to add content to your knowledge base.
curl -X POST "https://api.notir.io/api/v1/ingest" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-tenant-id: YOUR_ORG_ID" \
-d '{
"content": "Your content to ingest",
"metadata": {
"source": "api",
"type": "feedback"
}
}'Use natural language to search and get answers from your knowledge base.
// Query your knowledge base
const response = await fetch('https://api.notir.io/api/v1/query', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY',
'x-tenant-id': 'YOUR_ORG_ID'
},
body: JSON.stringify({
query: 'What are the main customer complaints?',
options: {
maxResults: 5,
includeMetadata: true
}
})
});
const { answer, sources } = await response.json();All API requests require authentication using an API key. Include your key in theAuthorization header.
Never expose your API keys in client-side code or public repositories. Keep them secure and use environment variables.
| Header | Description |
|---|---|
Authorization | Bearer YOUR_API_KEY |
x-tenant-id | Your organization ID |
Content-Type | application/json |
The Notir REST API provides endpoints for document ingestion, querying, and management.
curl -X POST "https://api.notir.io/api/v1/ingest" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-tenant-id: YOUR_ORG_ID" \
-d '{
"content": "Your content to ingest",
"metadata": {
"source": "api",
"type": "feedback"
}
}'| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/ingest | Ingest content into your knowledge base |
| POST | /api/v1/query | Query your knowledge base with natural language |
| GET | /api/v1/documents | List all ingested documents |
| DELETE | /api/v1/documents/:id | Delete a specific document |
| GET | /api/v1/analytics | Get usage analytics and metrics |
Our JavaScript SDK makes it easy to integrate Notir into your Node.js or browser applications.
npm install @notir/sdkimport { NotirClient } from '@notir/sdk';
const notir = new NotirClient({
apiKey: 'YOUR_API_KEY',
orgId: 'YOUR_ORG_ID'
});
// Ingest content
await notir.ingest({
content: 'User feedback or content',
metadata: {
source: 'app',
userId: 'user-123',
page: '/dashboard'
}
});
// Query the knowledge base
const response = await notir.query('What feedback have users given?');
console.log(response.answer);Add a chat widget to your website with just a few lines of code. The widget allows your users to interact with your knowledge base directly.
<!-- Notir Widget -->
<script src="https://api.notir.io/notir-widget.js"
data-api-key="YOUR_API_KEY"
data-org-id="YOUR_ORG_ID"
data-position="bottom-right"
data-theme="light">
</script>data-positionbottom-right, bottom-left, top-right, top-leftdata-themelight, darkdata-api-keyYour API keydata-org-idYour organization IDReceive real-time notifications when events occur in your Notir account. Configure webhooks to trigger automations and keep your systems in sync.
Webhook support is coming soon. Stay tuned!