Update a challenge Coming soon
PATCH/v1/challenges/{id}
Changes the fields you send. A draft is edited in place. Editing a scheduled or live challenge creates a new version: members already enrolled keep the rules they joined under, and new members get the new version. You can't change type, and an ended challenge can't be edited.
Returns the challenge object.
Permissions: Secret key with challenges:write.
Guide
ChallengesPath parameters#
idstring (uuid)Required
Request body#
namestringdescriptionstringimage_urlstring (uri)NullabletypestringOne ofvisits,streak,spend,menu_discoverygoalobjectShow attributesHide attributes
targetintegerunitstringOne ofvisits,periods,cents,itemsperiodstringNullableOne ofday,weekgrace_periodsintegerNullableitem_setarray of object
qualifyingobjectShow attributesHide attributes
min_subtotal_centsintegerInteger cents.Min 0channelsarray of stringlocation_idsarray of string (uuid)fulfillmentarray of stringOne ofpickup,delivery,curbside,dine_inavailable_timesarray of AvailableTimeShow attributesAvailableTime
daysarray of stringShow valuesHide values
montuewedthufrisatsun
startstringLocal time, HH:MM.endstringLocal time, HH:MM.
max_counted_per_dayinteger
windowobject or objectenrollmentstringOne ofautomatic,opt_inrewardobject or objectmax_completions_per_memberintegerbudgetobjectShow attributesHide attributes
max_completionsintegerNullable
Response fields#
Returns 200 with Challenge
idstring (uuid)The challenge.namestringShown to guests.descriptionstringOne or two lines for guests.image_urlstring (uri)NullableHTTPS image for the challenge card.typestringvisits,streak,spendormenu_discovery.One ofvisits,streak,spend,menu_discoverygoalobjecttarget(number to reach) andunit(visits,periods,centsoritems). Streaks addperiod(dayorweek) andgrace_periods. Menu discovery addsitem_set: items (pos_item_id,name) or categories (pos_category_id,name). Fields that don't apply arenullor empty.Show attributesHide attributes
targetintegerunitstringOne ofvisits,periods,cents,itemsperiodstringNullableOne ofday,weekgrace_periodsintegerNullableitem_setarray of object
qualifyingobjectWhich orders count:min_subtotal_cents,channels,location_ids,fulfillment,available_times(same shapes as reward rules; empty lists mean no limit) andmax_counted_per_day(default 1).Show attributesHide attributes
min_subtotal_centsintegerInteger cents.Min 0channelsarray of stringlocation_idsarray of string (uuid)fulfillmentarray of stringOne ofpickup,delivery,curbside,dine_inavailable_timesarray of AvailableTimeShow attributesAvailableTime
daysarray of stringShow valuesHide values
montuewedthufrisatsun
startstringLocal time, HH:MM.endstringLocal time, HH:MM.
max_counted_per_dayinteger
windowobject or object{ "kind": "fixed", "starts_at", "ends_at" }for the same dates for everyone, or{ "kind": "rolling", "days" }for a window per member that starts when they join.enrollmentstringautomaticoropt_in.One ofautomatic,opt_inrewardobject or object{ "kind": "points", "points" }for bonus points, or{ "kind": "reward", "reward_id" }for a catalog reward that lands in the wallet.max_completions_per_memberintegerUsually 1.budgetobjectmax_completionsacross all members, ornullfor no limit.Show attributesHide attributes
max_completionsintegerNullable
statusstringdraft,scheduled,live,pausedorended.One ofdraft,scheduled,live,paused,endedversionintegerGoes up each time a scheduled or live challenge is edited. Members keep the rules of the version they joined.
Error descriptions#
400Bad request
invalid_param
A bad value, or an attempt to change type.
409Conflict
invalid_state
The challenge has ended.
Any endpoint can also return the common errors.