Send announcement
How to send a message (announcement) to the community via API
To send a message (to post announcement) to a Community, you need to find out the exact ID of the group attached to that community.
Read more about it here: Important aspects of the API Community
How to find the correct Announcements group
To send announcements to your Community, you need to use the dedicated Announcements group, which is technically separate from the Community’s main group.
The easiest and most reliable way to retrieve it is by using the endpoint:
GET /communities/{CommunityID}/subgroups
This call returns all subgroups linked to the Community — including the Announcements group.
Within the response, look for the group that has:
"announcements": true
"linkedParent"
matching your Community IDThe same name as your Community, but a different ID
Alternatively, you can also:
Manually send a message from your phone and check the
chat_id
in the webhook event — that’s the ID of the Announcements group.
This approach removes the guesswork and ensures you are sending announcements to the correct destination.
Sending an announcement to a community is completely identical and follows the rules for sending a message to a group. To send this message, use this endpoint:
POST https://gate.whapi.cloud/messages/text
curl --request POST \
--url https://gate.whapi.cloud/messages/text \
--header 'accept: application/json' \
--header 'authorization: Bearer {your_token}' \
--header 'content-type: application/json' \
--data '
{
"to": "[email protected]",
"body": "My first announcement"
}
'
We wrote more about how to post to a group here: Send Group message
Last updated
Was this helpful?