cURL
curl --request PATCH \
--url https://cmd.illusory.io/v1/proxies/allocate/renew \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"proxies": {
"time": [
{
"proxy_name": "IL-US-AU1-9999",
"auto_renew": true,
"interval": 1
},
{
"proxy_name": "IL-US-AU1-9998",
"auto_renew": true,
"interval": 1
}
]
}
}
'import requests
url = "https://cmd.illusory.io/v1/proxies/allocate/renew"
payload = { "proxies": { "time": [
{
"proxy_name": "IL-US-AU1-9999",
"auto_renew": True,
"interval": 1
},
{
"proxy_name": "IL-US-AU1-9998",
"auto_renew": True,
"interval": 1
}
] } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
proxies: {
time: [
{proxy_name: 'IL-US-AU1-9999', auto_renew: true, interval: 1},
{proxy_name: 'IL-US-AU1-9998', auto_renew: true, interval: 1}
]
}
})
};
fetch('https://cmd.illusory.io/v1/proxies/allocate/renew', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cmd.illusory.io/v1/proxies/allocate/renew",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'proxies' => [
'time' => [
[
'proxy_name' => 'IL-US-AU1-9999',
'auto_renew' => true,
'interval' => 1
],
[
'proxy_name' => 'IL-US-AU1-9998',
'auto_renew' => true,
'interval' => 1
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cmd.illusory.io/v1/proxies/allocate/renew"
payload := strings.NewReader("{\n \"proxies\": {\n \"time\": [\n {\n \"proxy_name\": \"IL-US-AU1-9999\",\n \"auto_renew\": true,\n \"interval\": 1\n },\n {\n \"proxy_name\": \"IL-US-AU1-9998\",\n \"auto_renew\": true,\n \"interval\": 1\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://cmd.illusory.io/v1/proxies/allocate/renew")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"proxies\": {\n \"time\": [\n {\n \"proxy_name\": \"IL-US-AU1-9999\",\n \"auto_renew\": true,\n \"interval\": 1\n },\n {\n \"proxy_name\": \"IL-US-AU1-9998\",\n \"auto_renew\": true,\n \"interval\": 1\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cmd.illusory.io/v1/proxies/allocate/renew")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"proxies\": {\n \"time\": [\n {\n \"proxy_name\": \"IL-US-AU1-9999\",\n \"auto_renew\": true,\n \"interval\": 1\n },\n {\n \"proxy_name\": \"IL-US-AU1-9998\",\n \"auto_renew\": true,\n \"interval\": 1\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"message": "Sent proxy allocation renew settings successfully.",
"data": {
"proxies": {
"time": [
{
"proxy_name": "IL-US-AU1-9999",
"auto_renew": true,
"interval": 1
}
]
}
}
}{
"ok": false,
"data": {
"proxy_name": "ILL-US-AU1-9999"
},
"message": "Proxy not found"
}Proxy Management
Update Proxies Renew
Updates the auto-renew settings of one or more proxy servers.
PATCH
/
v1
/
proxies
/
allocate
/
renew
cURL
curl --request PATCH \
--url https://cmd.illusory.io/v1/proxies/allocate/renew \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"proxies": {
"time": [
{
"proxy_name": "IL-US-AU1-9999",
"auto_renew": true,
"interval": 1
},
{
"proxy_name": "IL-US-AU1-9998",
"auto_renew": true,
"interval": 1
}
]
}
}
'import requests
url = "https://cmd.illusory.io/v1/proxies/allocate/renew"
payload = { "proxies": { "time": [
{
"proxy_name": "IL-US-AU1-9999",
"auto_renew": True,
"interval": 1
},
{
"proxy_name": "IL-US-AU1-9998",
"auto_renew": True,
"interval": 1
}
] } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
proxies: {
time: [
{proxy_name: 'IL-US-AU1-9999', auto_renew: true, interval: 1},
{proxy_name: 'IL-US-AU1-9998', auto_renew: true, interval: 1}
]
}
})
};
fetch('https://cmd.illusory.io/v1/proxies/allocate/renew', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cmd.illusory.io/v1/proxies/allocate/renew",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'proxies' => [
'time' => [
[
'proxy_name' => 'IL-US-AU1-9999',
'auto_renew' => true,
'interval' => 1
],
[
'proxy_name' => 'IL-US-AU1-9998',
'auto_renew' => true,
'interval' => 1
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cmd.illusory.io/v1/proxies/allocate/renew"
payload := strings.NewReader("{\n \"proxies\": {\n \"time\": [\n {\n \"proxy_name\": \"IL-US-AU1-9999\",\n \"auto_renew\": true,\n \"interval\": 1\n },\n {\n \"proxy_name\": \"IL-US-AU1-9998\",\n \"auto_renew\": true,\n \"interval\": 1\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://cmd.illusory.io/v1/proxies/allocate/renew")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"proxies\": {\n \"time\": [\n {\n \"proxy_name\": \"IL-US-AU1-9999\",\n \"auto_renew\": true,\n \"interval\": 1\n },\n {\n \"proxy_name\": \"IL-US-AU1-9998\",\n \"auto_renew\": true,\n \"interval\": 1\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cmd.illusory.io/v1/proxies/allocate/renew")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"proxies\": {\n \"time\": [\n {\n \"proxy_name\": \"IL-US-AU1-9999\",\n \"auto_renew\": true,\n \"interval\": 1\n },\n {\n \"proxy_name\": \"IL-US-AU1-9998\",\n \"auto_renew\": true,\n \"interval\": 1\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"message": "Sent proxy allocation renew settings successfully.",
"data": {
"proxies": {
"time": [
{
"proxy_name": "IL-US-AU1-9999",
"auto_renew": true,
"interval": 1
}
]
}
}
}{
"ok": false,
"data": {
"proxy_name": "ILL-US-AU1-9999"
},
"message": "Proxy not found"
}You can specify whether you want specific proxies to automatically allocate time when they expire. If enabled, the proxy will automatically renew for the same amount of time as the current period.
If disabled, the proxy will expire and be removed from your account unless you manually allocate time it.
Authorizations
The Authorization header is used to authenticate with the API using your Master API key. Value is of the format Bearer YOUR_KEY_HERE.
Body
application/json
Allocate proxy details
Object containing a list of proxies to allocate.
Show child attributes
Show child attributes
Example:
{
"time": [
{
"proxy_name": "IL-US-AU1-9999",
"auto_renew": true,
"interval": 1
},
{
"proxy_name": "IL-US-AU1-9998",
"auto_renew": true,
"interval": 1
}
]
}
Response
Server response
Was this page helpful?
⌘I