Base URL
Authentication
Every request must include your API key in theAuthorization header:
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /v1/health | Check API availability |
POST | /v1/next-questions | Returns the next best question to ask |
POST | /v1/sessions/{session_id}/conversion | Records the outcome of a conversation |
POST /v1/next-questions
This is the main endpoint. Call it each time your application needs to decide which question to ask next. The engine analyses the conversation so far and returns the single most relevant question. You must send eitherconversation_history (the full message list) or context (a plain-text summary) with every request, along with a session_id that stays the same throughout the conversation.
POST /v1/sessions//conversion
Call this once per conversation when a meaningful result is reached — a purchase, a lead capture, or an abandonment. This powers the conversion analytics in the NBQ Studio Dashboard.Key properties
Stateless
The API stores no session state. Every request must include the full conversation context.
One question per call
Each response contains exactly one next question — the most relevant one for that moment.
Scores are private
Internal ranking scores are never returned. Only the selected question is exposed.
Safe retries
The conversion endpoint accepts an
Idempotency-Key header so retries are always safe.