Skip to main content
PUT
/
users
/
{user_id}
Update a user
curl --request PUT \
  --url https://api.projectcor.com/v1/users/{user_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "first_name": "John",
  "last_name": "Doe",
  "email": "john.doe@example.com",
  "role_id": 3
}
'
{
  "id": 123,
  "first_name": "<string>",
  "last_name": "<string>",
  "picture": "<string>",
  "email": "jsmith@example.com",
  "cuil": "<string>",
  "remaining_hours": 123,
  "user_position_id": 123,
  "role_id": 123,
  "daily_hours": 123,
  "labels": [
    {
      "id": 123,
      "hex": "<string>",
      "hsl": "<string>",
      "rgb": "<string>",
      "lang": "<string>",
      "name": "<string>",
      "color_id": 123
    }
  ],
  "plan_id": 123,
  "plan_name": "<string>",
  "hidden": true,
  "position_name": "<string>",
  "category_id": 123,
  "category_name": "<string>",
  "leaves": [
    {
      "id": 123,
      "user_id": 123,
      "company_id": 123,
      "leave_type_id": 123,
      "start": "2023-11-07T05:31:56Z",
      "end": "2023-11-07T05:31:56Z",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "deleted_at": "2023-11-07T05:31:56Z",
      "all_day": true,
      "leaveType": {
        "id": 123,
        "name": "<string>",
        "type_code": "<string>",
        "company_id": 123,
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "deleted_at": "2023-11-07T05:31:56Z",
        "icon_name": "<string>"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

user_id
integer
required

User ID

Body

application/json
first_name
string

User given name

last_name
string

User family name

email
string<email>

User email

role_id
enum<integer>

User Role: 1=C-Level, 2=Director, 3=Project Manager, 4=Collaborator, 5=Freelancer, 6=Client

Available options:
1,
2,
3,
4,
5,
6
user_position_id
integer

ID of the user's position

phone
string

User phone number

description
string

User description

birthday
string<date>

User birthday (YYYY-MM-DD)

work_in
string

Department or area

hourly_rate
number

Hourly rate

monthly_hours
integer

Monthly hours

daily_hours
integer

Daily hours

plan_id
enum<integer>

Plan ID: 4=Project Management, 5=Capacity Planning

Available options:
4,
5
hidden
boolean

Whether user is hidden

charge_hours
boolean

Whether to charge hours

Response

200 - application/json

User updated successfully

id
integer
first_name
string
last_name
string
picture
string

URL to user's profile picture

email
string<email>
cuil
string
remaining_hours
number
user_position_id
integer
role_id
integer

1=C-Level, 2=Director, 3=Project Manager, 4=Collaborator, 5=Freelancer, 6=Client

daily_hours
number
labels
object[] | null
plan_id
integer

4=Project Management, 5=Capacity Planning

plan_name
string
hidden
boolean
position_name
string | null
category_id
integer | null
category_name
string | null
leaves
object[]