Evolution V2
Configure proxy
Sets the outbound proxy for the instance named in the {instance} path parameter.
POST
/
proxy
/
set
/
{instance}
Configure proxy
curl --request POST \
--url https://pilotstatus.com.br/api/layer/evolution-v2/proxy/set/{instance} \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"enabled": true,
"host": "proxy.example.com",
"port": "8080",
"protocol": "http",
"username": "proxyuser",
"password": "proxypass"
}
'import requests
url = "https://pilotstatus.com.br/api/layer/evolution-v2/proxy/set/{instance}"
payload = {
"enabled": True,
"host": "proxy.example.com",
"port": "8080",
"protocol": "http",
"username": "proxyuser",
"password": "proxypass"
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
host: 'proxy.example.com',
port: '8080',
protocol: 'http',
username: 'proxyuser',
password: 'proxypass'
})
};
fetch('https://pilotstatus.com.br/api/layer/evolution-v2/proxy/set/{instance}', 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://pilotstatus.com.br/api/layer/evolution-v2/proxy/set/{instance}",
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([
'enabled' => true,
'host' => 'proxy.example.com',
'port' => '8080',
'protocol' => 'http',
'username' => 'proxyuser',
'password' => 'proxypass'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$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://pilotstatus.com.br/api/layer/evolution-v2/proxy/set/{instance}"
payload := strings.NewReader("{\n \"enabled\": true,\n \"host\": \"proxy.example.com\",\n \"port\": \"8080\",\n \"protocol\": \"http\",\n \"username\": \"proxyuser\",\n \"password\": \"proxypass\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
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://pilotstatus.com.br/api/layer/evolution-v2/proxy/set/{instance}")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"host\": \"proxy.example.com\",\n \"port\": \"8080\",\n \"protocol\": \"http\",\n \"username\": \"proxyuser\",\n \"password\": \"proxypass\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/api/layer/evolution-v2/proxy/set/{instance}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"host\": \"proxy.example.com\",\n \"port\": \"8080\",\n \"protocol\": \"http\",\n \"username\": \"proxyuser\",\n \"password\": \"proxypass\"\n}"
response = http.request(request)
puts response.read_body{
"proxy": {
"instanceName": "my-instance",
"proxy": {
"enabled": true,
"host": "proxy.example.com",
"port": "3128",
"protocol": "http",
"username": "proxyuser",
"password": "proxypass"
}
}
}{
"status": 400,
"error": "Bad Request",
"message": "Invalid payload"
}Authorizations
Your Pilot Status API key (ps_...). Evolution GO also accepts Authorization: Bearer <key>.
Path Parameters
The number's display name in the Pilot Status dashboard.
Body
application/json
Whether the proxy is enabled for this instance.
Example:
true
Proxy host name or IP address.
Example:
"proxy.example.com"
Proxy port.
Example:
"8080"
Proxy protocol (e.g. http, https, socks5).
Example:
"http"
Username for proxy authentication.
Example:
"proxyuser"
Password for proxy authentication.
Example:
"proxypass"
Response
Success — provider-native response body.
Confirmation that the instance proxy configuration was saved. Echoes the instance name and the proxy payload that was persisted.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Configure proxy
curl --request POST \
--url https://pilotstatus.com.br/api/layer/evolution-v2/proxy/set/{instance} \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"enabled": true,
"host": "proxy.example.com",
"port": "8080",
"protocol": "http",
"username": "proxyuser",
"password": "proxypass"
}
'import requests
url = "https://pilotstatus.com.br/api/layer/evolution-v2/proxy/set/{instance}"
payload = {
"enabled": True,
"host": "proxy.example.com",
"port": "8080",
"protocol": "http",
"username": "proxyuser",
"password": "proxypass"
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
host: 'proxy.example.com',
port: '8080',
protocol: 'http',
username: 'proxyuser',
password: 'proxypass'
})
};
fetch('https://pilotstatus.com.br/api/layer/evolution-v2/proxy/set/{instance}', 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://pilotstatus.com.br/api/layer/evolution-v2/proxy/set/{instance}",
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([
'enabled' => true,
'host' => 'proxy.example.com',
'port' => '8080',
'protocol' => 'http',
'username' => 'proxyuser',
'password' => 'proxypass'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$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://pilotstatus.com.br/api/layer/evolution-v2/proxy/set/{instance}"
payload := strings.NewReader("{\n \"enabled\": true,\n \"host\": \"proxy.example.com\",\n \"port\": \"8080\",\n \"protocol\": \"http\",\n \"username\": \"proxyuser\",\n \"password\": \"proxypass\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
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://pilotstatus.com.br/api/layer/evolution-v2/proxy/set/{instance}")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"host\": \"proxy.example.com\",\n \"port\": \"8080\",\n \"protocol\": \"http\",\n \"username\": \"proxyuser\",\n \"password\": \"proxypass\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/api/layer/evolution-v2/proxy/set/{instance}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"host\": \"proxy.example.com\",\n \"port\": \"8080\",\n \"protocol\": \"http\",\n \"username\": \"proxyuser\",\n \"password\": \"proxypass\"\n}"
response = http.request(request)
puts response.read_body{
"proxy": {
"instanceName": "my-instance",
"proxy": {
"enabled": true,
"host": "proxy.example.com",
"port": "3128",
"protocol": "http",
"username": "proxyuser",
"password": "proxypass"
}
}
}{
"status": 400,
"error": "Bad Request",
"message": "Invalid payload"
}