> ## 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 apiv1assignments submissions



## OpenAPI

````yaml /api/openapi.json post /api/v1/assignments/{assignmentId}/submissions
openapi: 3.1.0
info:
  title: Tessera API
  version: '1'
servers:
  - url: https://tessera.edstratumlabs.ai
    description: Production
security: []
paths:
  /api/v1/assignments/{assignmentId}/submissions:
    post:
      tags:
        - assignments
      operationId: submit
      parameters:
        - name: assignmentId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                text:
                  type: string
                fileId:
                  type: string
                  minLength: 1
                link:
                  type: string
              required: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Submission'
        '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:
    Submission:
      type: object
      properties:
        id:
          type: string
          minLength: 1
        assignmentId:
          type: string
          minLength: 1
        studentId:
          type: string
          minLength: 1
        attempt:
          type: integer
          minimum: 1
          maximum: 9007199254740991
        state:
          type: string
          enum:
            - submitted
            - graded
            - returned
        text:
          type: string
        fileId:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
        link:
          type: string
        submittedAt:
          type: string
          minLength: 1
        grade:
          anyOf:
            - $ref: '#/components/schemas/Grade'
            - type: 'null'
      required:
        - id
        - assignmentId
        - studentId
        - attempt
        - state
        - text
        - fileId
        - link
        - submittedAt
        - grade
      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: {}
    Grade:
      type: object
      properties:
        score:
          type: number
          minimum: 0
        criteria:
          type: array
          items:
            type: object
            properties:
              criterionId:
                type: string
                minLength: 1
              levelId:
                type: string
                minLength: 1
              points:
                type: number
                minimum: 0
              comment:
                type: string
            required:
              - criterionId
              - levelId
              - points
              - comment
            additionalProperties: false
        feedback:
          type: string
        feedbackOrigin:
          type: string
          enum:
            - human
            - ai
        feedbackProvenance:
          anyOf:
            - $ref: '#/components/schemas/Provenance'
            - type: 'null'
        gradedBy:
          type: string
          minLength: 1
        gradedAt:
          type: string
          minLength: 1
        releasedAt:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
      required:
        - score
        - criteria
        - feedback
        - feedbackOrigin
        - feedbackProvenance
        - gradedBy
        - gradedAt
        - releasedAt
      additionalProperties: false
    Provenance:
      type: object
      properties:
        model:
          type: string
          minLength: 1
        task:
          type: string
          enum:
            - brief
            - outline
            - lesson-draft
            - block-regenerate
            - announcement
            - feedback
            - alt-text
            - rewrite
            - link-text
            - element
            - tutor
            - tutor-summary
            - agent
        generatedAt:
          type: string
          minLength: 1
        sources:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
              name:
                type: string
                minLength: 1
            required:
              - id
              - name
            additionalProperties: false
        summary:
          type: string
      required:
        - model
        - task
        - generatedAt
        - sources
        - summary
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Scoped tsk_… API token or Access JWT

````