- API Reference
- endpoint
- beta
- admin
Beta Admin User Groups
Beta Admin User Groups
GET /v1/admin/user-groups
Get User Groups
Get all user groups across the organization.
Security
AdminApiKey
bearerhttpParameters
page
integerqueryPage number to return.
page_size
integerqueryMaximum number of results per page.
search
string | nullquerySearch term used to filter user groups by name.
workspace_uuid
string | nullqueryFilter groups to those assigned to this Workspace. Assignments to archived Workspaces never match.
role
"user" | "dev" | "mistral_code_user" | "cloud_user" | "workspace_contributor" | "workspace_admin"queryFilter groups to those holding this role on a Workspace. When combined with workspace_uuid, the role must be held on that Workspace. Assignments to archived Workspaces never match.
Responses
OK
User groups on this page.
AdminUserGroupOut
description
string | null* requiredOptional description of the user group.
Example:
Members of the platform engineering team
externally_managed
boolean | nullWhether the group is managed by an external system.
name
stringMax Length: 255* requiredName of the user group.
Example:
Engineering Team
organization_role
string | nullOrganization role assigned to the group.
uuid
string* requiredUser group ID.
page
integer* requiredPage number returned.
Example:
1
page_size
integer* requiredMaximum number of results per page.
Example:
25
total
integer* requiredTotal number of user groups that match the request.
Example:
4
POST /v1/admin/user-groups
Create User Group
Create a new user group.
Security
AdminApiKey
bearerhttpRequest Example
{
"name": "Engineering Team"
}
Request Body
description
string | nullOptional description of the user group.
Example:
Members of the platform engineering team
name
stringMax Length: 255* requiredName of the user group.
Example:
Engineering Team
Responses
OK
description
string | null* requiredOptional description of the user group.
Example:
Members of the platform engineering team
externally_managed
boolean | nullWhether the group is managed by an external system.
name
stringMax Length: 255* requiredName of the user group.
Example:
Engineering Team
organization_role
string | nullOrganization role assigned to the group.
uuid
string* requiredUser group ID.
POST /v1/admin/user-groups/provision-workspace
Provision Group To Workspace
Deprecated: provision all users from a user group to a workspace with a specific role.
Use POST /user-groups/\{group_uuid\}/workspaces with role_names to assign the group to a workspace, and PATCH /user-groups/\{group_uuid\}/workspaces/\{workspace_uuid\} to change the roles of an existing assignment.
Security
AdminApiKey
bearerhttpRequest Example
{
"user_group_uuid": "ipsum eiusmod",
"workspace_uuid": "consequat do"
}
Request Body
user_group_uuid
string* requiredUser group ID to provision.
workspace_role
"A" | "M" | "48436751-ee56-44bd-8a2d-712233977821" | "578584f1-4319-4c88-9948-38a5184483b6" | "252a0825-40b9-4b98-be80-7658956f13e9" | "17aa61c5-1c61-477e-a40a-e52c8ccd74b9" | "b23cd6e0-91cd-4a8a-9869-b30366bf3966" | "731eb2be-a74f-4070-b797-35bf7009e553" | nullWorkspace role value to assign to the group. Mutually exclusive with 'workspace_role_name'.
workspace_role_name
"user" | "dev" | "mistral_code_user" | "cloud_user" | "workspace_contributor" | "workspace_admin"Workspace role name to assign to the group. Mutually exclusive with 'workspace_role'.
workspace_uuid
string* requiredWorkspace ID where the group is provisioned.
GET /v1/admin/user-groups/{group_uuid}
Get User Group
Get a specific user group.
Security
AdminApiKey
bearerhttpParameters
group_uuid
stringpath* requiredUser group ID.
Responses
OK
description
string | null* requiredOptional description of the user group.
Example:
Members of the platform engineering team
externally_managed
boolean | nullWhether the group is managed by an external system.
name
stringMax Length: 255* requiredName of the user group.
Example:
Engineering Team
organization_role
string | nullOrganization role assigned to the group.
uuid
string* requiredUser group ID.
DELETE /v1/admin/user-groups/{group_uuid}
Delete User Group
Delete a user group.
Security
AdminApiKey
bearerhttpParameters
group_uuid
stringpath* requiredUser group ID.
PATCH /v1/admin/user-groups/{group_uuid}
Update User Group
Update User Group
Security
AdminApiKey
bearerhttpParameters
group_uuid
stringpath* requiredRequest Example
{}
Request Body
description
string | nullUpdated description of the user group. Pass an empty string to clear it; omit the field or pass null to leave it unchanged.
Example:
Members of the platform engineering team
name
string | nullUpdated name of the user group.
Example:
Engineering Team
Responses
OK
description
string | null* requiredOptional description of the user group.
Example:
Members of the platform engineering team
externally_managed
boolean | nullWhether the group is managed by an external system.
name
stringMax Length: 255* requiredName of the user group.
Example:
Engineering Team
organization_role
string | nullOrganization role assigned to the group.
uuid
string* requiredUser group ID.
GET /v1/admin/user-groups/{group_uuid}/members
Get User Group Members
Get members of a user group.
Security
AdminApiKey
bearerhttpParameters
group_uuid
stringpath* requiredUser group ID.
page
integerqueryPage number to return.
page_size
integerqueryMaximum number of results per page.
Responses
OK
Group members on this page.
AdminUserGroupMemberOut
Email address of the group member.
Example:
alice.martin@example.com
name
string | null* requiredName of the group member.
Example:
Alice Martin
user_uuid
string* requiredUser ID of the group member.
page
integer* requiredPage number returned.
Example:
1
page_size
integer* requiredMaximum number of results per page.
Example:
25
total
integer* requiredTotal number of group members that match the request.
Example:
12
POST /v1/admin/user-groups/{group_uuid}/members
Assign Users To Group
Assign users to a user group.
Security
AdminApiKey
bearerhttpParameters
group_uuid
stringpath* requiredRequest Example
{
"user_uuids": [
"ipsum eiusmod"
]
}
Request Body
user_uuids
array<string>Max Items: 1000* requiredUser IDs to add to the group.
DELETE /v1/admin/user-groups/{group_uuid}/members
Remove Users From Group
Remove users from a user group.
Security
AdminApiKey
bearerhttpParameters
group_uuid
stringpath* requiredRequest Example
{
"user_uuids": [
"ipsum eiusmod"
]
}
Request Body
user_uuids
array<string>Max Items: 1000* requiredUser IDs to add to the group.
GET /v1/admin/user-groups/{group_uuid}/workspaces
Get Group Workspace Assignments
List workspace assignments for a user group.
Security
AdminApiKey
bearerhttpParameters
group_uuid
stringpath* requiredUser group ID.
page
integerqueryPage number to return.
page_size
integerqueryMaximum number of results per page.
Responses
OK
Workspace assignments on this page.
GroupWorkspaceAssignmentOut
created
date-time* requiredrole_name
string | nullDeprecated: Workspace assignments now support multiple roles. This field only contains the name of the first entry in roles; use roles instead.
role_uuid
string | nullDeprecated: Workspace assignments now support multiple roles. This field only contains the UUID of the first entry in roles; use roles instead.
WorkspaceRoleRef
name
string* requireduuid
string* requiredworkspace_name
string* requiredName of the Workspace.
Example:
Product Team
workspace_uuid
string* requiredpage
integer* requiredPage number returned.
Example:
1
page_size
integer* requiredMaximum number of results per page.
Example:
25
total
integer* requiredTotal number of Workspace assignments that match the request.
Example:
2
POST /v1/admin/user-groups/{group_uuid}/workspaces
Assign Group To Workspace
Assign a user group to a workspace.
Security
AdminApiKey
bearerhttpParameters
group_uuid
stringpath* requiredUser group ID.
Request Example
{
"workspace_uuid": "ipsum eiusmod"
}
Request Body
role
"A" | "M" | "48436751-ee56-44bd-8a2d-712233977821" | "578584f1-4319-4c88-9948-38a5184483b6" | "252a0825-40b9-4b98-be80-7658956f13e9" | "17aa61c5-1c61-477e-a40a-e52c8ccd74b9" | "b23cd6e0-91cd-4a8a-9869-b30366bf3966" | "731eb2be-a74f-4070-b797-35bf7009e553"role_names
array<"user" | "dev" | "mistral_code_user" | "cloud_user" | "workspace_contributor" | "workspace_admin"> | nullSimplified role names to assign. Mutually exclusive with 'roles'.
roles
array<"A" | "M" | "48436751-ee56-44bd-8a2d-712233977821" | "578584f1-4319-4c88-9948-38a5184483b6" | "252a0825-40b9-4b98-be80-7658956f13e9" | "17aa61c5-1c61-477e-a40a-e52c8ccd74b9" | "b23cd6e0-91cd-4a8a-9869-b30366bf3966" | "731eb2be-a74f-4070-b797-35bf7009e553"> | nullRole values to assign. Mutually exclusive with 'role_names'.
workspace_uuid
string* requiredDELETE /v1/admin/user-groups/{group_uuid}/workspaces/{workspace_uuid}
Remove Group From Workspace
Remove a user group from a workspace.
Security
AdminApiKey
bearerhttpParameters
group_uuid
stringpath* requiredUser group ID.
workspace_uuid
stringpath* requiredWorkspace ID.
PATCH /v1/admin/user-groups/{group_uuid}/workspaces/{workspace_uuid}
Update Group Workspace Assignment
Update the workspace role assignment for a user group.
Either set the group's roles with role_names or roles, which replaces all the roles it has on the Workspace, or change them with add_role_names/add_roles and remove_role_names/remove_roles, which keeps its other roles.
Security
AdminApiKey
bearerhttpParameters
group_uuid
stringpath* requiredUser group ID.
workspace_uuid
stringpath* requiredWorkspace ID.
Request Example
{}
Request Body
Either set the group's roles on the Workspace, or add and remove some of them.
add_role_names
array<"user" | "dev" | "mistral_code_user" | "cloud_user" | "workspace_contributor" | "workspace_admin"> | nullSimplified role names to add to the existing roles. Mutually exclusive with 'add_roles'.
add_roles
array<"48436751-ee56-44bd-8a2d-712233977821" | "578584f1-4319-4c88-9948-38a5184483b6" | "252a0825-40b9-4b98-be80-7658956f13e9" | "17aa61c5-1c61-477e-a40a-e52c8ccd74b9" | "b23cd6e0-91cd-4a8a-9869-b30366bf3966" | "731eb2be-a74f-4070-b797-35bf7009e553">Min Items: 1Workspace roles assigned to the member.
remove_role_names
array<"user" | "dev" | "mistral_code_user" | "cloud_user" | "workspace_contributor" | "workspace_admin"> | nullSimplified role names to remove from the existing roles. Mutually exclusive with 'remove_roles'.
remove_roles
array<"48436751-ee56-44bd-8a2d-712233977821" | "578584f1-4319-4c88-9948-38a5184483b6" | "252a0825-40b9-4b98-be80-7658956f13e9" | "17aa61c5-1c61-477e-a40a-e52c8ccd74b9" | "b23cd6e0-91cd-4a8a-9869-b30366bf3966" | "731eb2be-a74f-4070-b797-35bf7009e553">Min Items: 1Workspace roles assigned to the member.
role
"A" | "M" | "48436751-ee56-44bd-8a2d-712233977821" | "578584f1-4319-4c88-9948-38a5184483b6" | "252a0825-40b9-4b98-be80-7658956f13e9" | "17aa61c5-1c61-477e-a40a-e52c8ccd74b9" | "b23cd6e0-91cd-4a8a-9869-b30366bf3966" | "731eb2be-a74f-4070-b797-35bf7009e553"role_names
array<"user" | "dev" | "mistral_code_user" | "cloud_user" | "workspace_contributor" | "workspace_admin"> | nullSimplified role names to assign. Mutually exclusive with 'roles'.
roles
array<"A" | "M" | "48436751-ee56-44bd-8a2d-712233977821" | "578584f1-4319-4c88-9948-38a5184483b6" | "252a0825-40b9-4b98-be80-7658956f13e9" | "17aa61c5-1c61-477e-a40a-e52c8ccd74b9" | "b23cd6e0-91cd-4a8a-9869-b30366bf3966" | "731eb2be-a74f-4070-b797-35bf7009e553"> | nullRole values to assign. Mutually exclusive with 'role_names'.
PATCH /v1/admin/user-groups/{group_uuid}/organization-role
Update User Group Organization Role
Update the organization role for a user group.
Security
AdminApiKey
bearerhttpParameters
group_uuid
stringpath* requiredUser group ID.
Request Example
{
"organization_role": "member"
}
Request Body
organization_role
"member" | "billing_manager" | "organization_admin" | "A" | "M" | "B" | "0d48f530-095c-43fe-8aea-6673bcacabe6" | "c955f4e1-9477-43f0-8349-6fbc629fccc9" | "7bde5959-d676-47d2-b779-35b64323d278"* requiredOrganization role to assign to the group: a role name (member, billing_manager, organization_admin) or a role UUID.