> ## Documentation Index
> Fetch the complete documentation index at: https://microstrate-1133-notifications-prefs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update user

> Updates user information



## OpenAPI

````yaml /api-reference/endpoint/accounts/openapi.json patch /accounts/user
openapi: 3.0.3
info:
  title: quiva.ai Gateway
  description: >-
    API for managing accounts, users, authentication, and payments in the
    quiva.ai platform
  version: 1.0.0
  contact:
    name: quiva.ai Support
    url: https://app.quiva.ai
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Account Management
    description: Operations related to account creation, updating, and deletion
  - name: User Management
    description: Operations related to user creation, updating, and deletion
  - name: Authentication
    description: Operations related to authentication and session management
  - name: API Keys
    description: Operations related to API key management
  - name: Multi-Factor Authentication
    description: Operations related to MFA setup and verification
  - name: Payment
    description: Operations related to subscription and payment management
  - name: Mesh Nodes
    description: Operations related to mesh node management
paths:
  /accounts/user:
    patch:
      tags:
        - User Management
      summary: Update user
      description: Updates user information
      operationId: updateUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserRequest'
            example:
              first_name: John
              last_name: Smith
              theme: dark
              sound: true
      responses:
        '200':
          description: User updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UpdateUserRequest:
      type: object
      properties:
        email:
          type: string
          description: User email (optional, defaults to current user)
        first_name:
          type: string
          description: First name
        last_name:
          type: string
          description: Last name
        sound:
          type: boolean
          description: Enable sound
        theme:
          type: string
          description: UI theme (light, dark, auto)
        totp_enabled:
          type: boolean
          description: Enable TOTP authentication
        passkey_enabled:
          type: boolean
          description: Enable passkey authentication
        notification_preferences:
          allOf:
            - $ref: '#/components/schemas/NotificationPrefs'
          description: >-
            User's notification preferences across all notification types and
            delivery channels.
    SuccessResponse:
      type: object
      properties:
        message:
          type: string
    Error:
      type: object
      properties:
        error:
          type: string
    NotificationPrefs:
      type: object
      description: >-
        A user's global notification preferences across all notification types
        and delivery channels.
      properties:
        task_status_changes:
          allOf:
            - $ref: '#/components/schemas/NotificationTypePrefs'
          description: Preferences for notifications when a task's status changes.
        task_assignments:
          allOf:
            - $ref: '#/components/schemas/NotificationTypePrefs'
          description: Preferences for notifications when a task is assigned to the user.
        task_mentions:
          allOf:
            - $ref: '#/components/schemas/NotificationTypePrefs'
          description: Preferences for notifications when the user is mentioned on a task.
        task_watcher_updates:
          allOf:
            - $ref: '#/components/schemas/NotificationTypePrefs'
          description: Preferences for notifications about tasks the user is watching.
        batch_mode:
          type: string
          description: >-
            How email notifications are grouped before delivery. 'realtime'
            sends immediately; 'hourly' and 'daily' send digests.
          enum:
            - realtime
            - hourly
            - daily
          example: daily
        quiet_hours:
          $ref: '#/components/schemas/NotificationQuietHours'
      required:
        - task_status_changes
        - task_assignments
        - task_mentions
        - task_watcher_updates
        - batch_mode
        - quiet_hours
    NotificationTypePrefs:
      type: object
      description: Opt-in state and channel configuration for one notification type.
      properties:
        enabled:
          type: boolean
          description: >-
            Whether the user receives notifications of this type at all. When
            false, channel toggles are ignored.
          example: true
        channels:
          $ref: '#/components/schemas/NotificationChannels'
      required:
        - enabled
        - channels
    NotificationQuietHours:
      type: object
      description: >-
        Time window during which notifications are suppressed. Times are
        interpreted in the configured timezone.
      properties:
        enabled:
          type: boolean
          description: >-
            Whether quiet hours are active. When false, the time fields are
            ignored.
          example: true
        start:
          type: string
          description: Start of the quiet window in 24-hour HH:MM format.
          pattern: ^([01]\d|2[0-3]):[0-5]\d$
          example: '22:00'
        end:
          type: string
          description: End of the quiet window in 24-hour HH:MM format.
          pattern: ^([01]\d|2[0-3]):[0-5]\d$
          example: '07:00'
        timezone:
          type: string
          description: IANA timezone name used to interpret the start and end times.
          example: Europe/London
      required:
        - enabled
        - start
        - end
        - timezone
    NotificationChannels:
      type: object
      description: Per-channel delivery toggles for a single notification type.
      properties:
        in_app:
          type: boolean
          description: Whether in-app notifications are delivered for this type.
          example: true
        email:
          type: boolean
          description: Whether email notifications are delivered for this type.
          example: false
        push:
          type: boolean
          description: Whether push notifications are delivered for this type.
          example: true
      required:
        - in_app
        - email
        - push
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````