Groups
Create a group
POST
/v1/groupsAdds an empty group, at the top level or inside another one. Two active groups with the same parent can't share a name, so a retried create can't make a second one: it answers 409 with data.groupId, the group the first attempt made.
Needs a key with the group:write scope.
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
201: The group was created.
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.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.