Documentation

Build with Notir API

Everything you need to integrate Notir into your applications. RESTful APIs, SDKs, and widgets.

Introduction

Notir provides a powerful API for ingesting documents, querying your knowledge base, and building intelligent applications. Our API is RESTful and returns JSON responses.

Base URL

https://api.notir.io

Quick Start

1

Create an API Key

Go to Settings → Connections in your dashboard to create an API key.

2

Ingest Your First Document

Use the ingestion API to add content to your knowledge base.

cURL
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"
    }
  }'
3

Query Your Data

Use natural language to search and get answers from your knowledge base.

Query Example
// 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();

Authentication

All API requests require authentication using an API key. Include your key in theAuthorization header.

Security Warning

Never expose your API keys in client-side code or public repositories. Keep them secure and use environment variables.

Required Headers

HeaderDescription
AuthorizationBearer YOUR_API_KEY
x-tenant-idYour organization ID
Content-Typeapplication/json

REST API

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"
    }
  }'

API Endpoints

MethodEndpointDescription
POST/api/v1/ingestIngest content into your knowledge base
POST/api/v1/queryQuery your knowledge base with natural language
GET/api/v1/documentsList all ingested documents
DELETE/api/v1/documents/:idDelete a specific document
GET/api/v1/analyticsGet usage analytics and metrics

JavaScript SDK

Coming Soon

Our JavaScript SDK makes it easy to integrate Notir into your Node.js or browser applications.

Installation

npm install @notir/sdk

Usage

import { 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);

Embeddable Widget

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.

Add to your HTML
<!-- 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>

Configuration Options

data-positionbottom-right, bottom-left, top-right, top-left
data-themelight, dark
data-api-keyYour API key
data-org-idYour organization ID

Webhooks

Coming Soon

Receive 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!

Ready to build?

Get your API keys and start building intelligent applications today.