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

# Update a user



## OpenAPI

````yaml /openapi.json put /users/{id}
openapi: 3.0.0
info:
  title: Uptime Monitor API
  description: >-
    API documentation for the Uptime Monitor application. This API allows users
    to create and manage website monitors, perform checks, and view statistics.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.justanotheruptime.com
security: []
tags:
  - name: auth
    description: Authentication endpoints
  - name: projects
    description: Project management endpoints
  - name: monitors
    description: Monitor management endpoints
  - name: checks
    description: Check-related endpoints
  - name: statistics
    description: Monitor statistics endpoints
paths:
  /users/{id}:
    put:
      tags:
        - Users
      summary: Update a user
      operationId: UserController_update
      parameters:
        - name: id
          required: true
          in: path
          description: User ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserDto'
      responses:
        '200':
          description: The user has been successfully updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '404':
          description: User not found.
      security:
        - bearer: []
components:
  schemas:
    UpdateUserDto:
      type: object
      properties:
        email:
          type: string
          example: user@example.com
        password:
          type: string
          example: newpassword123
        firstName:
          type: string
          example: John
        lastName:
          type: string
          example: Doe
        image:
          type: string
        provider:
          type: string
        providerId:
          type: string
        isEmailVerified:
          type: boolean
        roles:
          type: array
          items:
            type: string
            enum:
              - user
              - admin
              - project_manager
              - super_admin
        settings:
          $ref: '#/components/schemas/UserSettingsType'
    User:
      type: object
      properties: {}
    UserSettingsType:
      type: object
      properties:
        theme:
          type: string
        notifications:
          $ref: '#/components/schemas/NotificationSettingsDto'
        preferredNotification:
          type: string
        emailConfig:
          type: object
        smsConfig:
          type: object
        slackConfig:
          type: object
        webhookConfig:
          type: object
    NotificationSettingsDto:
      type: object
      properties:
        email:
          type: boolean
        sms:
          type: boolean
        slack:
          type: boolean
        webhook:
          type: boolean
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````