Skip to main content

Ruleset Rules API

List all engagement scoring rules within a specific ruleset. Use this to audit scoring logic, compare rulesets, or export ruleset configuration.

GET /rulesets/{id}/rules

Returns all engagement rules for the specified ruleset.

Request

ParameterTypeRequiredDescription
idstringYesRuleset identifier (path parameter)

Response

200 OK

{
"rules": [
{
"id": "rule-123",
"ruleset_id": "ruleset-abc",
"event_type": "email_open",
"weight": 5,
"active": true,
"created_at": "2025-01-15T10:00:00Z"
},
{
"id": "rule-456",
"ruleset_id": "ruleset-abc",
"event_type": "page_view",
"weight": 10,
"active": true,
"created_at": "2025-01-15T10:05:00Z"
},
{
"id": "rule-789",
"ruleset_id": "ruleset-abc",
"event_type": "demo_request",
"weight": 50,
"active": true,
"created_at": "2025-01-15T10:10:00Z"
}
]
}

Response Fields

FieldTypeDescription
rulesarrayArray of rule objects
rules[].idstringUnique rule identifier
rules[].ruleset_idstringParent ruleset identifier
rules[].event_typestringEvent type this rule scores
rules[].weightintegerPoints awarded per event
rules[].activebooleanWhether the rule is active
rules[].created_attimestampWhen the rule was created

Example

curl -X GET "https://api.leadvibe.com/rulesets/ruleset-abc/rules" \
-H "Authorization: Bearer <token>"

Common Errors

StatusMeaningSolution
401UnauthorizedCheck authentication credentials
404Not FoundVerify the ruleset ID is correct

Notes

  • Each rule belongs to exactly one ruleset
  • The same event type can have different weights in different rulesets (e.g., email_open worth 5 points in one ruleset and 10 in another)
  • Rule evaluation order does not matter -- all matching rules fire simultaneously when an event occurs