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

# Update a user

> Updates a user using a PUT http method.

⚠️ **Important:** Use caution when using this endpoint. The system will replace the existing user with the values passed in the request body.

**Available properties:**
- `first_name` — User given name
- `last_name` — User family name
- `email` — User email
- `role_id` — ID of the user's role (1-6)
- `user_position_id` — ID of the user's position
- `phone`, `description`, `birthday`, `work_in`
- `hourly_rate`, `monthly_hours`, `daily_hours`
- `plan_id` — 4: Project Management, 5: Capacity Planning
- `hidden`, `charge_hours` — Boolean values
- `salary` — New monthly salary amount
- `salary_from` — Month from which salary should apply (MM-YYYY). Defaults to the current month if `salary` is provided.



## OpenAPI

````yaml /api-reference/openapi.json put /users/{user_id}
openapi: 3.1.0
info:
  title: COR API
  description: >-
    The COR API lets you integrate with projectcor.com applications using simple
    HTTP methods, in either XML or JSON formats, making this an ideal API for
    developing integrations with other softwares, external clients or mobile
    applications
  version: 1.0.0
servers:
  - url: https://api.projectcor.com/v1
    description: Production server
security:
  - bearerAuth: []
paths:
  /users/{user_id}:
    put:
      tags:
        - Users
      summary: Update a user
      description: >-
        Updates a user using a PUT http method.


        ⚠️ **Important:** Use caution when using this endpoint. The system will
        replace the existing user with the values passed in the request body.


        **Available properties:**

        - `first_name` — User given name

        - `last_name` — User family name

        - `email` — User email

        - `role_id` — ID of the user's role (1-6)

        - `user_position_id` — ID of the user's position

        - `phone`, `description`, `birthday`, `work_in`

        - `hourly_rate`, `monthly_hours`, `daily_hours`

        - `plan_id` — 4: Project Management, 5: Capacity Planning

        - `hidden`, `charge_hours` — Boolean values

        - `salary` — New monthly salary amount

        - `salary_from` — Month from which salary should apply (MM-YYYY).
        Defaults to the current month if `salary` is provided.
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: integer
          description: User ID
          example: 123
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserUpdateInput'
            example:
              first_name: John
              last_name: Doe
              email: john.doe@example.com
              role_id: 3
              salary: 5200
              salary_from: 01-2026
      responses:
        '200':
          description: User updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
components:
  schemas:
    UserUpdateInput:
      type: object
      properties:
        first_name:
          type: string
          description: User given name
        last_name:
          type: string
          description: User family name
        email:
          type: string
          format: email
          description: User email
        role_id:
          type: integer
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
          description: >-
            User Role: 1=C-Level, 2=Director, 3=Project Manager, 4=Collaborator,
            5=Freelancer, 6=Client
        user_position_id:
          type: integer
          description: ID of the user's position
        phone:
          type: string
          description: User phone number
        description:
          type: string
          description: User description
        birthday:
          type: string
          format: date
          description: User birthday (YYYY-MM-DD)
        work_in:
          type: string
          description: Department or area
        hourly_rate:
          type: number
          description: Hourly rate
        monthly_hours:
          type: integer
          description: Monthly hours
        daily_hours:
          type: integer
          description: Daily hours
        plan_id:
          type: integer
          enum:
            - 4
            - 5
          description: 'Plan ID: 4=Project Management, 5=Capacity Planning'
        hidden:
          type: boolean
          description: Whether user is hidden
        charge_hours:
          type: boolean
          description: Whether to charge hours
        salary:
          type: integer
          description: Monthly salary amount
        salary_from:
          type: string
          description: >-
            Month from which salary should apply (MM-YYYY). Defaults to the
            current month if salary is provided.
    User:
      allOf:
        - $ref: '#/components/schemas/UserBase'
        - type: object
          properties:
            labels:
              type: array
              items:
                $ref: '#/components/schemas/Label'
              nullable: true
    UserBase:
      type: object
      properties:
        id:
          type: integer
        first_name:
          type: string
        last_name:
          type: string
        picture:
          type: string
          description: URL to user's profile picture
        email:
          type: string
          format: email
        cuil:
          type: string
        remaining_hours:
          type: number
        user_position_id:
          type: integer
        role_id:
          type: integer
          description: >-
            1=C-Level, 2=Director, 3=Project Manager, 4=Collaborator,
            5=Freelancer, 6=Client
        daily_hours:
          type: number
        plan_id:
          type: integer
          description: 4=Project Management, 5=Capacity Planning
        plan_name:
          type: string
        hidden:
          type: boolean
        position_name:
          type: string
          nullable: true
        category_id:
          type: integer
          nullable: true
        category_name:
          type: string
          nullable: true
        gmt:
          type: string
          description: >-
            UTC offset from the user's last login location. Indicates the
            timezone configured at their last login.
          example: '-03:00'
        leaves:
          type: array
          items:
            $ref: '#/components/schemas/Leave'
    Label:
      type: object
      properties:
        id:
          type: integer
        hex:
          type: string
          description: Hex color code
        hsl:
          type: string
          nullable: true
        rgb:
          type: string
          nullable: true
        lang:
          type: string
        name:
          type: string
        color_id:
          type: integer
    Leave:
      type: object
      properties:
        id:
          type: integer
        user_id:
          type: integer
        company_id:
          type: integer
        leave_type_id:
          type: integer
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        deleted_at:
          type: string
          format: date-time
          nullable: true
        all_day:
          type: boolean
        leaveType:
          $ref: '#/components/schemas/LeaveType'
    LeaveType:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        type_code:
          type: string
        company_id:
          type: integer
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        deleted_at:
          type: string
          format: date-time
          nullable: true
        icon_name:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````