Group Chats
Create and manage WhatsApp group chats, participants, and invite links
Group Chats
Create and manage WhatsApp group conversations directly from the API. Groups appear in the Inbox alongside individual conversations, and you can send messages to groups using the same messaging endpoints.
The Groups API is not supported on phone numbers connected via Coexistence (Cloud API + WhatsApp Business app on the same number). Meta disables group create, list, and management endpoints for coexistence and Multi-solution Conversations setups. To use the Groups API, connect a number in Cloud API-only mode.
How to tell if a number is in Coexistence
- If the same phone number is still active in the WhatsApp Business app on a phone and connected to Zernio at the same time, it's Coexistence.
- You can also check in Meta Business Suite under WhatsApp Accounts > Phone Numbers. Numbers running Coexistence keep the mobile app registration active alongside the Cloud API.
Migrating a Coexistence number to Cloud API-only
Meta does not expose an API to flip an existing number out of Coexistence. The business has to disconnect from the WhatsApp Business app (Settings > Account > Business Platform > Disconnect on the phone). Once disconnected, Zernio deactivates the account automatically. Reconnect the number via Embedded Signup or Headless Credentials without choosing the "existing WA Business app account" option, and the Groups API will be available.
These are actual WhatsApp group chats on the platform, not contact groups used for broadcast targeting (which are at /v1/whatsapp/groups).
Create a Group
const { data } = await zernio.whatsapp.createWhatsAppGroupChat({
body: {
accountId: 'YOUR_WHATSAPP_ACCOUNT_ID',
subject: 'Customer Support Team',
description: 'Internal support coordination',
joinApprovalMode: 'approval_required'
}
});
console.log('Group created:', data.group.groupId);
console.log('Invite link:', data.group.inviteLink);response = client.whatsapp.create_whats_app_group_chat(
account_id='YOUR_WHATSAPP_ACCOUNT_ID',
subject='Customer Support Team',
description='Internal support coordination',
join_approval_mode='approval_required'
)
print(f"Group created: {response.group.group_id}")curl -X POST https://zernio.com/api/v1/whatsapp/wa-groups \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"accountId": "YOUR_WHATSAPP_ACCOUNT_ID",
"subject": "Customer Support Team",
"description": "Internal support coordination",
"joinApprovalMode": "approval_required"
}'List Active Groups
const { data } = await zernio.whatsapp.listWhatsAppGroupChats({
query: { accountId: 'YOUR_WHATSAPP_ACCOUNT_ID', limit: 50 }
});
data.groups.forEach(g => console.log(`${g.subject} (${g.id})`));response = client.whatsapp.list_whats_app_group_chats(
account_id='YOUR_WHATSAPP_ACCOUNT_ID',
limit=50
)
for g in response.groups:
print(f"{g.subject} ({g.id})")curl "https://zernio.com/api/v1/whatsapp/wa-groups?accountId=YOUR_WHATSAPP_ACCOUNT_ID&limit=50" \
-H "Authorization: Bearer YOUR_API_KEY"Manage Participants
Add up to 8 participants per request, or remove participants from a group:
// Add participants
await zernio.whatsapp.addWhatsAppGroupParticipants({
path: { groupId: 'GROUP_ID' },
query: { accountId: 'YOUR_WHATSAPP_ACCOUNT_ID' },
body: { phoneNumbers: ['+1234567890', '+0987654321'] }
});
// Remove participants
await zernio.whatsapp.removeWhatsAppGroupParticipants({
path: { groupId: 'GROUP_ID' },
query: { accountId: 'YOUR_WHATSAPP_ACCOUNT_ID' },
body: { phoneNumbers: ['+1234567890'] }
});# Add participants
client.whatsapp.add_whats_app_group_participants(
group_id='GROUP_ID',
account_id='YOUR_WHATSAPP_ACCOUNT_ID',
phone_numbers=['+1234567890', '+0987654321']
)
# Remove participants
client.whatsapp.remove_whats_app_group_participants(
group_id='GROUP_ID',
account_id='YOUR_WHATSAPP_ACCOUNT_ID',
phone_numbers=['+1234567890']
)# Add participants
curl -X POST "https://zernio.com/api/v1/whatsapp/wa-groups/GROUP_ID/participants?accountId=YOUR_WHATSAPP_ACCOUNT_ID" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phoneNumbers": ["+1234567890", "+0987654321"]}'
# Remove participants
curl -X DELETE "https://zernio.com/api/v1/whatsapp/wa-groups/GROUP_ID/participants?accountId=YOUR_WHATSAPP_ACCOUNT_ID" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phoneNumbers": ["+1234567890"]}'Invite Links & Join Requests
Generate invite links for your group and manage pending join requests:
// Create invite link
const { data } = await zernio.whatsapp.createWhatsAppGroupInviteLink({
path: { groupId: 'GROUP_ID' },
query: { accountId: 'YOUR_WHATSAPP_ACCOUNT_ID' }
});
console.log('Invite link:', data.inviteLink);
// List pending join requests (for groups with approval_required)
const { data: requests } = await zernio.whatsapp.listWhatsAppGroupJoinRequests({
path: { groupId: 'GROUP_ID' },
query: { accountId: 'YOUR_WHATSAPP_ACCOUNT_ID' }
});
// Approve join requests
await zernio.whatsapp.approveWhatsAppGroupJoinRequests({
path: { groupId: 'GROUP_ID' },
query: { accountId: 'YOUR_WHATSAPP_ACCOUNT_ID' },
body: { phoneNumbers: ['+1234567890'] }
});# Create invite link
curl -X POST "https://zernio.com/api/v1/whatsapp/wa-groups/GROUP_ID/invite-link?accountId=YOUR_WHATSAPP_ACCOUNT_ID" \
-H "Authorization: Bearer YOUR_API_KEY"
# List pending join requests
curl "https://zernio.com/api/v1/whatsapp/wa-groups/GROUP_ID/join-requests?accountId=YOUR_WHATSAPP_ACCOUNT_ID" \
-H "Authorization: Bearer YOUR_API_KEY"
# Approve join requests
curl -X POST "https://zernio.com/api/v1/whatsapp/wa-groups/GROUP_ID/join-requests?accountId=YOUR_WHATSAPP_ACCOUNT_ID" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phoneNumbers": ["+1234567890"]}'Sending Messages to Groups
Send messages to a group using the standard Inbox messaging API. Group conversations are created automatically when a group message is received, and you can reply using the conversation ID:
// Send a text message to a group conversation
await zernio.messages.sendInboxMessage({
path: { conversationId: 'CONVERSATION_ID' },
body: {
accountId: 'YOUR_ACCOUNT_ID',
message: 'Hello team!',
},
});client.messages.send_inbox_message(
conversation_id="CONVERSATION_ID",
account_id="YOUR_ACCOUNT_ID",
message="Hello team!",
)curl -X POST "https://zernio.com/api/v1/inbox/conversations/CONVERSATION_ID/messages" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"accountId": "YOUR_ACCOUNT_ID",
"message": "Hello team!"
}'Group messages from all participants appear in the Inbox. Each group has its own conversation thread identified by the group ID.