Rewards (admin)

Create a draft challenge

Changed on
post/api/rewards/admin/challenges

Request

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

Request body

titlestring
descriptionobject
start_dateobject
end_dateobject
announce_dateobject
rule_typestring
rule_paramsobject
reward_pointsnumber
reward_cosmetic_keyobject
audiencesstring[]
test_user_idsstring[]

Test mode: only these users are in. [] = normal.

join_mode'opt_in' | 'auto'

opt_in: users join; auto: everyone eligible is in

tracker_stylestring
notificationsobject

Example request

{
  "rule_type": "log_days_in_window",
  "rule_params": {
    "source_type": "any",
    "days_required": 6
  },
  "audiences": [
    {
      "relationship": "client"
    }
  ],
  "test_user_ids": [
    1074
  ],
  "tracker_style": "menorah",
  "notifications": {
    "launch": true,
    "nudge": true,
    "last_day": true
  }
}

Changes