Claude Platform Docs

Tunnel-Token rotieren

$ ant beta:tunnels rotate-token
POST/v1/tunnels/{tunnel_id}/rotate_token

Die Tunnels API befindet sich in der "Research Preview" (Forschungsvorschau). Sie erfordert den Header anthropic-beta: mcp-tunnels-2026-06-22 und kann sich ohne Abkündigungsfrist ändern. Sie ersetzt die Admin-API-Endpunkte unter /v1/organizations/tunnels, die während eines Migrationszeitraums weiterhin verfügbar bleiben.

Rotiert das Connector-Token eines Tunnels. Die Rotation macht das aktuelle Token für neue Verbindungen ungültig und gibt einen neuen Wert zurück; bestehende Verbindungen werden nicht getrennt. Ein nach der Rotation neu gestarteter Connector muss den neuen Wert verwenden.

Parameters
--tunnel-id: string⁠Path parameter

ID of the tunnel (tnl_...).

--reason: optional string

Optional free-text reason for the rotation, recorded for audit.

maxLength1024
--beta: optional array of AnthropicBeta⁠Header parameter

This endpoint is in beta: requests must send mcp-tunnels-2026-06-22 in this header.

--workspace-id: optional string⁠Header parameter

Optional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).

Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

Returns
beta_tunnel_token: object{ type: "tunnel_token", id, tunnel_token }

A tunnel's connector token.

type: "tunnel_token"
id: string

Stable identifier for the current token value. Changes when the token is rotated.

tunnel_token: string

The connector token used to run the tunnel. Treat as a credential.

Tunnel-Token rotieren
ant beta:tunnels rotate-token \
  --api-key my-anthropic-api-key \
  --tunnel-id tunnel_id
Returns Examples
Response 200
{
  "id": "id",
  "tunnel_token": "tunnel_token",
  "type": "tunnel_token"
}