Skip to main content

Knowledge Base

The SendSeven Knowledge Base is an AI-powered system that stores your organization's documents, FAQs, and website content. When queried, it uses retrieval-augmented generation (RAG) to find relevant information and generate accurate answers with source citations.

Required Scopes

ScopePurpose
knowledge_base:readSearch and list documents
knowledge_base:createCreate documents, folders, and start crawls
knowledge_base:deleteDelete documents

Key Capabilities

  • AI-powered search -- ask natural language questions and receive synthesized answers
  • Document management -- upload text documents, FAQs, and files
  • Website crawling -- automatically import content from your website
  • Folder organization -- organize documents into folders (each folder becomes a separate search corpus)
  • Confidence scoring -- every answer includes a confidence score indicating reliability

Pricing

Knowledge base queries draw from the same monthly included pool as messages and campaign messages, and any overage is billed at the same per-unit rate:

PlanBase feeIncluded pool / monthPer KB query beyond the pool
ProfessionalEUR 792,500EUR 0.020
ScaleEUR 19910,000EUR 0.015
EnterpriseEUR 49940,000EUR 0.010
API OnlyEUR 9 per connected channel1,000 per connected channelEUR 0.005

There is no separate KB allowance — a message, a campaign send, and a KB query all draw down the same pool.

Knowledge Base is not included on Basic. On API Only the Knowledge Base UI is disabled, but the API documented below is fully usable and billed exactly as shown above.


Search the Knowledge Base

Ask a natural language question and receive an AI-generated answer with source references.

POST /api/v1/knowledge-base/search

Request Body

FieldTypeRequiredDescription
querystringYesThe question or search query
limitintegerNoMax source documents to consider (default: 5, max: 20)
folder_idstringNoRestrict search to a specific folder

curl

curl -X POST "https://api.sendseven.com/api/v1/knowledge-base/search" \
-H "Authorization: Bearer s7_api_a1b2c3d4e5f6789012345678abcdef00" \
-H "Content-Type: application/json" \
-d '{
"query": "What is your return policy for electronics?",
"limit": 5
}'

Response

{
"answer": "Our return policy for electronics allows returns within 30 days of purchase. Items must be in original packaging with all accessories included. Refunds are processed within 5-7 business days after we receive the returned item. For defective products, we offer free return shipping. For non-defective returns, a flat EUR 5 return shipping fee applies.",
"confidence": 0.92,
"sources": [
{
"id": "doc_return_policy",
"title": "Return Policy - Electronics",
"relevance": 0.95,
"snippet": "Electronics may be returned within 30 days of purchase in original packaging..."
},
{
"id": "doc_shipping_faq",
"title": "Shipping & Returns FAQ",
"relevance": 0.78,
"snippet": "For defective products, we offer free return shipping..."
}
],
"tokens": {
"input": 1250,
"output": 180
}
}

Confidence Scores

RangeMeaningRecommended Action
0.70 -- 1.00High confidenceSafe to present directly to customers
0.40 -- 0.69Medium confidenceReview before presenting, may need clarification
0.00 -- 0.39Low confidenceAnswer may be incomplete or speculative
tip

Use the confidence score to decide how to present the answer. High-confidence answers can be sent directly to customers via your bot. Medium and low confidence answers should be routed to a human agent.

Python

import requests

BASE_URL = "https://api.sendseven.com/api/v1"
HEADERS = {
"Authorization": "Bearer s7_api_a1b2c3d4e5f6789012345678abcdef00",
"Content-Type": "application/json",
}

result = requests.post(
f"{BASE_URL}/knowledge-base/search",
headers=HEADERS,
json={"query": "How do I cancel my subscription?", "limit": 5},
).json()

print(f"Answer: {result['answer']}")
print(f"Confidence: {result['confidence']}")
for source in result["sources"]:
print(f" Source: {source['title']} (relevance: {source['relevance']})")

JavaScript

