Overview
This method is responsible for creating a group with its respective participants.
It’s not possible to add an image during creation, but you can add it afterwards using the update group image method.
You should not include the connected number in the participants list. At least one contact is required to create the group, just like on WhatsApp Web.
Attributes
Your instance ID. Available in the Z-API panel under Instances.
Your Z-API instance token.
Required
Whether to send a private invite to participants who can’t be added directly
List of participants’ phone numbers
Request Body
{
"autoInvite": true,
"groupName": "Z-API Group",
"phones": ["5544999999999", "5544888888888"]
}
Response
200
{
"phone": "120363019502650977-group",
"invitationLink": "https://chat.whatsapp.com/GONwbGGDkLe8BifUWwLgct"
}
405
Make sure you are correctly sending the method specification, that is, verify that you sent POST or GET as specified at the beginning of this topic.
415
If you receive a 415 error, make sure to add the “Content-Type” header to your request, which in most cases is “application/json”.