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

# updateUser

> 
The `updateUser` API updates required employee information in the system.

### What it does:

- Updates existing employee personal details and contact information
- Allows partial changes to user data
- StateCode can only be added for **Remote** workers, and companylocationId can only be added for "Office" workers

### Note:

- We are not currently allowing changes to a user's name for kyc (know your customer) purposes. Please contact support if a name change is required



## OpenAPI

````yaml put /adminPortal/updateUser
openapi: 3.0.1
info:
  title: Default module
  description: ''
  version: 1.0.0
servers: []
security:
  - basic: []
tags: []
paths:
  /adminPortal/updateUser:
    put:
      tags: []
      summary: updateUser
      description: >-

        The `updateUser` API updates required employee information in the
        system.


        ### What it does:


        - Updates existing employee personal details and contact information

        - Allows partial changes to user data

        - StateCode can only be added for **Remote** workers, and
        companylocationId can only be added for "Office" workers


        ### Note:


        - We are not currently allowing changes to a user's name for kyc (know
        your customer) purposes. Please contact support if a name change is
        required
      parameters: []
      requestBody:
        content:
          application/x-msgpack:
            schema:
              type: object
              properties:
                method:
                  type: string
                  title: updateUser
                user:
                  type: object
                  properties:
                    userId:
                      type: string
                    middleName:
                      type: string
                    phoneNumber:
                      type: string
                      title: Must be 10 Digits
                    dateOfJoin:
                      type: string
                    workerType:
                      type: string
                      title: Enum
                    jobTitle:
                      type: string
                    companyLocationCategory:
                      type: string
                      title: Enum
                    stateCode:
                      type: string
                    companyLocationId:
                      type: string
                  required:
                    - userId
              required:
                - method
                - user
            example:
              method: updateUser
              user:
                userId: 5F45CFBA-4AED-41AF-B334-E02D23BA17AE
                firstName: Joe
                lastName: Bloggs
                phoneNumber: '9889890989'
                email: joeBloggs@mailsac.com
                dateOfJoin: '2000-01-01'
                workerType: W2
                jobTitle: Manager
                companyLocationCategory: Office
                stateCode: AL
                companyLocationId: 9721384B-0367-41DD-BD64-EF8047E8FD71
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  user:
                    type: object
                    properties:
                      userId:
                        type: string
                      status:
                        type: string
                      message:
                        type: string
                    required:
                      - userId
                      - status
                    x--orders:
                      - EmployeeID
                      - Status
                      - Message
                required:
                  - user
                x--orders:
                  - Employee
              examples:
                '1':
                  summary: Success
                  value:
                    user:
                      userId: 673F4A1C-ABD9-4E20-A235-66ED7CA71E8D
                      status: Ready
                      message: The User's data has been updated successfully.
                '2':
                  summary: Exception
                  value:
                    error:
                      code: 400
                      message: Date of join format is not valid
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: integer
                        message:
                          type: string
                      required:
                        - code
                required:
                  - error
          headers: {}
      deprecated: false
      security:
        - basic: []
components:
  securitySchemes:
    basic:
      type: http
      scheme: basic

````