Skip to content
API documentation
View as MarkdownOpen in Claude

Reference data

Fetch one organization by its id

GET
/v1/organization/{id}

The organization with this _id, as listOrganizations lists it.

An id that names no organization in that list, mto included, answers 404 not_found: the same answer that id gets as organizationId in another operation’s path.

Parameters

Path parameters

NameTypeDescription
idrequiredstring

The organization’s _id, from listOrganizations: 24 hexadecimal digits.

Responses

200 OK

Success: message is "Organization fetched successfully.".

Body

  • successbooleanrequired

    Always true on a success.

    one oftrue

  • messagestringrequired

    exampleOrganization fetched successfully.

  • dataobject · OrganizationResponserequired

    An organization you act on. Its _id is the organizationId of every organization-scoped operation.

    6 fields of data
    • _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": "Organization fetched successfully.",
  "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/<id>' \
  -H "Authorization: Bearer $TOKEN"

Search the API documentation

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