Skip to content
API documentation
View as MarkdownOpen in Claude

Reference data

List the organizations and their ids

GET
/v1/organization

Every organization that runs exams, a page at a time (limit up to 100). Each one’s _id is the organizationId in the path of every organization-scoped operation: exams, applications, certificates, reports, sign-in links and the organization’s own student records.

mto, the organization that holds your students’ main records, is not listed. The operations without organizationId in the path act on it, so you never need its id.

Being listed does not mean your account may act on an organization. That is set by the roles an operator gave your account, and an operation on any other organization answers 403 forbidden.

The list is in no guaranteed order and rarely changes, so fetch it once and keep it.

Parameters

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

Body

  • successbooleanrequired

    Always true on a success.

    one oftrue

  • messagestringrequired

    exampleOrganizations 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 OrganizationResponserequired

    6 fields of each item
    • _idstringrequired

      The organization’s id: the organizationId every organization-scoped operation takes.

      example64b7f0c2a1d3e4f5a6b7c8d9

    • namestring

      The organization’s name.

      exampleExample Science Olympiad

    • slugstring

      Its short code. A student’s activatedPlatformsThisSeason lists organizations by it, and the sign-in and supervisor links name the organization they acted on by it.

      examplestem

    • logostring

      The address of the organization’s logo image.

      examplehttps://cdn.example.org/logos/example-science-olympiad.png

    • descstring

      A short description of the organization.

      exampleAn international olympiad in science and mathematics.

    • defaultRedirectstring

      The address of the organization’s student panel. A sign-in link made without a redirect lands here.

      examplehttps://my.example-olympiad.org

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": "Organizations fetched successfully.",
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 57,
    "totalPages": 3
  },
  "data": [
    {
      "_id": "64b7f0c2a1d3e4f5a6b7c8d9",
      "name": "Example Science Olympiad",
      "slug": "stem",
      "logo": "https://cdn.example.org/logos/example-science-olympiad.png",
      "desc": "An international olympiad in science and mathematics.",
      "defaultRedirect": "https://my.example-olympiad.org"
    }
  ]
}

Example request

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