Create community
Method#
/create-group#
POST https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/communities
Header#
| Key | Value |
|---|---|
| Client-Token | ACCOUNT SECURITY TOKEN |
Concept#
Before using this feature, it's important to check if the WhatsApp application on your mobile phone already supports communities. If it's available, you can use this API to create new communities.
Attributes#
Required#
| Attribute | Type | Description |
|---|---|---|
| name | string | Name of the community you want to create |
Optional#
| Attribute | Type | Description |
|---|---|---|
| description | string | Description of the community |
Request Body#
Method
POST https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/communities
Example
Response#
200#
| Attribute | Type | Description |
|---|---|---|
| id | string | ID of the created community |
| subGroups | array[subgroup] | List of linked groups |
Exemplo
405#
In this case certify that you are sending the correct specification of the method. This means, verify if you sent a POST or GET as specified at the beginning of this topic.
415#
In case you receive 415 error, make sure to add the “Content-Type” of the object you are sending in the request headers, mostly “application/json”