Sample - Box Platform API
POST/users

Create user

Creates a new managed 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.

1 parameter · 18 body fields
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.
namestringrequired
The name of the user.
loginstringoptional
The email address the user uses to log in Required, unless `is_platform_access_only` is set to `true`.
is_platform_access_onlybooleanoptional
Specifies that the user is an app user.
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.
space_amountintegeroptional
The user’s total available space in bytes. Set this to `-1` to indicate unlimited storage.
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.
statusstringoptional
The user's account status.
Allowed:activeinactivecannot_delete_editcannot_delete_edit_upload
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.

2 status codes
201Returns a user object for the newly created user.
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.
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

Any other status is an error: An unexpected client error.