Claude Platform Docs

Listar túneis

$client->beta->tunnels->list(?bool includeArchived, ?int limit, ?string page, ?list<AnthropicBeta> betas, ?string workspaceID): PageCursor<BetaTunnel>
GET/v1/tunnels

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.

Lista túneis. Os resultados são ordenados por data de criação, do mais recente para o mais antigo; túneis arquivados são excluídos, a menos que include_archived esteja definido.

Parameters
includeArchived?:optional bool

Whether to include archived tunnels in the results. Defaults to false.

limit?:optional int

Maximum number of tunnels to return per page. Defaults to 20, maximum 1000.

page?:optional string

Opaque pagination cursor from a previous list_tunnels response.

betas?:optional list<AnthropicBeta>

Optional header to specify the beta version(s) you want to use.

workspaceID?:optional string
Returns
class BetaTunnel { $type = 'tunnel'; $id; $archivedAt; /* 3 more */ }
"tunnel" type
string id

Unique identifier for the tunnel, prefixed with tnl_.

?\Datetime archivedAt

A timestamp in RFC 3339 format

\Datetime createdAt

A timestamp in RFC 3339 format

?string displayName

Human-readable name for the tunnel (1-255 characters). Null if unset.

string domain

Anthropic-assigned hostname for the tunnel. MCP server URLs whose host is a subdomain of this value are routed through the tunnel. Globally unique and never reused, even after the tunnel is archived.

Listar túneis
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

$client = new Client(apiKey: 'my-anthropic-api-key');

$page = $client->beta->tunnels->list(
  includeArchived: true,
  limit: 0,
  page: 'page',
  betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
  workspaceID: 'wrkspc_011CZkZaBF1tNoB5wlCeusgy',
);

var_dump($page);
Returns Examples
Response 200
{
  "data": [
    {
      "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"
    }
  ],
  "next_page": "next_page"
}