> ## Documentation Index
> Fetch the complete documentation index at: https://developer.supernotes.app/llms.txt
> Use this file to discover all available pages before exploring further.

#  Update Current User

> Update the authenticated user's personal information



## OpenAPI

````yaml put /v1/user
openapi: 3.1.0
info:
  title: supernotes
  description: The Supernotes API – a modern and fast API for quick card creation
  version: 3.2.1
servers: []
security: []
paths:
  /v1/user:
    put:
      tags:
        - user
      summary: ' Update Current User'
      description: Update the authenticated user's personal information
      operationId: _update_current_user_v1_user_put
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserUpdateRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserTwoFaced'
        4XX:
          description: Unified Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnifiedError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    UserUpdateRequest:
      properties:
        new_username:
          type: string
          maxLength: 32
          minLength: 3
          title: New Username
        first_name:
          type: string
          maxLength: 32
          minLength: 1
          title: First Name
        last_name:
          type: string
          maxLength: 32
          title: Last Name
        bio:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Bio
        photo:
          anyOf:
            - type: string
              maxLength: 2048
            - type: 'null'
          title: Photo
      type: object
      required:
        - new_username
        - first_name
        - last_name
      title: UserUpdateRequest
    UserTwoFaced:
      properties:
        private_data:
          $ref: '#/components/schemas/UserData'
        public_profile:
          $ref: '#/components/schemas/UserPublicProfile'
      type: object
      required:
        - private_data
        - public_profile
      title: UserTwoFaced
    UnifiedError:
      discriminator:
        mapping:
          auth: '#/components/schemas/AuthError'
          basic: '#/components/schemas/BasicError'
          card: '#/components/schemas/CardError'
          numeric: '#/components/schemas/NumericError'
          permission: '#/components/schemas/PermError'
          recaptcha: '#/components/schemas/RecaptchaError'
          turnstile: '#/components/schemas/TurnstileError'
          validation: '#/components/schemas/ValidationError'
        propertyName: type
      oneOf:
        - $ref: '#/components/schemas/AuthError'
        - $ref: '#/components/schemas/BasicError'
        - $ref: '#/components/schemas/CardError'
        - $ref: '#/components/schemas/PermError'
        - $ref: '#/components/schemas/RecaptchaError'
        - $ref: '#/components/schemas/TurnstileError'
        - $ref: '#/components/schemas/ValidationError'
        - $ref: '#/components/schemas/NumericError'
    UserData:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        email:
          type: string
          title: Email
        first_name:
          type: string
          title: First Name
        last_name:
          type: string
          title: Last Name
        username:
          type: string
          title: Username
        referral_code:
          type: string
          title: Referral Code
        bio:
          anyOf:
            - type: string
            - type: 'null'
          title: Bio
        photo:
          anyOf:
            - type: string
            - type: 'null'
          title: Photo
        kind:
          anyOf:
            - $ref: '#/components/schemas/UserKind'
            - type: 'null'
        prefs:
          $ref: '#/components/schemas/UserPrefs'
        pref_flags:
          type: integer
          title: Pref Flags
        feature_preview_flags:
          type: integer
          title: Feature Preview Flags
        pins:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Pins
        status:
          $ref: '#/components/schemas/Status'
        access_level:
          $ref: '#/components/schemas/AccessLevel'
        signup_when:
          type: string
          format: date-time
          title: Signup When
      type: object
      required:
        - id
        - email
        - first_name
        - last_name
        - username
        - referral_code
        - prefs
        - pref_flags
        - feature_preview_flags
        - pins
        - status
        - access_level
        - signup_when
      title: UserData
    UserPublicProfile:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        username:
          type: string
          title: Username
        first_name:
          type: string
          title: First Name
        last_name:
          type: string
          title: Last Name
        bio:
          anyOf:
            - type: string
            - type: 'null'
          title: Bio
        photo:
          anyOf:
            - type: string
            - type: 'null'
          title: Photo
      type: object
      required:
        - id
        - username
        - first_name
        - last_name
        - bio
        - photo
      title: UserPublicProfile
    AuthError:
      properties:
        type:
          const: auth
          title: Type
          type: string
        detail:
          title: Detail
          type: string
        meta:
          enum:
            - APIKey
            - Bearer
            - Fresh
            - Refresh
          title: Meta
          type: string
        status:
          title: Status
          type: integer
      required:
        - type
        - detail
        - meta
        - status
      title: AuthError
      type: object
    BasicError:
      properties:
        type:
          const: basic
          title: Type
          type: string
        detail:
          title: Detail
          type: string
        meta:
          title: Meta
          type: 'null'
        status:
          title: Status
          type: integer
      required:
        - type
        - detail
        - meta
        - status
      title: BasicError
      type: object
    CardError:
      properties:
        type:
          const: card
          title: Type
          type: string
        detail:
          title: Detail
          type: string
        meta:
          format: uuid
          title: Meta
          type: string
        status:
          title: Status
          type: integer
      required:
        - type
        - detail
        - meta
        - status
      title: CardError
      type: object
    PermError:
      properties:
        type:
          const: permission
          title: Type
          type: string
        detail:
          title: Detail
          type: string
        meta:
          $ref: '#/components/schemas/PermErrorMeta'
        status:
          title: Status
          type: integer
      required:
        - type
        - detail
        - meta
        - status
      title: PermError
      type: object
    RecaptchaError:
      properties:
        type:
          const: recaptcha
          title: Type
          type: string
        detail:
          title: Detail
          type: string
        meta:
          title: Meta
          type: boolean
        status:
          title: Status
          type: integer
      required:
        - type
        - detail
        - meta
        - status
      title: RecaptchaError
      type: object
    TurnstileError:
      properties:
        type:
          const: turnstile
          title: Type
          type: string
        detail:
          title: Detail
          type: string
        meta:
          items:
            type: string
          title: Meta
          type: array
        status:
          title: Status
          type: integer
      required:
        - type
        - detail
        - meta
        - status
      title: TurnstileError
      type: object
    ValidationError:
      properties:
        type:
          const: validation
          title: Type
          type: string
        detail:
          title: Detail
          type: string
        meta:
          additionalProperties:
            type: string
          title: Meta
          type: object
        status:
          title: Status
          type: integer
      required:
        - type
        - detail
        - meta
        - status
      title: ValidationError
      type: object
    NumericError:
      properties:
        type:
          const: numeric
          title: Type
          type: string
        detail:
          title: Detail
          type: string
        meta:
          anyOf:
            - type: number
            - type: integer
          title: Meta
        status:
          title: Status
          type: integer
      required:
        - type
        - detail
        - meta
        - status
      title: NumericError
      type: object
    UserKind:
      type: integer
      enum:
        - 1
        - 2
        - 3
        - 4
      title: UserKind
    UserPrefs:
      properties:
        indent_type:
          $ref: '#/components/schemas/IndentType'
        default_sort_type:
          $ref: '#/components/schemas/SortType'
        appearance_mode:
          $ref: '#/components/schemas/AppearanceMode'
        day_theme:
          $ref: '#/components/schemas/AppearanceTheme'
        night_theme:
          $ref: '#/components/schemas/AppearanceTheme'
        couple_key:
          anyOf:
            - type: string
              maxLength: 4
            - type: 'null'
          title: Couple Key
        persona:
          anyOf:
            - $ref: '#/components/schemas/UserPersona'
            - type: 'null'
        haptic_threshold:
          anyOf:
            - $ref: '#/components/schemas/HapticThreshold'
            - type: 'null'
        daily_append_format:
          anyOf:
            - $ref: '#/components/schemas/DailyAppendFormat'
            - type: 'null'
      type: object
      required:
        - indent_type
        - default_sort_type
        - appearance_mode
        - day_theme
        - night_theme
        - couple_key
      title: UserPrefs
    Status:
      enum:
        - -2
        - -1
        - 0
        - 1
        - 2
      title: Status
      type: integer
    AccessLevel:
      type: integer
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
      title: AccessLevel
    PermErrorMeta:
      properties:
        perm_name:
          title: Perm Name
          type: string
        perm_value:
          title: Perm Value
          type: integer
      required:
        - perm_name
        - perm_value
      title: PermErrorMeta
      type: object
    IndentType:
      type: integer
      enum:
        - 0
        - 1
        - 2
      title: IndentType
    SortType:
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        - 10
        - 11
        - 12
      title: SortType
      type: integer
    AppearanceMode:
      type: integer
      enum:
        - 1
        - 2
        - 3
      title: AppearanceMode
    AppearanceTheme:
      type: integer
      enum:
        - 1
        - 2
        - 3
        - 4
      title: AppearanceTheme
    UserPersona:
      type: integer
      enum:
        - 1
        - 2
        - 3
        - 4
      title: UserPersona
    HapticThreshold:
      type: integer
      enum:
        - 0
        - 1
        - 2
        - 3
      title: HapticThreshold
    DailyAppendFormat:
      type: string
      enum:
        - plain
        - bullet
        - todo
      title: DailyAppendFormat
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Api-Key

````