Tree BG 1
Tree
Tree
TreeLeaves
TreeLeaves
Cat IdleGrassGrassRockRock

Beta Service Accounts Endpoints

(beta) Service Accounts API.

List Service Accounts

GET /v1/service-accounts#

List the service accounts in a workspace.

Requires the Workspace admin (workspace_admin) role.

200

Successful Response

Playground

Test the endpoints live

curl https://api.mistral.ai/v1/service-accounts \
 -X GET \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

200

{
  "items": [
    {
      "created_at": "2025-12-17T10:25:07.818693Z",
      "customer_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
      "deleted_at": null,
      "description": null,
      "id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
      "name": "My resource",
      "organization_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
      "updated_at": "2025-12-17T10:41:03.469341Z",
      "workspace_id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
    }
  ]
}

Create Service Account

POST /v1/service-accounts#

Create a service account in a workspace. Requires the Workspace admin (workspace_admin) role.

201

Successful Response

created_at#
*date-time
customer_id#
*string
deleted_at#
*date-time|null
description#
*string|null
id#
*string
name#
*string
organization_id#
*string
updated_at#
*date-time
workspace_id#
*string

Playground

Test the endpoints live

curl https://api.mistral.ai/v1/service-accounts \
 -X POST \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -H 'Content-Type: application/json' \
 -d '{
  "name": "My resource",
  "workspace_id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}'

201

{
  "created_at": "2025-12-17T10:25:07.818693Z",
  "customer_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
  "deleted_at": null,
  "description": null,
  "id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
  "name": "My resource",
  "organization_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
  "updated_at": "2025-12-17T10:41:03.469341Z",
  "workspace_id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}

List Assignable Service Account Roles

GET /v1/service-accounts/assignable-roles#

List the workspace roles that can be assigned to a service account.

Requires the Workspace admin (workspace_admin) role.

200

Successful Response

Playground

Test the endpoints live

curl https://api.mistral.ai/v1/service-accounts/assignable-roles \
 -X GET \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

200

{
  "items": [
    {
      "description": "My resource description.",
      "is_custom_role": false,
      "name": "My resource",
      "uuid": "019b2bd7-96e7-7219-8c0b-45a73da50088"
    }
  ]
}

Get Service Account

GET /v1/service-accounts/{service_account_id}#

Retrieve a service account.

Requires the Workspace admin (workspace_admin) role.

200

Successful Response

created_at#
*date-time
customer_id#
*string
deleted_at#
*date-time|null
description#
*string|null
id#
*string
name#
*string
organization_id#
*string
updated_at#
*date-time
workspace_id#
*string

Playground

Test the endpoints live

curl https://api.mistral.ai/v1/service-accounts/{service_account_id} \
 -X GET \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

200

{
  "created_at": "2025-12-17T10:25:07.818693Z",
  "customer_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
  "deleted_at": null,
  "description": null,
  "id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
  "name": "My resource",
  "organization_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
  "updated_at": "2025-12-17T10:41:03.469341Z",
  "workspace_id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}

Delete Service Account

DELETE /v1/service-accounts/{service_account_id}#

Delete a service account.

Requires the Workspace admin (workspace_admin) role.

Playground

Test the endpoints live

curl https://api.mistral.ai/v1/service-accounts/{service_account_id} \
 -X DELETE \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -H 'Content-Type: application/json'

Update Service Account

PATCH /v1/service-accounts/{service_account_id}#

Update a service account.

Requires the Workspace admin (workspace_admin) role.

200

Successful Response

created_at#
*date-time
customer_id#
*string
deleted_at#
*date-time|null
description#
*string|null
id#
*string
name#
*string
organization_id#
*string
updated_at#
*date-time
workspace_id#
*string

Playground

Test the endpoints live

curl https://api.mistral.ai/v1/service-accounts/{service_account_id} \
 -X PATCH \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -H 'Content-Type: application/json' \
 -d '{}'

200

{
  "created_at": "2025-12-17T10:25:07.818693Z",
  "customer_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
  "deleted_at": null,
  "description": null,
  "id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
  "name": "My resource",
  "organization_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
  "updated_at": "2025-12-17T10:41:03.469341Z",
  "workspace_id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}

List Service Account Roles

GET /v1/service-accounts/{service_account_id}/roles#

List the workspace roles assigned to a service account.

Requires the Workspace admin (workspace_admin) role.

200

Successful Response

Playground

Test the endpoints live

curl https://api.mistral.ai/v1/service-accounts/{service_account_id}/roles \
 -X GET \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

200

{
  "items": [
    {
      "role_id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
    }
  ]
}

Set Service Account Roles

PUT /v1/service-accounts/{service_account_id}/roles#

Replace the workspace roles assigned to a service account.

Requires the Workspace admin (workspace_admin) role.

200

Successful Response

Playground

Test the endpoints live

curl https://api.mistral.ai/v1/service-accounts/{service_account_id}/roles \
 -X PUT \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -H 'Content-Type: application/json' \
 -d '{}'

200

{
  "items": [
    {
      "role_id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
    }
  ]
}