TrueNASTrueNAS Nightly Development Documentation
This content follows experimental nightly development software. Pre-release software is intended for testing purposes only.
Use the Product and Version selectors above to view content specific to a stable software release.

User API Keys Screen

My API Keys on the top right toolbar user settings dropdown menu to opens the User API Keys screen.

This screen displays a list of API keys added to your system and allows you to add, search, edit, or delete keys. API Docs opens the API Documentation.

API Keys Screen
Figure 1: API Keys Screen

Add opens the Add API Key screen.

Add API Key
Figure 2: Add API Key

Always back up and secure keys. TrueNAS displays the key string only once, in the API Key confirmation dialog, immediately after creation.

User-linked API keys allow password-equivalent access to the TrueNAS middleware. API keys are not subject to the two-factor authentication (2FA) configuration of the associated user account. A compromised API key results in access to the TrueNAS API as the associated user, even if the account is configured to require 2FA.

For increased security, HTTPS with SSL/TLS transport security is required for TrueNAS API authentication using API keys. TrueNAS automatically revokes any user-linked API keys passed as part of an authentication attempt via insecure (HTTP) transport. A revoked API key cannot be used until it is reset. Resetting generates a new key-string. Remember to update clients to use the new key.

edit for any API key on the list opens the Edit API Key window to modify that key.

Edit API Key
Figure 3: Edit API Key

Reset removes the existing API key and generates a new random key.

delete for any API key on the list opens a Delete API Key dialog to remove that key.

Delete API Key
Figure 4: Delete API Key

API Documentation

API Docs opens the TrueNAS API documentation that is built into the system.

TrueNAS 25.04 and later uses a versioned JSON-RPC 2.0 over WebSocket API. API versions are numbered in conjunction with TrueNAS version releases.

The API documentation provides information about supported API methods and events. Documentation is included for all API versions supported by the current TrueNAS release and defaults to the latest supported API. Use the dropdown to view documentation for different supported API versions.

Advanced users can interact with the TrueNAS API to perform management tasks using the TrueNAS API Client as an alternative to the TrueNAS web UI. This websocket client provides the command line tool midclt and allows users to communicate with middleware using Python by making API calls. The client can connect to the local TrueNAS instance or to a specified remote socket.