Skip to main content

List challenges

Retrieve a paginated list of challenges in a community.
GET /v1/communities/:community_id/challenges
Query parameters:
ParameterTypeDescription
pageintPage number (default: 1).
per_pageintItems per page (max 50).

Get challenge

Retrieve the details of a specific challenge.
GET /v1/communities/:community_id/challenges/:id

Create challenge

Create a new challenge inside a community.
POST /v1/communities/:community_id/challenges
Request body:
{
  "title": "30-Day Challenge",
  "description": "A description of the challenge",
  "duration_days": 30,
  "challenge_type": "daily",
  "access_type": "free",
  "xp_reward": 100
}
FieldTypeRequiredDescription
titlestringYesChallenge title.
descriptionstringNoDetailed description of the challenge.
duration_daysintYesLength of the challenge in days.
challenge_typestringYesType of challenge: daily, weekly, or custom.
access_typestringYesWho can join: free, paid, or members_only.
xp_rewardintNoXP awarded to participants who complete the challenge.

Enroll in challenge

Enroll the authenticated user in a challenge.
POST /v1/communities/:community_id/challenges/:id/enroll
Response: Returns the enrollment record with status active.
If the challenge has access_type: "paid", the user must have completed payment before enrollment succeeds.

Get progress

Retrieve the authenticated user’s progress in a specific challenge.
GET /v1/communities/:community_id/challenges/:id/progress
Response:
{
  "data": {
    "total_days": 30,
    "completed_days": 5,
    "progress_percent": 16.7,
    "current_streak": 5,
    "last_checkin_at": "2025-01-20T08:00:00Z"
  }
}

Submit check-in

Submit a daily check-in for the authenticated user in a challenge.
POST /v1/communities/:community_id/challenges/:id/checkins
Request body:
{
  "content": "Day 5 complete! I exercised for 30 minutes.",
  "day_number": 5,
  "tags": ["fitness", "morning"]
}
FieldTypeRequiredDescription
contentstringYesA description of what you accomplished.
day_numberintYesThe day of the challenge you are checking in for.
tagsstring[]NoOptional tags for categorizing the check-in.

Leaderboard

Retrieve the leaderboard rankings for a challenge, sorted by progress and XP.
GET /v1/communities/:community_id/challenges/:id/leaderboard
Query parameters:
ParameterTypeDescription
pageintPage number (default: 1).
per_pageintItems per page (max 50).
Response: Returns an array of participants ordered by ranking position, including their display_name, completed_days, current_streak, and xp_earned.