Maximum number of results to return.













Beta Admin Api Keys Endpoints
(beta) Admin API - manage API keys. Requires an admin API key.












Examples
Real world code examples
Get Api Keys
GET /api/admin/api-keys
List API keys for the Organization.
AdminApiKey
limit
offset
Number of results to skip before returning results.
200
OK
Playground
Test the endpoints live
curl https://api.mistral.ai/api/admin/api-keys \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'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
}
]
}{
"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.
AdminApiKey
expiration
Date when the API key should expire.
name
Optional name for the API key.
user_id
ID of the user the API key is created for.
workspace_uuid
Workspace ID for the 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
Time when the API key was created.
expiration_date
Date when the API key expires.
hidden_key
Masked API key value for display.
key
Plaintext API key value. Only returned at creation time.
key_id
API key ID.
name
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"
}'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
}{
"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.
AdminApiKey
key_id
API key ID.
200
OK
detail
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'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"
}{
"detail": "ipsum eiusmod"
}