Link groups
#
Method#
/communities/linkPOST
https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/communities/link
#
HeaderKey | Value |
---|---|
Client-Token | ACCOUNT SECURITY TOKEN |
#
ConceptWith this API, you can add other groups to a community. To do this, you will need the ID of your community and the phone numbers of the groups you want to add.
Attention
It's important to remember that you cannot link the same group to more than one community. If you provide 3 groups to add, and one of them is already part of another community, 2 will be added, and the one already in another community will be indicated in the response.
#
Attributes#
RequiredAttribute | Type | Description |
---|---|---|
communityId | string | The ID of the community to which the groups will be added |
groupsPhones | array of strings | An array with the phone number(s) of the groups to be linked |
#
OptinalAttribute | Type | Description |
---|
#
Request Body#
URLPOST
https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/communities/link
#
Body#
Response#
200Attribute | Type | Description |
---|---|---|
success | boolean | true if successful, false in case of failure |
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”