Plans & line generation
GET /plans lists the active plans a key owns. POST /plans/{id}/generate returns host:port:user:pass lines with country, city, ISP and sticky-session targeting.
hproxy.com/api/v1/plansList plans
Your active plans: residential GB balances and dedicated allocations. The id is what you pass to the endpoints below; label is your own tag (see PATCH), null until you set it.
curl https://hproxy.com/api/v1/plans -H "X-API-Key: hpx_your_key_here"hproxy.com/api/v1/plans/{id}Get one plan
A single active plan you own: the per-customer read for a reseller dashboard: remaining GB (refreshed from live usage about every 30 minutes), expiry and your label.
curl https://hproxy.com/api/v1/plans/cmjfmhhpd004c4i4hqsk3mzrr \
-H "X-API-Key: hpx_your_key_here"hproxy.com/api/v1/plans/{id}Label a plan
PATCH a plan with your own reference, e.g. which of YOUR customers it belongs to. Pure metadata: it changes nothing about pricing, traffic or generation, and it comes back in GET /plans, GET /plans/{id} and in webhook payloads, so every signal is already attributed to your customer. null (or an empty body) clears it.
| Parameter | Type | Required | Description |
|---|---|---|---|
label | string | null | optional | 1 to 64 characters, no control characters. null/omitted clears. |
curl -X PATCH https://hproxy.com/api/v1/plans/cmjfmhhpd004c4i4hqsk3mzrr \
-H "X-API-Key: hpx_your_key_here" \
-H "Content-Type: application/json" \
-d '{"label": "customer-1042"}'hproxy.com/api/v1/plans/{id}/generateGenerate proxy lines
Turn a residential plan you own into ready-to-use proxy lines, fully programmatic, using the same hardened generator the dashboard uses. Lines come back as host:port:username:password with the targeting baked into the username, so any HTTP or SOCKS5 client uses them as-is. Every field is optional; an empty body returns one rotating line with the plan's defaults. Generating lines is free and repeatable: traffic is only consumed when the lines are used. All generated lines draw from the SAME plan balance. Dedicated per-IP products don't generate; fetch them from GET /proxies instead.
| Parameter | Type | Required | Description |
|---|---|---|---|
protocol | string | optional | "http" (default) or "socks5". |
count | integer | optional | Lines to return, 1 to 1000. Default 1. |
country | string | optional | Country targeting, e.g. "US" (letters only, 2 to 40 chars). |
state | string | optional | State / region targeting, where the pool supports it. |
city | string | optional | City targeting, where the pool supports it. |
isp | string | optional | ISP targeting. Residential Survey plans only (400 on other products). |
stickyMinutes | integer | optional | Sticky-session length in minutes. Omit for rotating IPs. |
curl -X POST https://hproxy.com/api/v1/plans/cmjfmhhpd004c4i4hqsk3mzrr/generate \
-H "X-API-Key: hpx_your_key_here" \
-H "Content-Type: application/json" \
-d '{"count": 3, "country": "US", "stickyMinutes": 30}'Ownership is strict: the plan must be yours and active, anything else is a plain 404 (an id never confirms another account's plan exists). Free-text targeting is validated before it touches the network (letters, digits, spaces and simple punctuation only), so a bad value is a clean 400 naming the rule. The exact host, port and username grammar in the response varies by pool; treat lines as opaque and use them verbatim.
Need a hand wiring this up? Email support@hproxy.com. A real person reads every message.