A program is the top-level container in Scrip. It holds your rules, links to your assets, and scopes your participants. You might have one program for your entire rewards system, or separate programs for distinct campaigns like “Q4 Referral Bonus” or “Employee Recognition.” Programs provide isolation. Rules in one program never trigger on events sent to another, so you can run multiple campaigns in parallel without rule conflicts.Documentation Index
Fetch the complete documentation index at: https://docs.scrip.dev/llms.txt
Use this file to discover all available pages before exploring further.
Creating a Program
A program only requires a name. You can set the enrollment policy and other options at creation or update them later.| Field | Required | Description |
|---|---|---|
name | Yes | Display name (1-255 characters) |
description | No | Additional context (max 1000 characters) |
on_unknown_participant | No | CREATE (default) or REJECT. See Enrollment below. |
program_id that you’ll use when sending events, creating rules, and querying balances.
The Program Wallet
Every program has a wallet. How it’s used depends on the asset’s issuance policy:- UNLIMITED credits mint new value directly. The wallet is bypassed. This is what most programs use.
- PREFUNDED credits draw from the wallet. You fund it up front, and every credit to a participant debits the wallet. When the wallet is empty, credits fail. This is how you enforce a fixed budget.
Linking Assets
Assets exist at the organization level. To use an asset in a program, it must be linked. When you create a new asset with aprogram_id, the link happens automatically. To share an existing asset across programs, link it manually:
An asset cannot be unlinked from a program if any ledger entries exist for that asset in that program.
Program State
Programs support the same state types as participants: tags, counters, and attributes. Use them for global logic that isn’t tied to any one participant. For example, a “first 1,000 signups” cap using a program-level counter:Program Status
You can pause or retire a program by updating its status:| Status | Behavior |
|---|---|
ACTIVE | Events process, rules evaluate normally |
SUSPENDED | New events are rejected. Useful for pausing a program while investigating an issue. Can be reactivated. |
ARCHIVED | Hidden from default listings. Historical data remains for auditing. |
Enrollment
Existing participants are automatically enrolled in a program the first time an event targets them in that program. This applies across all identity paths and requires no configuration. Inactive enrollments (FROZEN, LOCKED, or CLOSED) are reactivated. Theon_unknown_participant setting controls what happens when an event arrives for a participant that doesn’t exist yet:
| Setting | Behavior |
|---|---|
CREATE (default) | Scrip creates the participant automatically, enrolls them, and processes the event. No separate registration step needed. |
REJECT | The event fails. You must create participants explicitly via POST /v1/participants before sending events for them. Existing participants are still auto-enrolled. |
CREATE for simplicity. Use REJECT when you need strict control over who can participate.
Automations
Programs can have automations that generate events on a schedule, at a specific time, or in response to participant state changes. Automations are scoped to a program and managed viaPOST /v1/programs/{id}/automations. See Automations for details.