Rotate Tunnel Token
api/beta/tunnels/rotate_token
Nearest release: v2.1.245, published an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
api/beta/tunnels/rotate_token Changed · +12 / -17 lines
# Rotate Tunnel Token ## Path parameters ## Headers ## Body parameters ## Returns ## Example ### Response (200) ## Rotate Tunnel Token ### Path Parameters ### Header Parameters ### Body Parameters ### Returns ### Example #### Response
---- -title: Rotate Tunnel Token -url: https://platform.claude.com/docs/en/api/beta/tunnels/rotate_token ---- +# Rotate Tunnel Token -## Rotate Tunnel Token +**POST** `/v1/tunnels/{tunnel_id}/rotate_token` -**post** `/v1/tunnels/{tunnel_id}/rotate_token` - The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. It supersedes the Admin API endpoints at `/v1/organizations/tunnels`, which remain available during a migration window. Rotates a tunnel's connector token. Rotation invalidates the current token for new connections and returns a fresh value; established connections are not severed. A connector restarted after rotation must use the new value. -### Path Parameters +## Path parameters - `tunnel_id: string` -### Header Parameters +## Headers - `"anthropic-beta": optional array of AnthropicBeta`
- `"mid-conversation-tool-changes-2026-07-01"` -### Body Parameters +## Body parameters - `reason: optional string or null` Optional free-text reason for the rotation, recorded for audit. -### Returns + maxLength: 1024 -- `BetaTunnelToken object { id, tunnel_token, type }` +## Returns +- `BetaTunnelToken object` + A tunnel's connector token. - `id: string`
- `type: "tunnel_token"` - - `"tunnel_token"` +## Example -### Example - -```http +```bash curl https://api.anthropic.com/v1/tunnels/$TUNNEL_ID/rotate_token \ -H 'Content-Type: application/json' \ -H 'anthropic-version: 2023-06-01' \
-d '{}' ``` -#### Response +### Response (200) ```json {