Enrollment
Create Enrollment Rule
Create a new enrollment rule for automatic plan subscription based on email or domain matching.
Authorization
bearerAuth AuthorizationBearer <token>
Use your secret API key as the bearer token
In: header
Request Body
application/json
planId*string
Plan ID to enroll matching users into
Match
^plan_int_[A-Za-z0-9]{22}$matcherType*string
Type of matching
Value in
"email" | "domain"matcherValue*string
Value to match (e.g., 'user@example.com' or 'example.com')
Length
1 <= lengthResponse Body
application/json
application/json
application/json
curl -X POST "https://api.getlumen.dev/v1/enrollment/rules" \ -H "Content-Type: application/json" \ -d '{ "planId": "string", "matcherType": "email", "matcherValue": "string" }'{
"rule": {
"id": "plan_enroll_rule_8fQ9rGzK3pV1sR6tB0nM2d",
"planId": "plan_int_6FJ7xXk8Qp9zR2tSa1BcDe",
"matcherType": "email",
"matcherValue": "vip@example.com",
"isActive": true,
"createdAt": "2025-02-20T18:12:11.123Z"
}
}{
"error": "Invalid request body"
}{
"error": "Failed to create enrollment rule"
}