> ## Documentation Index
> Fetch the complete documentation index at: https://dev.schoolcues.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List all classes

> A page of the school’s classes, oldest change first. Pass the latest `updatedAt` you have read as `updatedSince` to read only what changed. Needs an API key that can read classes (`classes:read`).



## OpenAPI

````yaml /reference/api.json get /api/school/v1/classes
openapi: 3.1.0
info:
  title: SchoolCues API
  version: '1'
  description: >-
    Read a school’s students, contacts, staff, classes and payments, and hear
    when they change. Generated from @schoolcues/contracts by `pnpm docs:api`;
    don't edit it by hand.
servers:
  - url: https://portal.schoolcues.com
    description: Production
security:
  - apiKey: []
tags:
  - name: Students
  - name: Contacts
  - name: Staff
  - name: Classes
  - name: Payments
  - name: Webhooks
paths:
  /api/school/v1/classes:
    get:
      tags:
        - Classes
      summary: List all classes
      description: >-
        A page of the school’s classes, oldest change first. Pass the latest
        `updatedAt` you have read as `updatedSince` to read only what changed.
        Needs an API key that can read classes (`classes:read`).
      operationId: list_classes
      parameters:
        - name: limit
          in: query
          required: false
          description: Records per page, a whole number from 1 to 500. The default is 100.
          schema:
            type: integer
        - name: offset
          in: query
          required: false
          description: How many records to skip. The default is 0.
          schema:
            type: integer
        - name: updatedSince
          in: query
          required: false
          description: >-
            Only records that changed after this time, in ISO 8601. Pass the
            latest `updatedAt` you have read.
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: A page of records.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/SchoolApiClass'
                    description: The page's records.
                  total:
                    type: integer
                    description: How many records match, across every page.
                  limit:
                    type: integer
                    description: The page size used.
                  offset:
                    type: integer
                    description: How many records were skipped.
                required:
                  - data
                  - total
                  - limit
                  - offset
        '400':
          description: >-
            A query parameter isn’t valid. The message says which. Fix the
            request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            The key or token is missing, revoked or expired. Ask the school for
            a new one.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The key can’t read this resource. Ask the school for a key that can.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            SchoolCues couldn’t check the key just now. Retry after a short
            wait.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SchoolApiClass:
      type: object
      properties:
        id:
          type: string
          description: The record's ID.
        name:
          type: string
          description: Class name.
        kind:
          type: string
          description: Kind of class.
        academicYearId:
          type: string
          description: The academic year it belongs to.
        active:
          type: boolean
          description: Whether it's active.
        endsOn:
          anyOf:
            - type: string
            - type: 'null'
          description: Its end date (YYYY-MM-DD), if it has one.
        teacherIds:
          type: array
          items:
            type: string
          description: Staff IDs of its teachers.
        studentIds:
          type: array
          items:
            type: string
          description: IDs of its current students.
        createdAt:
          type: string
          description: When the record was created, in ISO 8601 (UTC).
        updatedAt:
          type: string
          description: >-
            When the record last changed, in ISO 8601 (UTC). Lists are in this
            order, oldest first.
      required:
        - id
        - name
        - kind
        - academicYearId
        - active
        - endsOn
        - teacherIds
        - studentIds
        - createdAt
        - updatedAt
      description: >-
        A class at the school, with its teachers and current students. Needs
        `classes:read`.
    Error:
      type: object
      description: Why the request was refused.
      properties:
        statusCode:
          type: integer
          description: The HTTP status.
        statusMessage:
          type: string
          description: What went wrong, in words to show.
      required:
        - statusCode
        - statusMessage
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        One of the school’s API keys, from [Settings › Integrations ›
        API](https://portal.schoolcues.com/settings/integrations/api).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.