Ports API
List open ports and replace the port list of a Hyperproxy.
Inspect and change which ports a Hyperproxy has open. A Hyperproxy only opens the base port 3128, ports that have a credential, and ports that have an active managed-proxy binding. See the Port Manager guide for the model.
List Ports
GET
/api/proxies/:id/portsRequires the proxies:read scope.
bash
curl https://proxies.ai/api/proxies/proxy-id/ports \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"ports": [3128, 3201, 3301],
"boundCredentialPorts": [3201],
"boundUpstreamPorts": [3301],
"secureSharePorts": [3401],
"reservedSystemPorts": [1344, 3129, 13440, 5353, 8080],
"allocations": [
{
"port": 3128,
"plane": "cifp-core",
"label": "Hyperproxy Core",
"username": "hyprx-proxy-id",
"usernamePasswordRequired": false,
"ipAuthEnabled": true
}
],
"count": 3
}| Field | Description |
|---|---|
ports | Every open port: the base port, ports with a credential, and ports with an active binding |
boundCredentialPorts | Ports that have a credential |
boundUpstreamPorts | Ports with an active managed-proxy binding |
secureSharePorts | Ports held by active Secure Shares. Not part of ports; they cannot be given credentials or bindings. |
reservedSystemPorts | Ports that can never be used |
allocations | One entry per port with its type (plane), label, login username, and Dual-Auth state |
Update Ports
PUT
/api/proxies/:id/portsRequires a paid plan and the proxies:write scope. Send any of add, remove, or ports; every number must be an integer from 1024 to 65535.
| Field | Description |
|---|---|
ports | Replace the port list. Any open port other than 3128 that is missing from this list is closed. Up to 5,000 entries. |
add | Ports to open. Up to 1,000 entries. |
remove | Ports to close. Up to 1,000 entries. |
bash
# Keep only 3201; close every other extra port
curl -X PUT https://proxies.ai/api/proxies/proxy-id/ports \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ports": [3201]}'Response (200)
{
"status": "ok",
"ports": [3128, 3201],
"count": 2,
"boundCredentialPorts": [3201],
"boundUpstreamPorts": [],
"reconcileMode": "pushed"
}reconcileMode is pushed when the change reached your Hyperproxy immediately, or sync-bundle-queued when it will be applied on the next sync.
Rules
- The base port
3128cannot be removed (400). - You can only open a port that already has a credential or an active binding. Otherwise the request fails with
422andcode: "LEAST_PORTS_OPEN_VIOLATION", listing theunboundPorts. Provision a credential or binding first. - Closing a port deletes its credential and disables its binding. Closing a port that has a credential also requires the
credentials:writescope. - Reserved ports and Secure Share ports can never be opened this way, because they cannot hold a credential or binding.