# Update a user

Updates one person's record and returns it, the same shape as reading it
back. Every field is optional, so a body carrying only what changed is safe
- fields you leave out keep their current values.

Custom attributes are sent alongside the fields below, under the codes the
account defines for them. Send `account_role` to change the administrative
role this person holds on the account; a role your own token may not grant
is rejected as a validation error against that field.

Endpoint: PUT /api/v2/user/{id}
Version: 2.0.0
Security: default

## Path parameters:

  - `id` (integer, required)
    The ID of the user.

## Header parameters:

  - `Rosterfy-Platform` (string)

## Request fields (application/json):

  - `email` (string)
    The email address of the User. Must be unique.

  - `preferred_name` (string)

  - `first_name` (string)
    The first name of the User

  - `middle_name` (string)

  - `last_name` (string)
    The last name of the User

  - `phone` (string)
    Phone number

  - `dob` (string)
    Date of birth in Y-m-d format

  - `address` (object)
    The address of the User.

  - `is_subscribed` (boolean)

  - `picture` (string)

  - `account_role` (string)
    An ID of an account role (Admin Permission) to place User into.

  - `user_checkpoint_id` (integer)
    The ID of the checkpoint the user should be placed into.

  - `user_type_id` (integer)
    Set the User Type of the User.

  - `is_archived` (boolean)
    Whether the User is archived.

  - `general:timezone` (string)

  - `custom_*` (string)
    A custom attribute, named by its code - custom_shirt_size, for example. The value follows the attribute's own type, so it may be a string, a number, a boolean or a list. See the custom attributes documentation.

## Response 200 fields (application/json):

  - `object` (object)

  - `object.id` (integer)

  - `object.id_token` (string)

  - `object.account_id` (integer)

  - `object.email` (string)

  - `object.force_reset_password` (integer)

  - `object.password_expires_at` (string | null)

  - `object.first_name` (string)

  - `object.middle_name` (string | null)

  - `object.last_name` (string)

  - `object.preferred_name` (string | null)

  - `object.phone` (string)

  - `object.dob` (string)

  - `object.picture` (string | null)

  - `object.picture_status` (integer)

  - `object.is_subscribed` (integer)

  - `object.is_subscribed_transactional` (integer)

  - `object.is_unreachable` (integer)

  - `object.is_unreachable_sms` (integer)

  - `object.terms` (integer)

  - `object.rating` (string)

  - `object.shift_privacy` (integer)

  - `object.is_team_leader` (integer)

  - `object.email_verified` (integer)

  - `object.login_lockout_attempts` (integer)

  - `object.login_lockout_at` (string | null)

  - `object.login_lockout_email_sent_at` (string | null)

  - `object.last_login_at` (string | null)

  - `object.last_app_login_at` (string | null)

  - `object.is_archived` (integer)

  - `object.last_activated` (string | null)

  - `object.from_source` (string | null)

  - `object.delete_requested_at` (string | null)

  - `object.deleted_at` (string | null)

  - `object.is_erased` (integer)

  - `object.created_at` (string)

  - `object.updated_at` (string)

  - `object.deleted_by` (string | null)

  - `object.interests` (string | null)

  - `object.address` (object)

  - `object.address.iso` (string)

  - `object.address.region_code` (string)

  - `object.address.coordinates` (object)

  - `object.address.coordinates.latitude` (string)

  - `object.address.coordinates.longitude` (string)

  - `object.address.street_address_1` (string)

  - `object.address.street_address_2` (string | null)

  - `object.address.street_address_3` (string | null)

  - `object.address.city` (string)

  - `object.address.postcode` (string)

  - `object.address.region` (string)

  - `object.address.country` (string)

  - `object.address.latitude` (string)

  - `object.address.longitude` (string)

  - `nice` (object)

  - `nice.rrn` (string)

  - `nice.address` (string)

  - `nice.address_oneline` (string)

  - `nice.address.country` (string)

  - `nice.address.country:raw` (string)

  - `nice.address.city` (string)

  - `nice.address.region` (string)

  - `nice.address.region:raw` (string)

  - `nice.address.postcode` (string)

  - `nice.address.street_address_1` (string)

  - `nice.address.street_address_2` (string | null)

  - `nice.address.street_address_3` (string | null)

  - `nice.address.latitude` (string)

  - `nice.address.longitude` (string)

  - `nice.family_id` (string | null)

  - `nice.has_family_members` (string)

  - `nice.manages_family` (boolean)

  - `nice.family_manager` (string)

  - `nice.family_member` (string)

  - `nice.is_family_member` (boolean)

  - `nice.is_engaged` (string)

  - `nice.is_engaged:raw` (boolean)

  - `nice.last_engaged_at` (string | null)

  - `nice.last_engaged_at:raw` (string | null)

  - `nice.created_at` (string)

  - `nice.created_at__date` (string)

  - `nice.created_at__time` (string)

  - `nice.created_at__offset` (string)

  - `nice.created_at__offset_minutes` (integer)

  - `nice.created_at__dayofweek` (string)

  - `nice.email_verified` (string)

  - `nice.from_source` (string)

  - `nice.interests` (string | null)

  - `nice.interests:value` (string | null)

  - `nice.interests:array` (string | null)

  - `nice.is_subscribed_transactional` (string)

  - `nice.is_team_leader` (string)

  - `nice.middle_name` (string)

  - `nice.picture_status` (string)

  - `nice.picture_status:value` (integer)

  - `nice.picture_status:array` (string)

  - `nice.shift_privacy` (string)

  - `nice.updated_at` (string)

  - `nice.updated_at__date` (string)

  - `nice.updated_at__time` (string)

  - `nice.updated_at__offset` (string)

  - `nice.updated_at__offset_minutes` (integer)

  - `nice.updated_at__dayofweek` (string)

  - `nice.first_name` (string)

  - `nice.last_name` (string)

  - `nice.preferred_name` (string)

  - `nice.phone:qr_code_value` (string)

  - `nice.phone` (string)

  - `nice.phone:raw` (string)

  - `nice.phone:local_au` (string)

  - `nice.dob` (string)

  - `nice.dob__dayofweek` (string)

  - `nice.is_subscribed` (string)

  - `nice.terms` (string)

  - `nice.name` (string)

  - `nice.age` (integer)

  - `nice.age_months` (string)

  - `nice.info` (string)

  - `nice.preferred_first_name` (string)

  - `nice.delete_requested` (boolean)

  - `nice.updated_hours` (number)

  - `nice.is_community_user` (boolean)

  - `nice.timezone` (string)

  - `relations` (array)

  - `permissions` (object)

  - `permissions.read` (boolean)

  - `permissions.update` (boolean)

  - `permissions.delete` (boolean)

  - `attributes` (object)

  - `id` (integer)

  - `name` (string)

## Response 422 fields (application/json):

  - `message` (string)

  - `errors` (object)

  - `errors.email` (array)

