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

# List classes and course sessions

> Returns the published, publicly visible schedule of your studio for a
date range. The list contains both standalone **classes** and
**course sessions** that belong to a multi-session course — read
`eventType` to tell them apart.

`dateFrom` and `dateTo` are required and are interpreted in your
studio's own time zone. See [Dates and time zones](/api/dates) for how
the range is resolved and why every event carries both a UTC and a
local timestamp.

Related resources are returned as ID references, not embedded objects.
Resolve `lecturerIds` against [`GET /v1/lecturers`](/api/v1/reference/lecturers/list-lecturers)
and `locationId` against [`GET /v1/places`](/api/v1/reference/places/list-places).
Tags are the exception — they are embedded inline.

Results are ordered by start time, ascending, with a deterministic ID
tie-breaker. Only published events that are visible in the public
calendar and not marked private are returned. A canceled event can
remain visible so clients can see the cancellation; read `isCanceled`.

See the [Class](/api/objects/class) object for the full field reference.




## OpenAPI

````yaml /api/v1/openapi.yaml get /v1/classes
openapi: 3.0.3
info:
  title: Zenamu API v1
  version: '1.0'
  description: The Zenamu public REST API.
servers:
  - url: https://api.zenamu.com
    description: Production
security:
  - zenamuPublicKey: []
tags:
  - name: Classes
  - name: Workshops
  - name: Lecturers
  - name: Places
  - name: Clients
  - name: Credits and passes
  - name: Pass groups
