Tree BG 1
Tree
Tree
TreeLeaves
TreeLeaves
Cat IdleGrassGrassRockRock

Beta Admin Workspaces Endpoints

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

Get Workspaces

GET /api/admin/workspaces

List Workspaces in the Organization.

200

OK

Workspaces on this page.

object
"list"

Default Value: "list"

Type of paginated API object.

page
*integer

Page number returned.

page_size
*integer

Maximum number of results per page.

total
*integer

Total number of Workspaces that match the request.

Playground

Test the endpoints live

curl https://api.mistral.ai/api/admin/workspaces \
 -X GET \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

200

{
  "items": [
    {
      "description": null,
      "icon": null,
      "is_default": false,
      "name": "My resource",
      "uuid": "019b2bd7-96e7-7219-8c0b-45a73da50088"
    }
  ],
  "page": "1",
  "page_size": "1000",
  "total": 56
}

Create Workspace

POST /api/admin/workspaces

Create a Workspace.

200

OK

description
*string|null

Workspace description.

icon
*string|null

Workspace icon.

is_default
*boolean

Whether this is the default Workspace for the Organization.

members_count
integer|null

Number of members in the Workspace.

name
*string

Workspace name.

raw_role
*"A"|"M"|"d7ea77c5-9260-41d0-ab26-52b5add3ee56"|"48436751-ee56-44bd-8a2d-712233977821"|"375cd0db-3bbe-4b79-80f3-954ccf04f3d1"|"578584f1-4319-4c88-9948-38a5184483b6"|"d79b3027-4eb2-4521-8722-825acfee7d8b"|"252a0825-40b9-4b98-be80-7658956f13e9"|"17aa61c5-1c61-477e-a40a-e52c8ccd74b9"|"b23cd6e0-91cd-4a8a-9869-b30366bf3966"|"731eb2be-a74f-4070-b797-35bf7009e553"|"ff86d432-7f27-47f8-b02f-b5c102ef6a55"|"0d48f530-095c-43fe-8aea-6673bcacabe6"|"c955f4e1-9477-43f0-8349-6fbc629fccc9"|"7bde5959-d676-47d2-b779-35b64323d278"

Deprecated single role for the Workspace. Use 'raw_roles' instead.

raw_roles
*array<"A"|"M"|"d7ea77c5-9260-41d0-ab26-52b5add3ee56"|"48436751-ee56-44bd-8a2d-712233977821"|"375cd0db-3bbe-4b79-80f3-954ccf04f3d1"|"578584f1-4319-4c88-9948-38a5184483b6"|"d79b3027-4eb2-4521-8722-825acfee7d8b"|"252a0825-40b9-4b98-be80-7658956f13e9"|"17aa61c5-1c61-477e-a40a-e52c8ccd74b9"|"b23cd6e0-91cd-4a8a-9869-b30366bf3966"|"731eb2be-a74f-4070-b797-35bf7009e553"|"ff86d432-7f27-47f8-b02f-b5c102ef6a55"|"0d48f530-095c-43fe-8aea-6673bcacabe6"|"c955f4e1-9477-43f0-8349-6fbc629fccc9"|"7bde5959-d676-47d2-b779-35b64323d278">

Roles granted for the Workspace.

spend_limit
WorkspaceSpendLimitOUT|null

Workspace spending limit.

uuid
*string

Workspace ID.

Playground

Test the endpoints live

curl https://api.mistral.ai/api/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": "My resource"
}'

200

{
  "description": null,
  "icon": null,
  "is_default": false,
  "name": "My resource",
  "raw_role": "A",
  "raw_roles": [
    "A"
  ],
  "uuid": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}

Delete Workspaces

DELETE /api/admin/workspaces/{workspace_uuid}

Archive a Workspace.

Playground

Test the endpoints live

curl https://api.mistral.ai/api/admin/workspaces/{workspace_uuid} \
 -X DELETE \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -H 'Content-Type: application/json'

Update Workspaces

PATCH /api/admin/workspaces/{workspace_uuid}

Update a Workspace.

200

OK

description
*string|null

Workspace description.

icon
*string|null

Workspace icon.

is_default
*boolean

Whether this is the default Workspace for the Organization.

members_count
integer|null

Number of members in the Workspace.

name
*string

Workspace name.

spend_limit
WorkspaceSpendLimitOUT|null

Workspace spending limit.

uuid
*string

Workspace ID.

Playground

Test the endpoints live

curl https://api.mistral.ai/api/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": "My resource",
  "uuid": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}

Add Users Workspaces

POST /api/admin/workspaces/{workspace_uuid}/add-users

Add members to a Workspace.

200

OK

added_members_count
*integer

Number of users added to the Workspace.

Playground

Test the endpoints live

curl https://api.mistral.ai/api/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
}

Add Or Update Users Workspaces

PATCH /api/admin/workspaces/{workspace_uuid}/users

Add or update Workspace members.

200

OK

added_members_count
*integer

Number of users added to the Workspace.

updated_members_count
*integer

Number of Workspace members updated.

Playground

Test the endpoints live

curl https://api.mistral.ai/api/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
}

Remove Users Workspaces

DELETE /api/admin/workspaces/{workspace_uuid}/remove-users

Remove members from a Workspace.

200

OK

deleted_members_count
*integer

Number of Workspace members removed.

not_deleted_members
array<string>|null

Users that could not be removed.

Playground

Test the endpoints live

curl https://api.mistral.ai/api/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
}