Skip to main content

Set Admin API key


Set the API key of the Admin user.

Vault always has an Admin user account, which you use to update the configuration of Vault.

The API key should meet the specified criteria:

  • It must be at least 15 characters long.
  • It must contain a mix of digits, lowercase letters, and uppercase letters.

This API is restricted to the Admin user.
The Admin API Key can be also set using the environment variable PVAULT_SERVICE_ADMIN_API_KEY


Request body

The API key of the Admin user to set.

object required*
  • key - string required*

    The new API key for the Admin user.

"key": "string"

Possible responses

The request is successful.

Try the API


Request body

Navigate to the docs of your local Vault installation to try the API directly from there.

Code examples