Accept Challenge

Accept a pending challenge with selected reward.

Changes challenge status from "pending" to "active" and sets:

  • selected_reward
  • reward_amount (from selected_reward)
  • reward_type (derived from selected_reward.tag)
  • start_timestamp = now
  • end_timestamp = now + time_window_days
  • accepted_timestamp = now

Args: request: Contains selected_reward (id, title, tag, amount)

Returns: Updated challenge object with status "active"

Raises: HTTPException: 404 if no pending challenge, 400 if invalid reward, etc.

post/api/challenge/accept

Request

  • Base URL
    https://backend.praktiki.io (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Request body

Response

Successful Response

successboolean required
challengeobject required
messagestring nullable

Changes

No recorded changes to this operation across all 1 revision of this API.