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

# Post apiv1courses gradebooksetuppreview



## OpenAPI

````yaml /api/openapi.json post /api/v1/courses/{courseId}/gradebook/setup/preview
openapi: 3.1.0
info:
  title: Tessera API
  version: '1'
servers:
  - url: https://tessera.edstratumlabs.ai
    description: Production
security: []
paths:
  /api/v1/courses/{courseId}/gradebook/setup/preview:
    post:
      tags:
        - assignments
      operationId: previewGradebookSetup
      parameters:
        - name: courseId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                setup:
                  type: object
                  properties:
                    courseId:
                      type: string
                      minLength: 1
                    mode:
                      type: string
                      enum:
                        - weighted
                        - points
                    categories:
                      maxItems: 100
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            minLength: 1
                          courseId:
                            type: string
                            minLength: 1
                          name:
                            type: string
                            minLength: 1
                            maxLength: 120
                          position:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          weight:
                            type: number
                            minimum: 0
                            maximum: 100
                          drop:
                            type: object
                            properties:
                              lowest:
                                type: integer
                                minimum: 0
                                maximum: 9007199254740991
                              highest:
                                type: integer
                                minimum: 0
                                maximum: 9007199254740991
                              keepAtLeast:
                                type: integer
                                minimum: 1
                                maximum: 9007199254740991
                            required:
                              - lowest
                              - highest
                              - keepAtLeast
                          lateApplies:
                            type: boolean
                        required:
                          - id
                          - courseId
                          - name
                          - position
                          - weight
                          - drop
                          - lateApplies
                    late:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                        percentPerPeriod:
                          type: number
                          minimum: 0
                          maximum: 100
                        period:
                          type: string
                          enum:
                            - day
                            - hour
                        basis:
                          type: string
                          enum:
                            - score
                            - possible
                        maxPeriods:
                          anyOf:
                            - type: integer
                              minimum: 0
                              maximum: 9007199254740991
                            - type: 'null'
                        afterMax:
                          type: string
                          enum:
                            - missing
                            - hold-at-max
                        graceMinutes:
                          type: integer
                          minimum: 0
                          maximum: 525600
                      required:
                        - enabled
                        - percentPerPeriod
                        - period
                        - basis
                        - maxPeriods
                        - afterMax
                        - graceMinutes
                    missing:
                      type: object
                      properties:
                        treatAs:
                          type: string
                          enum:
                            - zero-after-due
                            - exclude-until-graded
                        droppable:
                          type: boolean
                      required:
                        - treatAs
                        - droppable
                    extraCredit:
                      type: object
                      properties:
                        categoryCapPercent:
                          anyOf:
                            - type: number
                              minimum: 0
                            - type: 'null'
                        courseCapPoints:
                          anyOf:
                            - type: number
                              minimum: 0
                            - type: 'null'
                      required:
                        - categoryCapPercent
                        - courseCapPoints
                    scheme:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                        name:
                          type: string
                          minLength: 1
                          maxLength: 120
                        bands:
                          minItems: 1
                          maxItems: 50
                          type: array
                          items:
                            type: object
                            properties:
                              letter:
                                type: string
                                minLength: 1
                                maxLength: 12
                              min:
                                type: number
                                minimum: 0
                                maximum: 100
                            required:
                              - letter
                              - min
                        rounding:
                          type: object
                          properties:
                            decimals:
                              type: number
                              const: 1
                            mode:
                              type: string
                              const: half-up
                          required:
                            - decimals
                            - mode
                        letterFrom:
                          type: string
                          const: rounded
                      required:
                        - id
                        - name
                        - bands
                        - rounding
                        - letterFrom
                    emptyCategory:
                      type: string
                      const: share-weight
                    studentNotes:
                      maxItems: 100
                      type: array
                      items:
                        type: object
                        properties:
                          categoryId:
                            type: string
                            minLength: 1
                          text:
                            type: string
                            maxLength: 1000
                        required:
                          - categoryId
                          - text
                    dismissedChecks:
                      maxItems: 200
                      type: array
                      items:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - weights-not-100
                              - weight-invalid
                              - category-empty
                              - drop-exceeds-items
                              - drop-before-complete
                              - keep-at-least-invalid
                              - drop-count-invalid
                              - scheme-gap
                              - scheme-overlap
                              - scheme-order
                              - late-no-cap
                              - extra-credit-uncapped
                              - item-no-category
                              - item-zero-points
                              - missing-droppable
                              - mode-switch-extra-credit
                          target:
                            type: string
                          by:
                            type: string
                            minLength: 1
                          at:
                            type: string
                            minLength: 1
                        required:
                          - code
                          - target
                          - by
                          - at
                    source:
                      type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - manual
                            - syllabus
                        designSessionId:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: 'null'
                      required:
                        - kind
                        - designSessionId
                    version:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    rulesVersion:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    updatedBy:
                      type: string
                    updatedAt:
                      type: string
                  required:
                    - courseId
                    - mode
                    - categories
                    - late
                    - missing
                    - extraCredit
                    - scheme
                    - emptyCategory
                    - studentNotes
                    - dismissedChecks
                    - source
                    - version
                    - rulesVersion
                    - updatedBy
                    - updatedAt
              required:
                - setup
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  checks:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                            - weights-not-100
                            - weight-invalid
                            - category-empty
                            - drop-exceeds-items
                            - drop-before-complete
                            - keep-at-least-invalid
                            - drop-count-invalid
                            - scheme-gap
                            - scheme-overlap
                            - scheme-order
                            - late-no-cap
                            - extra-credit-uncapped
                            - item-no-category
                            - item-zero-points
                            - missing-droppable
                            - mode-switch-extra-credit
                        severity:
                          type: string
                          enum:
                            - fix
                            - review
                            - pass
                        target:
                          type: string
                        params:
                          type: object
                          propertyNames:
                            type: string
                          additionalProperties:
                            type:
                              - string
                              - number
                        fixes:
                          type: array
                          items:
                            type: object
                            properties:
                              label:
                                type: string
                              patch: {}
                            required:
                              - label
                              - patch
                            additionalProperties: false
                      required:
                        - code
                        - severity
                        - target
                        - params
                        - fixes
                      additionalProperties: false
                  changeSet:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - setup
                          - release
                      changes:
                        type: array
                        items:
                          type: object
                          properties:
                            studentId:
                              type: string
                              minLength: 1
                            name:
                              type: string
                            from:
                              type: object
                              properties:
                                percent:
                                  type:
                                    - number
                                    - 'null'
                                letter:
                                  type:
                                    - string
                                    - 'null'
                              required:
                                - percent
                                - letter
                              additionalProperties: false
                            to:
                              type: object
                              properties:
                                percent:
                                  type:
                                    - number
                                    - 'null'
                                letter:
                                  type:
                                    - string
                                    - 'null'
                              required:
                                - percent
                                - letter
                              additionalProperties: false
                          required:
                            - studentId
                            - name
                            - from
                            - to
                          additionalProperties: false
                      letterChanges:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      unchanged:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      notSent:
                        type: array
                        items:
                          type: object
                          properties:
                            submissionId:
                              type: string
                              minLength: 1
                            studentId:
                              type: string
                              minLength: 1
                            reason:
                              type: string
                              const: ai-draft-not-reviewed
                          required:
                            - submissionId
                            - studentId
                            - reason
                          additionalProperties: false
                      hash:
                        type: string
                    required:
                      - kind
                      - changes
                      - letterChanges
                      - unchanged
                      - notSent
                      - hash
                    additionalProperties: false
                required:
                  - checks
                  - changeSet
                additionalProperties: false
        '400':
          description: API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
        '401':
          description: API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
        '403':
          description: API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
        '404':
          description: API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
        '409':
          description: API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
        '429':
          description: API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
      security:
        - bearerAuth: []
components:
  schemas:
    ApiErrorBody:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - unauthenticated
                - forbidden
                - not-found
                - invalid
                - conflict
                - not-ready
                - ai-disabled
                - ai-failed
                - rate-limited
                - too-large
                - unsupported
            message:
              type: string
            details: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Scoped tsk_… API token or Access JWT

````