Whether to include archived Workspaces.













Beta Admin Workspaces Endpoints
(beta) Admin API - manage workspaces. Requires an admin API key.












Examples
Real world code examples
Playground
Test the endpoints live
curl https://api.mistral.ai/v1/admin/workspaces \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'curl https://api.mistral.ai/v1/admin/workspaces \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'200
{
"items": [
{
"description": null,
"icon": null,
"is_default": false,
"name": "Product Team",
"uuid": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}
],
"page": "1",
"page_size": "1000",
"total": 56
}{
"items": [
{
"description": null,
"icon": null,
"is_default": false,
"name": "Product Team",
"uuid": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}
],
"page": "1",
"page_size": "1000",
"total": 56
}Create Workspace
POST /v1/admin/workspaces#
Create a Workspace.
AdminApiKey#
200
OK
Whether this is the default Workspace for the Organization.
members_count#
Number of members in the Workspace.
raw_role#
Deprecated single role for the Workspace. Use 'raw_roles' instead.
raw_roles#
Roles granted for the Workspace.
Playground
Test the endpoints live
curl https://api.mistral.ai/v1/admin/workspaces \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"admin_user_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"name": "Product Team"
}'curl https://api.mistral.ai/v1/admin/workspaces \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"admin_user_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"name": "Product Team"
}'200
{
"description": null,
"icon": null,
"is_default": false,
"name": "Product Team",
"raw_role": "A",
"raw_roles": [
"A"
],
"uuid": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}{
"description": null,
"icon": null,
"is_default": false,
"name": "Product Team",
"raw_role": "A",
"raw_roles": [
"A"
],
"uuid": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}Delete Workspaces
DELETE /v1/admin/workspaces/{workspace_uuid}#
Archive a Workspace.
AdminApiKey#
Workspace ID.
Playground
Test the endpoints live
curl https://api.mistral.ai/v1/admin/workspaces/{workspace_uuid} \
-X DELETE \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json'curl https://api.mistral.ai/v1/admin/workspaces/{workspace_uuid} \
-X DELETE \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json'Update Workspaces
PATCH /v1/admin/workspaces/{workspace_uuid}#
Update a Workspace.
AdminApiKey#
Workspace ID.
200
OK
Whether this is the default Workspace for the Organization.
members_count#
Number of members in the Workspace.
Playground
Test the endpoints live
curl https://api.mistral.ai/v1/admin/workspaces/{workspace_uuid} \
-X PATCH \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{}'curl https://api.mistral.ai/v1/admin/workspaces/{workspace_uuid} \
-X PATCH \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{}'200
{
"description": null,
"icon": null,
"is_default": false,
"name": "Product Team",
"uuid": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}{
"description": null,
"icon": null,
"is_default": false,
"name": "Product Team",
"uuid": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}Add Users Workspaces
POST /v1/admin/workspaces/{workspace_uuid}/add-users#
Add members to a Workspace.
AdminApiKey#
Workspace ID.
200
OK
Number of users added to the Workspace.
Playground
Test the endpoints live
curl https://api.mistral.ai/v1/admin/workspaces/{workspace_uuid}/add-users \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{}'curl https://api.mistral.ai/v1/admin/workspaces/{workspace_uuid}/add-users \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{}'200
{
"added_members_count": 87
}{
"added_members_count": 87
}Add Or Update Users Workspaces
PATCH /v1/admin/workspaces/{workspace_uuid}/users#
Add or update Workspace members.
AdminApiKey#
Workspace ID.
Playground
Test the endpoints live
curl https://api.mistral.ai/v1/admin/workspaces/{workspace_uuid}/users \
-X PATCH \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{}'curl https://api.mistral.ai/v1/admin/workspaces/{workspace_uuid}/users \
-X PATCH \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{}'200
{
"added_members_count": 87,
"updated_members_count": 14
}{
"added_members_count": 87,
"updated_members_count": 14
}Remove Users Workspaces
DELETE /v1/admin/workspaces/{workspace_uuid}/remove-users#
Remove members from a Workspace.
AdminApiKey#
Workspace ID.
Playground
Test the endpoints live
curl https://api.mistral.ai/v1/admin/workspaces/{workspace_uuid}/remove-users \
-X DELETE \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"members": [
{
"user_uuid": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}
]
}'curl https://api.mistral.ai/v1/admin/workspaces/{workspace_uuid}/remove-users \
-X DELETE \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"members": [
{
"user_uuid": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}
]
}'200
{
"deleted_members_count": 87
}{
"deleted_members_count": 87
}