Skip to main content
The NBQ Engine exposes a REST API. Your application calls it each time it needs to decide which question to present to the user next.

Base URL

https://api.zelinqa.ai

Authentication

Every request must include your API key in the Authorization header:
Authorization: Bearer nbq_live_xxx
Generate and manage your API keys in the NBQ Studio.

Endpoints

MethodPathDescription
GET/v1/healthCheck API availability
POST/v1/next-questionsReturns the next best question to ask
POST/v1/sessions/{session_id}/conversionRecords 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 either conversation_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.