Creates a new managed user in an enterprise. This endpoint is only available to users and applications with the right admin permissions.
id,type,nameA 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.
900 Jefferson Ave, Redwood City, CA 94063255The user’s address
trueWhether the user can see other enterprise users in their contact list
my-user-1234An 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.
trueWhether to exempt the user from enterprise device limits
trueWhether the user must use two-factor authentication
trueWhether the user is allowed to collaborate with users outside their enterprise
trueSpecifies that the user is an app user.
trueWhether the user can use Box Sync
CEO100The user’s job title
enThe language of the user, formatted in modified version of the ISO 639-1 format.
boss@box.comThe email address the user uses to log in
Required, unless is_platform_access_only
is set to true.
Aaron Levie50The name of the user
6509241374100The user’s phone number
userThe user’s enterprise role
Value is one of coadmin,user
11345156112The user’s total available space in bytes. Set this to -1 to
indicate unlimited storage.
activeThe user's account status
Value is one of active,inactive,cannot_delete_edit,cannot_delete_edit_upload
Africa/BujumburaThe user's timezone
["code1: 12345"]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.
Returns a user object for the newly created user.
An unexpected client error.
curl -X POST https://api.box.com/2.0/users \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
-H 'Content-Type: application/json" '
-d '{
"login": "ceo@example.com",
"name": "Aaron Levie"
}'var userParams = new BoxUserRequest()
{
Name = "Example User",
Login = "user@example.com"
};
BoxUser newUser = await client.UsersManager.CreateEnterpriseUserAsync(userParams);BoxUser.Info createdUserInfo = BoxUser.createEnterpriseUser(api, "user@example.com", "A User");new_user = client.create_user('Dummy User', 'user@example.com')client.enterprise.addUser(
'eddard@winterfell.example.com',
'Ned Stark',
{
role: client.enterprise.userRoles.COADMIN,
address: '555 Box Lane',
status: client.enterprise.userStatuses.CANNOT_DELETE_OR_EDIT
})
.then(user => {
/* user -> {
type: 'user',
id: '44444',
name: 'Ned Stark',
login: 'eddard@winterfell.example.com',
created_at: '2012-11-15T16:34:28-08:00',
modified_at: '2012-11-15T16:34:29-08:00',
role: 'coadmin',
language: 'en',
timezone: 'America/Los_Angeles',
space_amount: 5368709120,
space_used: 0,
max_upload_size: 2147483648,
status: 'active',
job_title: '',
phone: '',
address: '555 Box Lane',
avatar_url: 'https://www.box.com/api/avatar/large/deprecated' }
*/
});client.users.create(login: "new.user@example.com", name: "New User") { (result: Result<User, BoxSDKError>) in
guard case let .success(user) = result else {
print("Error creating user")
return
}
print("Created user \(user.name), with login \(user.login)")
}