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



## OpenAPI

````yaml /api/openapi.json post /api/v1/requirements
openapi: 3.1.0
info:
  title: Tessera API
  version: '1'
servers:
  - url: https://tessera.edstratumlabs.ai
    description: Production
security: []
paths:
  /api/v1/requirements:
    post:
      tags:
        - session
      operationId: createRequirement
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                target:
                  $ref: '#/components/schemas/RequirementTarget'
                audience:
                  $ref: '#/components/schemas/RequirementAudience'
                dueAt:
                  anyOf:
                    - type: string
                      minLength: 1
                    - type: 'null'
                recurrence:
                  type: string
                  enum:
                    - none
                    - annual
              required:
                - target
                - audience
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Requirement'
        '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:
    RequirementTarget:
      oneOf:
        - type: object
          properties:
            kind:
              type: string
              const: course
            courseId:
              type: string
              minLength: 1
          required:
            - kind
            - courseId
          additionalProperties: false
        - type: object
          properties:
            kind:
              type: string
              const: program
            programId:
              type: string
              minLength: 1
          required:
            - kind
            - programId
          additionalProperties: false
    RequirementAudience:
      oneOf:
        - type: object
          properties:
            kind:
              type: string
              const: role
            role:
              $ref: '#/components/schemas/Role'
          required:
            - kind
            - role
          additionalProperties: false
        - type: object
          properties:
            kind:
              type: string
              const: users
            userIds:
              minItems: 1
              maxItems: 5000
              type: array
              items:
                type: string
                minLength: 1
          required:
            - kind
            - userIds
          additionalProperties: false
    Requirement:
      type: object
      properties:
        id:
          type: string
          minLength: 1
        target:
          $ref: '#/components/schemas/RequirementTarget'
        audience:
          $ref: '#/components/schemas/RequirementAudience'
        dueAt:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
        recurrence:
          type: string
          enum:
            - none
            - annual
        createdBy:
          type: string
          minLength: 1
        createdAt:
          type: string
          minLength: 1
      required:
        - id
        - target
        - audience
        - dueAt
        - recurrence
        - createdBy
        - createdAt
      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: {}
    Role:
      type: string
      enum:
        - administrator
        - instructor
        - student
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Scoped tsk_… API token or Access JWT

````