Proxies.ai

Managed Proxies API

Bind ports to a mobile modem or provider account and rotate exit IPs.

Bind a port on a Hyperproxy to your own proxy provider account, and rotate its exit IP. Managed 4G/5G Mobile modems are bought and managed with the Managed Mobile API; binding a mobile modem here returns 409 USE_MOBILE_PURCHASE_FLOW. For the concepts, see the Managed Proxies guide.

List Bindings and Pools

GET/api/proxies/:id/upstreams

Requires the proxies:read scope.

bash
curl https://proxies.ai/api/proxies/proxy-id/upstreams \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "bindings": [
    {
      "id": "pub_abc123",
      "proxyId": "proxy-id",
      "poolId": "pool_xyz",
      "port": 3301,
      "label": "Frankfurt research",
      "targeting": { "country": "DE", "city": "frankfurt", "sessionId": "agent01" },
      "allocatedGb": null,
      "usedBytes": 0,
      "status": "active",
      "lastRotatedAt": null,
      "createdAt": "2026-06-01T10:00:00Z",
      "updatedAt": "2026-06-01T10:00:00Z"
    }
  ],
  "pools": [],
  "count": 1
}

pools lists your provider pools (and the managed mobile pool, which is bought through the Managed Mobile API). Provider passwords and internal gateway details are never returned.

Bind a Port

POST/api/proxies/:id/upstreams

Requires a paid plan and the proxies:write scope. If the port has no credential yet, the credentials:write scope is also required. Provide one way to choose the upstream: poolId, byoPool, or legacyProxyString.

FieldRequiredDescription
portYesInteger 1024–65535. Not reserved, not used by a Secure Share.
labelYesDisplay name, 1–120 characters
poolIdOne of threeID of one of your provider pools from the list response
byoPoolOne of threeCreate a provider pool inline (see below)
legacyProxyStringOne of threeExisting proxy login to convert: username and password, optional gatewayHost and gatewayHttpPort
targetingNoLocation and session settings. See the guide for the field list.
useTlsNoConnect to the provider gateway over TLS

byoPool fields:

FieldRequiredDescription
displayNameYes1–120 characters
dialectYesbright-data, oxylabs, decodo, iproyal, dataimpulse, or webshare
baseUsernameYesYour provider username (up to 255 bytes, no spaces, quotes, # or colon)
basePasswordYesYour provider password (up to 255 bytes, no spaces, quotes or #)
tierNoresidential (default), mobile, or datacenter
gatewayHostNoOverride the provider default gateway host
gatewayHttpPortNoOverride the gateway HTTP port

Example: Bring Your Own Provider

bash
curl -X POST https://proxies.ai/api/proxies/proxy-id/upstreams \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "port": 3301,
    "label": "London sticky",
    "byoPool": {
      "displayName": "My Oxylabs account",
      "dialect": "oxylabs",
      "baseUsername": "customer-YOUR_USER",
      "basePassword": "YOUR_PROVIDER_PASSWORD"
    },
    "targeting": { "country": "GB", "city": "London", "sessionId": "london01", "sessionTtlSeconds": 600 }
  }'

Save portPassword immediately

portPassword is only present when the bind created the port login. It is stored as a hash and is not returned again.

Common errors: 400 invalid input or reserved port, 409 USE_MOBILE_PURCHASE_FLOW the pool is a Managed 4G/5G Mobile pool (use the Managed Mobile API).

Rotate a Port

POST/api/proxies/:id/upstreams/:port/rotate

Requires a paid plan and the proxies:write scope. Optional body { "mode": "ip" }; use the Managed Mobile API for mode: "random" on mobile modems.

bash
curl -X POST https://proxies.ai/api/proxies/proxy-id/upstreams/3202/rotate \
  -H "Authorization: Bearer YOUR_API_KEY"
Response, mobile modem port
{
  "rotated": true,
  "newPublicIp": "203.0.113.77",
  "cooldownSeconds": 60,
  "binding": { "id": "pub_abc123", "port": 3202, "lastRotatedAt": "2026-06-01T10:05:00Z" }
}
Response, provider port
{
  "rotated": true,
  "sessionId": "rotA1b2c3",
  "cooldownSeconds": 60,
  "binding": { "id": "pub_abc123", "port": 3301 }
}

A port can be rotated once every 60 seconds. A request inside the window returns 429 with code: "ROTATION_COOLDOWN" and the seconds remaining. If a modem cannot complete the rotation the response is 409 with rotated: false. Provider ports pick up the new session on the next sync, within moments. A new session only changes the exit for providers and modes that hold sticky sessions; in per-request modes (for example Webshare per_request) every request already gets a new exit, so rotated: true does not mean the session changed.

Unbind a Port

Close the port with PUT /api/proxies/:id/ports (see the Ports API). Closing disables the binding and removes the port credential.