The Create User call adds a user associated with the base account, and with default values for admin roles, etc. Required values for this call are an email and first and last name. You must also assign a new user either a licenseKey or an adminRole. Admin roles are defined in Implementation. In addition, you can optionally assign a user to a group, define their locale, and you can set the email content this user will receive to inform them of their addition to the admin roles.

NOTE: You cannot create a user with an admin or manager role if that user has hasAdminAccess set to false. This is generally an internal-only setting and should not impact outside developers.

The response is an array of email-key binding objects. Each object contains an 'email' property and may contain a 'key' property. The key property may be absent if the corresponding email conflicted with an existing email. The request parameter 'allOrNothing' with a value of true or false may be provided to control the outcome of email conflicts. The default value for this parameter is 'true'. If set to true, a 409 Conflict response is returned upon email conflicts. If set to false, a 200 OK response is returned upon email conflicts. Emails already in use will not have a corresponding user key in the response.

See Manage Users for other user functions.

Parameters

Name Required Data Type Value Range Description
allOrNothing No boolean True/False controls the outcome of email conflicts: if True, a 409 Conflict response is returned on email conflicts; if False, a 200 OK response is returned.

Roles

SUPER_USER

ADD_USERS

URL

https://api.getgo.com/admin/rest/v1/accounts/{accountKey}/users

Method

POST

Response Type

JSON

HTTP Request Example

POST
https://api.getgo.com/admin/rest/v1/accounts/8830995/users
HTTP 1.1
Accept: application/json
Content-type: application/json
Authorization: OAuth oauth_token= ZlUe11FakEyCWxtOkeN3wk0uTKuL
{
 "users":[
  {
  "email":"Juvene.Loral@realwhirled.org",
  "firstName":"Juvene",
  "lastName":"Loral",
  "locale":"en_US"
  }
 ],
 "adminRoles":["MANAGE_USERS","MANAGE_SEATS"],
 "managedGroupKeys":["111","555"],
 "licenseKeys":[1000,4000,9000],
 "groupKey":111,
 "emailContent":
 {
  "subject":"Welcome to GoToMeeting Admin APIs",
  "text":"You have been added as a user to the GoToMeeting Admin APIs. Log in using your email as User ID at developer.logmein.com."
 }
}

Response Example

200 OK
 [
   {
    "email":"Juvene.Loral@realwhirled.org",
    "key":"345",
   }
 ]

Status Codes

Status Code Field/Rejected Value Description
400 Bad Request request.users.required users Users are required
400 Bad Request request.users.maxlength users Users array exceeds 100 items
400 Bad Request request.users.nonulls users Users array contains a null value
400 Bad Request request.licensekeys.nonulls licenseKeys License keys array contains null
400 Bad Request request.managedgroupkeys.nonulls managedGroupKeys Group keys array contains null
400 Bad Request request.roles.required   Request does not contain a user role
400 Bad Request user.email.invalid users[].email User email is invalid
400 Bad Request user.email.required users[].email User email is required
400 Bad Request user.email.maxlength users[].email User email exceeds 128 characters
400 Bad Request user.firstname.required users[].firstName User first name is required
400 Bad Request user.firstname.maxlength users[].firstName User first name exceeds 32 characters
400 Bad Request user.firstname.invalid users[].firstName User first name is invalid
400 Bad Request user.lastname.required users[].lastName User last name is required
400 Bad Request user.lastname.maxlength users[].lastName User last name exceeds 32 characters
400 Bad Request user.lastname.invalid users[].lastName User last name is invalid
400 Bad Request user.locale.invalid users[].locale User locale is invalid
400 Bad Request emailcontent.subject.maxlength emailContent.subject Email subject exceeds 150 characters
400 Bad Request emailcontent.subject.invalid emailContent.subject Email subject is invalid
400 Bad Request emailcontent.text.maxlength emailContent.text Email text exceeds 2000 characters
400 Bad Request emailcontent.text.invalid emailContent.text Email text is invalid
404 Not Found license.not.found License not found
404 Not Found group.not.found Group not found
409 Conflict user.email.conflict User email conflict
422 Unprocessable Entity license.insufficient.seats Insufficient license seats
422 Unprocessable Entity user.manager.caller managedGroupKeys Manager is not permitted to update roles or managed groups
507 Insufficient Storage capacity.exceeded.user   The user maximum per account of 10000 is exceeded.