Atualizar configurações
Define as opções de comportamento da instância indicada no parâmetro de caminho {instance}.
curl --request POST \
--url https://pilotstatus.com.br/api/layer/evolution-v2/settings/set/{instance} \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data @- <<EOF
{
"rejectCall": true,
"groupsIgnore": false,
"alwaysOnline": true,
"readMessages": false,
"readStatus": false,
"syncFullHistory": false,
"msgCall": "Sorry, I can't take calls right now.",
"wavoipToken": ""
}
EOFimport requests
url = "https://pilotstatus.com.br/api/layer/evolution-v2/settings/set/{instance}"
payload = {
"rejectCall": True,
"groupsIgnore": False,
"alwaysOnline": True,
"readMessages": False,
"readStatus": False,
"syncFullHistory": False,
"msgCall": "Sorry, I can't take calls right now.",
"wavoipToken": ""
}
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({
rejectCall: true,
groupsIgnore: false,
alwaysOnline: true,
readMessages: false,
readStatus: false,
syncFullHistory: false,
msgCall: 'Sorry, I can\'t take calls right now.',
wavoipToken: ''
})
};
fetch('https://pilotstatus.com.br/api/layer/evolution-v2/settings/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/settings/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([
'rejectCall' => true,
'groupsIgnore' => false,
'alwaysOnline' => true,
'readMessages' => false,
'readStatus' => false,
'syncFullHistory' => false,
'msgCall' => 'Sorry, I can\'t take calls right now.',
'wavoipToken' => ''
]),
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/settings/set/{instance}"
payload := strings.NewReader("{\n \"rejectCall\": true,\n \"groupsIgnore\": false,\n \"alwaysOnline\": true,\n \"readMessages\": false,\n \"readStatus\": false,\n \"syncFullHistory\": false,\n \"msgCall\": \"Sorry, I can't take calls right now.\",\n \"wavoipToken\": \"\"\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/settings/set/{instance}")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"rejectCall\": true,\n \"groupsIgnore\": false,\n \"alwaysOnline\": true,\n \"readMessages\": false,\n \"readStatus\": false,\n \"syncFullHistory\": false,\n \"msgCall\": \"Sorry, I can't take calls right now.\",\n \"wavoipToken\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/api/layer/evolution-v2/settings/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 \"rejectCall\": true,\n \"groupsIgnore\": false,\n \"alwaysOnline\": true,\n \"readMessages\": false,\n \"readStatus\": false,\n \"syncFullHistory\": false,\n \"msgCall\": \"Sorry, I can't take calls right now.\",\n \"wavoipToken\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"settings": {
"instanceName": "my-instance",
"settings": {
"rejectCall": true,
"msgCall": "I can't take calls right now, please send a message.",
"groupsIgnore": false,
"alwaysOnline": true,
"readMessages": true,
"readStatus": false,
"syncFullHistory": false,
"wavoipToken": ""
}
}
}{
"status": 400,
"error": "Bad Request",
"message": "Invalid payload"
}Autorizações
Your Pilot Status API key (ps_...). Evolution GO also accepts Authorization: Bearer <key>.
Parâmetros de caminho
O nome de exibição do número no painel do Pilot Status.
Corpo
Rejeita automaticamente as chamadas recebidas no WhatsApp.
true
Ignora mensagens vindas de grupos.
false
Mantém a presença da conexão como sempre online.
true
Marca automaticamente as mensagens recebidas como lidas.
false
Marca automaticamente as atualizações de status/stories como lidas.
false
Sincroniza todo o histórico de mensagens ao conectar.
false
Mensagem enviada a quem liga quando uma chamada é rejeitada.
"Sorry, I can't take calls right now."
Token WAVOIP usado para habilitar o tratamento de chamadas de voz.
""
Resposta
Sucesso — corpo de resposta nativo do provedor.
Confirmation that the instance settings were saved. Echoes the instance name and the settings payload that was persisted.
Show child attributes
Show child attributes
Esta página foi útil?
curl --request POST \
--url https://pilotstatus.com.br/api/layer/evolution-v2/settings/set/{instance} \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data @- <<EOF
{
"rejectCall": true,
"groupsIgnore": false,
"alwaysOnline": true,
"readMessages": false,
"readStatus": false,
"syncFullHistory": false,
"msgCall": "Sorry, I can't take calls right now.",
"wavoipToken": ""
}
EOFimport requests
url = "https://pilotstatus.com.br/api/layer/evolution-v2/settings/set/{instance}"
payload = {
"rejectCall": True,
"groupsIgnore": False,
"alwaysOnline": True,
"readMessages": False,
"readStatus": False,
"syncFullHistory": False,
"msgCall": "Sorry, I can't take calls right now.",
"wavoipToken": ""
}
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({
rejectCall: true,
groupsIgnore: false,
alwaysOnline: true,
readMessages: false,
readStatus: false,
syncFullHistory: false,
msgCall: 'Sorry, I can\'t take calls right now.',
wavoipToken: ''
})
};
fetch('https://pilotstatus.com.br/api/layer/evolution-v2/settings/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/settings/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([
'rejectCall' => true,
'groupsIgnore' => false,
'alwaysOnline' => true,
'readMessages' => false,
'readStatus' => false,
'syncFullHistory' => false,
'msgCall' => 'Sorry, I can\'t take calls right now.',
'wavoipToken' => ''
]),
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/settings/set/{instance}"
payload := strings.NewReader("{\n \"rejectCall\": true,\n \"groupsIgnore\": false,\n \"alwaysOnline\": true,\n \"readMessages\": false,\n \"readStatus\": false,\n \"syncFullHistory\": false,\n \"msgCall\": \"Sorry, I can't take calls right now.\",\n \"wavoipToken\": \"\"\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/settings/set/{instance}")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"rejectCall\": true,\n \"groupsIgnore\": false,\n \"alwaysOnline\": true,\n \"readMessages\": false,\n \"readStatus\": false,\n \"syncFullHistory\": false,\n \"msgCall\": \"Sorry, I can't take calls right now.\",\n \"wavoipToken\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/api/layer/evolution-v2/settings/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 \"rejectCall\": true,\n \"groupsIgnore\": false,\n \"alwaysOnline\": true,\n \"readMessages\": false,\n \"readStatus\": false,\n \"syncFullHistory\": false,\n \"msgCall\": \"Sorry, I can't take calls right now.\",\n \"wavoipToken\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"settings": {
"instanceName": "my-instance",
"settings": {
"rejectCall": true,
"msgCall": "I can't take calls right now, please send a message.",
"groupsIgnore": false,
"alwaysOnline": true,
"readMessages": true,
"readStatus": false,
"syncFullHistory": false,
"wavoipToken": ""
}
}
}{
"status": 400,
"error": "Bad Request",
"message": "Invalid payload"
}