Add

Overview 

Creates a new account user based on the passed parameters

Syntax 

Add(1)

Function Properties 

OrdinalTypeDescription
1objectRequiredA JSON object representing the properties of the new account user

Example 

This sample code adds a new account user and specifies both a default business unit as well as associated business units for the user based on the provided external keys:

1var newUser = {
2    "Name" : "Andrea Cruz",
3    "UserID" : "acruz",
4    "Password" : "PASSWORD",
5    "Email" : "acruz@example.com",
6    "ClientID" : 123456789,
7    "DefaultBusinessUnitKey": "childBUKey",
8    "AssociatedBusinessUnits" : ["childBUKey", "grandchildBUKey"]
9};
10
11var status = AccountUser.Add(newUser);