Skip to content
HelpBot
v1.0.0OpenAPI 3.1REST + JSON

API Reference

Integrate AI-powered FAQ chat into any frontend. All endpoints live under /api/v1/ and support CORS.

openapi.json

Bearer Token

Authorization: Bearer <key>

Recommended for server-to-server calls.

API Key Parameter

?apiKey=<key> or body.apiKey

Convenient for widget & browser calls.

Quick start
curl -X POST /api/v1/chat \
  -H "Authorization: Bearer YOUR_KEY" \
  -d '{"question":"How do I get started?"}'

Chat

Send questions, receive AI answers, submit feedback, and escalate to humans.

POST/api/v1/chatBearer token

Ask a question

Submit a question and receive an AI-generated answer based on your indexed FAQ sources. Supports language selection. Consumes credits from your monthly allowance.

Request Body

questionreq
stringmax 1000 chars
apiKey
string
sessionId
string
language
string

Responses

200Success
answerstring
sourcesarray
conversationIdstring
400Missing or invalid question field.
401Invalid API key.
429Monthly credit limit reached.
500Internal server error.
POST/api/v1/feedbackBearer token

Submit feedback

Record whether the AI answer was helpful. Used by the thumbs-up / thumbs-down buttons in the widget.

Request Body

conversationIdreq
string
helpfulreq
"yes" | "no"
apiKey
string

Responses

200Success
successboolean
400Missing or invalid fields.
401Invalid API key.
500Internal server error.
POST/api/v1/handoffBearer token

Request human handoff

Escalate a conversation to a human agent. Marks the conversation as handed off and sends an email notification to the site owner.

Request Body

conversationIdreq
string
apiKey
string
customerEmail
string

Responses

200Success
successboolean
400Missing required fields.
401Invalid API key.
500Internal server error.

Sources

Manage FAQ sources programmatically (Scale plan required).

GET/api/v1/sourcesBearer token

List FAQ sources

Returns all FAQ sources associated with your site. Requires Scale plan.

Responses

200Success
sourcesarray
401Invalid API key.
403Plan not allowed.
500Internal server error.
POST/api/v1/sourcesBearer token

Add a FAQ source

Creates a new FAQ source with status: pending. Requires Scale plan. Poll GET /api/v1/sources to check when status becomes indexed.

Request Body

urlreq
string

Responses

200Success
sourceobject
messagestring
400Missing url field.
401Invalid API key.
403Plan not allowed.
500Internal server error.
DELETE/api/v1/sourcesBearer token

Delete a FAQ source

Permanently removes a FAQ source by ID. Requires Scale plan.

Parameters

idreq
string

Responses

200Success
deletedboolean
400Missing id query parameter.
401Invalid API key.
403Plan not allowed.
404Source not found or belongs to a different site.
500Internal server error.
POST/api/v1/sources/rescrapeBearer token

Re-scrape a FAQ source

Triggers a fresh scrape of an existing FAQ source by ID. The source must be a URL (not a file upload). The scrape runs asynchronously — poll GET /api/v1/sources to check status. Requires Scale plan.

Request Body

sourceIdreq
string
apiKey
string

Responses

200Success
sourceIdstring
urlstring
status"scraping"
messagestring
400Missing sourceId or source is a file upload.
401Invalid API key.
403Plan not allowed.
404Source not found or belongs to a different site.
500Internal server error.

Widget

Retrieve widget display configuration (colors, labels, position).

GET/api/v1/configBearer token

Get widget configuration

Returns the full display configuration for a widget — colors, labels, position, bot name, and all customisable text strings.

Parameters

apiKey
string

Responses

200Success
primaryColorstring
primaryForegroundstring
backgroundColorstring
foregroundColorstring
secondaryColorstring
secondaryForegroundstring
position"bottom-right" | "bottom-left"
greetingstring
botNamestring
showBrandingboolean
aiLanguagestring
inputPlaceholderstring
typingTextstring
onlineTextstring
handoffTextstring
handoffSentTextstring
emailPlaceholderstring
emailSendTextstring
emailSkipTextstring
feedbackYesTextstring
feedbackNoTextstring
errorTextstring
networkErrorTextstring
401Invalid API key.
500Internal server error.
PATCH/api/v1/configBearer token

Update widget configuration

Update one or more widget configuration fields. Only send the fields you want to change — omitted fields keep their current values. Setting showBranding to false requires the Scale plan.

Request Body

apiKey
string
primaryColor
string
primaryForeground
string
backgroundColor
string
foregroundColor
string
secondaryColor
string
secondaryForeground
string
position
"bottom-right" | "bottom-left"
greeting
string
botName
string
showBranding
boolean
aiLanguage
string
inputPlaceholder
string
typingText
string
onlineText
string
handoffText
string
handoffSentText
string
emailPlaceholder
string
emailSendText
string
emailSkipText
string
feedbackYesText
string
feedbackNoText
string
errorText
string
networkErrorText
string

