cURL
curl --request POST \
--url https://cmd.illusory.io/v1/proxies/swap/{proxyName} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"isp": "Verizon",
"location": "Austin",
"copy_settings": true
}
'import requests
url = "https://cmd.illusory.io/v1/proxies/swap/{proxyName}"
payload = {
"isp": "Verizon",
"location": "Austin",
"copy_settings": True
}
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({isp: 'Verizon', location: 'Austin', copy_settings: true})
};
fetch('https://cmd.illusory.io/v1/proxies/swap/{proxyName}', 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/swap/{proxyName}",
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([
'isp' => 'Verizon',
'location' => 'Austin',
'copy_settings' => true
]),
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/swap/{proxyName}"
payload := strings.NewReader("{\n \"isp\": \"Verizon\",\n \"location\": \"Austin\",\n \"copy_settings\": true\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/swap/{proxyName}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"isp\": \"Verizon\",\n \"location\": \"Austin\",\n \"copy_settings\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cmd.illusory.io/v1/proxies/swap/{proxyName}")
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 \"isp\": \"Verizon\",\n \"location\": \"Austin\",\n \"copy_settings\": true\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"message": "Proxy swap command sent to device successfully.",
"data": {
"proxy_name": "ILL-US-AU1-9999"
}
}{
"ok": false,
"data": {
"proxy_name": "ILL-US-AU1-9999"
},
"message": "Proxy not found"
}{
"ok": false,
"data": {
"count": 0,
"amount": 1,
"location": "Cleveland",
"isp": "AT&T"
},
"message": "The amount requested is lower than the available stock. Please review your cart as it may have been revised."
}Proxy Management
Swap Proxy
Swaps the proxy server with another proxy server.
POST
/
v1
/
proxies
/
swap
/
{proxyName}
cURL
curl --request POST \
--url https://cmd.illusory.io/v1/proxies/swap/{proxyName} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"isp": "Verizon",
"location": "Austin",
"copy_settings": true
}
'import requests
url = "https://cmd.illusory.io/v1/proxies/swap/{proxyName}"
payload = {
"isp": "Verizon",
"location": "Austin",
"copy_settings": True
}
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({isp: 'Verizon', location: 'Austin', copy_settings: true})
};
fetch('https://cmd.illusory.io/v1/proxies/swap/{proxyName}', 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/swap/{proxyName}",
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([
'isp' => 'Verizon',
'location' => 'Austin',
'copy_settings' => true
]),
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/swap/{proxyName}"
payload := strings.NewReader("{\n \"isp\": \"Verizon\",\n \"location\": \"Austin\",\n \"copy_settings\": true\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/swap/{proxyName}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"isp\": \"Verizon\",\n \"location\": \"Austin\",\n \"copy_settings\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cmd.illusory.io/v1/proxies/swap/{proxyName}")
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 \"isp\": \"Verizon\",\n \"location\": \"Austin\",\n \"copy_settings\": true\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"message": "Proxy swap command sent to device successfully.",
"data": {
"proxy_name": "ILL-US-AU1-9999"
}
}{
"ok": false,
"data": {
"proxy_name": "ILL-US-AU1-9999"
},
"message": "Proxy not found"
}{
"ok": false,
"data": {
"count": 0,
"amount": 1,
"location": "Cleveland",
"isp": "AT&T"
},
"message": "The amount requested is lower than the available stock. Please review your cart as it may have been revised."
}Swap a proxy server for a new one from any available ISP and location. This will remove the old proxy server and replace it with a new one.
The name of the proxy and port will change after swapping. The server IP may change as well. You have the option to
use
copy_settings to transfer configurations like: auto_change, auto_change_time, auth_method, username,
password and whitelist.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.
Path Parameters
Replace {proxyName} in the url path with YOUR_PROXY.
Body
application/json
Swap proxy details
Was this page helpful?
⌘I