Guides
Create a WhatsApp community with an API (curl, Node, Python)
To create a WhatsApp community with HelloHop, send a subject to the communities endpoint on your linked channel. Keep the returned community JID, use it to create or list subgroups, and fetch the invite link. You can also attach an existing group through the links endpoint instead of creating a new subgroup.
Facts (as of October 2026, API v1)
- Community creation takes subject and answers 201 with a group object.
- Subgroup creation takes subject, optional participants and optional hidden.
- The community invite-link response carries invite_link.
- Link and unlink return the group after reading it back to confirm the change.
Steps
- Prepare your channel. Link a WhatsApp number in the console and create a channel token. Set CHANNEL_ID and CHANNEL_TOKEN in your environment.
- Create the community. POST a subject to /communities. Keep the jid in the response. WhatsApp also creates the announcement subgroup.
- Create and list subgroups. POST a subject to /communities/{community}/subgroups, then GET that path to inspect the subgroup list.
- Fetch the invite link. GET /communities/{community}/invite-link. The response has invite_link.
Create, add a subgroup, inspect and invite
Choose one language. The examples create a community and a Support subgroup with no initial participants. In curl, replace COMMUNITY with the create response jid before continuing. Node.js uses built-in fetch and top-level await in an .mjs file; Python uses the requests package.
API=https://api.hellohop.app/v1
BASE="$API/sessions/$CHANNEL_ID"
AUTH="Authorization: Bearer $CHANNEL_TOKEN"
curl -s -X POST "$BASE/communities" \
-H "$AUTH" \
-H "Content-Type: application/json" \
-d '{"subject":"My community"}'
# Set COMMUNITY to the jid returned by the create call before continuing.
[email protected]
curl -s -X POST "$BASE/communities/$COMMUNITY/subgroups" \
-H "$AUTH" \
-H "Content-Type: application/json" \
-d '{"subject":"Support","participants":[]}'
curl -s -X GET "$BASE/communities/$COMMUNITY/subgroups" \
-H "$AUTH"
curl -s -X GET "$BASE/communities/$COMMUNITY/invite-link" \
-H "$AUTH"const API = 'https://api.hellohop.app/v1';
const { CHANNEL_ID, CHANNEL_TOKEN } = process.env;
const BASE = `${API}/sessions/${CHANNEL_ID}`;
const headers = {
Authorization: `Bearer ${CHANNEL_TOKEN}`,
'Content-Type': 'application/json',
};
async function call(method, path, body) {
const res = await fetch(`${BASE}${path}`, {
method,
headers,
body: body === undefined ? undefined : JSON.stringify(body),
});
const data = await res.json();
if (!res.ok) throw new Error(`${res.status} ${data.code}: ${data.error}`);
return data;
}
const community = await call('POST', `/communities`, {"subject":"My community"});
console.log(community);
const subgroup = await call('POST', `/communities/${community.jid}/subgroups`, {"subject":"Support","participants":[]});
console.log(subgroup);
const subgroups = await call('GET', `/communities/${community.jid}/subgroups`);
console.log(subgroups);
const invite = await call('GET', `/communities/${community.jid}/invite-link`);
console.log(invite);import os
import requests
API = 'https://api.hellohop.app/v1'
BASE = f"{API}/sessions/{os.environ['CHANNEL_ID']}"
HEADERS = {'Authorization': f"Bearer {os.environ['CHANNEL_TOKEN']}"}
def call(method, path, body=None):
res = requests.request(method, BASE + path, headers=HEADERS, json=body, timeout=30)
data = res.json()
if not res.ok:
raise RuntimeError(f"{res.status_code} {data.get('code')}: {data.get('error')}")
return data
community = call('POST', f"/communities", {
"subject": "My community"
})
print(community)
subgroup = call('POST', f"/communities/{community['jid']}/subgroups", {
"subject": "Support",
"participants": []
})
print(subgroup)
subgroups = call('GET', f"/communities/{community['jid']}/subgroups")
print(subgroups)
invite = call('GET', f"/communities/{community['jid']}/invite-link")
print(invite)Link a group you already have
Use the existing group JID in group_jid. Set COMMUNITY to the parent JID. This is an alternative to creating a new subgroup, not a required extra step.
API=https://api.hellohop.app/v1
BASE="$API/sessions/$CHANNEL_ID"
AUTH="Authorization: Bearer $CHANNEL_TOKEN"
curl -s -X POST "$BASE/communities/$COMMUNITY/links" \
-H "$AUTH" \
-H "Content-Type: application/json" \
-d '{"group_jid":"[email protected]","hidden":false}'Check before repeating a write
Keep every returned JID. A lost response or a 500, 502 or 503 can follow an applied write. Read or list groups and subgroups before creating again. There is no API idempotency key.
The examples use ordinary subgroups. With hidden: true, a successful create verifies the community link, not phone-visible hidden status. A verification_failed response means the subgroup was created: use group_jid from that error to link it instead of creating a duplicate.
A community costs one group add. The empty subgroup here costs two: its creation and its community link. Each initial participant adds another unit. The sandbox permits 5 group adds per day; optional warming has its own allowances when enabled.
Questions
- Which JID do I use for the parent?
- Use jid from the community create response. Keep the subgroup jid separately; it identifies the child group.
- Can I pass participants when creating the community?
- The community create body takes subject. Supply participants when creating a subgroup, up to 50 per request.
- How do I remove a group from a community?
- DELETE /communities/{community}/links/{group} unlinks the group and returns the group after a read-back check.
- What if hidden subgroup verification fails?
- Do not create it again. The verification_failed error includes group_jid for the group already created. Repair its link with the links endpoint.
Free sandbox, forever. Add a real number when you're ready.
Start in the free sandboxKeep going
HelloHop is an independent WhatsApp API for developers: send and receive messages, automate groups and communities, and get signed webhooks with a free sandbox. Not affiliated with WhatsApp or Meta. You link your own number.