mistralM

Docs

sideBar

Beta Admin API Keys

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

GET /v1/admin/api-keys

Get Api Keys

List API keys for the Organization.

Security

AdminApiKey
bearerhttp

Parameters

limit
integerquery

Maximum number of results to return.

offset
integerquery

Number of results to skip before returning results.

name
string | nullquery

Filter API keys by name substring or the last 4 characters of the key. Matching is case-insensitive and accent-insensitive.

Responses

OK

keys
array<AdminAPIKeyOut>* required

API keys for the Organization.

AdminAPIKeyOut
created_at
date-time | null* required

Time when the API key was created.

created_by
string | null* required

Display name of the user who owns the API key. Null for keys not owned by a user.

Example:

Alice Martin
expiration_date
date | null* required

Date when the API key expires. Null if it never expires.

hidden_key
string* required

Masked API key value for display.

Example:

HQSx...Ug6Y
key
any | null
exclamationMark

Deprecated: always null. The plaintext API key value is only returned when the key is created.

Example:

null
key_id
string* required

API key ID.

Example:

9b2d6f4e-1c3a-4e8b-a5f7-2d0c8e6b4a1f
last_used
date | null* required

Date when the API key was last used. Null if it was never used.

name
string | null* required

Name of the API key.

Example:

Production API Key
product
"API" | "Mistral Code" | "Vibe"* required

Product the API key is restricted to. Null for general API keys.

Example:

Vibe
service_account_id
string | null* required

ID of the service account that owns the API key. Null for keys not owned by a service account.

Example:

6d3f9a1c-2b7e-4c8a-9f10-1a2b3c4d5e6f
user_id
string | null* required

ID of the user who owns the API key. Null for keys not owned by a user.

Example:

3fa85f64-5717-4562-b3fc-2c963f66afa6
workspace_id
string | null* required

ID of the Workspace the API key belongs to.

Example:

7c1e5a9d-3f2b-4d6e-8a0c-5b9f1e3d7a2c
workspace_name
string | null* required

Name of the Workspace the API key belongs to.

Example:

Product Team

POST /v1/admin/api-keys

Create Api Key

Create a Workspace API key.

Security

AdminApiKey
bearerhttp

Request Example

{
  "user_id": "ipsum eiusmod",
  "workspace_uuid": "consequat do"
}

Request Body

expiration
date | null

Date when the API key should expire.

name
string | null

Optional name for the API key.

Example:

Production API Key
user_id
string* required

ID of the user the API key is created for.

workspace_uuid
string* required

Workspace ID for the API key.

Responses

OK

created_at
date-time | null* required

Time when the API key was created.

expiration_date
date | null* required

Date when the API key expires. Null if it never expires.

hidden_key
string* required

Masked API key value for display.

Example:

HQSx...Ug6Y
key
string* required

Plaintext API key value. It is only returned in this response: store it securely.

Example:

HQSxfB7IaJRKNHRv0e5OAYJNO1h2Ug6Y
key_id
string* required

API key ID.

Example:

9b2d6f4e-1c3a-4e8b-a5f7-2d0c8e6b4a1f
name
string | null* required

Name of the API key.

Example:

Production API Key

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

Delete Api Key

Delete an API key.

Security

AdminApiKey
bearerhttp

Parameters

key_id
stringpath* required

API key ID.

Responses

OK

detail
string* required

API key deletion result message.

Example:

API key deleted successfully