Configure group messaging permissions
curl --request POST \
--url https://api.wppfy.com/group/updateAnnounce \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"groupjid": "120363339858396166@g.us",
"announce": true
}
'import requests
url = "https://api.wppfy.com/group/updateAnnounce"
payload = {
"groupjid": "120363339858396166@g.us",
"announce": True
}
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({groupjid: '120363339858396166@g.us', announce: true})
};
fetch('https://api.wppfy.com/group/updateAnnounce', 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.wppfy.com/group/updateAnnounce",
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([
'groupjid' => '120363339858396166@g.us',
'announce' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <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://api.wppfy.com/group/updateAnnounce"
payload := strings.NewReader("{\n \"groupjid\": \"120363339858396166@g.us\",\n \"announce\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<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://api.wppfy.com/group/updateAnnounce")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"groupjid\": \"120363339858396166@g.us\",\n \"announce\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/group/updateAnnounce")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"groupjid\": \"120363339858396166@g.us\",\n \"announce\": true\n}"
response = http.request(request)
puts response.read_body{
"response": "Group announce enabled successfully",
"group": {
"JID": "jid8@g.us",
"OwnerJID": "1232@s.whatsapp.net",
"OwnerPN": "<string>",
"Name": "Support Group",
"NameSetAt": "2023-11-07T05:31:56Z",
"NameSetBy": "<string>",
"NameSetByPN": "<string>",
"Topic": "<string>",
"TopicID": "<string>",
"TopicSetAt": "2023-11-07T05:31:56Z",
"TopicSetBy": "<string>",
"TopicSetByPN": "<string>",
"TopicDeleted": true,
"IsLocked": true,
"IsAnnounce": true,
"AnnounceVersionID": "<string>",
"IsEphemeral": true,
"DisappearingTimer": 1,
"IsIncognito": true,
"IsParent": true,
"IsJoinApprovalRequired": true,
"LinkedParentJID": "<string>",
"IsDefaultSubGroup": true,
"DefaultMembershipApprovalMode": "<string>",
"GroupCreated": "2023-11-07T05:31:56Z",
"CreatorCountryCode": "<string>",
"ParticipantVersionID": "<string>",
"Participants": [
{
"JID": "<string>",
"LID": "<string>",
"PhoneNumber": "<string>",
"IsAdmin": true,
"IsSuperAdmin": true,
"DisplayName": "<string>",
"ImagePreview": "<string>",
"Error": 1,
"AddRequest": {
"Code": "<string>",
"Expiration": "2023-11-07T05:31:56Z"
},
"Username": "<string>"
}
],
"MemberAddMode": "",
"AddressingMode": "",
"OwnerCanSendMessage": true,
"OwnerIsAdmin": true,
"DefaultSubGroupId": "<string>",
"invite_link": "<string>",
"request_participants": "<string>",
"image_url": "<string>",
"image_preview_url": "<string>",
"picture_id": "<string>",
"picture_preview_id": "<string>",
"picture_empty_at": "2023-11-07T05:31:56Z",
"image_checked_at": "2023-11-07T05:31:56Z",
"image_preview_checked_at": "2023-11-07T05:31:56Z",
"parent_community": {
"jid": "<string>",
"name": "<string>",
"image_url": "<string>",
"image_preview_url": "<string>",
"default_subgroup_jid": "<string>"
},
"participant_profiles": [
{
"jid": "<string>",
"pn": "<string>",
"lid": "<string>",
"username": "<string>",
"display_name": "<string>",
"name": "<string>",
"image_url": "<string>",
"image_preview_url": "<string>",
"picture_id": "<string>",
"picture_preview_id": "<string>",
"is_admin": true,
"is_super_admin": true
}
],
"ParticipantCount": 1,
"request_participants_lid": "<string>"
},
"needs_refresh": false
}Groups and Communities
Configure group messaging permissions
Sets the permissions for sending messages in the group, allowing restriction to administrators only.
When enabled (announce=true):
- Only administrators can send messages
- Other participants can only read
- Useful for important announcements or spam control
When disabled (announce=false):
- All participants can send messages
- Default setting for normal groups
Requires the user to be a group administrator to make changes.
POST
/
group
/
updateAnnounce
Configure group messaging permissions
curl --request POST \
--url https://api.wppfy.com/group/updateAnnounce \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"groupjid": "120363339858396166@g.us",
"announce": true
}
'import requests
url = "https://api.wppfy.com/group/updateAnnounce"
payload = {
"groupjid": "120363339858396166@g.us",
"announce": True
}
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({groupjid: '120363339858396166@g.us', announce: true})
};
fetch('https://api.wppfy.com/group/updateAnnounce', 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.wppfy.com/group/updateAnnounce",
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([
'groupjid' => '120363339858396166@g.us',
'announce' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <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://api.wppfy.com/group/updateAnnounce"
payload := strings.NewReader("{\n \"groupjid\": \"120363339858396166@g.us\",\n \"announce\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<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://api.wppfy.com/group/updateAnnounce")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"groupjid\": \"120363339858396166@g.us\",\n \"announce\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/group/updateAnnounce")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"groupjid\": \"120363339858396166@g.us\",\n \"announce\": true\n}"
response = http.request(request)
puts response.read_body{
"response": "Group announce enabled successfully",
"group": {
"JID": "jid8@g.us",
"OwnerJID": "1232@s.whatsapp.net",
"OwnerPN": "<string>",
"Name": "Support Group",
"NameSetAt": "2023-11-07T05:31:56Z",
"NameSetBy": "<string>",
"NameSetByPN": "<string>",
"Topic": "<string>",
"TopicID": "<string>",
"TopicSetAt": "2023-11-07T05:31:56Z",
"TopicSetBy": "<string>",
"TopicSetByPN": "<string>",
"TopicDeleted": true,
"IsLocked": true,
"IsAnnounce": true,
"AnnounceVersionID": "<string>",
"IsEphemeral": true,
"DisappearingTimer": 1,
"IsIncognito": true,
"IsParent": true,
"IsJoinApprovalRequired": true,
"LinkedParentJID": "<string>",
"IsDefaultSubGroup": true,
"DefaultMembershipApprovalMode": "<string>",
"GroupCreated": "2023-11-07T05:31:56Z",
"CreatorCountryCode": "<string>",
"ParticipantVersionID": "<string>",
"Participants": [
{
"JID": "<string>",
"LID": "<string>",
"PhoneNumber": "<string>",
"IsAdmin": true,
"IsSuperAdmin": true,
"DisplayName": "<string>",
"ImagePreview": "<string>",
"Error": 1,
"AddRequest": {
"Code": "<string>",
"Expiration": "2023-11-07T05:31:56Z"
},
"Username": "<string>"
}
],
"MemberAddMode": "",
"AddressingMode": "",
"OwnerCanSendMessage": true,
"OwnerIsAdmin": true,
"DefaultSubGroupId": "<string>",
"invite_link": "<string>",
"request_participants": "<string>",
"image_url": "<string>",
"image_preview_url": "<string>",
"picture_id": "<string>",
"picture_preview_id": "<string>",
"picture_empty_at": "2023-11-07T05:31:56Z",
"image_checked_at": "2023-11-07T05:31:56Z",
"image_preview_checked_at": "2023-11-07T05:31:56Z",
"parent_community": {
"jid": "<string>",
"name": "<string>",
"image_url": "<string>",
"image_preview_url": "<string>",
"default_subgroup_jid": "<string>"
},
"participant_profiles": [
{
"jid": "<string>",
"pn": "<string>",
"lid": "<string>",
"username": "<string>",
"display_name": "<string>",
"name": "<string>",
"image_url": "<string>",
"image_preview_url": "<string>",
"picture_id": "<string>",
"picture_preview_id": "<string>",
"is_admin": true,
"is_super_admin": true
}
],
"ParticipantCount": 1,
"request_participants_lid": "<string>"
},
"needs_refresh": false
}Authorizations
Body
application/json
