Tunnels

Rotate a Tunnel Token

Changed on

Issues a new tunnel_token and invalidates the previous one. Tunnel processes already connected stay connected until they reconnect, and are then refused until they use the new token.

post/tunnels/{id}/actions/rotate_token

Request

  • Base URL
    https://api.telnyx.com/v2
  • URL
    https://api.telnyx.com/v2/tunnels/{id}/actions/rotate_token
  • Auth
    HTTP bearer

Path parameters

idstring uuid required
Example:62d438d2-8a51-4c5e-9d0c-1f6b2a7e4c39

The id of the tunnel.

Response

Successful response. The response carries the new tunnel token, once.

Example response

{
  "data": {
    "id": "62d438d2-8a51-4c5e-9d0c-1f6b2a7e4c39",
    "record_type": "tunnel",
    "name": "chicago-dc",
    "status": "healthy",
    "connection_count": 2,
    "connections": [
      {
        "hostname": "dc1-tunnel-a",
        "version": "0.6.0",
        "region_code": "chicago-il",
        "connected_at": "2026-10-21T15:04:05.123456Z"
      }
    ],
    "created_at": "2026-10-21T15:04:05.123456Z",
    "tunnel_token": "tnl_example-token-shown-once"
  }
}

Changes