WeFitter challenge API

WeFitter API’s challenge engine will bring endless engagement to your platform. For more information about the possibilities in challenges please go to https://www.wefitter.com/en-us/features/gamification/ Challenges have multilanguage support on the fields: `Title`, `Slogan`, and `Description`. By default, challenges get the default-language that is configured in the app. Whenever a challenge is requested through the API this challenge will be presented in the default language. If another language is preferred, this can be requested by adding the header parameter `Accept-Language` stating the language short code (ex. `en` for english). If this language short code is not present in the title of the challenge, the default language will be returned. These translation fields contain JSON strings, for example: ```{"en":"this is the English title","nl":"this is the Dutch title"}``` So to create a multilanguage challenge, please provide the title, slogan, and description field as json strings, be aware that because of serialization this should be formed with backward slashes: { "title": "{\"en\":\"this is the English title\", \"nl\":\"this is the dutch title\"}", "slogan": "{\"en\":\"this is the English title\", \"nl\":\"this is the dutch slogan\"}", "description": "{\"en\":\"this is the English title\", \"nl\":\"this is the dutch description\"}", }

Operations 22

GET /challenge/ List Challenges #
POST /challenge/ Create challenge #
GET /challenge/{challenge_public_id}/team/ Team leaderboard #
GET /challenge/{challenge_public_id}/team/{team_public_id}/ Team contribution #
GET /challenge/{public_id}/ Get Challenge #
PUT /challenge/{public_id}/ Edit challenge #
PATCH /challenge/{public_id}/ Partial edit challenge #
DELETE /challenge/{public_id}/ Delete challenge #
POST /challenge/{public_id}/deactivate_member/ Deactivate member #
PUT /challenge/{public_id}/deactivate_member/ #
POST /challenge/{public_id}/deactivate_members/ Deactivate members #
PUT /challenge/{public_id}/deactivate_members/ #
GET /challenge/{public_id}/leaderboard/ Leaderboard #
GET /challenge/{public_id}/leaderboard_history/ Leaderboard history #
POST /challenge/{public_id}/member/ Add member #
PUT /challenge/{public_id}/member/ Add member #
DELETE /challenge/{public_id}/member/ Remove member #
GET /challenge/{public_id}/members/ Get members #
POST /challenge/{public_id}/members/ Add members #
PUT /challenge/{public_id}/members/ Add members #
GET /challenge/{public_id}/periods/ Periods #
POST /challenge/{public_id}/remove_members/ Remove members #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/wefitter-challenge-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

wefitter-challenge-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: WeFitter app Challenge API
  description: This is the WeFitter API
  termsOfService: https://www.wefitter.com/privacy/
  contact:
    email: hello@wefitter.com
  license:
    name: BSD License
  version: v1.3
servers:
- url: https://api.wefitter.com/api/v1.3
security:
- BearerProfile: []
tags:
- name: challenge
  description: "\nWeFitter API’s challenge engine will bring endless engagement to your platform.\nFor more information about the possibilities in challenges please go to https://www.wefitter.com/en-us/features/gamification/\n\nChallenges have multilanguage support on the fields: `Title`, `Slogan`, and `Description`.\nBy default, challenges get the default-language that is configured in the app. Whenever a challenge is requested through the API this challenge will be presented in the default language.\nIf another language is preferred, this can be requested by adding the header parameter `Accept-Language` stating the language short code (ex. `en` for english). If this language short code is not present in the title of the challenge, the default language will be returned.\n\nThese translation fields contain JSON strings, for example:\n```{\"en\":\"this is the English title\",\"nl\":\"this is the Dutch title\"}```\nSo to create a multilanguage challenge, please provide the title, slogan, and description field as json strings, be aware that because of serialization this should be formed with backward slashes:\n\n\n<table><tbody>\n    <tr><td>\n{\n\n\"title\": \"{\\\"en\\\":\\\"this is the English title\\\", \\\"nl\\\":\\\"this is the dutch title\\\"}\",\n\n\"slogan\": \"{\\\"en\\\":\\\"this is the English title\\\", \\\"nl\\\":\\\"this is the dutch slogan\\\"}\",\n\n\"description\": \"{\\\"en\\\":\\\"this is the English title\\\", \\\"nl\\\":\\\"this is the dutch description\\\"}\",\n\n}\n</td></tr>\n</tbody></table>\n\n"
