curl --request POST \
--url https://api.zapfy.io/v1/profile/update-privacy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"groupAdd": "all",
"lastSeen": "all",
"status": "all",
"profile": "all",
"readReceipts": "all",
"callAdd": "all",
"online": "all"
}
'import requests
url = "https://api.zapfy.io/v1/profile/update-privacy"
payload = {
"groupAdd": "all",
"lastSeen": "all",
"status": "all",
"profile": "all",
"readReceipts": "all",
"callAdd": "all",
"online": "all"
}
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({
groupAdd: 'all',
lastSeen: 'all',
status: 'all',
profile: 'all',
readReceipts: 'all',
callAdd: 'all',
online: 'all'
})
};
fetch('https://api.zapfy.io/v1/profile/update-privacy', 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://api.zapfy.io/v1/profile/update-privacy",
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([
'groupAdd' => 'all',
'lastSeen' => 'all',
'status' => 'all',
'profile' => 'all',
'readReceipts' => 'all',
'callAdd' => 'all',
'online' => 'all'
]),
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://api.zapfy.io/v1/profile/update-privacy"
payload := strings.NewReader("{\n \"groupAdd\": \"all\",\n \"lastSeen\": \"all\",\n \"status\": \"all\",\n \"profile\": \"all\",\n \"readReceipts\": \"all\",\n \"callAdd\": \"all\",\n \"online\": \"all\"\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://api.zapfy.io/v1/profile/update-privacy")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"groupAdd\": \"all\",\n \"lastSeen\": \"all\",\n \"status\": \"all\",\n \"profile\": \"all\",\n \"readReceipts\": \"all\",\n \"callAdd\": \"all\",\n \"online\": \"all\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zapfy.io/v1/profile/update-privacy")
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 \"groupAdd\": \"all\",\n \"lastSeen\": \"all\",\n \"status\": \"all\",\n \"profile\": \"all\",\n \"readReceipts\": \"all\",\n \"callAdd\": \"all\",\n \"online\": \"all\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"groupAdd": "all",
"lastSeen": "all",
"status": "all",
"profile": "all",
"readReceipts": "all",
"callAdd": "all",
"online": "all"
}
}{
"error": "Instance not found"
}{
"error": "Instance not found"
}{
"error": "Instance not found"
}{
"error": "Instance not found"
}Set privacy
Updates the seven privacy settings at once — all are required and a partial body is rejected. To change just one, read the current values with GET /v1/profile/privacy, change the field you want and resend all seven.
curl --request POST \
--url https://api.zapfy.io/v1/profile/update-privacy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"groupAdd": "all",
"lastSeen": "all",
"status": "all",
"profile": "all",
"readReceipts": "all",
"callAdd": "all",
"online": "all"
}
'import requests
url = "https://api.zapfy.io/v1/profile/update-privacy"
payload = {
"groupAdd": "all",
"lastSeen": "all",
"status": "all",
"profile": "all",
"readReceipts": "all",
"callAdd": "all",
"online": "all"
}
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({
groupAdd: 'all',
lastSeen: 'all',
status: 'all',
profile: 'all',
readReceipts: 'all',
callAdd: 'all',
online: 'all'
})
};
fetch('https://api.zapfy.io/v1/profile/update-privacy', 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://api.zapfy.io/v1/profile/update-privacy",
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([
'groupAdd' => 'all',
'lastSeen' => 'all',
'status' => 'all',
'profile' => 'all',
'readReceipts' => 'all',
'callAdd' => 'all',
'online' => 'all'
]),
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://api.zapfy.io/v1/profile/update-privacy"
payload := strings.NewReader("{\n \"groupAdd\": \"all\",\n \"lastSeen\": \"all\",\n \"status\": \"all\",\n \"profile\": \"all\",\n \"readReceipts\": \"all\",\n \"callAdd\": \"all\",\n \"online\": \"all\"\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://api.zapfy.io/v1/profile/update-privacy")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"groupAdd\": \"all\",\n \"lastSeen\": \"all\",\n \"status\": \"all\",\n \"profile\": \"all\",\n \"readReceipts\": \"all\",\n \"callAdd\": \"all\",\n \"online\": \"all\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zapfy.io/v1/profile/update-privacy")
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 \"groupAdd\": \"all\",\n \"lastSeen\": \"all\",\n \"status\": \"all\",\n \"profile\": \"all\",\n \"readReceipts\": \"all\",\n \"callAdd\": \"all\",\n \"online\": \"all\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"groupAdd": "all",
"lastSeen": "all",
"status": "all",
"profile": "all",
"readReceipts": "all",
"callAdd": "all",
"online": "all"
}
}{
"error": "Instance not found"
}{
"error": "Instance not found"
}{
"error": "Instance not found"
}{
"error": "Instance not found"
}Authorizations
Instance token (zpfy_inst_...) — sends messages.
Body
Who can add you to groups. ALL = everyone; CONTACTS = all of your contacts; CONTACT_BLACKLIST = your contacts, excluding the ones you put on an exclusion list (WhatsApp's "My contacts except…" option); NONE = nobody.
ALL, CONTACTS, CONTACT_BLACKLIST, NONE "all"
Who can see your "last seen". ALL = everyone; CONTACTS = all of your contacts; CONTACT_BLACKLIST = your contacts, excluding the ones you put on an exclusion list (WhatsApp's "My contacts except…" option); NONE = nobody.
ALL, CONTACTS, CONTACT_BLACKLIST, NONE "all"
Who can see your status updates (stories). ALL = everyone; CONTACTS = all of your contacts; CONTACT_BLACKLIST = your contacts, excluding the ones you put on an exclusion list (WhatsApp's "My contacts except…" option); NONE = nobody.
ALL, CONTACTS, CONTACT_BLACKLIST, NONE "all"
Who can see your profile photo. ALL = everyone; CONTACTS = all of your contacts; CONTACT_BLACKLIST = your contacts, excluding the ones you put on an exclusion list (WhatsApp's "My contacts except…" option); NONE = nobody.
ALL, CONTACTS, CONTACT_BLACKLIST, NONE "all"
Read receipts (blue ticks). ALL = on; NONE = off.
ALL, NONE "all"
Who can add you to group calls. ALL = anyone; KNOWN = only known contacts.
ALL, KNOWN "all"
Who can see when you are online. ALL = everyone; MATCH_LAST_SEEN = follows your "last seen" setting.
ALL, MATCH_LAST_SEEN "all"
Response
Privacy settings.
Show child attributes
Show child attributes