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

#  Set Preferences

> Sets multiple preferences for the user



## OpenAPI

````yaml patch /v1/user/prefs
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/prefs:
    patch:
      tags:
        - user
        - preferences
      summary: ' Set Preferences'
      description: Sets multiple preferences for the user
      operationId: _set_preferences_v1_user_prefs_patch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserUpdatePrefs'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserPrefs'
        4XX:
          description: Unified Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnifiedError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    UserUpdatePrefs:
      properties:
        sort_type:
          $ref: '#/components/schemas/SortType'
        default_sort_type:
          $ref: '#/components/schemas/SortType'
        indent_type:
          $ref: '#/components/schemas/IndentType'
        appearance_mode:
          $ref: '#/components/schemas/AppearanceMode'
        day_theme:
          $ref: '#/components/schemas/AppearanceTheme'
        night_theme:
          $ref: '#/components/schemas/AppearanceTheme'
        couple_key:
          anyOf:
            - type: string
            - 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
      title: UserUpdatePrefs
    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
    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'
    SortType:
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        - 10
        - 11
        - 12
      title: SortType
      type: integer
    IndentType:
      type: integer
      enum:
        - 0
        - 1
        - 2
      title: IndentType
    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
    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
    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
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Api-Key

````