Tunnel-Zertifikat erstellen
POST/v1/tunnels/{tunnel_id}/certificates
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.
Registriert ein öffentliches CA-Zertifikat für einen Tunnel. Anthropic überprüft das Serverzertifikat des Gateways anhand dieser CA, wenn die innere TLS-Sitzung terminiert wird. Ein Tunnel enthält höchstens zwei nicht archivierte Zertifikate.
Parameters
Returns
Tunnel-Zertifikat erstellen
package main
import (
"context"
"fmt"
"github.com/anthropics/anthropic-sdk-go"
"github.com/anthropics/anthropic-sdk-go/option"
)
func main() {
client := anthropic.NewClient(
option.WithAPIKey("my-anthropic-api-key"),
)
betaTunnelCertificate, err := client.Beta.Tunnels.Certificates.New(
context.TODO(),
"tunnel_id",
anthropic.BetaTunnelCertificateNewParams{
CACertificatePEM: "ca_certificate_pem",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", betaTunnelCertificate.ID)
}Response 200
{
"id": "id",
"archived_at": "2019-12-27T18:11:19.117Z",
"created_at": "2019-12-27T18:11:19.117Z",
"expires_at": "2019-12-27T18:11:19.117Z",
"fingerprint": "fingerprint",
"tunnel_id": "tunnel_id",
"type": "tunnel_certificate"
}Returns Examples
Response 200
{
"id": "id",
"archived_at": "2019-12-27T18:11:19.117Z",
"created_at": "2019-12-27T18:11:19.117Z",
"expires_at": "2019-12-27T18:11:19.117Z",
"fingerprint": "fingerprint",
"tunnel_id": "tunnel_id",
"type": "tunnel_certificate"
}