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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Ruleset 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
| Field | Type | Description |
|---|---|---|
rules | array | Array of rule objects |
rules[].id | string | Unique rule identifier |
rules[].ruleset_id | string | Parent ruleset identifier |
rules[].event_type | string | Event type this rule scores |
rules[].weight | integer | Points awarded per event |
rules[].active | boolean | Whether the rule is active |
rules[].created_at | timestamp | When the rule was created |
Example
curl -X GET "https://api.leadvibe.com/rulesets/ruleset-abc/rules" \
-H "Authorization: Bearer <token>"
Common Errors
| Status | Meaning | Solution |
|---|---|---|
| 401 | Unauthorized | Check authentication credentials |
| 404 | Not Found | Verify 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_openworth 5 points in one ruleset and 10 in another) - Rule evaluation order does not matter -- all matching rules fire simultaneously when an event occurs
Related Endpoints
- Engagement Rulesets - List and create rulesets
- Engagement Rules - Create engagement rules
- Engagement Rule by ID - Update or delete a rule
- Profile Scoring Rules - Profile scoring rules