Tree BG 1
Tree
Tree
TreeLeaves
TreeLeaves
Cat IdleGrassGrassRockRock

Beta Admin Api Keys Endpoints

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

Get Api Keys

GET /api/admin/api-keys

List API keys for the Organization.

200

OK

API keys for the Organization.

Playground

Test the endpoints live

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

200

{
  "keys": [
    {
      "actions": {},
      "can_delete": null,
      "created_at": null,
      "created_by": null,
      "expiration_date": null,
      "hidden_key": "ipsum eiusmod",
      "key": null,
      "key_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
      "last_used": null,
      "name": null,
      "product": "API",
      "workspace_id": null,
      "workspace_name": null
    }
  ]
}

Create Api Key

POST /api/admin/api-keys

Create a Workspace API key.

200

OK

Per-action availability for an API key, keyed by action name.

This is the generic, reusable shape for surfacing what a viewer may do with a resource on get/list endpoints: each action maps to a value that is either available or unavailable with an optional reason code. Add fields here as more actions are exposed.

Every action is opt-in: fields default to None (the action is absent), and an absent action means "unavailable, with no specified reason". An action is only available when a producer explicitly sets it to ActionAvailable. This keeps permissions opt-in rather than opt-out, so forgetting to populate an action can never accidentally expose it.

created_at
*date-time|null

Time when the API key was created.

expiration_date
*date|null

Date when the API key expires.

hidden_key
*string

Masked API key value for display.

key
*string|null

Plaintext API key value. Only returned at creation time.

key_id
*string

API key ID.

name
*string|null

Name of the API key.

Playground

Test the endpoints live

curl https://api.mistral.ai/api/admin/api-keys \
 -X POST \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -H 'Content-Type: application/json' \
 -d '{
  "user_id": "9c0ab39f-0cd0-46cd-bd30-8bf2d50be5ce",
  "workspace_uuid": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}'

200

{
  "actions": {},
  "created_at": null,
  "expiration_date": null,
  "hidden_key": "ipsum eiusmod",
  "key": null,
  "key_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
  "name": null
}

Delete Api Key

DELETE /api/admin/api-keys/{key_id}

Delete an API key.

200

OK

detail
*string

API key deletion result message.

Playground

Test the endpoints live

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

200

{
  "detail": "ipsum eiusmod"
}