Developer Docs

Last updated: September 30, 2026

BrokerBot gives you two ways to integrate: a chat widget you embed in your site, and a REST API your backend calls with a team API key.

Start here

  • Authentication: get an API key, how keys are scoped to your team, and the base URLs.
  • Errors: the error format and what each status code means.

Chat Widget

  • Quick Start: embed the widget, sign members in with server-side SSO, pass page context, open a document in chat, and control the widget from your own page (including headless mode).
  • SSO Tokens: POST /auth/generate-token issues a one-time token that signs a member in to the widget.

API reference

Endpoint Description
POST /v1/knowledge/search Search a team’s knowledge base.
GET /v1/teams/members List a team’s members.
POST /v1/teams/members Add members to a team.
DELETE /v1/teams/members Remove a member from a team.
GET /v1/teams/groups List a team’s groups.
GET /v1/teams/groups/{groupId}/members List a group’s members.
GET /v1/training List a team’s training.
GET /v1/training/{trainingId} Get one training record.
POST /v1/training/{trainingId}/approve Approve training so the agent uses it.
POST /v1/training/{trainingId}/reject Reject training.
GET /v1/workflows List a team’s workflows.
GET /v1/workflows/{workflowId} Get one workflow with its instructions.

Every /v1/teams endpoint also has a form that takes a sub-team in the path, for example GET /v1/teams/{teamId}/members. See Teams.

Libraries

  • brokerbot on npm: the official TypeScript/JavaScript client. It covers knowledge search and SSO tokens. Server-side only; it uses your API key.
npm install brokerbot
import { BrokerBot } from "brokerbot"

const brokerbot = new BrokerBot({ apiKey: process.env.BROKERBOT_API_KEY! })

new BrokerBot() also accepts baseUrl (default https://api.brokerbot.ai) and a custom fetch. Failed requests throw a BrokerBotError with the HTTP status and the API’s error message.