My custom vault key is missing or required

Provide the key for a custom-encrypted project, or learn what happens if it was lost.

Why it happens

VAULT_KEY_REQUIRED means a custom-encrypted project needs its vault key for the operation. INVALID_VAULT_KEY means the key provided was rejected.

What to do

Check that the CLI is using the intended project.

Check the active projectShell
apivault projects current

If you still have the vault key, save it from the project’s folder using the hidden prompt.

Save the vault keyShell
apivault config set vaultKey

In CI, supply the key through your runner’s secret store and configure the CLI to read it from an environment variable. If the CLI tells you to wait after incorrect attempts, wait before retrying.

If the key is lost, ApiVault cannot recover it or the values it encrypted. A project owner can reset project encryption, which permanently deletes every key in the project. Use that option only if you’re ready to recreate them.

Check the result

Retry the operation that required the vault key against the same project. A key list alone may succeed because it can show masked values without decrypting them.

Still stuck? Contact support with the error and the steps you tried. Remove secret values before sending.