paths:
  /challenge/:
    parameters: []
    get:
      operationId: challenge_list
      summary: List Challenges
      description: Lists all available challenges
      parameters:
      - name: limit
        in: query
        description: Number of results to return per page.
        required: false
        schema:
          type: integer
      - name: offset
        in: query
        description: The initial index from which to return the results.
        required: false
        schema:
          type: integer
      - name: recent
        in: query
        description: Show challenges that have not ended in the last N weeks
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                required:
                - count
                - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type:
                    - string
                    - 'null'
                    format: uri
                  previous:
                    type:
                    - string
                    - 'null'
                    format: uri
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/ChallengeList'
      tags:
      - challenge
      security:
      - BearerAdmin: []
      - BearerProfile: []
      deprecated: false
    post:
      operationId: challenge_create
      summary: Create challenge
      description: Creates a new challenge
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChallengeDetail'
      tags:
      - challenge
      security:
      - BearerAdmin: []
      deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChallengeDetail'
        required: true
  /challenge/{challenge_public_id}/team/:
    parameters:
    - name: challenge_public_id
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: challenge_team_list
      summary: Team leaderboard
      description: 'List the standings of different teams in challenges (don''t have to be team challenges).

        This endpoint returns a list of objects.

        '
      parameters:
      - name: limit
        in: query
        description: Number of results to return per page.
        required: false
        schema:
          type: integer
      - name: offset
        in: query
        description: The initial index from which to return the results.
        required: false
        schema:
          type: integer
      - name: date_range
        in: query
        description: Index of the time period use
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                required:
                - count
                - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type:
                    - string
                    - 'null'
                    format: uri
                  previous:
                    type:
                    - string
                    - 'null'
                    format: uri
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/LeaderboardTeam'
      tags:
      - challenge
      security:
      - BearerAdmin: []
      - BearerProfile: []
      deprecated: false
  /challenge/{challenge_public_id}/team/{team_public_id}/:
    parameters:
    - name: challenge_public_id
      in: path
      required: true
      schema:
        type: string
    - name: team_public_id
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: challenge_team_read
      summary: Team contribution
      description: 'List team members'' contribution to the challenge.

        This endpoint returns a list of objects.

        '
      parameters:
      - name: date_range
        in: query
        description: Index of the time period use
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeaderboardProfile'
      tags:
      - challenge
      security:
      - BearerAdmin: []
      - BearerProfile: []
      deprecated: false
  /challenge/{public_id}/:
    parameters:
    - name: public_id
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: challenge_read
      summary: Get Challenge
      description: Gets a single challenge
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChallengeDetail'
      tags:
      - challenge
      security:
      - BearerAdmin: []
      - BearerProfile: []
      deprecated: false
    put:
      operationId: challenge_update
      summary: Edit challenge
      description: Edits a challenge
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChallengeDetail'
      tags:
      - challenge
      security:
      - BearerAdmin: []
      deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChallengeDetail'
        required: true
    patch:
      operationId: challenge_partial_update
      summary: Partial edit challenge
      description: Edits a challenge
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChallengeDetail'
      tags:
      - challenge
      security:
      - BearerAdmin: []
      deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChallengeDetail'
        required: true
    delete:
      operationId: challenge_delete
      summary: Delete challenge
      description: deletes a challenge
      responses:
        '204':
          description: ''
      tags:
      - challenge
      security:
      - BearerAdmin: []
      deprecated: false
  /challenge/{public_id}/deactivate_member/:
    parameters:
    - name: public_id
      in: path
      required: true
      schema:
        type: string
    post:
      operationId: challenge_deactivate_member_create
      summary: Deactivate member
      description: Deactivate a member from the challenge
      parameters:
      - name: profile
        in: query
        description: A profile public_id is expected
        required: true
        schema:
          type: string
          format: uuid
      - name: team
        in: query
        description: A team public_id is expected
        required: false
        schema:
          type: string
          format: uuid
      - name: is_active
        in: query
        description: 'Whether profile actively participates in challenge.


          While inactive, scores/leaderboard will not be updated but still be visible.'
        required: false
        schema:
          type: boolean
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfileAsProfilePublicIdAndTeamAsTeamPublicId'
      tags:
      - challenge
      security:
      - BearerAdmin: []
      - BearerProfile: []
      deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProfileAsProfilePublicIdAndTeamAsTeamPublicId'
        required: true
    put:
      operationId: challenge_deactivate_member_update
      description: This docstring is used by Django Rest Framework
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfileAsProfilePublicIdAndTeamAsTeamPublicId'
      tags:
      - challenge
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProfileAsProfilePublicIdAndTeamAsTeamPublicId'
        required: true
  /challenge/{public_id}/deactivate_members/:
    parameters:
    - name: public_id
      in: path
      required: true
      schema:
        type: string
    post:
      operationId: challenge_deactivate_members_create
      summary: Deactivate members
      description: Deactivate multiple members from the challenge
      parameters:
      - name: profile
        in: query
        description: A profile public_id is expected
        required: true
        schema:
          type: string
          format: uuid
      - name: team
        in: query
        description: A team public_id is expected
        required: false
        schema:
          type: string
          format: uuid
      - name: is_active
        in: query
        description: 'Whether profile actively participates in challenge.


          While inactive, scores/leaderboard will not be updated but still be visible.'
        required: false
        schema:
          type: boolean
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfilePublicIdsListAndTeamAsPublicId'
      tags:
      - challenge
      security:
      - BearerAdmin: []
      - BearerProfile: []
      deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProfilePublicIdsListAndTeamAsPublicId'
        required: true
    put:
      operationId: challenge_deactivate_members_update
      description: This docstring is used by Django Rest Framework
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfilePublicIdsListAndTeamAsPublicId'
      tags:
      - challenge
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProfilePublicIdsListAndTeamAsPublicId'
        required: true
  /challenge/{public_id}/leaderboard/:
    parameters:
    - name: public_id
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: challenge_leaderboard
      summary: Leaderboard
      description: 'Displays the leaderboard for a challenge.

        This endpoint returns a list of objects.

        '
      parameters:
      - name: date_range
        in: query
        description: Index of the time period use
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeaderboardProfileAndTeam'
      tags:
      - challenge
      security:
      - BearerAdmin: []
      - BearerProfile: []
      deprecated: false
  /challenge/{public_id}/leaderboard_history/:
    parameters:
    - name: public_id
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: challenge_leaderboard_history
      summary: Leaderboard history
      description: 'Retrieve the scores of the authenticated profile for all periods since the profile joined the challenge.

        This endpoint returns a list of objects.

        '
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeaderboardHistory'
      tags:
      - challenge
      security:
      - BearerProfile: []
      deprecated: false
  /challenge/{public_id}/member/:
    parameters:
    - name: public_id
      in: path
      required: true
      schema:
        type: string
    post:
      operationId: challenge_member_create
      summary: Add member
      description: 'Add member to a team.


        Note: for now if the challenge is a team challenge and no team is specified, the first team for the specified profile is

        used. Do note that this is a temporary fix and may be removed at any time.

        '
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfileAsProfilePublicIdAndTeamAsTeamPublicId'
      tags:
      - challenge
      security:
      - BearerAdmin: []
      - BearerProfile: []
      deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProfileAsProfilePublicIdAndTeamAsTeamPublicId'
        required: true
    put:
      operationId: challenge_member_update
      summary: Add member
      description: 'Add member to a team.


        Note: for now if the challenge is a team challenge and no team is specified, the first team for the specified profile is

        used. Do note that this is a temporary fix and may be removed at any time.

        '
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfileAsProfilePublicIdAndTeamAsTeamPublicId'
      tags:
      - challenge
      security:
      - BearerAdmin: []
      - BearerProfile: []
      deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProfileAsProfilePublicIdAndTeamAsTeamPublicId'
        required: true
    delete:
      operationId: challenge_member_delete
      summary: Remove member
      description: Remove a member from the challenge
      parameters:
      - name: profile
        in: query
        description: A profile public_id is expected
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: ''
      tags:
      - challenge
      security:
      - BearerAdmin: []
      - BearerProfile: []
      deprecated: false
  /challenge/{public_id}/members/:
    parameters:
    - name: public_id
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: challenge_members_read
      summary: Get members
      description: Get a paginated list of members enrolled to a Challenge
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChallengeDetail'
      tags:
      - challenge
      security:
      - BearerAdmin: []
      - BearerProfile: []
      deprecated: false
    post:
      operationId: challenge_members_create
      summary: Add members
      description: 'Add members to a team.


        Note: for now if the challenge is a team challenge and no team is specified, the first team for the specified profile is

        used. Do note that this is a temporary fix and may be removed at any time.


        Note: for the GET/POST endpoint an admin bearer token is required, while the GET also accepts profile bearer tokens'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfilePublicIdsListAndTeamAsPublicId'
      tags:
      - challenge
      security:
      - BearerAdmin: []
      deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProfilePublicIdsListAndTeamAsPublicId'
        required: true
    put:
      operationId: challenge_members_update
      summary: Add members
      description: 'Add members to a team.


        Note: for now if the challenge is a team challenge and no team is specified, the first team for the specified profile is

        used. Do note that this is a temporary fix and may be removed at any time.


        Note: for the GET/POST endpoint an admin bearer token is required, while the GET also accepts profile bearer tokens'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfilePublicIdsListAndTeamAsPublicId'
      tags:
      - challenge
      security:
      - BearerAdmin: []
      deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProfilePublicIdsListAndTeamAsPublicId'
        required: true
  /challenge/{public_id}/periods/:
    parameters:
    - name: public_id
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: challenge_periods
      summary: Periods
      description: 'Get all periods for the challenge.

        This endpoint returns a list of objects.

        '
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChallengePeriod'
      tags:
      - challenge
      security:
      - BearerAdmin: []
      - BearerProfile: []
      deprecated: false
  /challenge/{public_id}/remove_members/:
    parameters:
    - name: public_id
      in: path
      required: true
      schema:
        type: string
    post:
      operationId: challenge_remove_members
      summary: Remove members
      description: Remove members from the challenge
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfilePublicIdsListAndTeamAsPublicId'
      tags:
      - challenge
      security:
      - BearerAdmin: []
      deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProfilePublicIdsListAndTeamAsPublicId'
        required: true
