Skip to content
API documentation
View as MarkdownOpen in Claude

Group challenges

Fetch one group challenge

GET
/v1/{organizationId}/group-challenge/{challengeId}

Reads one group challenge of this organization: its dates, how many students a group takes, the grade groups it is open to and the steps a group works through, in order.

Parameters

Path parameters

NameTypeDescription
organizationIdrequiredstringpattern ^[0-9a-f]{24}$

The organization’s _id: 24 hexadecimal digits, as listOrganizations (GET /v1/organization) lists it.

Example 64b7f0c2a1d3e4f5a6b7c8d9

challengeIdrequiredstring

The group challenge’s _id, from listGroupChallenges.

Responses

200 OK

Success: message is "Group challenge fetched successfully.".

Body

  • successbooleanrequired

    Always true on a success.

    one oftrue

  • messagestringrequired

    exampleGroup challenge fetched successfully.

  • dataobject · GroupChallengeResponserequired

    A group challenge: groups of students, formed by their teacher, work through a set of steps between two dates.

    11 fields of data
    • _idstringrequired

      The challenge’s id: the challengeId of every other operation.

      example6650a1b2c3d4e5f6a7b8c9eb

    • namestringrequired

      Its name.

      exampleSTEM Maker Challenge

    • statusstringrequired

      published while it runs; closed once the organizers have closed it, when it is still readable and takes no more work. New values may be added; treat an unknown one as closed.

      one ofpublishedclosed

      examplepublished

    • isOpenbooleanrequired

      Whether it takes work right now: published, and now is between windowStart and windowEnd.

      exampletrue

    • windowStartstringrequired

      When it opens (UTC).

      formatdate-timeexample2026-10-01T00:00:00.000Z

    • windowEndstringrequired

      When it closes (UTC), inclusive. Nothing is submitted after it: not a step, not the final work.

      formatdate-timeexample2026-12-21T23:59:59.999Z

    • minStudentsobjectnullablerequired

      The fewest students a group may have.

      example2

    • maxStudentsobjectnullablerequired

      The most students a group may have.

      example3

    • isPaidbooleanrequired

      Whether taking part costs a fee. The teacher settles it in the panel when they create the group; this API neither shows nor takes it.

      examplefalse

    • gradeGroupsarray of GroupChallengeGradeGroupResponserequired

      The grade groups, in their order.

      3 fields of each item
      • _idstringrequired

        The grade group’s id within the challenge.

        example6650a1b2c3d4e5f6a7b8c9ec

      • labelstringrequired

        Its name, for a person.

        exampleGroup 7-8-9

      • gradesarray of GroupChallengeGradeResponserequired

        The grades it takes. A student whose grade is in none of the grade groups cannot join the challenge.

        2 fields of each item
        • _idstringrequired

          The grade’s id, the same _id listGrades returns and a student’s grade holds.

          example6650a1b2c3d4e5f6a7b8c9d4

        • nameobjectnullablerequired

          The grade’s name, as it was when the challenge was set up.

          example10

    • stepsarray of GroupChallengeStepDefinitionResponserequired

      The steps, in their order.

      6 fields of each item
      • _idstringrequired

        The step’s id: what submitGroupChallengeStep takes.

        example6650a1b2c3d4e5f6a7b8c9ee

      • ordernumberrequired

        Its position, from 1. Steps open one after another.

        example1

      • titlestringrequired

        Its title, for a person.

        exampleProject proposal

      • fileTypesarray of stringrequired

        The file types a member may upload for it, by extension, such as pdf or mp4.

        example["pdf","docx"]

      • maxFileBytesobjectnullablerequired

        The largest file a member may upload for it, in bytes.

        example20971520

      • maxFilesobjectnullablerequired

        How many files the step holds at most.

        example1

Headers

X-RateLimit-Limit integer

Requests your account may make to this operation per window (100).

X-RateLimit-Remaining integer

Requests left in the current window.

X-RateLimit-Reset integer

Seconds until the current window ends.

Example

{
  "success": true,
  "message": "Group challenge fetched successfully.",
  "data": {
    "_id": "6650a1b2c3d4e5f6a7b8c9eb",
    "name": "STEM Maker Challenge",
    "status": "published",
    "isOpen": true,
    "windowStart": "2026-10-01T00:00:00.000Z",
    "windowEnd": "2026-12-21T23:59:59.999Z",
    "minStudents": 2,
    "maxStudents": 3,
    "isPaid": false,
    "gradeGroups": [
      {
        "_id": "6650a1b2c3d4e5f6a7b8c9ec",
        "label": "Group 7-8-9",
        "grades": [
          {
            "_id": "6650a1b2c3d4e5f6a7b8c9d4",
            "name": "10"
          }
        ]
      }
    ],
    "steps": [
      {
        "_id": "6650a1b2c3d4e5f6a7b8c9ee",
        "order": 1,
        "title": "Project proposal",
        "fileTypes": [
          "pdf",
          "docx"
        ],
        "maxFileBytes": 20971520,
        "maxFiles": 1
      }
    ]
  }
}

Example request

# $TOKEN: a short-lived token you minted with your API key and secret
curl -sS 'https://api.main-team.org/v1/<organizationId>/group-challenge/<challengeId>' \
  -H "Authorization: Bearer $TOKEN"

Search the API documentation

Guides, endpoints by name, path or permission, and error codes such as not_found.