Youproxy

Auto-extend by IPs

Endpoint:

POST/client/api/v1/{apiKey}/extend/auto1/{apiKey}/resource/{id}

Toggles auto-renewal for specific IP addresses. When enabled, the IPs will be automatically extended by rentPeriodDays before they expire. To toggle auto-extend on whole orders instead, use Auto-extend by order IDs.

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 toggle auto-extend on. Get them from Get IP addresses.

rentPeriodDays*

number

Extension duration in days for each automatic renewal. Get valid values from Rent period.

autoExtend*

boolean

true to enable auto-extend, false to disable.

Example

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

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. Switch tabs to see each scenario.

{
      "success": true,
      "proxyType": "IPv4",
      "rentPeriodDays": 30,
      "quantity": 1,
      "ipAddressIds": ["1111111111111111"],
      "balance": 5,
      "currency": "USD",
      "error": null
    }
{
      "success": false,
      "proxyType": null,
      "rentPeriodDays": 0,
      "quantity": 0,
      "ipAddressIds": [],
      "balance": 5,
      "currency": "USD",
      "error": {
        "code": 4,
        "message": "Incorrect proxy type"
      }
    }

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.

rentPeriodDays

number

Echoes the requested period. 0 on error.

quantity

number

Number of IPs the change was applied to. 0 on error.

ipAddressIds

array

Echoes the requested IDs. Empty array on error.

balance

number

Account balance in currency.

currency

string

ISO currency code (e.g. USD).

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