from line 1
1---
2title: Create Tunnel Certificate
3url: https://platform.claude.com/docs/en/api/beta/tunnels/certificates/create
4---
1# Create Tunnel Certificate
52
6## Create Tunnel Certificate
3**POST** `/v1/tunnels/{tunnel_id}/certificates`
74
8**post** `/v1/tunnels/{tunnel_id}/certificates`
9
105The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. It supersedes the Admin API endpoints at `/v1/organizations/tunnels`, which remain available during a migration window.
116
127Registers a public CA certificate on a tunnel. Anthropic verifies the gateway's server certificate against this CA when it terminates the inner TLS session. A tunnel holds at most two non-archived certificates.
138
14### Path Parameters
9## Path parameters
1510
1611- `tunnel_id: string`
1712
18### Header Parameters
13## Headers
1914
2015- `"anthropic-beta": optional array of AnthropicBeta`
2116
from line 88
9388
9489 - `"mid-conversation-tool-changes-2026-07-01"`
9590
96### Body Parameters
91## Body parameters
9792
9893- `ca_certificate_pem: string`
9994
10095 PEM-encoded X.509 CA certificate. Must contain exactly one certificate and no private-key material. Maximum 8KB.
10196
102### Returns
97 maxLength: 8192
10398
104- `BetaTunnelCertificate object { id, archived_at, created_at, 4 more }`
99## Returns
105100
101- `BetaTunnelCertificate object`
102
106103 A CA certificate attached to a tunnel.
107104
108105 - `id: string`
from line 110
113110
114111 A timestamp in RFC 3339 format
115112
113 format: date-time
114
116115 - `created_at: string`
117116
118117 A timestamp in RFC 3339 format
119118
119 format: date-time
120
120121 - `expires_at: string or null`
121122
122123 A timestamp in RFC 3339 format
123124
125 format: date-time
126
124127 - `fingerprint: string`
125128
126129 Lowercase hex SHA-256 fingerprint of the certificate's DER encoding.
from line 134
131134
132135 - `type: "tunnel_certificate"`
133136
134 - `"tunnel_certificate"`
137## Example
135138
136### Example
137
138```http
139```bash
139140curl https://api.anthropic.com/v1/tunnels/$TUNNEL_ID/certificates \
140141 -H 'Content-Type: application/json' \
141142 -H 'anthropic-version: 2023-06-01' \
from line 147
146147 }'
147148```
148149
149#### Response
150### Response (200)
150151
151152```json
152153{
No line in this hunk matches that.