Skip to Content
SeyloDocs
API referenceCloudflare tunnels

Turn a Cloudflare tunnel on or off

POST
/api/v1/tunnels.set

Turns the service's Cloudflare tunnel on or off. quick mode starts a temporary trycloudflare.com URL (default 2 hours, at most 24). token mode uses this service's tunnel token, or the global one from settings, for a permanent hostname. Fields left out keep their value; token null removes the service's own token.

Needs tunnels.edit on the service (a grant on its project covers it). Available to MCP clients and the assistant.

Authorization

cookieseylo_session<token>

Request Body

application/json
  1. body
serviceId*string

Panel-issued id.

Match^[a-z0-9]{16}$
enabled*boolean
mode?string|string
targetPort?integer

Port the container listens on.

Range1 <= value <= 65535
durationMinutes?integer
Range5 <= value <= 1440
token?|null
hostname?|null

Response Body

Success.

application/json
  1. response
serviceId*string

Panel-issued id.

Match^[a-z0-9]{16}$
enabled*boolean
mode*string|string
state*string|string|string|string
targetPort*integer

Port the container listens on.

Range1 <= value <= 65535
url*string|null
hostname*|null
tokenSource*string|string|string
expiresAt*|null
error*string|null
Example Request
curl -X POST 'https://example.com/api/v1/tunnels.set' \  -H 'Content-Type: application/json' \  -d '{  "serviceId": "string",  "enabled": true}'
Example Response
{  "serviceId": "string",  "enabled": true,  "mode": "quick",  "state": "off",  "targetPort": 1,  "url": "string",  "hostname": "string",  "tokenSource": "service",  "expiresAt": "2019-08-24T14:15:22Z",  "error": "string"}