Adds one or more members to a group.
This operation supports both single-object and bulk semantics. For more information, see Optional Bulk Operations.
If called with a single GroupMember object, and that group member already exists, error code 1129 is returned. If called with an array of GroupMember objects, any users specified in the array that are already group members are ignored and omitted from the response.
This operation is only available to group administrators and system administrators.
groupId required | number Group Id |
Authorization | string API Access Token used to authenticate requests to Smartsheet APIs. Example: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789 |
id | number Group member's user Id. |
string <email> Group member's email address. | |
firstName | string Group member's first name. |
lastName | string Group member's last name. |
name | string Group member's full name. |
[ ]
{- "message": "SUCCESS",
- "resultCode": 0,
- "result": {
- "id": 2331373580117892,
- "email": "john.doe@smartsheet.com",
- "firstName": "John",
- "lastName": "Doe",
- "name": "John Doe"
}
}
Removes a member from a group.
This operation is only available to group administrators and system administrators.
groupId required | number Group Id |
userId required | number User Id |
Authorization | string API Access Token used to authenticate requests to Smartsheet APIs. Example: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789 |
curl https://api.smartsheet.com/2.0/groups/{groupId}/members/{userId} \ -H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" \ -X DELETE
{- "message": "SUCCESS",
- "resultCode": 0
}