Arquivar túnel
POST/v1/tunnels/{tunnel_id}/archive
A API Tunnels está em "research preview" (prévia de pesquisa). Ela requer o cabeçalho anthropic-beta: mcp-tunnels-2026-06-22 e pode mudar sem um período de descontinuação. Ela substitui os endpoints da Admin API em /v1/organizations/tunnels, que permanecem disponíveis durante uma janela de migração.
Arquiva um túnel. O arquivamento é irreversível: todo certificado não arquivado no túnel é arquivado na mesma operação, o hostname é desativado e nunca realocado, e o token do túnel é invalidado. Tentar novamente em um túnel já arquivado retorna o registro existente inalterado.
Parameters
Returns
Arquivar túnel
import os
from anthropic import Anthropic
client = Anthropic(
api_key=os.environ.get(
"ANTHROPIC_API_KEY"
), # This is the default and can be omitted
)
beta_tunnel = client.beta.tunnels.archive(
tunnel_id="tunnel_id",
)
print(beta_tunnel.id)Response 200
{
"id": "id",
"archived_at": "2019-12-27T18:11:19.117Z",
"created_at": "2019-12-27T18:11:19.117Z",
"display_name": "display_name",
"domain": "domain",
"type": "tunnel"
}Returns Examples
Response 200
{
"id": "id",
"archived_at": "2019-12-27T18:11:19.117Z",
"created_at": "2019-12-27T18:11:19.117Z",
"display_name": "display_name",
"domain": "domain",
"type": "tunnel"
}