Responses

200Success
updatedarray
configobject
400No valid fields to update, or invalid field value.
401Invalid API key.
403Removing branding requires Scale plan.
500Internal server error.

Analytics

Usage statistics, daily activity, and unanswered question insights (Growth or Scale plan required).

GET/api/v1/analytics/overviewBearer token

Get analytics overview

Returns summary statistics for your site: total questions, satisfaction rate, handoff count, week-over-week trend, and credit usage. Requires Growth or Scale plan.

Parameters

range
string

Responses

200Success
rangestring
totalQuestionsinteger
satisfactionRateinteger
helpfulCountinteger
totalFeedbackinteger
handoffCountinteger
handoffRateinteger
weekOverWeekChangeinteger
creditsobject
401Invalid API key.
403Plan not allowed (requires Growth or Scale).
500Internal server error.
GET/api/v1/analytics/activityBearer token

Get daily activity

Returns daily question counts for chart rendering. Each entry contains a date (YYYY-MM-DD) and the number of questions asked that day. Requires Growth or Scale plan.

Parameters

range
string

Responses

200Success
rangestring
activityarray
401Invalid API key.
403Plan not allowed (requires Growth or Scale).
500Internal server error.
GET/api/v1/conversationsBearer token

List conversations

Returns a paginated list of conversations with flexible filters. Use `filter=unanswered` to find gaps, `filter=handoff` for escalations, or combine with `search` to find specific topics. Requires Growth or Scale plan.

Parameters

range
string
limit
integer
page
integer
filter
string
search
string
sessionId
string
sort
string

Responses

200Success
conversationsarray
totalDocsnumber
pagenumber
totalPagesnumber
limitnumber
401Invalid API key.
403Plan not allowed (requires Growth or Scale).
500Internal server error.

Webhooks

Register callback URLs to receive real-time event notifications (Growth or Scale plan required).

GET/api/v1/webhooksBearer token

List webhooks

Returns all webhooks for your site. Secrets are redacted to last 4 characters. Requires Growth or Scale plan.

Responses

200Success
webhooksarray
401Invalid API key.
403Plan not allowed.
500Internal server error.
POST/api/v1/webhooksBearer token

Create a webhook

Registers a new webhook endpoint. The signing secret is returned once — store it securely. Max 5 webhooks per site. Requires Growth or Scale plan.

Request Body

urlreq
string
eventsreq
array
description
stringmax 200 chars

Responses

200Success
webhookobject
400Invalid request body.
401Invalid API key.
403Plan not allowed or webhook limit reached.
500Internal server error.
DELETE/api/v1/webhooksBearer token

Delete a webhook

Permanently removes a webhook by ID. Requires Growth or Scale plan.

Parameters

idreq
string

Responses

200Success
deletedboolean
400Missing id query parameter.
401Invalid API key.
403Plan not allowed.
404Webhook not found or belongs to a different site.
500Internal server error.

Delivery format

Every webhook delivery is an HTTP POST with a JSON body and the following headers:

Content-TypeAlways application/json.
X-HelpBot-SignatureHMAC-SHA256 hex digest prefixed with sha256=.
X-HelpBot-EventThe event type, e.g. conversation.created.
X-HelpBot-DeliveryUnique UUID for this delivery (for idempotency).

Envelope

The JSON body wraps every event in a consistent envelope:

payload.json
{
  "event": "conversation.created",
  "timestamp": "2024-01-15T10:30:00.000Z",
  "data": { ... }
}

Verifying signatures

verify.ts
import crypto from "node:crypto";

const signature = req.headers["x-helpbot-signature"];
const expected = "sha256=" +
  crypto.createHmac("sha256", WEBHOOK_SECRET)
    .update(rawBody)
    .digest("hex");

if (signature !== expected) {
  return new Response("Invalid signature", { status: 401 });
}

Event payloads

The data field contains event-specific fields described below.

conversation.created

Fired when a visitor asks a question and receives an AI answer.

conversationIdstring
sessionIdstring
questionstring
answerstring
sourcesstring[]
conversation.unanswered

Fired alongside conversation.created when the AI could not find a relevant answer.

conversationIdstring
sessionIdstring
questionstring
answerstring
sourcesstring[]
conversation.feedback

Fired when a visitor rates an answer as helpful or not helpful.

conversationIdstring
helpful"yes" | "no"
conversation.handoff

Fired when a conversation is escalated to a human agent.

conversationIdstring
questionstring
answerstring
customerEmailstring | null