Skip to main content

Score Gains API

Retrieve leads with the largest recent score increases. Useful for identifying leads that are rapidly gaining engagement and may be ready for outreach.

GET /score-gains​

Get leads with the highest score gains for the active Organizational Unit.

Request​

ParameterTypeRequiredDescription
rangestringNoTime range: today, last_7d, last_30d (default: last_7d)
limitintegerNoMaximum number of results (default: 10)

Response​

200 OK

{
"leads": [
{
"lead_id": "ld_123",
"score": 85,
"score_gain": 40,
"last_event_at": "2025-01-15T10:30:00Z"
},
{
"lead_id": "ld_456",
"score": 62,
"score_gain": 28,
"last_event_at": "2025-01-15T09:15:00Z"
}
]
}

Response Fields​

FieldTypeDescription
lead_idstringLead identifier
scoreintegerCurrent score
score_gainintegerScore increase in the specified period
last_event_attimestampMost recent event for the lead

Example​

curl -X GET "https://api.kenbun.io/score-gains?range=last_7d&limit=10" \
-H "Authorization: Bearer <token>"

Common Errors​

StatusMeaningSolution
401UnauthorizedCheck authentication token
500Server ErrorContact support if persists

Notes​

  • Results are OU-scoped to the active Organizational Unit
  • Score gains are calculated from score snapshots, so data reflects hourly snapshot resolution
  • Leads with no recent activity will not appear in results