Create a tier
Creates a new tier with levels within a program.
Creates a new tier within a program. A tier is a ranked progression track where participants hold exactly one level at a time. Every tier needs a uniqueDocumentation Index
Fetch the complete documentation index at: https://docs.scrip.dev/llms.txt
Use this file to discover all available pages before exploring further.
key and at least one level. Each level has its own key and a rank that sets its position in the hierarchy (higher rank = higher tier). Both the tier key and level key are immutable after creation. Keys must be lowercase alphanumeric with underscores, starting with a letter (pattern: ^[a-z][a-z0-9_]*$).
Each level can also include color (hex code for UI display), icon_url, and a freeform benefits object. Tiers cannot be created under an archived program.
Lifecycle
Thelifecycle object controls how the tier behaves over time. Omit it to create a rules-only tier where changes are driven entirely by SET_TIER rule actions or direct API calls.
When present, lifecycle has five parts:
retentioncontrols whether the tier is re-evaluated on a periodic schedule (PERIOD_BASED) or expires after adurationof inactivity (ACTIVITY_REFRESH). WithACTIVITY_REFRESH, each event processed for the participant resets the timer.qualification_periodsets the evaluation cycle forPERIOD_BASEDretention:CALENDAR_YEAR(Jan 1 to Dec 31),FIXED_YEAR(custom start date viastart_monthandstart_day), orNONE.status_validityextends a status grant past the period end.extend_monthskeeps status valid for that many months beyond the boundary.0or omitted means status expires exactly at period end.downgrade_policydetermines what happens when qualification lapses.DROP_TO_QUALIFYINGre-evaluates and drops to the highest level the participant still qualifies for.DROP_ONEdrops exactly one rank.HOLDkeeps the current level indefinitely. Setgrace_daysto defer downgrades andmin_levelto establish a floor. Omit the whole object to default toDROP_TO_QUALIFYING.counterscontrols whether qualifying counters reset to zero (NONE) or carry over the excess above the current level’s threshold (EXCESS) at period end. Thequalifyingarray lists which counter keys are subject to rollover.
Qualification
Each level can definequalification criteria for counter-based auto-advancement. After rules fire for an event, Scrip evaluates each level’s thresholds and upgrades the participant to the highest level they qualify for.
Set mode to ALL (every criterion must pass) or ANY (at least one). Each criterion checks a counter key against a threshold using an operator: >=, >, ==, <=, or <. threshold defaults to 0 when omitted, so set it explicitly for a meaningful criterion.
Auto-qualification only upgrades. Downgrades happen through the lifecycle system at period end or timer expiration.
Benefits
benefits is a freeform JSON object on each level. Scrip stores it and returns it with the participant’s tier state. Use it to drive behavior in your application: a points_multiplier, free_shipping flag, or discount_percent. Scrip does not interpret the benefits payload. It is a data contract between your tier configuration and your application.
Authorizations
API key passed in the X-API-Key header.
Path Parameters
Program ID
Body
Tier definition with at least one level
Unique identifier for this tier within the program (immutable after creation, lowercase alphanumeric + underscores)
1 - 100^[a-z][a-z0-9_]*$"status"
Ordered set of levels within this tier (at least one required)
1Human-readable name shown in dashboards and reports
255"Loyalty Status"
Controls how tiers behave over time: retention mode, qualification period, downgrade policy, and counter rollover. Omit for rules-only mode.
Response
Tier created
A tier definition with its levels, lifecycle configuration, and metadata
When the tier was archived (RFC 3339); absent while the tier is ACTIVE
"2024-03-01T00:00:00Z"
When this tier was created (RFC 3339)
"2024-01-15T10:30:00Z"
Human-readable name
"Loyalty Status"
Unique identifier for this tier
"550e8400-e29b-41d4-a716-446655440000"
Tier key used in API calls and rule actions
"status"
Ordered list of levels within this tier
Lifecycle configuration (retention mode, qualification period, downgrade policy, counter rollover)
Program this tier belongs to
"550e8400-e29b-41d4-a716-446655440001"
Lifecycle status: ACTIVE, or ARCHIVED once the tier has been archived
"ACTIVE"
When this tier was last modified (RFC 3339)
"2024-01-15T10:30:00Z"