Skip to content
API documentation
View as MarkdownOpen in Claude

Group challenges

List the groups your students are in for a group challenge

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

Lists the groups of the challenge that at least one of your students is an active member of, oldest first: their state, how far through the steps they are, and your students in them. Deleted groups are not listed.

Only your own students are named. Every other person — the other members, the teacher, the organizers — is shown by role alone, with studentId and name set to null, and a file’s name only when one of your students uploaded it. The members who are not yours are counted in memberCount and not listed.

A page at a time: limit is 20 by default and at most 100.

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.

Query parameters

NameTypeDescription
pageoptionalnumber

Page number. Defaults to 1.

Example 1

limitoptionalnumber

Items per page. Defaults to 20, max 100.

Example 20

Responses

200 OK

Success: message is "Groups fetched successfully.".

Body

  • successbooleanrequired

    Always true on a success.

    one oftrue

  • messagestringrequired

    exampleGroups fetched successfully.

  • paginationobject · PaginationMetarequired

    Where one page sits in the whole list.

    4 fields of pagination
    • pagenumberrequired

      The page returned, counting from 1.

      min1example1

    • limitnumberrequired

      Items per page: the limit you sent, 20 if you sent none, and never more than 100.

      min1max100example20

    • totalnumberrequired

      Items across every page.

      min0example57

    • totalPagesnumberrequired

      Pages at this limit: total / limit, rounded up.

      min0example3

  • dataarray of GroupChallengeGroupSummaryResponserequired

    14 fields of each item
    • _idstringrequired

      The group’s id: the groupId of the group operations.

      example6650a1b2c3d4e5f6a7b8c9ed

    • challengeIdstringrequired

      The challenge it belongs to.

      example6650a1b2c3d4e5f6a7b8c9eb

    • shortCodestringrequired

      A six-character code for the group, unique in the organization.

      example7KQ2MX

    • nameobjectnullablerequired

      The name the teacher gave it, or null.

      examplenull

    • displayNamestringrequired

      name, or "Group" and the short code when it has none.

      exampleGroup 7KQ2MX

    • statusstringrequired

      awaiting_payment and draft while the teacher prepares it; finalized once confirmed, with its steps open one by one; completed once its work has been sent. New values may be added.

      one ofawaiting_paymentdraftfinalizedcompleted

      examplefinalized

    • gradeGroupobject · GroupChallengeGradeGroupRefResponserequired

      The grade group its members come from.

      2 fields of gradeGroup
      • _idstringrequired

        The grade group’s id within the challenge.

        example6650a1b2c3d4e5f6a7b8c9ec

      • labelstringrequired

        Its name.

        exampleGroup 7-8-9

    • memberCountnumberrequired

      How many students are in it, yours and others.

      example3

    • yourStudentsarray of GroupChallengeMemberResponserequired

      Your students in it. The other members are counted in memberCount and not listed.

      5 fields of each item
      • studentIdstringrequired

        The student’s _id, as registerStudent returned it.

        example6650a1b2c3d4e5f6a7b8c9d0

      • firstNamestringrequired

        Their first name when they joined the group.

        exampleAda

      • lastNamestringrequired

        Their last name then.

        exampleLovelace

      • gradeNameobjectnullablerequired

        Their grade’s name then.

        example8

      • addedAtstringnullablerequired

        When the teacher added them.

        formatdate-timeexample2026-10-05T13:20:00.000Z

    • stepCountnumberrequired

      How many steps the group works through.

      example3

    • stepsSubmittednumberrequired

      How many of them are submitted.

      example1

    • createdAtstringnullablerequired

      When the teacher created it.

      formatdate-timeexample2026-10-05T13:20:00.000Z

    • finalizedAtstringnullablerequired

      When the teacher confirmed it, or null.

      formatdate-timeexample2026-10-12T08:15:00.000Z

    • finalSubmittedAtstringnullablerequired

      When its work was sent, or null.

      formatdate-timeexamplenull

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": "Groups fetched successfully.",
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 57,
    "totalPages": 3
  },
  "data": [
    {
      "_id": "6650a1b2c3d4e5f6a7b8c9ed",
      "challengeId": "6650a1b2c3d4e5f6a7b8c9eb",
      "shortCode": "7KQ2MX",
      "name": null,
      "displayName": "Group 7KQ2MX",
      "status": "finalized",
      "gradeGroup": {
        "_id": "6650a1b2c3d4e5f6a7b8c9ec",
        "label": "Group 7-8-9"
      },
      "memberCount": 3,
      "yourStudents": [
        {
          "studentId": "6650a1b2c3d4e5f6a7b8c9d0",
          "firstName": "Ada",
          "lastName": "Lovelace",
          "gradeName": "8",
          "addedAt": "2026-10-05T13:20:00.000Z"
        }
      ],
      "stepCount": 3,
      "stepsSubmitted": 1,
      "createdAt": "2026-10-05T13:20:00.000Z",
      "finalizedAt": "2026-10-12T08:15:00.000Z",
      "finalSubmittedAt": null
    }
  ]
}

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>/group?page=1&limit=20' \
  -H "Authorization: Bearer $TOKEN"

Search the API documentation

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