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

# Rotate a proxy token

> Issue a new Agent Vault proxy token with the Node.js SDK.

`client.agentVault().proxies.rotateToken()` issues a new proxy token. The client must log in as a user or machine identity with the **Admin** role in the [Agent Vault project](https://infisical.com/docs/documentation/platform/agent-vault/access-control#product-membership).

Issue a new proxy token if the current token leaked. Rotating the token also restores a revoked proxy's access. The old token stops working right away. To restart the proxy and its agents, follow the steps in [Rotate a proxy's token](https://infisical.com/docs/documentation/platform/agent-vault/proxies#rotate-a-proxy’s-token).

## Parameters

**proxyId** `string` *required*

The ID of the proxy.

## Returns

**result** `AgentVaultProxyWithTokenResponse`

The proxy in `proxy`, and the new proxy token in `proxyToken` (Infisical returns the token only once).

```typescript Basic theme={"dark"}
const { proxy, proxyToken } = await client.agentVault().proxies.rotateToken("<proxy-id>");
```

```json Response theme={"dark"}
{
  "proxy": {
    "id": "f1e2d3c4-b5a6-4978-8a6b-5c4d3e2f1a0b",
    "name": "edge-proxy",
    "description": "Proxy for CI runners",
    "heartbeat": null,
    "isHealthy": false,
    "rootCaFingerprint": "<sha-256-fingerprint>",
    "rootCaExpiresAt": "2036-12-02T12:15:00.000Z",
    "trafficPolicy": "service-hosts",
    "allowedHosts": "registry.npmjs.org",
    "pollInterval": 30,
    "createdAt": "2026-12-01T09:00:00.000Z"
  },
  "proxyToken": "<proxy-token>"
}
```


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