Skip to main content
PATCH
Update a reward

Authorizations

Authorization
string
header
required

API key from the Rigaly dashboard: Authorization: Bearer rgly_sk_...

Path Parameters

id
string<uuid>
required

Body

application/json
name
string
Example:

"Free Coffee"

description
string | null
points_cost
integer
Required range: x >= 0
Example:

500

active
boolean
default:true
start_date
string<date> | null
end_date
string<date> | null
time_active
object

Per-day time-of-day windows. Omit a day to leave it unrestricted; omit the whole field for always-active.

Example:
conditions
string | null

Free-text conditions shown to customers and returned on validation — use it to encode product restrictions your system enforces.

Maximum string length: 1000
cooldown_mode
enum<string>
default:none
Available options:
none,
limit,
once
cooldown_count
integer | null

Required when cooldown_mode = limit

cooldown_amount
integer | null

Required when cooldown_mode = limit

cooldown_unit
enum<string> | null
Available options:
minute,
hour,
day,
month
absence_amount
integer | null

Only offer after the customer has been absent this long (pair with absence_unit)

absence_unit
enum<string> | null
Available options:
minute,
hour,
day,
month
birthday
boolean
default:false
birthday_window_mode
enum<string>

birthday_days_before/after required when 'days'

Available options:
exact,
days,
month
birthday_days_before
integer | null
birthday_days_after
integer | null
tier_gate
object | null

Restrict the reward to a tier/level (mode: minimum|only)

tier_overrides
object[]

Per-tier cooldown / early-access overrides

max_redemptions
integer | null

Global redemption cap — the reward can be redeemed this many times in total, across all customers. null (the default) = unlimited. Only completed redemptions count. On reaching the cap the reward is switched off automatically (active: false, deactivated_by_limit: true) and disappears from the customer app; raising the cap (or setting it to null) switches it back on. Cannot be lowered below redemptions_count.

Required range: 1 <= x <= 1000000
Example:

10

delivery_mode
enum<string>
default:in_store

How the reward reaches the customer — see the delivery modes guide. in_store: the customer gets a redemption code you validate and complete at your counter (points are deducted on completion). shipping: the customer submits a shipping address in the app; points are deducted immediately and you fulfil the order via the redemption endpoints. digital: the customer receives a code or link instantly in the app; points are deducted immediately.

Available options:
in_store,
shipping,
digital
digital_asset_type
enum<string> | null

What the customer receives. Required when delivery_mode is digital; must be omitted/null otherwise. An external reward's endpoint must return this exact type — a mismatch is rejected.

Available options:
code,
link
digital_asset_source
enum<string>
default:static

Where the delivered value comes from — digital rewards only, and the customer experience is identical for all three. See the delivery modes guide. static: one fixed digital_asset_value every customer receives. pool: a stored batch of one-time values; each redemption consumes exactly one, atomically — no two customers can ever get the same value. external: Rigaly calls your digital_webhook_url at redemption time and delivers whatever it mints. Sending anything other than static on a non-digital reward is rejected.

Available options:
static,
pool,
external
digital_asset_value
string | null

The voucher code or URL handed to the customer. Required when digital_asset_source is static, and rejected for pool (upload the values to the reward's pool instead) and external (the endpoint supplies the value). Must be a valid http(s) URL when digital_asset_type is link. Never returned on customer-facing payloads.

Required string length: 1 - 500
Example:

"SUMMER24"

digital_webhook_url
string<uri> | null

HTTPS endpoint Rigaly POSTs to at redemption time to mint the value. Required when digital_asset_source is external, rejected otherwise. Must be https, carry no embedded credentials, and resolve to a public address — private, loopback, link-local and cloud-metadata hosts are refused at save time. Creating a reward as external, or switching an existing one to external, returns digital_webhook_secret once; changing only the URL afterwards does not rotate it.

Maximum string length: 500
Example:

"https://api.example.com/rigaly/provision"

digital_email_delivery
boolean
default:false

Digital rewards only — also email the code/link to the customer when they redeem.

Response

Reward updated

success
boolean
Example:

true

message
string
data
object