Skip to content

Evaluate incentive/decision rules for a profile event

Runs the incentive decision pipeline for one profile + event and returns a synchronous summary of matched rules; the actual effects (e.g. coupon grants) are queued asynchronously.

Profile traits are loaded from identified_users.traits_masked (same store as PUT /api/v1/profile) and shallow-merged with any inline traits in the body (inline wins, not persisted).

Auth: X-API-Key with scope decide OR decision:call (x-required-scope: decide|decision:call). projectId in the body must match the key’s project.

Rate limit: 30 req/min per (projectId, IP) — over → 429.

Media typeapplication/json
object
projectId
required

Must match the API key’s project (tenant isolation).

string
profileId
required

The user/profile ID whose traits are loaded for evaluation.

string
event
required
object
name
required
string
props
object
key
additional properties
any
traits

Optional inline traits merged over the stored profile for THIS decision only (not persisted).

object
key
additional properties
any
userFeatures

Optional feature snapshot for offer-selection. When omitted, minimal null defaults are used.

object
valueScore
number | null
payingAtRisk
boolean
attributionChannelQuality
number | null
historicalRedemptionRate
number | null
Example
json
{
"projectId": "prj_123",
"profileId": "uid_456",
"event": {
"name": "checkout_abandoned",
"props": {
"cartValue": 12000
}
}
}

Decision result. matched is empty when no rule fired.

Media typeapplication/json
object
decisionId
required
string
matched
required
Array<object>
object
ruleId
string
effects
Array<object>
object
type
string
summary
string

Invalid JSON or missing required fields.

Media typeapplication/json
object
error
required

Human-readable error message.

string
retryAfter

Seconds to wait before retrying (present on 429/503).

integer
message
string
affectedIndices
Array<integer>
Examples
json
{
"error": "invalid_json"
}

Missing/invalid API key.

Media typeapplication/json
object
error
required

Human-readable error message.

string
retryAfter

Seconds to wait before retrying (present on 429/503).

integer
message
string
affectedIndices
Array<integer>
Examplegenerated
json
{
"error": "example",
"retryAfter": 1,
"message": "example",
"affectedIndices": [
1
]
}

API key lacks the decide/decision:call scope.

Media typeapplication/json
object
error
required

Human-readable error message.

string
retryAfter

Seconds to wait before retrying (present on 429/503).

integer
message
string
affectedIndices
Array<integer>
Examplegenerated
json
{
"error": "example",
"retryAfter": 1,
"message": "example",
"affectedIndices": [
1
]
}

Project not found or key belongs to a different project (tenant isolation).

Media typeapplication/json
object
error
required

Human-readable error message.

string
retryAfter

Seconds to wait before retrying (present on 429/503).

integer
message
string
affectedIndices
Array<integer>
Example
json
{
"error": "not_found"
}

Rate limit exceeded (30/min per project+IP).

Media typeapplication/json
object
error
required

Human-readable error message.

string
retryAfter

Seconds to wait before retrying (present on 429/503).

integer
message
string
affectedIndices
Array<integer>
Example
json
{
"error": "rate_limited"
}

Decision cache/service binding unavailable.

Media typeapplication/json
object
error
required

Human-readable error message.

string
retryAfter

Seconds to wait before retrying (present on 429/503).

integer
message
string
affectedIndices
Array<integer>
Example
json
{
"error": "service_unavailable"
}