Skip to main content
POST
Create remote tunnel

Body

application/json

Request body to create a new remote tunnel

ports
object[]
required

One or more local ports to expose via the tunnel

public
boolean

If true, the tunnel is publicly accessible without Cloudflare Access authentication

projectShortId
string

Target a specific project by its prefixed short ID (proj-slug_shortId or proj_shortId), as returned by the projects API. Required for organization-scoped API keys; project-scoped keys may only pass their own project's short ID.

Pattern: ^proj(-.+_.+|_.+)$

Response

200 - application/json

The request has succeeded.

Response after successfully creating a remote tunnel

runnerId
string
required

Our identifier for this runner, used in subsequent API calls

hostnames
object[]
required

Public hostnames mapped to local ports

tunnelToken
string
required

cloudflared token to start the tunnel daemon

expiresAt
string
required

ISO timestamp when this tunnel will expire