Organization Groups
Organization Groups endpoints of the bizSupply API.
GET /api/v1/organizations/{orgId}/groups
List the organization's groups with member counts (members:read).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
orgId | path | yes | Organization UUID. |
Responses
| Status | Description |
|---|---|
200 | Groups, ordered by name |
403 | MEMBERS_PERMISSION_REQUIRED |
POST /api/v1/organizations/{orgId}/groups
Create a group (groups:manage).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
orgId | path | yes | Organization UUID. |
Request body
application/json→CreateUserGroupRequest
Responses
| Status | Description |
|---|---|
201 | The created group |
400 | GROUP_NAME_INVALID or GROUP_DESCRIPTION_INVALID |
409 | GROUP_NAME_TAKEN |
PATCH /api/v1/organizations/{orgId}/groups/{groupId}
Rename or re-describe a group (groups:manage).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
orgId | path | yes | Organization UUID. |
groupId | path | yes | Group UUID. |
Request body
application/json→UpdateUserGroupRequest
Responses
| Status | Description |
|---|---|
200 | The updated group |
404 | GROUP_NOT_FOUND |
409 | GROUP_NAME_TAKEN |
DELETE /api/v1/organizations/{orgId}/groups/{groupId}
Delete a group and its memberships (groups:manage).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
orgId | path | yes | Organization UUID. |
groupId | path | yes | Group UUID. |
Responses
| Status | Description |
|---|---|
204 | Deleted |
404 | GROUP_NOT_FOUND |
GET /api/v1/organizations/{orgId}/groups/{groupId}/members
List a group's members (members:read).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
orgId | path | yes | Organization UUID. |
groupId | path | yes | Group UUID. |
Responses
| Status | Description |
|---|---|
200 | Members, oldest first |
404 | GROUP_NOT_FOUND |
PUT /api/v1/organizations/{orgId}/groups/{groupId}/members/{userId}
Add a member to a group; idempotent (groups:manage).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
orgId | path | yes | Organization UUID. |
groupId | path | yes | Group UUID. |
userId | path | yes | User UUID. |
Responses
| Status | Description |
|---|---|
204 | Added, or already a member |
400 | GROUP_MEMBER_NOT_IN_ORGANIZATION |
403 | SELF_GRANT_FORBIDDEN, TARGET_TIER_TOO_HIGH or ROLE_GRANT_EXCEEDS_YOUR_ACCESS |
409 | GROUP_MEMBERSHIP_LIMIT or GROUP_MEMBERSHIP_READ_ONLY (IdP group) |
DELETE /api/v1/organizations/{orgId}/groups/{groupId}/members/{userId}
Remove a member from a group; idempotent (groups:manage).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
orgId | path | yes | Organization UUID. |
groupId | path | yes | Group UUID. |
userId | path | yes | User UUID. |
Responses
| Status | Description |
|---|---|
204 | Removed, or was not a member |
403 | TARGET_TIER_TOO_HIGH |
409 | GROUP_MEMBERSHIP_READ_ONLY (IdP group) |
PUT /api/v1/organizations/{orgId}/groups/{groupId}/roles/{role}
Give a group a functional role (groups:manage; T2 roles only).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
orgId | path | yes | Organization UUID. |
groupId | path | yes | Group UUID. |
role | path | yes | Functional role id. |
Responses
| Status | Description |
|---|---|
204 | Assigned, or already held |
400 | GROUP_ROLE_NOT_ALLOWED or ROLE_UNKNOWN |
403 | SELF_GRANT_FORBIDDEN (you are in the group) or ROLE_GRANT_EXCEEDS_YOUR_ACCESS |
404 | GROUP_NOT_FOUND |
DELETE /api/v1/organizations/{orgId}/groups/{groupId}/roles/{role}
Remove a functional role from a group (groups:manage).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
orgId | path | yes | Organization UUID. |
groupId | path | yes | Group UUID. |
role | path | yes | Functional role id. |
Responses
| Status | Description |
|---|---|
204 | Removed, or was not held |
400 | ROLE_UNKNOWN |
403 | ROLE_GRANT_OWNER_ONLY |
404 | GROUP_NOT_FOUND |