components:
  schemas:
    ChallengeActivityType:
      required:
      - activity_type
      type: object
      properties:
        activity_type:
          title: Activity type
          type: string
          enum:
          - RUNNING
          - CROSSFIT
          - CYCLING
          - SWIMMING
          - OTHER
          - ROWING
          - WALKING
          - MINDFULNESS
          - YOGA
          - STRENGTH_TRAINING
    LeaderboardTeam:
      required:
      - name
      - avatar
      type: object
      properties:
        name:
          title: Name
          type: string
          maxLength: 100
          minLength: 1
        public_id:
          title: Public id
          type: string
          format: uuid
          readOnly: true
        url:
          title: Url
          type: string
          format: uri
          readOnly: true
        num_members:
          title: Num members
          type: string
          readOnly: true
        score:
          title: Score
          type: number
          readOnly: true
        position:
          title: Position
          type: integer
          readOnly: true
        avatar:
          title: Avatar
          type: string
          format: uri
          minLength: 1
    ChallengePeriod:
      type: object
      properties:
        start:
          title: Start
          type: string
          format: date-time
          readOnly: true
        end:
          title: End
          type: string
          format: date-time
          readOnly: true
    LeaderboardProfileAndTeam:
      required:
      - avatar
      type: object
      properties:
        name:
          title: Name
          type: string
          readOnly: true
          minLength: 1
        public_id:
          title: Public id
          type: string
          format: uuid
          readOnly: true
        url:
          title: Url
          type: string
          format: uri
          readOnly: true
        score:
          title: Score
          type: number
          readOnly: true
        position:
          title: Position
          type: integer
          readOnly: true
        avatar:
          title: Avatar
          type: string
          format: uri
          minLength: 1
    LeaderboardHistory:
      type: object
      properties:
        score:
          title: Score
          type: number
          readOnly: true
        start:
          title: Start
          type: string
          format: date-time
          readOnly: true
        end:
          title: End
          type: string
          format: date-time
          readOnly: true
    TeamProfile:
      description: Team of which this profile is a member of
      required:
      - name
      type: object
      properties:
        name:
          title: Name
          type: string
          maxLength: 100
          minLength: 1
        public_id:
          title: Public id
          type: string
          format: uuid
          readOnly: true
        url:
          title: Url
          type: string
          format: uri
          readOnly: true
        avatar:
          title: Avatar
          type:
          - string
          - 'null'
          format: uri
          minLength: 1
    ProfileAsProfilePublicIdAndTeamAsTeamPublicId:
      required:
      - profile
      type: object
      properties:
        profile:
          title: Profile
          description: A profile public_id is expected
          type: string
          format: uuid
        team:
          title: Team
          description: A team public_id is expected
          type: string
          format: uuid
        is_active:
          title: Is active
          description: 'Whether profile actively participates in challenge.


            While inactive, scores/leaderboard will not be updated but still be visible.'
          type: boolean
        joined:
          title: Joined
          description: The timestamp when the profile/team joined the challenge.
          type: string
          format: date-time
    LeaderboardProfile:
      required:
      - avatar
      type: object
      properties:
        url:
          title: Url
          type: string
          format: uri
          readOnly: true
        public_id:
          title: Public id
          type: string
          format: uuid
          readOnly: true
        name:
          title: Name
          type: string
          readOnly: true
          minLength: 1
        gender:
          title: Gender
          type: string
          enum:
          - M
          - F
          - X
        teams:
          description: Team of which this profile is a member of
          type: array
          items:
            $ref: '#/components/schemas/TeamProfile'
          readOnly: true
        reference:
          title: Reference
          type: string
          readOnly: true
          minLength: 1
        score:
          title: Score
          type: number
          readOnly: true
        position:
          title: Position
          type: integer
          readOnly: true
        avatar:
          title: Avatar
          type: string
          format: uri
          minLength: 1
    ProfilePublicIdsListAndTeamAsPublicId:
      required:
      - profiles
      type: object
      properties:
        profiles:
          type: array
          items:
            type: string
            format: uuid
        is_active:
          title: Is active
          description: 'Whether profile actively participates in challenge.


            While inactive, scores/leaderboard will not be updated but still be visible.'
          type: boolean
        team:
          title: Team
          description: A team public_id is expected
          type: string
          format: uuid
        joined:
          title: Joined
          description: The timestamp when the profile/team joined the challenge.
          type: string
          format: date-time
    ChallengeDetail:
      required:
      - title
      - start
      - type
      - goal
      - goal_type
      - visibility
      - calculation_method
      - enrollment_method
      - repetition
      type: object
      properties:
        url:
          title: Url
          type: string
          format: uri
          readOnly: true
        public_id:
          title: Public id
          type: string
          format: uuid
          readOnly: true
        title:
          title: Title
          type: string
          minLength: 1
        slogan:
          title: Slogan
          type: string
        description:
          title: Description
          type: string
        start:
          title: Start
          type: string
          format: date-time
        end:
          title: End
          type:
          - string
          - 'null'
          format: date-time
        type:
          title: Type
          type: string
          enum:
          - INDIVIDUAL
          - GROUP
          - TEAM
        goal:
          title: Goal
          type: string
          enum:
          - DAILY
          - TOTAL
          - WEEKLY
          - MONTHLY
        goal_value:
          title: Goal value
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: -2147483648
        goal_type:
          title: Goal type
          type: string
          enum:
          - POINTS
          - DISTANCE
          - CALORIES
          - DURATION
          - STEPS
        visibility:
          title: Visibility
          type: string
          enum:
          - PUBLIC
          - PRIVATE
        num_members:
          title: Num members
          type: string
          readOnly: true
        calculation_method:
          title: Calculation method
          type: string
          enum:
          - SUM
          - AVERAGE
        goal_progress:
          title: Goal progress
          description: '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.'
          type: number
          readOnly: true
        enrollment_method:
          title: Enrollment method
          type: string
          enum:
          - AUTOMATIC
          - MANUAL
        default_enrollment_time:
          title: Default enrollment time
          type: string
          enum:
          - CHALLENGE_START
          - ENROLLMENT_TIME
        repetition:
          title: Repetition
          type: string
          enum:
          - NONE
          - STREAK
          - STICKTOIT
          - GOALBREAKER
        avatar:
          title: Avatar
          type:
          - string
          - 'null'
          format: uri
          minLength: 1
        data_source:
          title: Data source
          type: string
          readOnly: true
          minLength: 1
        activity_types:
          type: array
          items:
            $ref: '#/components/schemas/ChallengeActivityType'
        current_period_start:
          title: Current period start
          description: The start (exclusive) of the current period. Null if the challenge has not started yet.
          type: string
          format: date-time
          readOnly: true
        current_period_end:
          title: Current period end
          description: The end (exclusive) of the current period. Null if the challenge end has passed.
          type: string
          format: date-time
          readOnly: true
        goal_cap:
          title: Goal cap
          description: Whether scores should be unable to surpass the goal value.
          type: boolean
        total_calories:
          title: Total calories
          type: number
          readOnly: true
        total_distance:
          title: Total distance
          type: number
          readOnly: true
        total_steps:
          title: Total steps
          type: number
          readOnly: true
        total_points:
          title: Total points
          type: number
          readOnly: true
        total_activity_duration:
          title: Total activity duration
          type: string <iso8601 duration>
          readOnly: true
          minLength: 1
    ChallengeList:
      required:
      - title
      - start
      - type
      - goal
      - goal_type
      - visibility
      - repetition
      type: object
      properties:
        url:
          title: Url
          type: string
          format: uri
          readOnly: true
        public_id:
          title: Public id
          type: string
          format: uuid
          readOnly: true
        title:
          title: Title
          type: string
          minLength: 1
        slogan:
          title: Slogan
          type: string
        description:
          title: Description
          type: string
        start:
          title: Start
          type: string
          format: date-time
        end:
          title: End
          type:
          - string
          - 'null'
          format: date-time
        type:
          title: Type
          type: string
          enum:
          - INDIVIDUAL
          - GROUP
          - TEAM
        goal:
          title: Goal
          type: string
          enum:
          - DAILY
          - TOTAL
          - WEEKLY
          - MONTHLY
        goal_value:
          title: Goal value
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: -2147483648
        goal_type:
          title: Goal type
          type: string
          enum:
          - POINTS
          - DISTANCE
          - CALORIES
          - DURATION
          - STEPS
        visibility:
          title: Visibility
          type: string
          enum:
          - PUBLIC
          - PRIVATE
        num_members:
          title: Num members
          type: string
          readOnly: true
   

# --- truncated at 32 KB (33 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/wefitter/refs/heads/main/openapi/wefitter-challenge-api-openapi.yml