Join a challenge Coming soon
POST/v1/members/me/challenges/{id}/join
Enrolls the member in an opt_in challenge. Returns the member challenge with status: "enrolled". For a rolling challenge, the member's window starts now. Joining a challenge the member is already in returns their current state, so a retry after a timeout is safe.
Permissions: Member token.
Guide
ChallengesRequest headers#
Idempotency-KeystringAny string up to 255 characters; use a UUID v4. Kept 24 hours per key (or member) and endpoint. Same key and body replays the first response withIdempotent-Replayed: true.Max Length 255
Path parameters#
idstring (uuid)RequiredThe challenge.
Response fields#
Returns 200 with MemberChallenge
challenge_idstring (uuid)The challenge.member_idstring (uuid)statusstringeligible(can join, not joined),enrolled,completedorexpired.One ofeligible,enrolled,completed,expiredprogressobjectcurrent,targetandunit. For streaks,periodslists each day or week withstarts_at,ends_atandmet; it's empty for other types.Show attributesHide attributes
currentintegertargetintegerunitstringOne ofvisits,periods,cents,itemsperiodsarray of objectShow attributesHide attributes
starts_atstring (date-time)ends_atstring (date-time)metboolean
window_ends_atstring (date-time)NullableWhen this member's window ends. For a rolling challenge they haven't joined,null.completed_atstring (date-time)NullableWhen they completed it, ornull.reward_wallet_item_idstring (uuid)NullableThe wallet item paid on completion, for catalog rewards.nullotherwise.
Error descriptions#
422Unprocessable
challenge_not_joinable
The challenge is automatic, isn't live, has used its budget, or isn't open to this member. detail says which.
404Not found
not_found
No such challenge.
Any endpoint can also return the common errors.