Groups
Update a group
PATCH
/v1/groups/{id}Renames a group, changes its type, or moves it. Moving a group moves its members in or out of every program that targets a group above it, old or new. Changes only the fields you send, and sending the same change again is safe.
Needs a key with the group:write scope.
Path parameters
idstringThe group's ID.
Body
namestringWhat to call it. Two active groups with the same parent can't share a name, whatever the capitals.
typestring or nullWhat kind of group it is, such as
departmentorteam. Any text you like.parentGroupIdstring or nullThe active group to put it inside.
nullor left out makes it a top-level group.
Response
200: The group after the change.
idstringThe group's ID.
namestring or nullThe group's name.
typestring or nullWhat kind of group it is, such as
departmentorteam.parentGroupIdstring or nullThe group this one sits inside.
memberCountintegerActive employees in this group and the groups inside it.
Errors
400REQUEST_BODY_INVALID: The body has a field that is unknown, missing or out of range.API_QUERY_INVALID: A query parameter, or an ID in the path, is unknown or not in the right form.401API_KEY_INVALID: The key is missing, wrong, expired or revoked.403API_KEY_SCOPE_MISSING: The key is valid but wasn't given the scope this endpoint needs.PLAN_UPGRADE_REQUIRED: Your plan doesn't include the API.COMPANY_CLOSED: Your company has closed its Teambrite account.404GROUP_NOT_FOUND: Your company has no active group with this ID.409GROUP_NAME_TAKEN: An active group with the same parent already has this name.GROUP_PARENT_INVALID: That parent would put the group inside itself or one of its own subgroups, or nest groups too deeply.411REQUEST_LENGTH_REQUIRED: The request didn't declare its length.413REQUEST_TOO_LARGE: The body is over 1 MB.429API_KEY_RATE_LIMITED: The key is over 600 requests a minute.