Skip to main content
POST
/
tunnel_sessions
/
{id}
/
restart
Restart
curl --request POST \
  --url https://api.ngrok.com/tunnel_sessions/{id}/restart \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'ngrok-version: <ngrok-version>' \
  --data '{
  "id": "<string>"
}'

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

ngrok-version
integer
default:2
required

Path Parameters

id
string
required

a resource identifier

Body

application/json
id
string

a resource identifier

Response

204

Issues a command instructing the ngrok agent to restart. The agent restarts itself by calling exec() on platforms that support it. This operation is notably not supported on Windows. When an agent restarts, it reconnects with a new tunnel session ID.