Skip to main content

Regenerate user API key

post
/api/pvlt/1.0/ctl/iam/user/regen

Regenerates a user's API key. The existing API key is invalidated. This operation is irreversible.

note

You cannot regenerate the key for the Admin user. See Set the admin's API key for information on how to set a value for this key.

The role that performs this operation must have the CapIAMWriter capability. See Access control for more information about how capabilities are used to control access to operations.

Request

Request body

The name of the user to regenerate API key for.

object required*
  • name - string required*
Example
{
"name": "string"
}

Possible responses

The request is successful.

object required*
  • api_key - string required*

    The new API key generated for the user.

  • api_key_expiry - string required*

    The expiry time of the API key.

Example
{
"api_key": "some_user",
"api_key_expiry": "2022-07-05T08:47:12.047Z"
}

Try the API

Authorization

Request body

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

Code examples

Example