Base URLs
All paths in this reference are relative to the base URL. For example,
POST /recommend means POST https://playground.kaireonai.com/api/v1/recommend.
Authentication
Every API request must identify a tenant. There are two ways to do that.The two API planes
The API is split into a data plane and a control plane:- Data plane — exactly
POST /recommend,POST /respond,POST /respond/bulk, andPOST /capture(a legacy alias of/respond). This is the runtime decisioning loop your own systems call machine-to-machine, and it is what anykrn_API key can reach. - Control plane — everything else in this reference: all management CRUD (schemas, offers, categories, channels, creatives, decision flows, decisioning gates, connectors, pipelines, segments, models, reports, settings, API keys, …). Control-plane endpoints are first-party only — they require a browser session, an MCP connection, or an API key minted with the
control-planescope (admin-only to mint; see API Keys).
403:
API Key (recommended for integrations)
Pass your key in theX-API-Key header. Every key starts with the krn_
prefix and is bound to the tenant that created it:
Authorization: Bearer scheme — a Bearer token is rejected with 401.
Because the key already identifies the tenant, X-Tenant-Id is optional
on API-key requests: when both are sent, the key’s tenant wins and the header
is ignored (this prevents tenant spoofing). You may still include
X-Tenant-Id for readability.
Session Cookie
When using the KaireonAI platform UI, requests authenticate via session cookie automatically. The tenant is resolved from the JWT session. No additional headers are needed.Common Headers
Idempotency
Idempotency is enforced only on the outcome-recording endpoints, where a retried delivery must never double-count a reward:
Deduplication is enforced by a unique database constraint on the interaction
row (
(tenantId, idempotencyKey)), not merely by a cache — even two concurrent
retries collapse to a single recorded outcome.
Pagination
List endpoints that support pagination return a cursor-based response. The page rows are indata; the paging state is nested under pagination:
pagination.cursor is the next cursor — pass it back as the cursor
query parameter to fetch the following page. It is null on the last page.
total is included only when the endpoint runs a count query. Fetch the next
page with ?cursor=<pagination.cursor>.
Query parameters:
Error Response Format
All errors follow a consistent structure:Status Codes
Rate Limiting
API requests are rate-limited per tenant on a sliding window basis. The default limit is 1,000 requests per 60-second window. When a request is rate-limited, the response includes these headers:
Example 429 response:
429, wait for the number of seconds in the Retry-After header before retrying.
Next Steps
Recommend API
Get personalized next-best-action recommendations for a customer.
Respond API
Record impressions, clicks, conversions, and other outcomes.
API Tutorial
End-to-end walkthrough with advanced features like Decision Flows and computed values.
MCP Server
Use the Recommend and Respond APIs as MCP tools from AI agents.