BotIQ API
Programmatic access to a workspace: ask the chatbot a question, add a URL to its knowledge base, or read back sources, conversations (metadata only), knowledge gaps and usage counts. Every request is authenticated with a workspace-scoped API key — the workspace is never a request parameter, it comes from the key. Each key carries the scopes it needs; create one from the workspace Settings page in the dashboard. It is shown once, at creation. Successful responses carry X-RateLimit-* and X-Quota-* headers.
Authentication
A workspace-scoped API key, sent as `Authorization: Bearer bq_...`. Each key carries one or more scopes (`chat:read`, `sources:write`, `sources:read`, `conversations:read`, `gaps:read`, `analytics:read`); a request needs the scope its endpoint requires. Rate-limited to 60 requests/minute per key.
/api/v1/chatscope: chat:readAsk the chatbot a question
Runs retrieval against the workspace's knowledge base and returns one JSON answer — not a stream. Counts against the same monthly plan limit as the embedded widget.
Example
curl https://your-app.example/api/v1/chat \
-H "Authorization: Bearer bq_..." \
-H "Content-Type: application/json" \
-d '{
"question": "What is your refund policy?"
}'/api/v1/sourcesscope: sources:readList knowledge-base sources
Returns the workspace's sources as metadata only — id, name, type, status and counts. Never source content. Not metered against message quota.
/api/v1/sourcesscope: sources:writeAdd a URL to the knowledge base
Queues a URL or sitemap for ingestion; returns immediately with the created source in `pending` status. Ingestion happens asynchronously — poll the dashboard, or your own workspace webhooks, for completion.
Example
curl https://your-app.example/api/v1/sources \
-H "Authorization: Bearer bq_..." \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/docs/faq",
"type": "url"
}'/api/v1/conversationsscope: conversations:readList conversations (metadata only)
Conversation ids and metadata — session, channel, timing, resolution state. Message content is never exposed on the API.
/api/v1/gapsscope: gaps:readList knowledge gaps
Questions the chatbot could not answer from the knowledge base, with how often they were asked.
/api/v1/analyticsscope: analytics:readWorkspace usage counts
Counts only: conversations started in the last 30 days, messages exchanged, open gaps, and feedback tallies.