cURL
curl --request POST \
--url https://cmd.illusory.io/v1/proxies/allocate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"proxies": {
"time": [
{
"proxy_name": "ILL-US-AU1-9999",
"interval": 1,
"period": "weekly"
},
{
"proxy_name": "ILL-US-AU1-9998",
"interval": 2,
"period": "monthly"
}
]
}
}
'import requests
url = "https://cmd.illusory.io/v1/proxies/allocate"
payload = { "proxies": { "time": [
{
"proxy_name": "ILL-US-AU1-9999",
"interval": 1,
"period": "weekly"
},
{
"proxy_name": "ILL-US-AU1-9998",
"interval": 2,
"period": "monthly"
}
] } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
proxies: {
time: [
{proxy_name: 'ILL-US-AU1-9999', interval: 1, period: 'weekly'},
{proxy_name: 'ILL-US-AU1-9998', interval: 2, period: 'monthly'}
]
}
})
};
fetch('https://cmd.illusory.io/v1/proxies/allocate', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'proxies' => [
'time' => [
[
'proxy_name' => 'ILL-US-AU1-9999',
'interval' => 1,
'period' => 'weekly'
],
[
'proxy_name' => 'ILL-US-AU1-9998',
'interval' => 2,
'period' => 'monthly'
]
]
]
]),
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"
payload := strings.NewReader("{\n \"proxies\": {\n \"time\": [\n {\n \"proxy_name\": \"ILL-US-AU1-9999\",\n \"interval\": 1,\n \"period\": \"weekly\"\n },\n {\n \"proxy_name\": \"ILL-US-AU1-9998\",\n \"interval\": 2,\n \"period\": \"monthly\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://cmd.illusory.io/v1/proxies/allocate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"proxies\": {\n \"time\": [\n {\n \"proxy_name\": \"ILL-US-AU1-9999\",\n \"interval\": 1,\n \"period\": \"weekly\"\n },\n {\n \"proxy_name\": \"ILL-US-AU1-9998\",\n \"interval\": 2,\n \"period\": \"monthly\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cmd.illusory.io/v1/proxies/allocate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"proxies\": {\n \"time\": [\n {\n \"proxy_name\": \"ILL-US-AU1-9999\",\n \"interval\": 1,\n \"period\": \"weekly\"\n },\n {\n \"proxy_name\": \"ILL-US-AU1-9998\",\n \"interval\": 2,\n \"period\": \"monthly\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"message": "Sent proxy expiration update successfully.",
"data": {
"proxies": {
"time": [
{
"proxy_name": "IL-US-AU1-9999",
"period": "hourly",
"interval": 1,
"individual_total": 5
}
]
},
"total": 5
}
}{
"ok": false,
"data": {
"proxy_name": "ILL-US-AU1-9999"
},
"message": "Proxy not found"
}{
"ok": false,
"data": {
"funds": 40,
"due": 2198
},
"message": "Insufficient funds. Please add funds to your wallet."
}Proxy Management
Allocate Proxies
Allocates time to extend the expiration of one or more proxy servers.
POST
/
v1
/
proxies
/
allocate
cURL
curl --request POST \
--url https://cmd.illusory.io/v1/proxies/allocate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"proxies": {
"time": [
{
"proxy_name": "ILL-US-AU1-9999",
"interval": 1,
"period": "weekly"
},
{
"proxy_name": "ILL-US-AU1-9998",
"interval": 2,
"period": "monthly"
}
]
}
}
'import requests
url = "https://cmd.illusory.io/v1/proxies/allocate"
payload = { "proxies": { "time": [
{
"proxy_name": "ILL-US-AU1-9999",
"interval": 1,
"period": "weekly"
},
{
"proxy_name": "ILL-US-AU1-9998",
"interval": 2,
"period": "monthly"
}
] } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
proxies: {
time: [
{proxy_name: 'ILL-US-AU1-9999', interval: 1, period: 'weekly'},
{proxy_name: 'ILL-US-AU1-9998', interval: 2, period: 'monthly'}
]
}
})
};
fetch('https://cmd.illusory.io/v1/proxies/allocate', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'proxies' => [
'time' => [
[
'proxy_name' => 'ILL-US-AU1-9999',
'interval' => 1,
'period' => 'weekly'
],
[
'proxy_name' => 'ILL-US-AU1-9998',
'interval' => 2,
'period' => 'monthly'
]
]
]
]),
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"
payload := strings.NewReader("{\n \"proxies\": {\n \"time\": [\n {\n \"proxy_name\": \"ILL-US-AU1-9999\",\n \"interval\": 1,\n \"period\": \"weekly\"\n },\n {\n \"proxy_name\": \"ILL-US-AU1-9998\",\n \"interval\": 2,\n \"period\": \"monthly\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://cmd.illusory.io/v1/proxies/allocate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"proxies\": {\n \"time\": [\n {\n \"proxy_name\": \"ILL-US-AU1-9999\",\n \"interval\": 1,\n \"period\": \"weekly\"\n },\n {\n \"proxy_name\": \"ILL-US-AU1-9998\",\n \"interval\": 2,\n \"period\": \"monthly\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cmd.illusory.io/v1/proxies/allocate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"proxies\": {\n \"time\": [\n {\n \"proxy_name\": \"ILL-US-AU1-9999\",\n \"interval\": 1,\n \"period\": \"weekly\"\n },\n {\n \"proxy_name\": \"ILL-US-AU1-9998\",\n \"interval\": 2,\n \"period\": \"monthly\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"message": "Sent proxy expiration update successfully.",
"data": {
"proxies": {
"time": [
{
"proxy_name": "IL-US-AU1-9999",
"period": "hourly",
"interval": 1,
"individual_total": 5
}
]
},
"total": 5
}
}{
"ok": false,
"data": {
"proxy_name": "ILL-US-AU1-9999"
},
"message": "Proxy not found"
}{
"ok": false,
"data": {
"funds": 40,
"due": 2198
},
"message": "Insufficient funds. Please add funds to your wallet."
}Allocates time to a proxy server to extend its expiration date. Providing
period and interval will extend the proxy’s expiration date by the specified amount of time.
When allocating time to a proxy, funds will be deducted from your Illusory Wallet. Ensure you have sufficient funds
before allocating.
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": "ILL-US-AU1-9999",
"interval": 1,
"period": "weekly"
},
{
"proxy_name": "ILL-US-AU1-9998",
"interval": 2,
"period": "monthly"
}
]
}
Response
Server response
Indicates whether the request was successful e.g., true
Success message
Example:
"Sent proxy expiration update successfully."
Show child attributes
Show child attributes
Example:
{
"proxies": {
"time": [
{
"proxy_name": "IL-US-AU1-9999",
"period": "hourly",
"interval": 1,
"individual_total": 5
}
]
},
"total": 5
}
Was this page helpful?
⌘I