Skip to main content

AddWorkspaceUsers

Create a new user for a group in a specific workspace

Description

Add multiple users to a group in a specified workspace.

Executive Authority

  • Workspace Administrator
    • Can be added to each group
  • Group Administrator
    • Can be added to a group to which the user belongs or a subordinate group
  • Other General Users
    • Unavailable

Method

POST

Request URL Format

/api/v0/workspaces/:workspace-id/users

URL Params

workspace-id    : Workspace ID

Payload

Content-Type : application/json

Parameter1DescriptionData TypeRequiredRemarks
usersInclude information about the user you want to add to the groupObject arrayRequiredAddUserAPI Multiple Payloads can be set

Payload Example

{
"users": [
{
"email": "[email protected]",
"g_id": "xxxxxxxxxxxxxxx",
"username": "xxxxxxxx",
"send_password_to_email": true,
"sender_address": "[email protected]",
"conf_email_template_id": "xxxxxxxxxxxxxxx",
"confirm_email_ack": true,
"exclusive_w_id": "xxxxxxxxxxxxxxx",
"user_code": "xxxxxxxxxx"
},
{
"email": "[email protected]",
"g_id": "xxxxxxxxxxxxxxx",
"username": "xxxxxxxx",
"no_confirm_email": true,
"tmp_password": "xxxxxxxx",
"invitor_id": "xxxxxxxxxxxxxxx",
"confirm_email_ack": false
}
]
}

Response Example

Normal Time

{
"errors": null,
"result": [
{
"added": false, //("bool added or not")
"exists": false, //("bool Already an existing user false=new, nonexistent new user")
"user_profile": { //("User profile object")
"confirmed": false, //("bool user email confirmed, false=not confirmed on email")
"email": "登録されたユーザーのemail",
"email_sent": false, //("bool email has been sent. false=email has already been sent to the target email")
"profile_pics": [//("User profile image objects")
{
"mediaLink": "https://storage.googleapis.com/linker/pub/default.png" //("Location of images used in user profiles")
}
],
"u_id": "登録されたユーザーのID",
"username": "登録されたユーザー名"
}
}
]
}

When an error occurs

Insufficient request parameters, etc.

{
"error_code": "INVALID_PARAMS",
"message": "invalid parameter"
}

The maximum number of batch user registrations exceeded

{
"error": "the maximum registration limit has been exceeded",
"error_code": "INVALID_PARAMS"
}

Lack of authority by the API operator

{
"errors": [
// If the additional operator was not either the workspace administrator or group administrator
{
"email": {追加対象メールアドレス},
"message": "not admin or group admin to workspace with given workspace_id",
"user_code": {追加対象ユーザーコード(存在したら)},
},
// Other errors
{
"email": {追加対象メールアドレス},
"message": "InternalServerError",
"user_code": {追加対象ユーザーコード(存在したら)},
}
],
"result": [
{
"added": false, //("bool added or not")
"exists": false, //("bool Already existing user false=new, non-existent new user")
"user_profile": { //("User profile object")
"confirmed": false, //("bool user email confirmed, false=not confirmed on email")
"email": "登録されたユーザーのemail",
"email_sent": false, //("bool email has been sent. false=email has already been sent to the target email")
"profile_pics": [//("User profile image objects")
{
"mediaLink": "https://storage.googleapis.com/linker/pub/default.png" //("Location of images used in user profiles")
}
],
"u_id": "登録されたユーザーのID",
"username": "登録されたユーザー名"
}
}
]
}