- API Reference
- endpoint
- beta
- admin
Beta Admin Workspaces
Beta Admin Workspaces
GET /v1/admin/workspaces
Get Workspaces
List Workspaces in the Organization.
Security
AdminApiKey
bearerhttpParameters
page
integerqueryPage number to return.
page_size
integerqueryMaximum number of results per page.
is_archived
booleanqueryWhether to include archived Workspaces.
search
string | nullquerySearch term to filter Workspaces by name.
Responses
OK
Workspaces on this page.
WorkspaceOUT
description
string | null* requiredWorkspace description.
Example:
Workspace for product and design teams
groups_count
integer | nullNumber of groups assigned to the Workspace.
Example:
3
icon
string | null* requiredWorkspace icon.
Example:
★
is_default
boolean* requiredWhether this is the default Workspace for the Organization.
members_count
integer | nullNumber of members in the Workspace.
name
stringMax Length: 255* requiredWorkspace name.
Example:
Product Team
spend_limit
WorkspaceSpendLimitOUT | nullWorkspace spending limit.
WorkspaceSpendLimitOUT
Workspace spending limit.
currency
string | null* requiredCurrency used for the Workspace spending limit.
Example:
USD
no_monthly_limit
boolean | null* requiredWhether the Workspace has no monthly spending limit.
value
number | null* requiredMonthly spending limit for the Workspace.
uuid
string* requiredWorkspace ID.
object
"list"Type of paginated API object.
Default Value: "list"
page
integer* requiredPage number returned.
Example:
1
page_size
integer* requiredMaximum number of results per page.
Example:
25
total
integer* requiredTotal number of Workspaces that match the request.
Example:
3
POST /v1/admin/workspaces
Create Workspace
Create a Workspace.
Security
AdminApiKey
bearerhttpRequest Example
{
"admin_user_id": "ipsum eiusmod",
"name": "Product Team"
}
Request Body
add_all_org_members
booleanWhether to add all Organization members to the Workspace.
Default Value: false
admin_user_id
string* requiredUser ID to grant the Workspace Admin role to.
description
stringMax Length: 255Workspace description.
Example:
Workspace for product and design teams
Default Value: ""
icon
stringMax Length: 2Workspace icon.
Example:
★
Default Value: ""
name
stringMax Length: 255* requiredWorkspace name.
Example:
Product Team
Responses
OK
description
string | null* requiredWorkspace description.
Example:
Workspace for product and design teams
groups_count
integer | nullNumber of groups assigned to the Workspace.
Example:
3
icon
string | null* requiredWorkspace icon.
Example:
★
is_default
boolean* requiredWhether this is the default Workspace for the Organization.
members_count
integer | nullNumber of members in the Workspace.
name
stringMax Length: 255* requiredWorkspace name.
Example:
Product Team
raw_role
"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" | "0d48f530-095c-43fe-8aea-6673bcacabe6" | "c955f4e1-9477-43f0-8349-6fbc629fccc9" | "7bde5959-d676-47d2-b779-35b64323d278"* requiredDeprecated first role of 'raw_roles'. Use 'raw_roles' instead.
raw_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" | "0d48f530-095c-43fe-8aea-6673bcacabe6" | "c955f4e1-9477-43f0-8349-6fbc629fccc9" | "7bde5959-d676-47d2-b779-35b64323d278">Min Items: 1* requiredRoles granted for the Workspace.
role
string* requiredDeprecated name of the first role of 'raw_roles'. Use 'raw_roles' instead.
spend_limit
WorkspaceSpendLimitOUT | nullWorkspace spending limit.
WorkspaceSpendLimitOUT
Workspace spending limit.
currency
string | null* requiredCurrency used for the Workspace spending limit.
Example:
USD
no_monthly_limit
boolean | null* requiredWhether the Workspace has no monthly spending limit.
value
number | null* requiredMonthly spending limit for the Workspace.
uuid
string* requiredWorkspace ID.
DELETE /v1/admin/workspaces/{workspace_uuid}
Delete Workspace
Archive a Workspace.
Security
AdminApiKey
bearerhttpParameters
workspace_uuid
stringpath* requiredWorkspace ID.
PATCH /v1/admin/workspaces/{workspace_uuid}
Update Workspace
Update a Workspace.
Security
AdminApiKey
bearerhttpParameters
workspace_uuid
stringpath* requiredWorkspace ID.
Request Example
{}
Request Body
description
string | nullUpdated Workspace description.
Example:
Workspace for product and design teams
icon
string | nullUpdated Workspace icon.
Example:
★
name
string | nullUpdated Workspace name.
Example:
Product Team
Responses
OK
description
string | null* requiredWorkspace description.
Example:
Workspace for product and design teams
groups_count
integer | nullNumber of groups assigned to the Workspace.
Example:
3
icon
string | null* requiredWorkspace icon.
Example:
★
is_default
boolean* requiredWhether this is the default Workspace for the Organization.
members_count
integer | nullNumber of members in the Workspace.
name
stringMax Length: 255* requiredWorkspace name.
Example:
Product Team
spend_limit
WorkspaceSpendLimitOUT | nullWorkspace spending limit.
WorkspaceSpendLimitOUT
Workspace spending limit.
currency
string | null* requiredCurrency used for the Workspace spending limit.
Example:
USD
no_monthly_limit
boolean | null* requiredWhether the Workspace has no monthly spending limit.
value
number | null* requiredMonthly spending limit for the Workspace.
uuid
string* requiredWorkspace ID.
GET /v1/admin/workspaces/{workspace_uuid}/users
List Workspace Users
List the members of a Workspace, direct or through a group, with their roles.
Security
AdminApiKey
bearerhttpParameters
workspace_uuid
stringpath* requiredWorkspace ID.
page
integerqueryPage number to return.
page_size
integerqueryMaximum number of results per page.
include_inactive
booleanqueryWhether to include deactivated and blocked members.
Responses
OK
Members of the Workspace on this page, direct or through a group.
AdminWorkspaceMemberOUT
direct_member
boolean* requiredWhether the user is a direct member of the Workspace. Members who only belong to it through a group are managed by changing the group.
Example:
true
Email address of the Workspace member.
Example:
alice.martin@example.com
externally_managed
boolean* requiredWhether the member is managed by an external identity provider, through SSO or SCIM.
Example:
false
Groups assigned to the Workspace that grant the member roles, with the roles each one grants.
AdminWorkspaceGroupGrantOUT
group_id
string* requiredID of the group assigned to the Workspace.
group_name
string* requiredName of the group assigned to the Workspace.
Example:
Engineering
roles
array<"user" | "dev" | "mistral_code_user" | "cloud_user" | "workspace_contributor" | "workspace_admin">* requiredNames of the Workspace roles the group assignment grants.
name
string | null* requiredName of the Workspace member.
Example:
Alice Martin
roles
array<"user" | "dev" | "mistral_code_user" | "cloud_user" | "workspace_contributor" | "workspace_admin">* requiredNames of the Workspace roles assigned directly to the member.
status
"active" | "deactivated" | "blocked"* requireduser_id
string* requiredUser ID of the Workspace member.
page
integer* requiredPage number returned.
Example:
1
page_size
integer* requiredMaximum number of results per page.
Example:
25
total
integer* requiredTotal number of members of the Workspace.
Example:
42
PATCH /v1/admin/workspaces/{workspace_uuid}/users
Add Or Update Users Workspaces
Add or update Workspace members.
For each member, either set its roles with roles or role_names, which replaces all the roles it has in the Workspace, or change them with add_roles/add_role_names and remove_roles/remove_role_names, which keeps its other roles. Users who are not yet members are added with the given roles.
Security
AdminApiKey
bearerhttpParameters
workspace_uuid
stringpath* requiredWorkspace ID.
Request Example
{}
Request Body
members
array<AdminWorkspaceMemberUpsertSingleIN> | nullWorkspace members to add or update. 'roles' or 'role_names' replace the member's roles; 'add_' and 'remove_' change them without touching the others.
AdminWorkspaceMemberUpsertSingleIN
Workspace member to add or update, either by setting its roles or by adding and removing some.
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" | nullDeprecated legacy single role value, kept for backward compatibility. Mutually exclusive with 'role_name'.
role_name
"user" | "dev" | "mistral_code_user" | "cloud_user" | "workspace_contributor" | "workspace_admin"Deprecated single role name, kept for backward compatibility. Mutually exclusive with 'role'.
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"> | 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"> | nullRole values to assign. Mutually exclusive with 'role_names'.
user_uuid
string* requiredUser ID of the Workspace member.
Responses
OK
added_members_count
integer* requiredNumber of users added to the Workspace.
Example:
1
updated_members_count
integer* requiredNumber of Workspace members updated.
Example:
0
POST /v1/admin/workspaces/{workspace_uuid}/add-users
Add Users Workspaces
Add members to a Workspace.
Security
AdminApiKey
bearerhttpParameters
workspace_uuid
stringpath* requiredWorkspace ID.
Request Example
{}
Request Body
members
array<AdminWorkspaceMemberSingleIN> | nullWorkspace members to add or update.
AdminWorkspaceMemberSingleIN
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" | nullDeprecated legacy single role value, kept for backward compatibility. Mutually exclusive with 'role_name'.
role_name
"user" | "dev" | "mistral_code_user" | "cloud_user" | "workspace_contributor" | "workspace_admin"Deprecated single role name, kept for backward compatibility. Mutually exclusive with 'role'.
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"> | 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"> | nullRole values to assign. Mutually exclusive with 'role_names'.
user_uuid
string* requiredUser ID of the Workspace member.
Responses
OK
added_members_count
integer* requiredNumber of users added to the Workspace.
Example:
1
DELETE /v1/admin/workspaces/{workspace_uuid}/remove-users
Remove Users Workspaces
Remove members from a Workspace.
Security
AdminApiKey
bearerhttpParameters
workspace_uuid
stringpath* requiredWorkspace ID.
Request Example
{
"members": [
{
"user_uuid": "ipsum eiusmod"
}
]
}
Request Body
Workspace members to remove.
BaseWorkspaceMemberIN
user_uuid
string* requiredUser ID of the Workspace member.
Responses
OK
deleted_members_count
integer* requiredNumber of Workspace members removed.
Example:
1
not_deleted_members
array<string> | nullUsers that could not be removed.