POST /api/v1/recommend
Returns ranked offer recommendations for a customer, filtered by channel, placement, qualification rules, contact policies, and guardrails. Each response includes aninteractionId to link outcomes recorded via the Respond API.
Request Body
Field Reference
| Field | Type | Required | Description |
|---|---|---|---|
customerId | string | Yes | Unique customer identifier. If omitted or set to "anonymous", a stable anonymous ID is derived from sessionId or the request IP + user agent |
channel | string | No | Filter creatives by channel type (e.g., "email", "sms", "web") |
channelId | string | No | Filter by a specific channel ID instead of channel type |
placement | string | No | Filter creatives by placement slot type (e.g., "hero_banner", "sidebar") |
limit | integer | No | Maximum number of results to return. Default: 5, max: 50 |
sessionId | string | No | Session identifier for tracking. Must be alphanumeric (UUID format recommended, max 64 chars). Used as the anonymous ID seed when customerId is not provided |
context | object | No | Real-time context (device, location, pageUrl). Passed through to interaction history |
segments | string[] | No | Customer segment tags used for qualification rule evaluation |
attributes | object | No | Customer attributes for personalization and qualification. Can include propensityScores as a nested object |
locale | string | No | Locale code for content selection (e.g., "en-US") |
currency | string | No | Currency code (e.g., "USD") |
placements | array | No | Multi-placement request. Each entry: { placementId: string, limit?: number }. When provided, the response uses the grouped format |
deduplicate | boolean | No | When true with multi-placement requests, each placement excludes offers already returned by prior placements (sequential resolution) |
excludeOffers | string[] | No | Offer IDs to exclude from results |
excludeCreatives | string[] | No | Creative IDs to exclude from results |
decisionFlowKey | string | No | Route the request through a specific Decision Flow pipeline. If omitted, the system auto-resolves via flow routing rules |
debug | boolean | No | When true, includes detailed debugTrace in the response with qualification reasons, contact policy reasons, and feature contributions |
V1 Response (flat decisions array)
Returned when the request does not use multi-placement and the Decision Flow does not produce grouped output.V2 Response (grouped placements)
Returned when the Decision Flow pipeline produces grouped output (Composable Pipeline with a Group node), or whenplacements is provided in the request.
Multi-placement request response:
Debug Trace
Whendebug=true, the response includes a debugTrace object:
GET /api/v1/recommend
A query-parameter variant for simple integrations that do not need the full request body.| Parameter | Type | Default | Description |
|---|---|---|---|
customerId | string | "anonymous" | Customer identifier |
channel | string | — | Filter by channel type |
placement | string | — | Filter by placement slot |
limit | integer | 5 | Max results (max 50) |
debug | string | "false" | Set to "true" for debug trace |
interactionId, sessionId, locale, or currency fields).
Error Responses
| Status | Cause |
|---|---|
400 | Invalid JSON body, missing customerId, or invalid sessionId format |
401 | Missing or invalid X-Tenant-Id / API key |
415 | Content-Type header is not application/json (POST only) |
429 | Rate limit exceeded (1,000 requests per 60s per tenant) |
500 | Internal server error |