You seem to be missing the listen_port
field in the API definition. You also don’t need most of the other fields and proxy subfields. The minimal you need is shown in the documentation. You could append then active
, name
and api_id
fields
{
"active": true,
"api_id": "ac4ba7ac44ef4f148187a1f65a8814c6",
"enable_proxy_protocol": false,
"name": "Sample TCP API",
"listen_port": 8081,
"protocol": "tcp",
"proxy": {
"target_url": "tcp://2.tcp.ngrok.io:13812"
},
"slug": "sample.tcp.api"
}
No a TCP API would ignore the paths. The root /
would be called. You will connect to your TCP service through a TCP client e.g. tcp, telnet or netcat
If you have not disabled_port_whitelist, then you need to ensure the ports are whitelisted as required