Skip to main content
The Remote Tunnels API enables you to programmatically create secure tunnels that expose local ports via Cloudflare. This allows QA.tech to access locally-running applications for testing without deploying them to a public server.
  • Base URL: https://api.qa.tech/v1
  • Authentication: Bearer token (project API token)
  • Content-Type: application/json

Prerequisites

Before using the Remote Tunnels API, you need:
  1. cloudflared – Cloudflare’s tunnel client must be installed on your machine or CI runner
  2. Your application running locally – The tunnel exposes local ports, so your app must be running

Tunnel Expiration

Tunnels expire 12 hours after creation. The expiresAt field in the response indicates when the tunnel will be automatically torn down. For long-running development, you’ll need to create a new tunnel when the current one expires.

When to Use Remote Tunnels

  • Local development testing – Test your local environment without deploying
  • CI/CD pipelines – Expose ephemeral test servers during build processes
  • Preview environments – Create temporary public URLs for testing
  • Firewall-protected environments – Access applications behind corporate firewalls
For CLI-based tunnel management, see the tunnel command documentation. The CLI provides a simpler interface for common tunnel operations.

Authentication

Include your project’s API token in the Authorization header:
Find your API token in the QA.tech dashboard: Settings → Integrations → API.

Create Remote Tunnel

Create a new tunnel that exposes one or more local ports via Cloudflare. Returns a tunnelToken to start the cloudflared daemon. Endpoint: POST /remote-tunnels

Request Body

Port Mapping Fields

Response (200)

Response Fields

Hostname Fields

Example: Single Port

Example: Multiple Ports with Subdomains

Starting the Tunnel

After creating a tunnel, start the cloudflared daemon with the returned token:
The tunnel will remain active as long as cloudflared is running and has not expired (12-hour maximum lifetime).
For simpler tunnel management, consider using the CLI tunnel command which handles cloudflared automatically: qatech tunnel start --port 3000

List Remote Tunnels

List all active tunnels for your project. Endpoint: GET /remote-tunnels

Response (200)

Response Fields

Tunnel Summary Fields

Example

Get Tunnel Status

Check the live health status of a tunnel via Cloudflare. Endpoint: GET /remote-tunnels/{runnerId}/status

Path Parameters

Response (200)

Response Fields

Status Values

Example

Delete Remote Tunnel

Tear down a tunnel and remove its DNS records. Endpoint: DELETE /remote-tunnels/{runnerId}

Path Parameters

Response (200)

Example

Complete Workflow Example

Here’s a complete example of creating a tunnel, using it for testing, and cleaning up:

Error Responses

Error responses include a body: { "message": "Error description" }.