> ## 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.

# Put apiv1courses gradebooksetup



## OpenAPI

````yaml /api/openapi.json put /api/v1/courses/{courseId}/gradebook/setup
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:
    put:
      tags:
        - assignments
      operationId: saveGradebookSetup
      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
                expectedVersion:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                hash:
                  type: string
                  minLength: 1
              required:
                - setup
                - expectedVersion
                - hash
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                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
                          additionalProperties: false
                        lateApplies:
                          type: boolean
                      required:
                        - id
                        - courseId
                        - name
                        - position
                        - weight
                        - drop
                        - lateApplies
                      additionalProperties: false
                  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
                    additionalProperties: false
                  missing:
                    type: object
                    properties:
                      treatAs:
                        type: string
                        enum:
                          - zero-after-due
                          - exclude-until-graded
                      droppable:
                        type: boolean
                    required:
                      - treatAs
                      - droppable
                    additionalProperties: false
                  extraCredit:
                    type: object
                    properties:
                      categoryCapPercent:
                        anyOf:
                          - type: number
                            minimum: 0
                          - type: 'null'
                      courseCapPoints:
                        anyOf:
                          - type: number
                            minimum: 0
                          - type: 'null'
                    required:
                      - categoryCapPercent
                      - courseCapPoints
                    additionalProperties: false
                  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
                          additionalProperties: false
                      rounding:
                        type: object
                        properties:
                          decimals:
                            type: number
                            const: 1
                          mode:
                            type: string
                            const: half-up
                        required:
                          - decimals
                          - mode
                        additionalProperties: false
                      letterFrom:
                        type: string
                        const: rounded
                    required:
                      - id
                      - name
                      - bands
                      - rounding
                      - letterFrom
                    additionalProperties: false
                  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
                      additionalProperties: false
                  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
                      additionalProperties: false
                  source:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - manual
                          - syllabus
                      designSessionId:
                        anyOf:
                          - type: string
                            minLength: 1
                          - type: 'null'
                    required:
                      - kind
                      - designSessionId
                    additionalProperties: false
                  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
                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

````