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

# Patch apiv1users



## OpenAPI

````yaml /api/openapi.json patch /api/v1/users/{userId}
openapi: 3.1.0
info:
  title: Tessera API
  version: '1'
servers:
  - url: https://tessera.edstratumlabs.ai
    description: Production
security: []
paths:
  /api/v1/users/{userId}:
    patch:
      tags:
        - people
      operationId: updateUser
      parameters:
        - name: userId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                role:
                  $ref: '#/components/schemas/Role'
              required: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '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:
    Role:
      type: string
      enum:
        - administrator
        - instructor
        - student
    User:
      type: object
      properties:
        id:
          type: string
          minLength: 1
        name:
          type: string
          minLength: 1
        email:
          type: string
          minLength: 1
          format: email
          pattern: >-
            ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
        role:
          $ref: '#/components/schemas/Role'
        initials:
          type: string
          minLength: 1
        profile:
          anyOf:
            - $ref: '#/components/schemas/LearningProfile'
            - type: 'null'
      required:
        - id
        - name
        - email
        - role
        - initials
        - profile
      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: {}
    LearningProfile:
      type: object
      properties:
        goals:
          type: array
          items:
            type: string
            enum:
              - finish-degree
              - career-change
              - upskill
              - compliance
              - curiosity
        goalNote:
          type: string
        weeklyMinutes:
          type: integer
          minimum: 0
          maximum: 2400
        language:
          type: string
          minLength: 1
        readingLevel:
          type: string
          enum:
            - standard
            - plain
        accessibility:
          type: object
          properties:
            captions:
              type: boolean
            reducedMotion:
              type: boolean
            largerText:
              type: boolean
            screenReader:
              type: boolean
          required:
            - captions
            - reducedMotion
            - largerText
            - screenReader
          additionalProperties: false
        reminders:
          type: string
          enum:
            - 'off'
            - daily
            - weekly
        sessionMinutes:
          type: integer
          minimum: 5
          maximum: 240
        completedAt:
          type: string
          minLength: 1
      required:
        - goals
        - goalNote
        - weeklyMinutes
        - language
        - readingLevel
        - accessibility
        - reminders
        - completedAt
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Scoped tsk_… API token or Access JWT

````