Skip to main content

Decay Rules API

Manage score decay rules that automatically reduce lead scores over time based on inactivity. Decay rules prevent stale leads from maintaining artificially high scores.

GET /decays

List all decay rules for the active Organizational Unit.

Request

No query parameters required.

Response

200 OK

{
"decays": [
{
"id": "decay-123",
"name": "7-Day Inactivity Decay",
"points": -5,
"interval_days": 7,
"active": true,
"created_at": "2025-01-15T10:00:00Z"
}
]
}

Response Fields

FieldTypeDescription
idstringUnique decay rule identifier
namestringDecay rule name
pointsintegerPoints to subtract each interval (negative value)
interval_daysintegerNumber of days of inactivity before decay applies
activebooleanWhether the rule is currently active
created_attimestampWhen the rule was created

Example

curl -X GET "https://api.leadvibe.com/decays" \
-H "Authorization: Bearer <token>"

Common Errors

StatusMeaningSolution
401UnauthorizedCheck authentication token

POST /decays

Create a new decay rule.

Request

ParameterTypeRequiredDescription
namestringYesRule name
pointsintegerYesPoints to subtract per interval (negative value)
interval_daysintegerYesDays of inactivity before decay starts

Request Body

{
"name": "Weekly Decay",
"points": -5,
"interval_days": 7
}

Response

201 Created

Returns the created decay rule.

Example

curl -X POST "https://api.leadvibe.com/decays" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "Weekly Decay",
"points": -5,
"interval_days": 7
}'

Common Errors

StatusMeaningSolution
400Bad RequestMissing required fields
401UnauthorizedCheck authentication token

Notes

  • Decay rules are OU-scoped to the active Organizational Unit
  • Decay is applied by the background worker on a schedule
  • A lead's score will not drop below zero (unless negative scores are enabled in scoring settings)
  • Use decay rules to ensure your highest-priority leads are truly active, not just historically engaged