DocsBrew Documentation
DocsBrew turns your catalog, website, and messaging channels into one conversational AI sales agent. Your bot sells on your website, WhatsApp, Telegram, Instagram, and Facebook Messenger — using a single source of truth for products and knowledge.
How to upload your product catalog, index your knowledge base, embed the widget (2 lines of code), connect every messaging channel, manage leads, and use the API. Also: how plans and limits work, and which features unlock at each tier.
DocsBrew separates Catalog (what you sell — products, services, tours, menu items) from Knowledge Base (what your bot knows about your business — about us, FAQs, policies, shipping). Catalog comes from structured uploads (CSV, Excel, Shopify). Knowledge comes from website crawls, file uploads, or typed-in text. Keeping them separate is the key to an agent that doesn't hallucinate prices or mix up products with blog posts.
Quickstart
Get DocsBrew running on your site in under 5 minutes.
Create your account
Sign up at docsbrew.com/signup. You'll be asked for your name, email, password, and an Organization Name — this becomes the workspace that holds your projects, team members, and billing. No credit card required on the free tier.
Already have an account? Log in instead.
Create a project and load your data
A project represents one business. Pick a name, a business type (e‑commerce, travel, restaurant, accommodation, services, SaaS), and a sales tone. Then feed it two things:
- Your Catalog — upload a CSV or Excel file (Catalog tab), or connect Shopify. The system imports names, prices, images, and any custom attributes.
- Your Knowledge Base — paste your website URL for a crawl, upload PDFs/Markdown/HTML, or just type your FAQ in as plain text (Knowledge tab). This becomes the context your bot uses to answer questions.
Don't have a website yet? Skip the crawl — the "Type It Out" option on the Knowledge tab lets you seed the bot in minutes.
Add the widget
Copy the embed snippet from your project's Widget page and paste it before the closing </body> tag on your site.
<script
src="https://api.docsbrew.com/widget/embed.js"
data-project-id="your-project-id"
></script>
Start selling
That's it. The widget appears on your site as a chat bubble. Visitors can ask questions about your products, get recommendations, and convert — all through conversation.
How DocsBrew works
1. Connect
You give DocsBrew two kinds of data: a structured Catalog (CSV, Excel, or Shopify sync — what you sell, with prices) and an unstructured Knowledge Base (website crawl, uploaded PDFs, or typed FAQs — what your bot knows). They live in separate tables so the bot never confuses a blog post with a product.
2. Converse
When a visitor asks a question on any channel, DocsBrew runs a retrieval pipeline: it searches your catalog for matching products, your knowledge base for relevant context, and stitches the best pieces into the LLM prompt. The unified AI agent handles intent classification, product recommendations, objection handling, and lead capture — all in one model call per turn.
3. Convert
The agent tracks conversation state (browsing → considering → ready_to_buy), captures contact info naturally when the visitor is warm, scores the lead, and fires a notification to the business owner. Conversations from every channel flow into one unified inbox on the dashboard.
DocsBrew scores every lead based on engagement signals — questions asked, products viewed, time spent, and funnel stage. You see qualified leads in your dashboard, ranked by conversion likelihood.
Widget installation
The DocsBrew widget can be embedded on any website with a single script tag. It loads asynchronously and won't block your page rendering.
Script tag embed
The simplest way to add DocsBrew. Paste this snippet before </body>:
<script
src="https://api.docsbrew.com/widget/embed.js"
data-project-id="proj_abc123"
></script>
The embed script creates a secure cross-origin iframe that loads the chat widget. This approach is CSP-friendly and works on any hosting platform including Shopify, WordPress, Squarespace, and static sites.
How it loads
- The
embed.jsbootloader (~3KB) reads yourdata-*attributes - It collects page context (URL, title, referrer, visitor timezone, screen size)
- An iframe is created pointing to your DocsBrew widget endpoint
- The widget and your page communicate via the
postMessageAPI
Widget customization
Control the widget's appearance and behavior through data-* attributes on the script tag or from the dashboard's Widget page.
Available attributes
All attributes below are read from the <script> tag that loads embed.js (and are forwarded to the widget iframe as URL params). Every attribute is optional except data-project-id.
| Attribute | Default | Description |
|---|---|---|
data-project-id |
— | Required. Your project UUID. Find it on the project's Widget page in the dashboard, or as data-site-id in legacy snippets. |
data-theme |
auto |
Color scheme: light, dark, or auto (follows the visitor's OS preference via prefers-color-scheme). |
data-accent |
#0070f3 |
Primary color for the launcher bubble, header, and action buttons. Any valid hex works — the widget auto-picks black or white foreground text based on luminance. |
data-radius |
12 |
Corner radius in pixels for the launcher and chat panel. Use 0 for sharp corners or larger values for a friendlier look. |
data-position |
bottom-right |
Where the launcher docks: bottom-right or bottom-left. |
data-name |
AI Assistant |
Display name shown in the widget header, next to the logo. |
data-welcome |
Hi! How can I help you today? |
The first message visitors see when they open the chat. |
data-placeholder |
Ask a question... |
Placeholder text shown in the message input. |
data-logo |
— | URL of a logo image to show in the header (displayed in a 28px circle). Omit to render the default chat glyph. |
data-branding |
true |
Show the "Powered by DocsBrew" footer. Set to false on paid plans to white-label. |
data-auto-open |
— | Auto-open the chat after N seconds (integer). Omit the attribute to keep the widget closed until the visitor clicks the launcher. |
data-launcher |
icon |
Launcher style: icon (round chat bubble), text (pill with label), or icon-text (pill with glyph + label). |
data-launcher-text |
Chat with us |
Text shown on the launcher when data-launcher is text or icon-text. |
data-launcher-size |
56 |
Launcher button diameter in pixels (for the icon style) or height (for the text / icon-text styles). Use smaller values for dense layouts. |
data-width |
380 |
Chat panel width in pixels. On mobile, the widget auto-collapses to full-screen. |
data-height |
560 |
Chat panel height in pixels. |
data-suggestions |
— | Pipe-separated list of suggested questions shown as clickable chips under the welcome message. Example: "How much does it cost?|Do you ship internationally?|Book a demo". |
Example with customization
<script
src="https://api.docsbrew.com/widget/embed.js"
data-project-id="proj_abc123"
data-accent="#6366f1"
data-position="bottom-left"
data-welcome="Hi! Looking for the perfect pair? I can help."
data-name="ShoeVault"
data-theme="light"
></script>
Settings configured in the dashboard's Widget page take effect as defaults. Attributes on the script tag override dashboard settings, giving you per-page control.
Widget events & callbacks
The widget communicates with your page via the postMessage API. You can listen for events to trigger custom behavior.
Listening for events
window.addEventListener('message', function(event) {
// Always verify the origin in production
if (event.data && event.data.type) {
switch (event.data.type) {
case 'docsbrew:ready':
console.log('Widget loaded');
break;
case 'docsbrew:resize':
console.log('Widget resized:', event.data.width, event.data.height);
break;
case 'docsbrew:navigate':
console.log('Navigation requested:', event.data.url);
break;
}
}
});
Event reference
| Event type | Payload | Description |
|---|---|---|
docsbrew:ready |
— | Fired when the widget iframe has finished loading. |
docsbrew:resize |
{ width, height } |
Fired when the widget panel opens, closes, or changes size. |
docsbrew:navigate |
{ url, newTab } |
Fired when the widget needs to open a URL on your page (e.g., a product link). |
docsbrew:pointer-events |
{ enabled } |
Toggles click-through on the iframe overlay. When enabled is false, clicks pass through the transparent iframe to your page underneath — this is how the launcher collapses without blocking clicks on the area it used to occupy. |
docsbrew:position |
{ position } |
Fired when the widget's dock position changes. position is either bottom-right or bottom-left. The bootloader uses this to move the iframe across the viewport when visitors or dashboard settings flip the launcher side. |
The bootloader sends docsbrew:host-context (page URL, title, referrer, timezone, screen size, OS color scheme) into the widget right after docsbrew:ready, and docsbrew:color-scheme whenever the visitor's OS theme switches. You only need to handle these yourself if you're building a fully custom embed instead of using embed.js.
Iframe embed (advanced)
If you need full control over the iframe, you can embed it manually instead of using the bootloader script.
<iframe
src="https://api.docsbrew.com/widget/frame?project-id=proj_abc123&accent=%230070f3"
style="position:fixed; bottom:0; right:0; width:420px; height:100vh;
border:none; z-index:999999;"
allow="clipboard-write"
></iframe>
When using the manual iframe approach, you're responsible for handling postMessage events (resize, navigation, pointer-events) yourself. The bootloader script handles all of this automatically.
Dashboard overview
The DocsBrew dashboard is your control center. After logging in at /login, you'll land on the Projects page — the hub for all your AI sales agents.
Navigation
The sidebar gives you quick access to your projects, settings, and these docs. Inside a project, the sidebar switches to project-specific pages: Knowledge Base, Widget, Leads, and Analytics.
Projects
Each project represents one website or storefront. You can run multiple projects under a single account.
Creating a project
- Click New Project from the dashboard
- Enter your project name and business name
- Choose your business type (E-commerce, Restaurant, Travel, Accommodation, SaaS, Services, or Other)
- Pick a sales tone (consultative, direct, friendly, or professional)
- Add optional sales instructions — these guide the AI's selling approach
- Click Create, then connect a data source (website URL, Shopify, WordPress, or uploaded files) to begin indexing
Business types
Business types shape how the AI agent behaves. An e-commerce type knows about products, pricing, and carts. An accommodation type understands rooms, availability, and bookings. Choose the one that best matches your business.
| Business type | Best for | Key behaviors |
|---|---|---|
ecommerce | Online stores, product catalogs | Product recommendations, comparisons, upselling |
restaurant | Restaurants and food service | Menu guidance, dietary filters, reservations |
travel | Tours, safaris, travel operators | Itinerary suggestions, pricing, booking inquiries |
accommodation | Hotels, lodges, short-term rentals | Room availability, amenities, booking handoff |
saas | Software products and platforms | Feature explanations, plan comparisons, trial sign-up |
services | Agencies, consultants, local services | Scope questions, quote requests, appointment booking |
other | Any other website | Informational Q&A with lead capture |
Catalog — what you sell
The Catalog tab on your project holds everything you sell: products, services, tours, packages, menu items. Each row has a name, price, optional image/URL/SKU, and custom attributes. The AI agent uses it for recommendations, comparisons, and quotes.
Getting products in
- CSV / Excel upload — the fastest path. See Bulk upload below.
- Shopify — connect your store URL + access token and we sync products on demand (Starter plan and above).
- Add manually — the "Add Products" button lets you enter one item at a time with a simple form.
What each item holds
Core fields: name (required), description, price (required), currency, category, brand, sku, url, image_url, in_stock, item_type. Everything else becomes a custom attribute stored on the product, searchable by the bot (e.g. duration, difficulty, dietary, rooms).
Automated extraction from HTML misreads prices, confuses variants with standalone products, and breaks every time you redesign. A spreadsheet or Shopify sync takes 3 minutes and gives you a trustworthy, editable catalog your bot can actually sell from. Website crawls feed the Knowledge Base instead.
Knowledge Base — what your bot knows
The Knowledge tab holds unstructured content: your website pages, PDFs, FAQs, policies, and anything else that helps the bot answer visitor questions confidently. This is never mixed with your catalog — it's only used as context for the LLM.
Three ways to add knowledge
- Crawl a website — paste a URL. We discover your pages, extract the main content (stripping navigation and footers), and index it. Great for About pages, FAQs, policies, and blog posts.
- Upload files — PDF, Markdown, HTML, or plain text. File size limits depend on your plan (5 MB Free, 10 MB Starter, 25 MB Pro, 100 MB Team).
- Type it out — no website? No problem. Use one of the templates (Business FAQ, About Your Business) or paste plain text directly. Perfect for businesses that sell primarily through WhatsApp or Instagram.
How retrieval works
Your content is chunked with overlap, embedded into a vector index, and searched on every visitor message. Each query hits two retrieval calls — one against your catalog, one against your knowledge — and the best matches flow into the AI's context. You don't need to tune any of this.
Re-indexing
Your website changed? Trigger a re-crawl from the Knowledge tab. Files can be replaced individually; typed-out entries can be edited in place.
CSV & Excel upload
The fastest way to get a catalog in. Supports .csv, .tsv, and Excel .xlsx. Maximum 1,000 rows per file; run several uploads for larger catalogs.
The import wizard
- Upload the file. Drag-and-drop, or click to browse.
- Map columns. We auto-detect common headers (title → name, cost → price, etc.) and show a preview with 5 sample rows. Override any mapping with a dropdown.
- Pick options.
item_type(product / menu_item / itinerary / room / service / plan), defaultcurrency(defaults to KES), and Replace all existing products vs. add to the current catalog. - Review results. We report rows created, skipped, and errors — expandable list of every bad row so you can fix and re-upload.
Recognised column names
Required: name, price. Optional: description, currency, category, brand, sku, url, image_url, in_stock, item_type. Common variants are auto-mapped (title → name, cost → price, product_url → url, etc.). Anything we don't recognise becomes a searchable attribute on the product.
Example
name,price,currency,duration,difficulty,image_url
Masai Mara 3-Day Migration Safari,45000,KES,3 days,easy,https://...
Mount Kenya Summit Expedition,120000,KES,5 days,challenging,https://...
Amboseli Elephant Weekend,38000,KES,2 days,easy,https://...
Channel: Web widget
The default channel. One script tag on your website and the chat bubble is live. See Widget installation for details.
Channel: WhatsApp
WhatsApp is included on every plan, including Free. In Kenya it's the most-used customer channel, so DocsBrew treats it as core rather than an upsell lever.
Setup
- Go to Connectors → WhatsApp in your project.
- Create a WhatsApp Business App on Meta for Developers and get your Phone Number ID, Access Token, App Secret.
- Paste them into the Connectors form. We auto-generate a webhook verify token.
- Copy the webhook URL from the Connectors page into your Meta App → Webhooks tab and subscribe to
messages.
Behaviour
Inbound messages flow through the same unified agent as the widget. Product recommendations render as interactive buttons or lists when ≤10 options. The 24-hour customer service window is tracked automatically.
Channel: Telegram
Included from the Starter plan. Easiest connector to set up — no OAuth, no app review.
- Open Telegram, message @BotFather, run
/newbot, give it a name. - Copy the bot token.
- Go to Connectors → Telegram, paste the token, and click Connect. We validate it via
getMeand register the webhook automatically.
Channel: Instagram & Facebook Messenger
Both are included from the Pro plan. Both use Meta's Graph API and share a setup flow similar to WhatsApp.
Instagram DMs
Requires an Instagram Business or Creator account connected to a Facebook Page. In Connectors → Instagram, enter the Page ID, Page Access Token, and App Secret. Subscribe to the messages webhook field in your Meta App. Needs instagram_manage_messages permission.
Facebook Messenger
Requires a Facebook Page with the Messenger product enabled in your Meta App. Same setup: Page ID, Page Access Token, App Secret, plus pages_messaging permission. Subscribe to messages and messaging_postbacks webhooks.
Leads & analytics
Every conversation is a potential lead. DocsBrew automatically captures visitor information and scores engagement.
Lead scoring
Each visitor interaction is scored based on behavioral signals: number of questions asked, products viewed, time engaged, and funnel stage progression. Leads are ranked so you can prioritize follow-up.
Lead data captured
- Contact info — email, phone, name (when the visitor provides it naturally in conversation)
- Engagement — messages sent, products discussed, session duration
- Funnel stage — browsing, considering, or ready to buy
- Source — page URL, referrer, UTM parameters
- Lead score — composite score ranking conversion likelihood
Analytics
The analytics view gives you conversation volume, response accuracy, popular questions, and conversion rates over time. Use it to understand what visitors ask about most and where your content gaps are.
Widget configuration
The Widget page in your project dashboard lets you customize appearance and copy the embed code.
Live preview
Changes to colors, position, welcome message, and business name are reflected in a live preview pane. Once you're satisfied, copy the embed snippet and paste it on your site.
Settings available
- Accent color — the primary brand color for buttons and highlights
- Theme — light, dark, or auto (matches the visitor's system preference)
- Corner radius — pixel value for rounding the bubble and panel
- Position — bottom-right or bottom-left placement
- Welcome message — the first thing visitors see
- Widget name — displayed in the chat header
- Input placeholder — hint text shown inside the message box
- Sales instructions — guide the AI's selling style, tone, and product focus
Plans & limits
Four tiers. Free is generous enough for a solo operator to run their business on WhatsApp; paid tiers add volume, channels, analytics, and branding.
| Limit | Free | Starter | Pro | Team |
|---|---|---|---|---|
| Price (KES/mo) | 0 | 1,200 | 3,800 | 12,900 |
| Projects | 1 | 3 | 10 | 50 |
| Queries / month | 100 | 1,000 | 5,000 | 25,000 |
| Conversations / month | 50 | 500 | 2,500 | 15,000 |
| Leads / month | 10 | 100 | 500 | 3,000 |
| Products / project | 50 | 500 | 5,000 | 25,000 |
| Documents / source | 10 | 50 | 200 | 1,000 |
| File upload max | 5 MB | 10 MB | 25 MB | 100 MB |
| Burst queries / minute | 5 | 15 | 30 | 60 |
Why these numbers?
Free is sized to run one small business with modest volume — a solo safari operator, a single restaurant, a small boutique. Starter is for a growing operator with regular traffic. Pro adds team-sized volume and multi-channel reach. Team is for established operators running multiple properties or lines of business.
What's in each plan
Everything is unlocked by plan: your dashboard always shows every feature, so you can see what you'd get by upgrading. Gated features display a small "Starter" or "Pro" badge.
| Feature | Free | Starter | Pro | Team |
|---|---|---|---|---|
| Web widget | ✓ | ✓ | ✓ | ✓ |
| WhatsApp channel | ✓ | ✓ | ✓ | ✓ |
| Telegram channel | — | ✓ | ✓ | ✓ |
| Instagram DM | — | — | ✓ | ✓ |
| Facebook Messenger | — | — | ✓ | ✓ |
| Lead capture & scoring | ✓ | ✓ | ✓ | ✓ |
| Conversation replay | ✓ | ✓ | ✓ | ✓ |
| Analytics dashboard | — | ✓ | ✓ | ✓ |
| CSV export (leads, catalog) | — | ✓ | ✓ | ✓ |
| Remove “Powered by DocsBrew” | — | — | ✓ | ✓ |
| Priority support | — | — | ✓ | ✓ |
| API access | ✓ | ✓ | ✓ | ✓ |
| AI model tier | Fast | + Balanced | + Advanced | + Flagship |
WhatsApp is the default buying channel for most of our market — gating it would defeat the purpose. Paid tiers unlock additional channels (Telegram, Instagram, Facebook), higher monthly volume, analytics, and custom branding instead.
When a limit is reached
API responses return HTTP 429 with a structured body:
{
"error": "plan_limit_exceeded",
"resource": "queries",
"current": 101,
"limit": 100,
"plan": "free",
"message": "You've reached the queries limit (101/100) on your free plan. Upgrade for higher limits.",
"upgrade_url": "/settings/billing"
}
Response headers X-Plan-Limit, X-Plan-Current, and X-Plan-Resource make it easy to inspect without parsing the body.
Billing
Payment methods
- M-Pesa — STK Push directly from the dashboard. Enter the phone number, approve on your handset, done.
- Card — Visa / Mastercard checkout for customers outside Kenya (coming soon).
All plans are priced and billed in KES — the amount you see on the pricing page is the amount you pay.
Annual billing
Pay annually and save 2 months on every paid plan. You can switch between monthly and annual from the Billing page.
Upgrades and downgrades
Upgrades take effect immediately and are prorated for the remainder of the month. Downgrades take effect at the end of your current billing period — you keep your existing limits until then. If you downgrade to a tier that doesn't include a feature you're using (e.g. Instagram channel disabled on Starter), inbound messages continue to work but new connects are blocked.
Pilots & custom limits
Running a pilot, a partnership, or a larger deployment than the standard tiers cover? Email support@docsbrew.com — we’ll work out limits and pricing that fit.
API authentication
Account-scoped endpoints (projects, leads, analytics) require an API key passed as a bearer token in the Authorization header.
Authorization: Bearer your-api-key
You can find your API key on the project's settings page in the dashboard. Keep it secret — anyone with your API key can manage your project and read lead data.
The POST /query endpoint that the widget uses is intentionally unauthenticated — it resolves your project from the site_id in the request body. This is what lets the widget call the API directly from a visitor's browser without exposing an API key.
Never expose your account API key in client-side JavaScript. Use it only in server-to-server requests.
Query endpoint
Send a visitor's question and get an AI-generated response grounded in your project's knowledge base.
Request body
| Field | Type | Description |
|---|---|---|
question | string | Required. The visitor's message. 1–2000 characters. |
site_id | string | Required. The site (project data source) the visitor is chatting on. Scopes retrieval to your catalog and knowledge base. |
conversation_id | string | Optional. Pass to continue an existing conversation thread. Links the query to a tracked conversation session for analytics and lead capture. |
stream | boolean | Optional. Stream the answer as Server-Sent Events. Defaults to true. |
provider | string | Optional. LLM provider override: openai, anthropic, or gemini. Defaults to server config. |
history | array | Optional. Prior conversation turns for multi-turn context. Each item is { "role": "user" | "assistant", "content": string }. Send the last 5 exchanges (10 messages) maximum — older turns are pruned. |
conversation_state | object | Optional. Sales-agent state carried between turns: shown_items (array of product IDs already shown), rejected_items (IDs the user declined), preferences (extracted key/value prefs), funnel_stage (browsing, considering, or ready_to_buy), and turn_count. The widget maintains this automatically; direct API callers should echo it back each turn to keep the agent from repeating itself. |
visitor_metadata | object | Optional. Browser/device metadata collected by the widget: user_agent, language, timezone, screen_resolution, referrer, page_url. Used for lead enrichment and scoring. |
Example request
curl -X POST https://api.docsbrew.com/query \
-H "Content-Type: application/json" \
-d '{
"question": "What running shoes do you recommend for beginners?",
"site_id": "site_abc123",
"stream": false,
"visitor_metadata": {
"page_url": "https://mystore.com/shoes",
"referrer": "https://google.com"
}
}'
Response
{
"answer": "For beginners, I'd recommend our CloudStep 2.0...",
"sources": [
{
"document": "Running Shoes Guide",
"section": "Picking your first pair",
"chunk_id": "chunk_abc_0042",
"relevance": "direct"
}
],
"confidence": "high",
"usage": {
"input_tokens": 1240,
"output_tokens": 186,
"total_tokens": 1426,
"model": "gemini-2.5-flash"
},
"sales": {
"products": [
{
"product_id": "prod_cloudstep_2",
"name": "CloudStep 2.0",
"price": 89.99,
"currency": "USD",
"url": "/shoes/cloudstep-2",
"image_url": "/img/cloudstep-2.jpg",
"in_stock": true,
"relevance": "recommended"
}
],
"cta_actions": [
{ "label": "Add to Cart", "action_type": "add_to_cart", "url": "/cart/add?p=prod_cloudstep_2", "icon": "cart" }
],
"suggestion_chips": ["What size should I pick?", "How is the arch support?"],
"funnel_stage": "considering",
"intent": "product_recommendation",
"agent": "recommender"
},
"captured_lead": null
}
Notes on response fields:
sources[]— each citation hasdocument(title),section(heading or chunk position),chunk_id(opaque identifier for debugging / deduplication), andrelevance(direct,supporting, ortangential).confidence— one of"high","medium", or"low"(string, not a number).sales— present only for projects with a business type set.nullfor generic docs Q&A projects. Containsproducts,cta_actions,suggestion_chips,funnel_stage,intent, andagent(which specialist handled the turn:rapport,discovery,recommender,closer, ordefault_rag).captured_lead— populated with{ email, name, phone, company }when the agent captured contact info in conversation; the widget uses this to auto-create a lead.
The query endpoint is intentionally unauthenticated — the widget calls it directly from the browser. Your project is resolved from site_id, which is created when you connect a data source in the dashboard.
Leads endpoint
Retrieve leads captured from conversations in your project.
Requires Authorization: Bearer with your API key. Returns a bare JSON array of leads.
Related endpoints on the same resource: GET /projects/{project_id}/leads/stats returns aggregate counts (total, by_status, avg_score, conversion_rate); POST /projects/{project_id}/leads/export triggers a CSV export; GET|PATCH /projects/{project_id}/lead-config controls whether lead capture is enabled and which fields are required.
Query parameters
| Param | Type | Description |
|---|---|---|
status | string | Filter by lead status. One of new, contacted, qualified, converted, lost. |
limit | integer | Number of leads to return (default: 50, max: 200). |
offset | integer | Pagination offset. |
Example response
[
{
"id": "lead_001",
"project_id": "proj_abc123",
"conversation_id": "conv_xyz789",
"email": "jane@example.com",
"name": "Jane",
"phone": null,
"company": null,
"source_url": "https://mystore.com/shoes/cloudstep",
"interested_products": ["prod_cloudstep_2"],
"funnel_stage": "ready_to_buy",
"score": 87,
"status": "new",
"notes": null,
"intelligence": {
"score": 87,
"confidence": "high",
"reasoning": "Returning visitor with clear buying intent. Asked about sizing and shipping in the same session.",
"recommended_action": "immediate_followup",
"action_label": "Follow up today",
"highlights": ["Returning visitor", "High engagement", "Asked about checkout"],
"score_breakdown": {
"engagement": "strong",
"intent": "high",
"fit": "excellent"
},
"scored_at": "2026-04-08T14:24:12Z",
"is_scoring": false,
"top_signals": [
"Viewed 3 products in a single session",
"Asked explicit pricing questions",
"Confirmed shipping destination"
],
"risks": ["No phone number captured"],
"talking_points": [
"Mention the current free-shipping offer",
"Offer a sizing guide link",
"Ask if they have a deadline for the purchase"
],
"recommended_outreach": {
"channel": "email",
"timing": "within 2 hours",
"opener": "Hi Jane — saw you were looking at the CloudStep 2.0. Want me to send over the sizing guide?"
}
},
"created_at": "2026-04-08T14:23:00Z"
}
]
Key fields:
score— integer 0–100. Same value appears at the top level and insideintelligence.status— one ofnew,contacted,qualified,converted,lost.funnel_stage—browsing,considering, orready_to_buy.intelligence— LLM-generated lead qualification. Contains the human-friendlyreasoning,recommended_action(immediate_followup,nurture,monitor, orlow_priority),top_signals,risks,talking_points, andrecommended_outreach(channel, timing, and an opener line your sales team can send verbatim). Ifis_scoringistrue, the LLM assessment is still pending and the other intelligence fields may be empty — poll again a few seconds later.
Projects endpoint
Manage your projects programmatically.
List all projects under your account.
Create a project. Data sources (website URL, Shopify, etc.) are connected in a separate step after creation.
Request body
| Field | Type | Description |
|---|---|---|
name | string | Required. Project display name. |
description | string | Optional short description of the project. |
business_name | string | Optional business name shown to visitors in the widget. |
business_type | string | Business vertical. One of: ecommerce, restaurant, travel, accommodation, saas, services, other. Defaults to other. |
sales_tone | string | Bot personality. One of: consultative, direct, friendly, professional. Defaults to friendly. |
sales_instructions | string | Custom instructions for the AI sales agent — override or extend the default behavior for this project. |
cta_config | array | Optional array of custom call-to-action button definitions for the widget (label, action type, target URL, etc.). Each item is a dict. |
Update project settings. All fields from the create request are accepted and optional — send only the fields you want to change.
Delete a project and all its associated data (crawled content, conversations, leads).
FAQ
How long does crawling take?
Most sites with under 500 pages are fully indexed within a few minutes. Larger sites may take longer depending on page complexity and server response times.
Does the widget slow down my site?
No. The embed script is ~3KB and loads asynchronously. The chat widget itself loads in an iframe, so its JavaScript and CSS are completely isolated from your page. There's zero impact on your Core Web Vitals.
Can the AI make up information?
DocsBrew uses RAG (Retrieval-Augmented Generation), which means every response is grounded in your actual content. The AI only answers based on what it finds in your knowledge base. If it doesn't have an answer, it says so rather than guessing.
What languages are supported?
DocsBrew detects the language a visitor writes in and replies in the same language automatically — handy for tourism, hospitality, and e-commerce businesses that get customers from outside Kenya. Out of the box we handle English, Swahili, French, German, Italian, Spanish, Portuguese, Dutch, Arabic, and Chinese; admins can also pin a single reply language or restrict the whitelist per project. Free plans reply in one language; Starter unlocks two; Pro and Team unlock the full set. Full details on the pricing page.
Is my data secure?
Yes. All data is encrypted in transit (TLS 1.3) and at rest. Your content is stored in isolated project spaces. We never share your data with other customers or use it to train models. See our security headers (HSTS, CSP, X-Frame-Options) for transport-level protections.
Can I use DocsBrew with Shopify / WordPress / Squarespace?
Yes. The iframe-based embed works on any platform that allows custom HTML. For Shopify, paste the snippet in your theme's theme.liquid file. For WordPress, use a custom HTML block or your theme's footer. For Squarespace, add it via Code Injection in Settings.
What happens when I hit my query limit?
On the free tier, the widget gracefully tells visitors to try again later. No errors, no broken experiences. Upgrade to Pro for 10,000 queries/month or Team for 50,000.
Troubleshooting
Widget doesn't appear
- Check that the
data-project-idattribute matches your project ID exactly - Make sure the script tag is placed before
</body>, not in<head> - Open your browser's developer console (F12) and look for any error messages
- If you have a strict Content-Security-Policy, ensure your CSP allows iframes from your DocsBrew domain
Widget loads but shows no response
- Verify your project has crawled content — check the Knowledge Base page in the dashboard
- If you just created the project, wait a few minutes for crawling to complete
- Check the browser console for network errors (CORS, 401, 500)
Incorrect or outdated answers
- Trigger a re-crawl from the Knowledge Base page if your site content has changed
- Review your sales instructions — overly specific instructions can sometimes steer the AI away from correct answers
API returns 401 Unauthorized
- Verify your API key is correct and includes the
Bearerprefix - Check that the API key belongs to the project you're querying
Support
Need help? We're here for you.
- Email — hello@docsbrew.com
- Twitter — @docsbrew
- GitHub — github.com/docsbrew
Pro and Team customers get priority support with guaranteed response times.