Skip to content
API documentation
View as MarkdownOpen in Claude

Documents

List one of your students’ released certificates

GET
/v1/{organizationId}/certificate/{userId}

Lists the certificates this organization has released for one of your students, across every season. A certificate the organization has not released yet is not listed. One is listed whether it was issued for one of the student’s applications or to the student directly. Download the file with downloadCertificate, by _id or shortId.

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

Your students are the ones your account registered: anyone else’s student answers 404, exactly as an unknown id does. A student who has never signed in to this organization answers 409; they cannot have sat its exams, so there is nothing to collect.

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

userIdrequiredstring

The student’s _id: the id registerStudent returned.

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 "Certificates fetched successfully.".

Body

  • successbooleanrequired

    Always true on a success.

    one oftrue

  • messagestringrequired

    exampleCertificates 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 CertificateResponserequired

    8 fields of each item
    • _idstringrequired

      The certificate’s id. downloadCertificate takes it, or shortId.

      example6650a1b2c3d4e5f6a7b8c9e7

    • shortIdstringrequired

      A ten-character code for the certificate. downloadCertificate takes it too.

      exampleK7Q2M9X4TB

    • titlestring

      The certificate’s title.

      exampleCertificate of Participation

    • applicationstring

      The id of the application it was issued for, when it was issued for one.

      example6650a1b2c3d4e5f6a7b8c9e5

    • userstring

      The organization’s own id for the student, when the certificate names the student directly rather than through application.

      example6650a1b2c3d4e5f6a7b8c9e9

    • activebooleanrequired

      Always true: only released certificates are listed.

      exampletrue

    • createdAtstring

      When the certificate was created.

      formatdate-timeexample2026-09-01T09:30:00.000Z

    • updatedAtstring

      When the certificate last changed.

      formatdate-timeexample2026-09-02T14:05:00.000Z

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": "Certificates fetched successfully.",
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 57,
    "totalPages": 3
  },
  "data": [
    {
      "_id": "6650a1b2c3d4e5f6a7b8c9e7",
      "shortId": "K7Q2M9X4TB",
      "title": "Certificate of Participation",
      "application": "6650a1b2c3d4e5f6a7b8c9e5",
      "user": "6650a1b2c3d4e5f6a7b8c9e9",
      "active": true,
      "createdAt": "2026-09-01T09:30:00.000Z",
      "updatedAt": "2026-09-02T14:05:00.000Z"
    }
  ]
}

Example request

# $TOKEN: a short-lived token you minted with your API key and secret
curl -sS 'https://api.main-team.org/v1/<organizationId>/certificate/<userId>?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.