from line 1
1---
2title: Rotate Tunnel Token
3url: https://platform.claude.com/docs/en/api/admin/mcp_tunnels/rotate_token
4---
1# Rotate Tunnel Token
52
6## Rotate Tunnel Token
3**POST** `/v1/organizations/tunnels/{tunnel_id}/rotate_token`
74
8**post** `/v1/organizations/tunnels/{tunnel_id}/rotate_token`
5**Deprecated**
96
107**Deprecated.** This Admin API endpoint is superseded by `/v1/tunnels` on the Claude API and will be removed after a migration window. New integrations should use [`/v1/tunnels`](/docs/en/api/beta/tunnels) with the `anthropic-beta: mcp-tunnels-2026-06-22` header and a WIF token carrying the `workspace:manage_tunnels` scope. Existing integrations continue to work with the `mcp-tunnels-2026-05-19` header and `org:manage_tunnels` scope during the migration window.
118
from line 12
1512restarted after rotation must use the new value. An optional
1613`reason` is captured for operational context.
1714
18### Path Parameters
15## Path parameters
1916
2017- `tunnel_id: string`
2118
2219 ID of the Tunnel.
2320
24### Header Parameters
21## Headers
2522
2623- `"anthropic-beta": array of "mcp-tunnels-2026-05-19"`
2724
2825 Required for all Tunnel endpoints.
2926
30 - `"mcp-tunnels-2026-05-19"`
27## Body parameters
3128
32### Body Parameters
33
3429- `reason: optional string or null`
3530
3631 Optional free-text reason for the rotation, recorded for audit.
3732
38### Returns
33 maxLength: 1024
3934
35## Returns
36
4037- `id: string`
4138
4239 Stable identifier for the current token value. Changes when the token is
from line 47
5047
5148 Object type. Always `tunnel_token` for Tunnel Tokens.
5249
53 - `"tunnel_token"`
50 default: tunnel_token
5451
55### Example
52## Example
5653
57```http
54```bash
5855curl https://api.anthropic.com/v1/organizations/tunnels/$TUNNEL_ID/rotate_token \
5956 -X POST \
6057 -H 'anthropic-version: 2023-06-01' \
from line 58
6158 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
6259```
6360
64#### Response
61### Response (200)
6562
6663```json
6764{
No line in this hunk matches that.