Create community
#
Method#
/create-groupPOST
https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/communities
#
HeaderKey | Value |
---|---|
Client-Token | ACCOUNT SECURITY TOKEN |
#
ConceptBefore 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#
RequiredAttribute | Type | Description |
---|---|---|
name | string | Name of the community you want to create |
#
OptionalAttribute | Type | Description |
---|---|---|
description | string | Description of the community |
#
Request BodyMethod
POST
https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/communities
Example
#
Response#
200Attribute | Type | Description |
---|---|---|
id | string | ID of the created community |
subGroups | array[subgroup] | List of linked groups |
Exemplo
#
405In 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.
#
415In 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”