XPipe LogoXPipe Documentation

Toggle state of a connection

Updates the state of a connection to either start or stop a session. This can be used for all kinds of services and tunnels.

POST
/connection/toggle

Authorization

AuthorizationRequiredBearer <token>

The bearer token used is the session token that you receive from the handshake exchange.

In: header

Request Body

application/jsonRequired
stateRequiredboolean

The state to switch to

connectionRequiredstring

The connection uuid

curl -X POST "http://localhost:21721/connection/toggle" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "connection": "36ad9716-a209-4f7f-9814-078d3349280c",
    "state": true
  }'

The request was successful. The connection state was updated.