paths:
  /v1/classes:
    get:
      tags:
        - Classes
      summary: List classes and course sessions
      description: >
        Returns the published, publicly visible schedule of your studio for a

        date range. The list contains both standalone **classes** and

        **course sessions** that belong to a multi-session course — read

        `eventType` to tell them apart.


        `dateFrom` and `dateTo` are required and are interpreted in your

        studio's own time zone. See [Dates and time zones](/api/dates) for how

        the range is resolved and why every event carries both a UTC and a

        local timestamp.


        Related resources are returned as ID references, not embedded objects.

        Resolve `lecturerIds` against [`GET
        /v1/lecturers`](/api/v1/reference/lecturers/list-lecturers)

        and `locationId` against [`GET
        /v1/places`](/api/v1/reference/places/list-places).

        Tags are the exception — they are embedded inline.


        Results are ordered by start time, ascending, with a deterministic ID

        tie-breaker. Only published events that are visible in the public

        calendar and not marked private are returned. A canceled event can

        remain visible so clients can see the cancellation; read `isCanceled`.


        See the [Class](/api/objects/class) object for the full field reference.
      operationId: getClasses
      parameters:
        - name: dateFrom
          in: query
          required: true
          schema:
            type: string
            format: date
            example: '2026-03-01'
          description: >-
            Start of the range (inclusive), `YYYY-MM-DD`, read in the studio's
            time zone. Must be a real calendar date and no later than `dateTo`.
            The range may span at most 366 days, counting both ends. See [Dates
            and time zones](/api/dates).
        - name: dateTo
          in: query
          required: true
          schema:
            type: string
            format: date
            example: '2026-03-31'
          description: >-
            End of the range (inclusive), `YYYY-MM-DD`, read in the studio's
            time zone. Must be a real calendar date on or after `dateFrom`, and
            at most 366 days after it. The whole end day is included.
        - name: placeIds
          in: query
          schema:
            type: string
            example: 1,2,3
          description: >-
            Comma-separated numeric place IDs. Returns only classes held at
            those places. Pass `-1` to include online classes. For a course
            session the place is the one set on that session, where the studio
            overrode the course's. See [Filtering](/api/filtering).
        - name: lecturerIds
          in: query
          schema:
            type: string
            example: 5,10
          description: >-
            Comma-separated numeric lecturer IDs. Matches the class's main
            lecturer and any additional lecturer. For a course session with a
            substitute lecturer, only the substitute matches, because the
            assignment replaces the course's lecturers for that session. See
            [Filtering](/api/filtering).
        - name: labelIds
          in: query
          schema:
            type: string
            example: 8,12
          description: >-
            Comma-separated numeric label IDs. Returns classes carrying any of
            the listed tags.
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            example: 50
          description: >-
            Maximum number of records to return. Unset returns every match in
            the range. See [Pagination](/api/pagination).
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            example: 0
          description: Number of records to skip. See [Pagination](/api/pagination).
        - name: includeCapacity
          in: query
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
              - '1'
              - '0'
            default: 'false'
          description: >-
            Set to `true` or `1` to add the `capacity` object. Omitted by
            default because it adds overhead — request it only when you display
            live availability.
      responses:
        '200':
          description: The matching classes and course sessions.
          headers:
            X-RateLimit-Limit:
              description: Maximum requests allowed in the current one-minute window.
              schema:
                type: integer
                example: 100
            X-RateLimit-Remaining:
              description: Requests remaining in the current window.
              schema:
                type: integer
                minimum: 0
                example: 99
            X-RateLimit-Reset:
              description: Unix timestamp in seconds when the current window resets.
              schema:
                type: integer
                example: 1788336000
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClassList'
              example:
                statusCode: 200
                message: Success
                data:
                  - _id: 9b1c4f7a2e6d8035c1a94fb27de60381
                    courseId: null
                    eventType: class
                    name: Morning Yoga
                    description: Relaxing morning yoga session for all levels.
                    start: '2026-03-15T08:00:00Z'
                    end: '2026-03-15T09:00:00Z'
                    localTimeStart: '2026-03-15T09:00:00+01:00'
                    localTimeEnd: '2026-03-15T10:00:00+01:00'
                    timezone: Europe/Prague
                    lecturerIds:
                      - a05e73c81df946b20c3ea8175f6b4e92
                    locationId: b8419fd7250ce6a3418df90b27ec5a41
                    isOnline: false
                    isCanceled: false
                    pricingOptions:
                      - id: 331
                        type: default
                        name: Single class
                        value: 250
                        currency: CZK
                        description: null
                      - id: 332
                        type: credit
                        name: Pay with credits
                        value: 2
                        description: null
                    tags:
                      - id: 8
                        name: Beginner friendly
                        color: '#4CAF50'
                    publicUrl: >-
                      https://app.zenamu.com/your-studio?selectedTerm=9b1c4f7a2e6d8035c1a94fb27de60381
                    capacity:
                      max: 20
                      reserved: 12
                  - _id: c47ea9016b5d3f82a0e7d15c9438fb60
                    courseId: 1f8b60d94ac7e2530b6f81a4dc95307e
                    eventType: course_session
                    name: Advanced Pilates — week 3
                    description: Third session of the eight-week advanced pilates course.
                    start: '2026-03-15T18:00:00Z'
                    end: '2026-03-15T19:30:00Z'
                    localTimeStart: '2026-03-15T19:00:00+01:00'
                    localTimeEnd: '2026-03-15T20:30:00+01:00'
                    timezone: Europe/Prague
                    lecturerIds:
                      - e29d4715b8c0af36d1b7e0524ca3f861
                    locationId: null
                    isOnline: true
                    isCanceled: false
                    pricingOptions:
                      - id: 501
                        type: membership
                        name: Premium membership
                        value: 0
                        description: null
                    tags: []
                    publicUrl: https://app.zenamu.com/your-studio/courses/123
                    capacity:
                      max: 15
                      reserved: 10
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/KeyNotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - zenamuPublicKey: []
components:
  schemas:
    ClassList:
      type: object
      properties:
        statusCode:
          type: integer
          example: 200
        message:
          type: string
          example: Success
        data:
          type: array
          items:
            $ref: '#/components/schemas/Class'
    Class:
      type: object
      description: A standalone class or one session of a course.
      properties:
        _id:
          type: string
          description: >-
            Opaque event ID. Not a sequential database ID — treat it as a string
            and do not parse it.
          example: 9b1c4f7a2e6d8035c1a94fb27de60381
        courseId:
          type: string
          nullable: true
          description: >-
            Opaque ID of the parent course when `eventType` is `course_session`,
            otherwise `null`.
        eventType:
          type: string
          enum:
            - class
            - course_session
          description: >-
            `class` for a standalone event, `course_session` for one session of
            a multi-session course.
        name:
          type: string
        description:
          type: string
          nullable: true
        start:
          type: string
          format: date-time
          nullable: true
          description: Start in UTC, ISO 8601 with a `Z` suffix.
          example: '2026-03-15T08:00:00Z'
        end:
          type: string
          format: date-time
          nullable: true
          description: End in UTC.
        localTimeStart:
          type: string
          nullable: true
          description: Start in the studio's time zone, ISO 8601 with a numeric offset.
          example: '2026-03-15T09:00:00+01:00'
        localTimeEnd:
          type: string
          nullable: true
          description: End in the studio's time zone.
        timezone:
          type: string
          description: IANA time zone of the studio. Falls back to `UTC` when unset.
          example: Europe/Prague
        lecturerIds:
          type: array
          items:
            type: string
          description: >-
            Opaque lecturer IDs. Resolve them against [`GET
            /v1/lecturers`](/api/v1/reference/lecturers/list-lecturers). For a
            course session with a substitute lecturer, only the substitute is
            listed.
        locationId:
          type: string
          nullable: true
          description: >-
            Opaque place ID. `null` for an online class and for one with no
            place assigned — read `isOnline` to tell them apart. Resolve a
            non-null value against [`GET
            /v1/places`](/api/v1/reference/places/list-places).
        isOnline:
          type: boolean
        isCanceled:
          type: boolean
          description: >-
            `true` when the studio canceled this occurrence but kept it visible
            in the public calendar. Do not present it as bookable.
        pricingOptions:
          type: array
          items:
            $ref: '#/components/schemas/PricingOption'
        tags:
          type: array
          items:
            $ref: '#/components/schemas/Tag'
        publicUrl:
          type: string
          description: >-
            Link to this class, or to the parent course, on the studio's public
            Zenamu page.
        capacity:
          $ref: '#/components/schemas/ClassCapacity'
    ErrorResponse:
      type: object
      required:
        - statusCode
        - message
      properties:
        statusCode:
          type: integer
          description: Repeats the HTTP status code.
        error:
          type: string
          description: >-
            Short label — `Internal Server Error` for `500`, `Too Many Requests`
            for `429`, `Error` otherwise.
        message:
          type: string
          description: >-
            Human-readable explanation. For `500` this is a fixed generic
            message; the detail is logged server-side.
    PricingOption:
      type: object
      description: >-
        One way to pay for a class. See [Pricing
        option](/api/objects/pricing-option) for how to read `type`, `value`,
        and `currency` together.
      properties:
        id:
          type: integer
          description: Numeric ID of the pricing option.
        type:
          type: string
          description: >-
            Which payment method the option represents. Current values:
            `default`, `discount`, `credit`, `credit_discount`, `pass`,
            `benefit`, `benefit_surcharge`, `benefit_surcharge_credit`,
            `membership`, `membership_surcharge`, `single_course_session`, and
            `other`. Treat the list as open: Zenamu can add values within v1, so
            render an unknown `type` using `name` rather than failing. See
            [Pricing option](/api/objects/pricing-option#types).
        name:
          type: string
          nullable: true
          description: Studio-chosen label, for example `Single class`.
        value:
          type: number
          description: >-
            A money amount in `currency` for money-based types, or a number of
            credits or entries for non-money options.
        currency:
          type: string
          description: >-
            ISO 4217 code for a money-based option. Common examples include
            `CZK`, `EUR`, `USD`, `HUF`, `PLN`, `GBP`, `RON`, `SEK`, `DKK`, and
            `NOK`; treat the list as open. **Absent** whenever the option is not
            money-based. Use presence of this field, not `type`, to interpret
            `value` as money.
          example: CZK
        description:
          type: string
          nullable: true
          description: Optional note. Present on class options only.
    Tag:
      type: object
      description: >-
        A studio label attached to an event. Embedded inline, not referenced by
        ID.
      properties:
        id:
          type: integer
          description: Numeric label ID. Pass it to the `labelIds` filter.
        name:
          type: string
        color:
          type: string
          description: Hex color chosen by the studio.
          example: '#4CAF50'
    ClassCapacity:
      type: object
      description: Present only when `includeCapacity` is requested.
      properties:
        max:
          type: integer
          description: Maximum number of participants. Every class has a seat limit.
        reserved:
          type: integer
          description: Number of seats currently reserved.
  responses:
    BadRequest:
      description: >-
        The request is malformed — a required parameter is missing, the
        `Authorization` header does not use the Bearer scheme, or body
        validation failed.
      headers:
        X-RateLimit-Limit:
          description: Maximum requests allowed in the current one-minute window.
          schema:
            type: integer
            example: 100
        X-RateLimit-Remaining:
          description: Requests remaining in the current window.
          schema:
            type: integer
            minimum: 0
            example: 99
        X-RateLimit-Reset:
          description: Unix timestamp in seconds when the current window resets.
          schema:
            type: integer
            example: 1788336000
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            statusCode: 400
            error: Error
            message: 'dateFrom parameter is required (format: YYYY-MM-DD)'
    Unauthorized:
      description: No API key was sent.
      headers:
        X-RateLimit-Limit:
          description: Maximum requests allowed in the current one-minute window.
          schema:
            type: integer
            example: 100
        X-RateLimit-Remaining:
          description: Requests remaining in the current window.
          schema:
            type: integer
            minimum: 0
            example: 99
        X-RateLimit-Reset:
          description: Unix timestamp in seconds when the current window resets.
          schema:
            type: integer
            example: 1788336000
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            statusCode: 401
            error: Error
            message: >-
              Missing access token. You must send your access token in the
              request header ('Authorization: Bearer YOUR_ACCESS_TOKEN' )
    Forbidden:
      description: >-
        Your studio's plan does not allow the public API. See [Plans and
        access](/api#plans-and-access).
      headers:
        X-RateLimit-Limit:
          description: Maximum requests allowed in the current one-minute window.
          schema:
            type: integer
            example: 100
        X-RateLimit-Remaining:
          description: Requests remaining in the current window.
          schema:
            type: integer
            minimum: 0
            example: 99
        X-RateLimit-Reset:
          description: Unix timestamp in seconds when the current window resets.
          schema:
            type: integer
            example: 1788336000
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            statusCode: 403
            error: Error
            message: The Zenamu public API is not available on the Free tariff.
    KeyNotFound:
      description: >-
        The API key was not recognized. Zenamu answers an unknown key with
        `404`, not `401` — see
        [Authentication](/api/authentication#authentication-errors).
      headers:
        X-RateLimit-Limit:
          description: Maximum requests allowed in the current one-minute window.
          schema:
            type: integer
            example: 100
        X-RateLimit-Remaining:
          description: Requests remaining in the current window.
          schema:
            type: integer
            minimum: 0
            example: 99
        X-RateLimit-Reset:
          description: Unix timestamp in seconds when the current window resets.
          schema:
            type: integer
            example: 1788336000
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            statusCode: 404
            error: Error
            message: API key not found
    TooManyRequests:
      description: >-
        You exceeded 100 calls per minute on this endpoint. See [Rate
        limits](/api/rate-limits).
      headers:
        X-RateLimit-Limit:
          description: Maximum requests allowed in the current one-minute window.
          schema:
            type: integer
            example: 100
        X-RateLimit-Remaining:
          description: Requests remaining in the current window.
          schema:
            type: integer
            minimum: 0
            example: 99
        X-RateLimit-Reset:
          description: Unix timestamp in seconds when the current window resets.
          schema:
            type: integer
            example: 1788336000
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            statusCode: 429
            error: Too Many Requests
            message: 'Rate limit exceeded: up to 100 requests per minute per endpoint.'
    InternalServerError:
      description: >-
        Unexpected server error. Retry with backoff if the call is safe to
        repeat.
      headers:
        X-RateLimit-Limit:
          description: Maximum requests allowed in the current one-minute window.
          schema:
            type: integer
            example: 100
        X-RateLimit-Remaining:
          description: Requests remaining in the current window.
          schema:
            type: integer
            minimum: 0
            example: 99
        X-RateLimit-Reset:
          description: Unix timestamp in seconds when the current window resets.
          schema:
            type: integer
            example: 1788336000
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            statusCode: 500
            error: Internal Server Error
            message: >-
              We apologize, but there was an error on our end. If problems
              persist, please contact us at support@zenamu.com
  securitySchemes:
    zenamuPublicKey:
      type: http
      scheme: bearer
      description: >-
        Your **public API key** (`zen_pub_…`), sent as `Authorization: Bearer
        <key>`. Browser-safe. See [Authentication](/api/authentication).

````