Manage users with the Admin API
Manage the members of your Organization programmatically. For an end-to-end onboarding flow, see User provisioning.
Enterprise plans only
The Admin API is available only on Enterprise plans, and access isn't self-serve. On other plans, you can't create an Admin API key, and a standard API key doesn't work with admin endpoints. To request access, contact your Mistral account team or our sales team.
Before you start
All requests use the base URL https://api.mistral.ai/v1/admin and an Admin API key in the x-api-key header. See Authentication and Admin API keys.
Organization roles
Assign Organization roles with the plural role_names field. Accepted names: member, billing_manager, organization_admin. You can also pass role UUIDs in roles. List them with GET /v1/admin/roles.
The singular role and role_name fields are deprecated. Prefer the plural roles / role_names, which support assigning multiple roles.
List users
Supports the page, page_size, and email query parameters.
curl "https://api.mistral.ai/v1/admin/users?page=1&page_size=50" \
-H "x-api-key: $ADMIN_API_KEY"Deactivated members are left out unless you set include_inactive=true. Each user's status field shows whether they are active or deactivated.
Get a single user
curl https://api.mistral.ai/v1/admin/users/<USER_UUID> \
-H "x-api-key: $ADMIN_API_KEY"Create users
Send an array of users. Each entry requires email, first_name, and last_name. Set roles with role_names and product access with subscription_types (CHAT, MISTRAL_CODE).
curl -X POST https://api.mistral.ai/v1/admin/users \
-H "Content-Type: application/json" \
-H "x-api-key: $ADMIN_API_KEY" \
-d '[
{"email": "ada@example.com", "first_name": "Ada", "last_name": "Lovelace", "role_names": ["organization_admin"]},
{"email": "alan@example.com", "first_name": "Alan", "last_name": "Turing", "role_names": ["member"], "subscription_types": ["CHAT", "MISTRAL_CODE"]}
]'The response maps each email to its created user ID. Created users sign in by entering their email and completing the account recovery flow.
Update a user
Change a user's roles or product subscriptions.
curl -X PATCH https://api.mistral.ai/v1/admin/users/<USER_UUID> \
-H "Content-Type: application/json" \
-H "x-api-key: $ADMIN_API_KEY" \
-d '{"role_names": ["member"], "subscription_types": ["CHAT"]}'Deactivate a user
Deactivate a user to end their access while keeping their memberships, so you can reactivate them later. You can deactivate users whose email address is on one of your Organization's verified domains.
curl -X POST https://api.mistral.ai/v1/admin/users/<USER_UUID>/deactivate \
-H "x-api-key: $ADMIN_API_KEY"Deactivation applies to the user's account in every Organization they belong to. It signs them out, deletes every API key they own, and releases their seats. Their roles, Workspaces, and groups are kept. See what deactivation does.
Reactivate a user
curl -X POST https://api.mistral.ai/v1/admin/users/<USER_UUID>/reactivate \
-H "x-api-key: $ADMIN_API_KEY"The user can sign in again, with the roles, Workspaces, and groups they had. Each seat they held is given back while the Organization has a free one. Their API keys are not restored: they create new ones.
Deactivating a user who is already deactivated, or reactivating an active user, succeeds without changing anything.
Errors
| Status | Cause | Solution |
|---|---|---|
400 | Your Organization provisions users through SCIM. | Deactivate or reactivate the user in your identity provider. See SCIM provisioning. |
404 | The user's email address is not on one of your verified domains, or the user does not exist. | Check the user ID. To end the access of a user outside your verified domains, remove them instead. |
While a user is deactivated, requests that change their role, assign them a seat, or add them to a Workspace or group return 409 with error code 7010. Reactivate them first.
Remove a user
Remove a user from your Organization. They keep their Mistral account and their other Organizations.
curl -X DELETE https://api.mistral.ai/v1/admin/users/<USER_UUID> \
-H "x-api-key: $ADMIN_API_KEY"Users whose email address is on one of your verified domains cannot be removed through the API: the request returns 409 with error code 7011. Deactivate them instead.
Invitations
Invite users by email instead of creating them directly. email is required and accepts one address, or several separated by commas or new lines. Optional fields include role_names, subscription_types, workspace_uuids, and email_language.
# Create an invitation
curl -X POST https://api.mistral.ai/v1/admin/users-invite \
-H "Content-Type: application/json" \
-H "x-api-key: $ADMIN_API_KEY" \
-d '{"email": "grace@example.com", "role_names": ["member"], "workspace_uuids": ["<WORKSPACE_UUID>"]}'
# List invitations
curl https://api.mistral.ai/v1/admin/users-invite \
-H "x-api-key: $ADMIN_API_KEY"
# Delete an invitation
curl -X DELETE https://api.mistral.ai/v1/admin/users-invite/<INVITATION_UUID> \
-H "x-api-key: $ADMIN_API_KEY"