Campaigns are the central container for all mechanics. You define the available prizes, their probabilities, user limits, and when they activate.Documentation Index
Fetch the complete documentation index at: https://docs.nippy.la/llms.txt
Use this file to discover all available pages before exploring further.
Create a campaign
Parameters
Internal campaign name. Only visible in your console.
Your backend URL where Nippy will send events. Must be HTTPS.
Secret for verifying the HMAC-SHA256 webhook signature. Minimum 16 characters.
Maximum spins per user. Use
-1 for unlimited.Wait time between spins for the same user. Use
0 for no cooldown.List of available prizes. Probabilities must add up to exactly 100.
Prize types
| Type | Description | Additional fields |
|---|---|---|
won_points | Credits points to the user | pointsValue (required) |
lost | No prize — needed so probabilities sum to 100 | — |
won_digital | Digital prize (code, voucher, etc.) | Descriptive name |
won_physical | Physical prize with tracked inventory | Descriptive name |
The probabilities of all gifts in a campaign must add up to exactly 100. If they don’t, creation fails with a validation error.
Create activation rules
Rules define which business event triggers a mechanic automatically. When the bank callsnippy.track(), the engine evaluates the campaign’s rules and executes the action if the condition is met.
Rule: unlock spin for purchases over $100
Rule: grant points for purchases over $500
Available condition operators
| Operator | Meaning |
|---|---|
gt | Greater than |
gte | Greater than or equal to |
lt | Less than |
lte | Less than or equal to |
eq | Equal to |
Available actions
| Action | Description |
|---|---|
unlock_spin | Triggers an automatic spin for the user. The result arrives via the spin.completed webhook. |
grant_points | Credits points directly without spinning. Requires the pointsValue field. |

