> ## Documentation Index
> Fetch the complete documentation index at: https://docs.revoengine.com/llms.txt
> Use this file to discover all available pages before exploring further.

# vault.rotate()

> Public low-code contract, signatures and examples for vault.rotate.

## `vault.rotate()`

Adds a new immutable revision to an existing parent. Returns its metadata, never value.
Default/null validFrom activates now and retires previous eligible/scheduled revisions.
A future validFrom schedules activation while the current value remains available until then.
Duplicate validFrom conflicts. Cache invalidation follows commit; no relogin is required.
Instance total/active revision quotas remain enforced.

### Signature

```ts theme={null}
static rotate(name: string, data: SecretRotateInput, options?: SecretRotateOptions): Promise<SecretWithRevision | null>;
```

### Example

```ts theme={null}
const rotated = await vault.rotate('TOKEN', { value: input.token }, { scope: 'user', validFrom: null });
```

See [all vault methods](https://docs.revoengine.com/low-code/reference/vault.md) or [runtime basics](https://docs.revoengine.com/low-code/overview.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.