Skip to main content
PATCH
Update a raffle

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string<uuid>
required

Body

application/json

On create, name, description, terms_conditions and ends_at are required; on update, all fields are optional (and some lock once the raffle has entries).

name
string
Required string length: 3 - 255
Example:

"Win a year of free coffee"

description
string
Maximum string length: 2000
terms_conditions
string
Maximum string length: 5000
starts_at
string<date-time> | null

Null/omitted = starts immediately

ends_at
string<date-time>

Must be in the future. Winners are drawn automatically at this moment.

points_cost
integer
default:0

Points per entry (0 = free raffle — free raffles allow exactly 1 entry per user)

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

100

entries_per_user
integer | null

Per-customer entry limit. Null/omitted = unlimited

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

5

winners_count
integer
default:1
Required range: 1 <= x <= 100
max_entries
integer | null

Ceiling for the whole raffle — what max_entries_mode counts stops here. null (the default) = unlimited. A raffle at its ceiling stays active and visible and still draws its winners at ends_at; only new entries are blocked. Raise it at any time to reopen entries; it can never be lowered below what has already been recorded.

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

500

max_entries_mode
enum<string>
default:total

What max_entries counts. total: every entry, so 500 caps the prize pool at 500 tickets however they are distributed. participants: distinct customers, so 500 caps the raffle at 500 people who may each buy up to entries_per_user tickets. Locks once the raffle has entries.

Available options:
total,
participants

Response

Raffle updated

success
boolean
Example:

true

message
string
data
object