Youproxy

Extend by IPs

Endpoint:

POSTPOST /client/api/v1/{apiKey}/calculate/extend

Returns the price before extending specific IP addresses. Always call this before the actual Extend by IP addresses request to surface validation issues without spending balance. To calculate price for extending whole orders instead, use Extend by orders ID.

Name

Type

Description

apiKey*

String

Your personal API key.

Request body

Name

Type

Description

proxyType*

String

One of: IPv4, IPv6, MOBILE, ISP.

ipAddressIds*

array

IP address IDs to extend. Get them from Get IP addresses.

rentPeriodDays*

number

Extension duration in days. Get valid values from Rent period.

promoCode*

String

Discount promo code. Get valid values from Promo codes.

Note for IPv6: all IPs from the same order must be extended together — partial extension is not allowed. Pass every ipAddressIds from the order in one request.

Example

curl -X POST https://youproxy.io/client/api/v1/$KEY/calculate/extend \
  -H "Content-Type: application/json" \
  -d '{
    "proxyType": "IPv4",
    "ipAddressIds": ["1111111111111111", "2222222222222222"],
    "rentPeriodDays": 30,
    "promoCode": "SAVE10"
  }'

For IPv6, MOBILE, or ISP — change proxyType and use the corresponding IDs from Get IP addresses. Body shape is otherwise identical.

Response

Same shape for all proxy types — proxyType field echoes the requested value. Switch tabs to see each scenario.

{
      "success": true,
      "proxyType": "IPv4",
      "balance": 7.18,
      "price": 2.65,
      "currency": "USD",
      "discount": 0,
      "promoCodeStatus": null,
      "error": null,
      "warnings": null
    }
{
      "success": true,
      "proxyType": "IPv4",
      "balance": 7.18,
      "price": 8.30,
      "currency": "USD",
      "discount": 0,
      "promoCodeStatus": null,
      "error": null,
      "warnings": [
        {
          "code": 16,
          "message": "Insufficient funds on balance"
        }
      ]
    }
{
      "success": true,
      "proxyType": "IPv4",
      "balance": 7.18,
      "price": 2.65,
      "currency": "USD",
      "discount": 0,
      "promoCodeStatus": "VALID",
      "error": null,
      "warnings": null
    }
{
      "success": true,
      "proxyType": "IPv4",
      "balance": 7.18,
      "price": 2.65,
      "currency": "USD",
      "discount": 0,
      "promoCodeStatus": "NO_VALID",
      "error": null,
      "warnings": null
    }
{
      "success": false,
      "proxyType": null,
      "balance": 0.65,
      "price": null,
      "currency": "USD",
      "discount": null,
      "promoCodeStatus": null,
      "error": {
        "code": 24,
        "message": "Incorrect ip addresses"
      },
      "warnings": null
    }

Response fields

Field

Type

Description

success

boolean

true on success, false if error is populated.

proxyType

string | null

Echoes the requested type. null on error.

balance

number

Account balance in currency.

price

number | null

Calculated extension cost. null on error.

currency

string

ISO currency code (e.g. USD).

discount

number | null

Discount percentage applied (e.g. 10 = 10%). 0 if no promo code.

promoCodeStatus

string | null

VALID, NO_VALID, or null if no promoCode sent.

warnings

array | null

Non-blocking issues. If present, extension won't go through with current data.

error

object | null

{ code, message } on failure. See Possible errors for codes.

The HTTP status is 200 OK for both success and error responses — check success: false to detect failures, not the HTTP code.

On this page