Repository Public
1---2title: Create Tunnel Certificate3url: https://platform.claude.com/docs/en/api/beta/tunnels/certificates/create4---56# Create Tunnel Certificate78**POST** `/v1/tunnels/{tunnel_id}/certificates`910The 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.1112Registers 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.1314## Path parameters1516- `tunnel_id: string`1718## Headers1920- `"anthropic-beta": optional array of AnthropicBeta`2122 Optional header to specify the beta version(s) you want to use.2324 - `string`2526 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`2728 - `"message-batches-2024-09-24"`2930 - `"prompt-caching-2024-07-31"`3132 - `"computer-use-2024-10-22"`3334 - `"computer-use-2025-01-24"`3536 - `"pdfs-2024-09-25"`3738 - `"token-counting-2024-11-01"`3940 - `"token-efficient-tools-2025-02-19"`4142 - `"output-128k-2025-02-19"`4344 - `"files-api-2025-04-14"`4546 - `"mcp-client-2025-04-04"`4748 - `"mcp-client-2025-11-20"`4950 - `"dev-full-thinking-2025-05-14"`5152 - `"interleaved-thinking-2025-05-14"`5354 - `"code-execution-2025-05-22"`5556 - `"extended-cache-ttl-2025-04-11"`5758 - `"context-1m-2025-08-07"`5960 - `"context-management-2025-06-27"`6162 - `"model-context-window-exceeded-2025-08-26"`6364 - `"skills-2025-10-02"`6566 - `"fast-mode-2026-02-01"`6768 - `"output-300k-2026-03-24"`6970 - `"user-profiles-2026-03-24"`7172 - `"user-profiles-2026-08-18"`7374 - `"user-profiles-2026-09-04"`7576 - `"advisor-tool-2026-03-01"`7778 - `"managed-agents-2026-04-01"`7980 - `"cache-diagnosis-2026-04-07"`8182 - `"dreaming-2026-04-21"`8384 - `"thinking-token-count-2026-05-13"`8586 - `"server-side-fallback-2026-06-01"`8788 - `"server-side-fallback-2026-07-01"`8990 - `"fallback-credit-2026-06-01"`9192 - `"fallback-credit-2026-07-01"`9394 - `"agent-memory-2026-07-22"`9596 - `"mid-conversation-tool-changes-2026-07-01"`9798 - `"compact-2026-01-12"`99100 - `"computer-use-2025-11-24"`101102 - `"mcp-tunnels-2026-06-22"`103104 - `"structured-outputs-2025-11-13"`105106 - `"task-budgets-2026-03-13"`107108 - `"thinking-display-updates-2026-08-18"`109110 - `"ce-user-management-2026-07-13"`111112 - `"mid-conversation-output-config-2026-07-01"`113114 - `"thinking-binding-controls-2026-08-01"`115116 - `"mid-conversation-system-clear-at-2026-08-21"`117118 - `"compact-2026-09-04"`119120- `"anthropic-workspace-id": optional string`121122## Body parameters123124- `ca_certificate_pem: string`125126 PEM-encoded X.509 CA certificate. Must contain exactly one certificate and no private-key material. Maximum 8KB.127128 maxLength: 8192129130## Returns131132- `BetaTunnelCertificate object`133134 A CA certificate attached to a tunnel.135136 - `type: "tunnel_certificate"`137138 - `id: string`139140 Unique identifier for the certificate, prefixed with `tcrt_`.141142 - `archived_at: string or null`143144 A timestamp in RFC 3339 format145146 format: date-time147148 - `created_at: string`149150 A timestamp in RFC 3339 format151152 format: date-time153154 - `expires_at: string or null`155156 A timestamp in RFC 3339 format157158 format: date-time159160 - `fingerprint: string`161162 Lowercase hex SHA-256 fingerprint of the certificate's DER encoding.163164 - `tunnel_id: string`165166 ID of the tunnel the certificate is registered against.167168## Example169170```bash171curl https://api.anthropic.com/v1/tunnels/$TUNNEL_ID/certificates \172 -H 'Content-Type: application/json' \173 -H 'anthropic-version: 2023-06-01' \174 -H 'anthropic-beta: mcp-tunnels-2026-06-22' \175 -H "X-Api-Key: $ANTHROPIC_API_KEY" \176 -d '{177 "ca_certificate_pem": "ca_certificate_pem"178 }'179```180181### Response (200)182183```json184{185 "id": "id",186 "archived_at": "2019-12-27T18:11:19.117Z",187 "created_at": "2019-12-27T18:11:19.117Z",188 "expires_at": "2019-12-27T18:11:19.117Z",189 "fingerprint": "fingerprint",190 "tunnel_id": "tunnel_id",191 "type": "tunnel_certificate"192}193```194