Documentation Index
Fetch the complete documentation index at: https://docs.kaireonai.com/llms.txt
Use this file to discover all available pages before exploring further.
The Attribution API computes credit assignment across touchpoints that led to a conversion. Supports five attribution models.
POST /api/v1/attribution
Compute attribution for a customer conversion. Rate limited to 100 requests/min. Editor or Admin.
Request Body
| Field | Type | Required | Description |
|---|
customerId | string | Yes | Customer identifier |
conversionId | string | Yes | Unique conversion event ID |
model | string | No | Attribution model (default: linear) |
conversionValue | number | No | Monetary value of the conversion (default: 1) |
Attribution Models
| Model | Description |
|---|
last_touch | 100% credit to the last touchpoint before conversion |
first_touch | 100% credit to the first touchpoint |
linear | Equal credit distributed across all touchpoints |
time_decay | More credit to touchpoints closer to conversion |
position_based | 40% to first, 40% to last, 20% distributed across middle |
Example
curl -X POST https://playground.kaireonai.com/api/v1/attribution \
-H "Content-Type: application/json" \
-H "X-Tenant-Id: my-tenant" \
-d '{
"customerId": "C-1234",
"conversionId": "conv_abc123",
"model": "time_decay",
"conversionValue": 99.99
}'
Response (201)
{
"customerId": "C-1234",
"conversionId": "conv_abc123",
"model": "time_decay",
"totalValue": 99.99,
"touchpoints": [
{ "offerId": "offer_1", "channelId": "ch_email", "credit": 0.15, "value": 14.99 },
{ "offerId": "offer_2", "channelId": "ch_push", "credit": 0.35, "value": 35.00 },
{ "offerId": "offer_1", "channelId": "ch_sms", "credit": 0.50, "value": 50.00 }
]
}
GET /api/v1/attribution
Query attribution results. Editor or Admin.
Query Parameters
| Parameter | Type | Required | Description |
|---|
customerId | string | No | Filter by customer |
model | string | No | Filter by attribution model |
limit | number | No | Max results (default: 50, max: 200) |
offset | number | No | Pagination offset |
Response
{
"data": [ ... ],
"pagination": {
"total": 42,
"limit": 50,
"offset": 0,
"hasMore": false
}
}