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



## OpenAPI

````yaml /api/openapi.json post /api/v1/courses/import
openapi: 3.1.0
info:
  title: Tessera API
  version: '1'
servers:
  - url: https://tessera.edstratumlabs.ai
    description: Production
security: []
paths:
  /api/v1/courses/import:
    post:
      tags:
        - import
      operationId: importCourse
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                course:
                  type: object
                  properties:
                    code:
                      type: string
                      minLength: 1
                    title:
                      type: string
                      minLength: 1
                    term:
                      type: string
                      minLength: 1
                    description:
                      type: string
                    welcome:
                      type: string
                    outcomes:
                      type: array
                      items:
                        type: string
                        minLength: 1
                  required:
                    - code
                    - title
                    - term
                modules:
                  type: array
                  items:
                    type: object
                    properties:
                      title:
                        type: string
                        minLength: 1
                      lessons:
                        type: array
                        items:
                          type: object
                          properties:
                            title:
                              type: string
                              minLength: 1
                            minutes:
                              type: integer
                              minimum: 1
                              maximum: 240
                            blocks:
                              type: array
                              items:
                                $ref: '#/components/schemas/BlockInput'
                          required:
                            - title
                            - blocks
                    required:
                      - title
                      - lessons
              required:
                - course
                - modules
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CourseOutline'
        '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:
    BlockInput:
      oneOf:
        - type: object
          properties:
            type:
              type: string
              const: heading
            level:
              anyOf:
                - type: number
                  const: 2
                - type: number
                  const: 3
            text:
              type: string
              minLength: 1
            id:
              type: string
              minLength: 1
          required:
            - type
            - level
            - text
        - type: object
          properties:
            type:
              type: string
              const: text
            text:
              type: string
              minLength: 1
            id:
              type: string
              minLength: 1
          required:
            - type
            - text
        - type: object
          properties:
            type:
              type: string
              const: callout
            tone:
              type: string
              enum:
                - info
                - tip
                - warning
            title:
              type: string
            text:
              type: string
            id:
              type: string
              minLength: 1
          required:
            - type
            - tone
            - title
            - text
        - type: object
          properties:
            type:
              type: string
              const: image
            src:
              type: string
              minLength: 1
            alt:
              type: string
            decorative:
              type: boolean
            caption:
              type: string
            id:
              type: string
              minLength: 1
          required:
            - type
            - src
            - alt
            - decorative
            - caption
        - type: object
          properties:
            type:
              type: string
              const: check
            question:
              type: string
            options:
              minItems: 2
              maxItems: 6
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                  text:
                    type: string
                required:
                  - id
                  - text
            correctOptionId:
              type: string
            feedbackCorrect:
              type: string
            feedbackIncorrect:
              type: string
            id:
              type: string
              minLength: 1
          required:
            - type
            - question
            - options
            - correctOptionId
            - feedbackCorrect
            - feedbackIncorrect
        - type: object
          properties:
            type:
              type: string
              const: document
            title:
              type: string
              minLength: 1
            sections:
              minItems: 1
              maxItems: 40
              type: array
              items:
                type: object
                properties:
                  heading:
                    type: string
                    minLength: 1
                  text:
                    type: string
                    minLength: 1
                required:
                  - heading
                  - text
            id:
              type: string
              minLength: 1
          required:
            - type
            - title
            - sections
        - type: object
          properties:
            type:
              type: string
              const: file
            fileId:
              type: string
              minLength: 1
            title:
              type: string
              minLength: 1
            description:
              type: string
            id:
              type: string
              minLength: 1
          required:
            - type
            - fileId
            - title
            - description
        - type: object
          properties:
            type:
              type: string
              const: video
            src:
              type: string
              minLength: 1
            provider:
              type: string
              enum:
                - youtube
                - vimeo
                - upload
            title:
              type: string
              minLength: 1
            captionsFileId:
              default: null
              anyOf:
                - type: string
                  minLength: 1
                - type: 'null'
            transcript:
              type: string
            minutes:
              default: 0
              type: integer
              minimum: 0
              maximum: 600
            id:
              type: string
              minLength: 1
          required:
            - type
            - src
            - provider
            - title
            - transcript
        - type: object
          properties:
            type:
              type: string
              const: table
            caption:
              type: string
            headerRow:
              type: boolean
            rows:
              minItems: 1
              maxItems: 200
              type: array
              items:
                minItems: 1
                maxItems: 20
                type: array
                items:
                  type: string
            id:
              type: string
              minLength: 1
          required:
            - type
            - caption
            - headerRow
            - rows
        - type: object
          properties:
            type:
              type: string
              const: scenario
            title:
              type: string
              minLength: 1
            setting:
              type: string
            nodes:
              minItems: 1
              maxItems: 60
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                  text:
                    type: string
                    minLength: 1
                  choices:
                    maxItems: 6
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                        text:
                          type: string
                          minLength: 1
                        nextNodeId:
                          type: string
                          minLength: 1
                        feedback:
                          type: string
                        quality:
                          type: string
                          enum:
                            - best
                            - okay
                            - poor
                      required:
                        - id
                        - text
                        - nextNodeId
                        - feedback
                        - quality
                  outcome:
                    type: string
                required:
                  - id
                  - text
                  - choices
                  - outcome
            startNodeId:
              type: string
              minLength: 1
            id:
              type: string
              minLength: 1
          required:
            - type
            - title
            - setting
            - nodes
            - startNodeId
        - type: object
          properties:
            type:
              type: string
              const: link
            href:
              type: string
              minLength: 1
              pattern: ^https?:\/\/
            text:
              type: string
              minLength: 1
            description:
              type: string
            id:
              type: string
              minLength: 1
          required:
            - type
            - href
            - text
            - description
    CourseOutline:
      type: object
      properties:
        course:
          $ref: '#/components/schemas/CourseSummary'
        modules:
          type: array
          items:
            $ref: '#/components/schemas/ModuleWithLessons'
      required:
        - course
        - modules
      additionalProperties: false
    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: {}
    CourseSummary:
      type: object
      properties:
        id:
          type: string
          minLength: 1
        code:
          type: string
          minLength: 1
        title:
          type: string
          minLength: 1
        term:
          type: string
          minLength: 1
        description:
          type: string
        welcome:
          type: string
        outcomes:
          type: array
          items:
            type: string
            minLength: 1
        instructorIds:
          type: array
          items:
            type: string
            minLength: 1
        status:
          type: string
          enum:
            - active
            - archived
        instructorNames:
          type: array
          items:
            type: string
            minLength: 1
        moduleCount:
          type: number
          minimum: 0
        lessonCount:
          type: number
          minimum: 0
        publishedLessonCount:
          type: number
          minimum: 0
        studentCount:
          type: number
          minimum: 0
        progress:
          anyOf:
            - type: number
              minimum: 0
              maximum: 1
            - type: 'null'
        startedLessonCount:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
      required:
        - id
        - code
        - title
        - term
        - description
        - welcome
        - outcomes
        - instructorIds
        - status
        - instructorNames
        - moduleCount
        - lessonCount
        - publishedLessonCount
        - studentCount
        - progress
        - startedLessonCount
      additionalProperties: false
    ModuleWithLessons:
      type: object
      properties:
        id:
          type: string
          minLength: 1
        courseId:
          type: string
          minLength: 1
        title:
          type: string
          minLength: 1
        position:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        lessons:
          type: array
          items:
            $ref: '#/components/schemas/LessonSummary'
      required:
        - id
        - courseId
        - title
        - position
        - lessons
      additionalProperties: false
    LessonSummary:
      type: object
      properties:
        id:
          type: string
          minLength: 1
        moduleId:
          type: string
          minLength: 1
        courseId:
          type: string
          minLength: 1
        title:
          type: string
          minLength: 1
        minutes:
          type: integer
          minimum: 1
          maximum: 240
        position:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        status:
          type: string
          enum:
            - draft
            - published
        publishedAt:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
        progress:
          anyOf:
            - type: string
              enum:
                - not-started
                - in-progress
                - completed
            - type: 'null'
        draftBlockCount:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
      required:
        - id
        - moduleId
        - courseId
        - title
        - minutes
        - position
        - status
        - publishedAt
        - progress
        - draftBlockCount
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Scoped tsk_… API token or Access JWT

````