Enrollment

List Enrollment Rules

List active enrollment rules for a plan. Rules match exact emails or domains and automatically enroll users into the plan when processing enrollment events.

GET
/enrollment/rules

Authorization

bearerAuth
AuthorizationBearer <token>

Use your secret API key as the bearer token

In: header

Query Parameters

planId*string

Plan ID to list rules for

Match^plan_int_[A-Za-z0-9]{22}$

Response Body

application/json

application/json

application/json

curl -X GET "https://api.getlumen.dev/v1/enrollment/rules?planId=string"
{
  "rules": [
    {
      "id": "plan_enroll_rule_8fQ9rGzK3pV1sR6tB0nM2d",
      "planId": "plan_int_6FJ7xXk8Qp9zR2tSa1BcDe",
      "matcherType": "domain",
      "matcherValue": "example.com",
      "isActive": true,
      "createdAt": "2025-02-20T18:12:11.123Z"
    }
  ]
}
{
  "error": "Invalid planId: must match pattern plan_int_[A-Za-z0-9]{22}"
}
{
  "error": "Failed to list enrollment rules"
}