const BASE_URL = "https://api.sendseven.com/api/v1";
const HEADERS = {
"Authorization": "Bearer s7_api_a1b2c3d4e5f6789012345678abcdef00",
"Content-Type": "application/json",
};

const response = await fetch(`${BASE_URL}/knowledge-base/search`, {
method: "POST",
headers: HEADERS,
body: JSON.stringify({
query: "What payment methods do you accept?",
limit: 3,
}),
});
const result = await response.json();
console.log(`Answer (${Math.round(result.confidence * 100)}% confident):`);
console.log(result.answer);

Manage Documents

List Documents

GET /api/v1/knowledge-base/documents
ParameterTypeDefaultDescription
folder_idstringFilter by folder
typestringFilter: faq, document, crawled
searchstringSearch by title
pageinteger1Page number
page_sizeinteger20Items per page (max 100)
curl -X GET "https://api.sendseven.com/api/v1/knowledge-base/documents?page=1&page_size=20" \
-H "Authorization: Bearer s7_api_a1b2c3d4e5f6789012345678abcdef00" \
-H "Content-Type: application/json"

Create a Document

POST /api/v1/knowledge-base/documents
FieldTypeRequiredDescription
titlestringYesDocument title
typestringYesfaq or document
contentstringYesDocument content (plain text or HTML)
folder_idstringNoTarget folder ID
curl -X POST "https://api.sendseven.com/api/v1/knowledge-base/documents" \
-H "Authorization: Bearer s7_api_a1b2c3d4e5f6789012345678abcdef00" \
-H "Content-Type: application/json" \
-d '{
"title": "Product Warranty Information",
"type": "document",
"content": "All products sold by Acme Store come with a standard 12-month warranty. This warranty covers manufacturing defects and hardware failures under normal use.",
"folder_id": "folder_policies"
}'

Delete a Document

DELETE /api/v1/knowledge-base/documents/{document_id}
curl -X DELETE "https://api.sendseven.com/api/v1/knowledge-base/documents/doc_warranty_info" \
-H "Authorization: Bearer s7_api_a1b2c3d4e5f6789012345678abcdef00"

Folders

Folders organize documents. Each folder acts as a separate search corpus, allowing targeted search with the folder_id parameter.

Create a Folder

POST /api/v1/knowledge-base/folders
curl -X POST "https://api.sendseven.com/api/v1/knowledge-base/folders" \
-H "Authorization: Bearer s7_api_a1b2c3d4e5f6789012345678abcdef00" \
-H "Content-Type: application/json" \
-d '{
"name": "Product Documentation",
"description": "Technical documentation and user guides for all products"
}'

Website Crawl

Trigger a website crawl to automatically import content from a URL. The crawler follows links within the same domain and indexes page content.

POST /api/v1/knowledge-base/crawl
FieldTypeRequiredDescription
urlstringYesStarting URL to crawl
max_pagesintegerNoMaximum pages to crawl (default: 50, range: 50-500)
folder_idstringNoTarget folder for crawled pages
curl -X POST "https://api.sendseven.com/api/v1/knowledge-base/crawl" \
-H "Authorization: Bearer s7_api_a1b2c3d4e5f6789012345678abcdef00" \
-H "Content-Type: application/json" \
-d '{
"url": "https://docs.acme.com",
"max_pages": 100,
"folder_id": "folder_product_docs"
}'
{
"crawl_job_id": "crawl_abc123",
"url": "https://docs.acme.com",
"status": "started",
"max_pages": 100,
"folder_id": "folder_product_docs",
"started_at": "2026-02-10T17:50:00Z"
}
info

Crawls run asynchronously. Pages are indexed as they are discovered. You can check crawl progress in the SendSeven dashboard under Knowledge Base > Website Crawls.

Error Responses

StatusError CodeDescription
401INVALID_TOKENToken is invalid or expired
403INSUFFICIENT_SCOPEToken lacks knowledge_base:read or knowledge_base:create
404RESOURCE_NOT_FOUNDDocument or folder not found
422VALIDATION_ERRORInvalid request (e.g., URL not valid, content too large)

Next Steps