Introduction

WhatsApp API for Community Management

Concept of Communities

Communities on WhatsApp enables you to organize and bring related groups together under one umbrella using a structure that works best for you. You can create a community for anythingโ€”your school, your neighborhood, your nonprofit, or your local club.

To illustrate how the community structure works, take a look at the image below:

Important details to consider:

  1. When you create a community, a default group (the Announcements group) is created with the same name as the community.

  2. This group represents your entire community and is used to send messages to all members.

  3. All members of each new group associated with the community will be members of the default group (announcement group).

  4. When you unlink a group, all of its members are removed from the default group (announcement group).

As you can see above, every community has an "Announcements Group" where only administrators can post. Use it when you want to send something to the whole community.

Up to and including 2000 members can be added to the community and its announcement group.

Important aspects of the API Community

When you create a Community, WhatsApp creates two identical groups with the same name. This is not visible visually, however technically it looks like this.

One group is the โ€œAnnouncements groupโ€, which is the main group for announcements. The second group, however, is purely a technical binder and has nothing to do with members or messages that can be sent to announcements. This can cause confusion when working through the API, as when requesting Get Groups, you will see both groups!

But we've made sure it's convenient and clear for you.

What does this mean?

After creating a Community, you will get a unique Community ID (following the format of the group ID) in the response. You will only need this ID to manage the community and its members, but you will need a different ID to post ads.

Let's look at an example. Here is the response when creating a community (this is an abridged version, for the full version see the relevant section):

To send announcements you need to find the second group, which is the default โ€œAnnouncements groupโ€. Now let's see what we have among the groups (this is an abridged version, for the full version see the relevant section):

Thus we see two identical groups with the same name. However, you will need a second group to write the ad.

Markers that you can use to automatically determine which group you need to use

  1. Find a group that has your community ID in parameter "linkedParent";

  2. Find a group that has the parameter โ€œannouncementsโ€: true;

  3. Find groups with the same name as your community, excluding the community ID you received in the response.

Briefly

  1. Use the community ID to manage the community;

  2. To send announcements, use a group with the same name as the community but with the โ€œannouncementsโ€ parameter.

We are looking for options to simplify this process for you and will be sure to implement a more logical and simple flow of interaction with Communities.

If you still have any questions, feel free to contact our support. We will help you!

Last updated