---
title: "Update one or more fields on an existing user. Only fields named in FieldsToUpdate are written; fields listed but null in the payload are ignored."
method: PUT
path: "/api/UserProfile"
tags: ["UserProfile"]
---

# Update one or more fields on an existing user. Only fields named in FieldsToUpdate are written; fields listed but null in the payload are ignored.

`PUT /api/UserProfile`

Admin role only. An existing user cannot change between team member and customer contact; CompanyIDFK cannot be updated. When Roles is in FieldsToUpdate, the supplied array fully replaces the existing role set (pass [] to clear) and paid-role quotas are checked against the post-update state.

## Request body

- UpdateUserProfile — Request body for PUT /api/UserProfile. Only fields named in FieldsToUpdate are written.
  - `UserID` integer — UserID of the existing, non-archived UserProfile to update.
  - `FieldsToUpdate` string[] — Allowlist of field names to update (case-insensitive, matches JSON keys). Other fields in the payload are ignored.
  - `Email` string — New email address. Must be a valid format and unique within the account. If changed, the GlobalUser link is rebuilt.
  - `Firstname` string — New first name. Max 100 characters.
  - `Lastname` string — New last name. Max 100 characters.
  - `TimeZone` string — New Windows Time Zone ID.
  - `PositionTitle` string — New position title. Max 100 characters.
  - `Mobile` string — New mobile. Max 50 characters.
  - `Phone` string — New phone. Max 50 characters.
  - `DefaultBillableRate` number, double — New default billable rate. Team members only. Non-negative.
  - `DefaultCostRate` number, double — New default cost rate. Team members only. Non-negative.
  - `Roles` string[] — When included in FieldsToUpdate, fully replaces the existing role set (pass [] to remove all). Each entry must be a RoleCode that is valid for the user's existing type (UserAssignable=1 for team members, CustomerAssignable=1 for customer contacts).
  - `SendInviteEmail` boolean — Only meaningful when Roles is in FieldsToUpdate. Drives invite-email behaviour after roles are replaced — see spec matrix.

## Response `200`

Returns the updated user.

- UserDetails — A user/team member record with profile information, availability hours, billing rates, roles, and tags.
  - `UserID` integer — Unique identifier for the user.
  - `AccountIDFK` integer — The Avaza account this user belongs to.
  - `Email` string — User's email address.
  - `Firstname` string — User's first name.
  - `Lastname` string — User's last name.
  - `PositionTitle` string — User's job title or position.
  - `Phone` string — User's phone number.
  - `Mobile` string — User's mobile phone number.
  - `TimeZone` string — Windows Timezone ID
  - `IANATimezone` string — IANA tz database timezone name
  - `isTeamMember` boolean — Whether the user is an internal team member (true) or external contact (false).
  - `CompanyIDFK` integer — The company the user is associated with (for external contacts).
  - `CompanyName` string — Name of the user's associated company.
  - `DefaultBillableRate` number, double — The user's default billing rate per hour.
  - `DefaultCostRate` number, double — The user's default cost rate per hour.
  - `MondayAvailableHours` number, double — Available working hours on Mondays.
  - `TuesdayAvailableHours` number, double — Available working hours on Tuesdays.
  - `WednesdayAvailableHours` number, double — Available working hours on Wednesdays.
  - `ThursdayAvailableHours` number, double — Available working hours on Thursdays.
  - `FridayAvailableHours` number, double — Available working hours on Fridays.
  - `SaturdayAvailableHours` number, double — Available working hours on Saturdays.
  - `SundayAvailableHours` number, double — Available working hours on Sundays.
  - `Roles` RoleDetails[] — List of security roles assigned to the user.
    - `RoleCode` string — Unique code for the role (e.g. Admin, PM, TimesheetUser).
    - `RoleName` string — Display name of the role.
  - `Tags` UserTagDetails[] — List of tags applied to the user for categorisation.
    - `UserTagID` integer — Unique identifier for the user tag.
    - `UserTagName` string — Display name of the user tag.

## Other responses

- `400` — Validation error.
- `401` — Unauthorized.
- `403` — Forbidden — caller is not an Admin.
- `412` — Precondition failed — paid-role license quota would be exceeded.

---

[API](https://skmtc.net/avaza/apis/avaza-api-documentation.md) · [All operations](https://skmtc.net/avaza/apis/avaza-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/avaza/avaza-api-documentation/versions/1eeadf750514/schema)
