Sample - Box Platform API
PUT/users/{user_id}

Update user

Updates a managed or app user in an enterprise. This endpoint is only available to users and applications with the right admin permissions.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters · 22 body fields
user_idstringrequired
The ID of the user.
fieldsarray<string>optional
A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response. Be aware that specifying this parameter will have the effect that none of the standard fields are returned in the response unless explicitly specified, instead only fields for the mini representation are returned, additional to the fields requested.
enterprisestringoptional
Set this to `null` to roll the user out of the enterprise and make them a free user.
notifybooleanoptional
Whether the user should receive an email when they are rolled out of an enterprise.
namestringoptional
The name of the user.
loginstringoptional
The email address the user uses to log in Note: If the target user's email is not confirmed, then the primary login address cannot be changed.
rolestringoptional
The user’s enterprise role.
Allowed:coadminuser
languagestringoptional
The language of the user, formatted in modified version of the [ISO 639-1](https://developer.box.com/guides/api-calls/language-codes) format.
is_sync_enabledbooleanoptional
Whether the user can use Box Sync.
job_titlestringoptional
The user’s job title.
phonestringoptional
The user’s phone number.
addressstringoptional
The user’s address.
tracking_codesarray<TrackingCode>optional
Tracking codes allow an admin to generate reports from the admin console and assign an attribute to a specific group of users. This setting must be enabled for an enterprise before it can be used.
can_see_managed_usersbooleanoptional
Whether the user can see other enterprise users in their contact list.
timezonestringoptional
The user's timezone.
is_external_collab_restrictedbooleanoptional
Whether the user is allowed to collaborate with users outside their enterprise.
is_exempt_from_device_limitsbooleanoptional
Whether to exempt the user from enterprise device limits.
is_exempt_from_login_verificationbooleanoptional
Whether the user must use two-factor authentication.
is_password_reset_requiredbooleanoptional
Whether the user is required to reset their password.
is_collaborated_content_available_when_owner_inactivebooleanoptional
Whether collaborators can access content owned by the user when the user is inactive. This setting preserves existing collaborator access and does not grant new permissions.
statusstringoptional
The user's account status.
Allowed:activeinactivecannot_delete_editcannot_delete_edit_upload
space_amountintegeroptional
The user’s total available space in bytes. Set this to `-1` to indicate unlimited storage.
notification_emailobjectoptional
An alternate notification email address to which email notifications are sent. When it's confirmed, this will be the email address to which notifications are sent instead of to the primary email address. Set this value to `null` to remove the notification email.
external_app_user_idstringoptional
An external identifier for an app user, which can be used to look up the user. This can be used to tie user IDs from external identity providers to Box users. Note: In order to update this field, you need to request a token using the application that created the app user.

4 status codes
200Returns the updated user object.
idstringrequired
The unique identifier for this user.
typestringrequired
The value will always be `user`.
Allowed:user
namestringoptional
The display name of this user.
loginstringoptional
The primary email address of this user.
created_atstringoptional
When the user object was created.
modified_atstringoptional
When the user object was last modified.
languagestringoptional
The language of the user, formatted in modified version of the [ISO 639-1](https://developer.box.com/guides/api-calls/language-codes) format.
timezonestringoptional
The user's timezone.
space_amountintegeroptional
The user’s total available space amount in bytes.
space_usedintegeroptional
The amount of space in use by the user.
max_upload_sizeintegeroptional
The maximum individual file size in bytes the user can have.
statusstringoptional
The user's account status.
Allowed:activeinactivecannot_delete_editcannot_delete_edit_upload
job_titlestringoptional
The user’s job title.
phonestringoptional
The user’s phone number.
addressstringoptional
The user’s address.
avatar_urlstringoptional
URL of the user’s avatar image.
notification_emailobjectoptional
An alternate notification email address to which email notifications are sent. When it's confirmed, this will be the email address to which notifications are sent instead of to the primary email address.
rolestringoptional
The user’s enterprise role.
Allowed:admincoadminuser
tracking_codesarray<TrackingCode>optional
Tracking codes allow an admin to generate reports from the admin console and assign an attribute to a specific group of users. This setting must be enabled for an enterprise before it can be used.
can_see_managed_usersbooleanoptional
Whether the user can see other enterprise users in their contact list.
is_sync_enabledbooleanoptional
Whether the user can use Box Sync.
is_external_collab_restrictedbooleanoptional
Whether the user is allowed to collaborate with users outside their enterprise.
is_exempt_from_device_limitsbooleanoptional
Whether to exempt the user from Enterprise device limits.
is_exempt_from_login_verificationbooleanoptional
Whether the user must use two-factor authentication.
is_collaborated_content_available_when_owner_inactivebooleanoptional
Whether collaborators can access content owned by the user when the user is inactive. This setting preserves existing collaborator access and does not grant new permissions.
enterpriseobjectoptional
my_tagsarray<string>optional
Tags for all files and folders owned by the user. Values returned will only contain tags that were set by the requester.
hostnamestringoptional
The root (protocol, subdomain, domain) of any links that need to be generated for the user.
is_platform_access_onlybooleanoptional
Whether the user is an App User.
external_app_user_idstringoptional
An external identifier for an app user, which can be used to look up the user. This can be used to tie user IDs from external identity providers to Box users.
400Returns an error if some of the parameters are missing or not valid. * `invalid_parameter` when a parameter is formatted incorrectly, for example when the `notification_email` has an incorrectly formatted email address.
typestringoptional
The value will always be `error`.
Allowed:error
statusintegeroptional
The HTTP status of the response.
codestringoptional
A Box-specific error code.
Allowed:createdacceptedno_contentredirectnot_modifiedbad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictprecondition_failed
messagestringoptional
A short message describing the error.
context_infoobjectoptional
A free-form object that contains additional context about the error. The possible fields are defined on a per-endpoint basis. `message` is only one example.
help_urlstringoptional
A URL that links to more information about why this error occurred.
request_idstringoptional
A unique identifier for this response, which can be used when contacting Box support.
403Returns an error if the user is not allowed to make the changes. * `access_denied_insufficient_permissions` when the user does not have the right permissions, for example when updating the notification email is turned off for the enterprise. * `denied_by_policy` when the user does not have the right permissions due to the information barrier restrictions.
typestringoptional
The value will always be `error`.
Allowed:error
statusintegeroptional
The HTTP status of the response.
codestringoptional
A Box-specific error code.
Allowed:createdacceptedno_contentredirectnot_modifiedbad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictprecondition_failed
messagestringoptional
A short message describing the error.
context_infoobjectoptional
A free-form object that contains additional context about the error. The possible fields are defined on a per-endpoint basis. `message` is only one example.
help_urlstringoptional
A URL that links to more information about why this error occurred.
request_idstringoptional
A unique identifier for this response, which can be used when contacting Box support.
defaultAn unexpected client error.
typestringoptional
The value will always be `error`.
Allowed:error
statusintegeroptional
The HTTP status of the response.
codestringoptional
A Box-specific error code.
Allowed:createdacceptedno_contentredirectnot_modifiedbad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictprecondition_failed
messagestringoptional
A short message describing the error.
context_infoobjectoptional
A free-form object that contains additional context about the error. The possible fields are defined on a per-endpoint basis. `message` is only one example.
help_urlstringoptional
A URL that links to more information about why this error occurred.
request_idstringoptional
A unique identifier for this response, which can be used when contacting Box support.

Error handling

A 400 is returned: Returns an error if some of the parameters are missing or not valid.

  • invalid_parameter when a parameter is formatted incorrectly, for example when the notification_email has an incorrectly formatted email address. A 403 is returned: Returns an error if the user is not allowed to make the changes.

  • access_denied_insufficient_permissions when the user does not have the right permissions, for example when updating the notification email is turned off for the enterprise.

  • denied_by_policy when the user does not have the right permissions due to the information barrier restrictions. Any other status is an error: An unexpected client error.