- 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:-
cloudflared – Cloudflare’s tunnel client must be installed on your machine or CI runner
- Your application running locally – The tunnel exposes local ports, so your app must be running
Tunnel Expiration
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 theAuthorization header:
Create Remote Tunnel
Create a new tunnel that exposes one or more local ports via Cloudflare. Returns atunnelToken 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: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" }.
Related
- Tunnel CLI Command – CLI interface for tunnel management
- SSH Tunnel – Alternative tunneling via SSH
- Start Run API – Use tunnel URLs as environment overrides
- API Introduction – Authentication and ID reference