POST /api/v1/simulate
Run a dry-run recommendation for testing. Behaves identically to the Recommend API but does not persist decision traces or interaction records.
Request Body
| Field | Type | Required | Description |
|---|
customerId | string | Yes | Customer identifier |
decisionFlowKey | string | No | Decision Flow to simulate (defaults to most recent active) |
channel | string | No | Channel filter (e.g., "email", "sms") |
limit | number | No | Max offers to return (default: 5) |
attributes | object | No | Request-time attributes (e.g., { "tier": "gold" }) |
Example
curl -X POST https://playground.kaireonai.com/api/v1/simulate \
-H "Content-Type: application/json" \
-H "X-Tenant-Id: my-tenant" \
-d '{
"customerId": "C-1234",
"decisionFlowKey": "credit-cards",
"channel": "email",
"limit": 3,
"attributes": { "tier": "premium" }
}'
Response
Same shape as the Recommend API response, including traceSummary for debugging.
{
"customerId": "C-1234",
"offers": [
{
"offerId": "offer_premium_card",
"offerName": "Premium Card",
"score": 0.92,
"rank": 1,
"personalization": { "display_rate": 13.49 }
}
],
"traceSummary": {
"totalCandidates": 8,
"afterQualification": 5,
"afterContactPolicy": 4,
"topScores": [
{ "offerId": "offer_premium_card", "score": 0.92 }
]
}
}
Use the Simulate API during development and testing to validate Decision Flow configurations without polluting production interaction history.