---
title: "Edit challenge"
method: PUT
path: "/challenge/{public_id}/"
tags: ["challenge"]
---

# Edit challenge

`PUT /challenge/{public_id}/`

Edits a challenge

## Request body

- ChallengeDetail
  - `url` string, uri
  - `public_id` string, uuid
  - `title` string, required
  - `slogan` string
  - `description` string
  - `start` string, date-time, required
  - `end` string, date-time, nullable
  - `type` 'INDIVIDUAL' | 'GROUP' | 'TEAM', required
  - `goal` 'DAILY' | 'TOTAL' | 'WEEKLY' | 'MONTHLY', required
  - `goal_value` integer, nullable
  - `goal_type` 'POINTS' | 'DISTANCE' | 'CALORIES' | 'DURATION' | 'STEPS', required
  - `visibility` 'PUBLIC' | 'PRIVATE', required
  - `num_members` string
  - `calculation_method` 'SUM' | 'AVERAGE', required
  - `goal_progress` number — Progress towards the goal, from perspective of profile whose bearer is used for authentication: can be an individual/team/global score. When goal is duration, this is the duration in seconds. When an admin token is used, returns 0.0.
  - `enrollment_method` 'AUTOMATIC' | 'MANUAL', required
  - `default_enrollment_time` 'CHALLENGE_START' | 'ENROLLMENT_TIME'
  - `members` ProfileListWithEnrolledTeam[] — List of all profiles participating in this challenge
    - `url` string, uri
    - `public_id` string, uuid, required
    - `name` string
    - `gender` 'M' | 'F' | 'X'
    - `team` TeamProfile — Team which this profile is enrolled with
      - `name` string, required
      - `public_id` string, uuid
      - `url` string, uri
      - `avatar` string, uri, nullable
    - `reference` string, required
    - `is_active` boolean — Whether profile actively participates in challenge. While inactive, scores will not be updated

## Response `200`

OK

- ChallengeDetail
  - `url` string, uri
  - `public_id` string, uuid
  - `title` string, required
  - `slogan` string
  - `description` string
  - `start` string, date-time, required
  - `end` string, date-time, nullable
  - `type` 'INDIVIDUAL' | 'GROUP' | 'TEAM', required
  - `goal` 'DAILY' | 'TOTAL' | 'WEEKLY' | 'MONTHLY', required
  - `goal_value` integer, nullable
  - `goal_type` 'POINTS' | 'DISTANCE' | 'CALORIES' | 'DURATION' | 'STEPS', required
  - `visibility` 'PUBLIC' | 'PRIVATE', required
  - `num_members` string
  - `calculation_method` 'SUM' | 'AVERAGE', required
  - `goal_progress` number — Progress towards the goal, from perspective of profile whose bearer is used for authentication: can be an individual/team/global score. When goal is duration, this is the duration in seconds. When an admin token is used, returns 0.0.
  - `enrollment_method` 'AUTOMATIC' | 'MANUAL', required
  - `default_enrollment_time` 'CHALLENGE_START' | 'ENROLLMENT_TIME'
  - `members` ProfileListWithEnrolledTeam[] — List of all profiles participating in this challenge
    - `url` string, uri
    - `public_id` string, uuid, required
    - `name` string
    - `gender` 'M' | 'F' | 'X'
    - `team` TeamProfile — Team which this profile is enrolled with
      - `name` string, required
      - `public_id` string, uuid
      - `url` string, uri
      - `avatar` string, uri, nullable
    - `reference` string, required
    - `is_active` boolean — Whether profile actively participates in challenge. While inactive, scores will not be updated

---

[API](https://skmtc.net/wefitter/apis/wefitter-api.md) · [All operations](https://skmtc.net/wefitter/apis/wefitter-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/wefitter/wefitter-api/revisions/52b0eb5e8b96/schema)
