Mention group
#
Method#
/send-textPOST
https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/send-text
#
HeaderKey | Value |
---|---|
Client-Token | ACCOUNT SECURITY TOKEN |
#
ConceptThis method is responsible for mentioning groups related to a community. Mentions can only be made in groups within a community, and the mentioned groups must belong to the same community.
#
Attributes#
RequiredAttributes | Type | Description |
---|---|---|
phone | string | ID of the group where the groups will be mentioned |
message | string | Text to be sent. Must contain @ with the group ID |
groupMentioned | GroupMentioned[] | List of objects with the group data to be mentioned |
#
GroupMentionedAttributes | Type | Description |
---|---|---|
phone | string | ID of the group to be mentioned |
subject | string | Name of the group |
#
OptionalAttributes | Type | Description |
---|---|---|
delayMessage | number | In this attribute, a delay is added to the message. You can decide between a range of 1~15 sec, meaning how many seconds it will wait to send the next message. (Ex "delayMessage": 5, ). The default delay if not specified is 1~3 sec |
#
Request Bodytip
It is also possible to mention participants in the message along with the group mentions
#
Response#
200Attributes | Type | Description |
---|---|---|
zaapId | string | ID in Z-API |
messageId | string | ID in WhatsApp |
id | string | Added for compatibility with Zapier, it has the same value as messageId |
Example
#
405In this case, ensure that you are correctly sending the method specification, meaning check if you sent POST or GET as specified at the beginning of this topic.
#
415If you receive a 415 error, make sure to add the "Content-Type" in the request headers for the object you are sending, in most cases "application/json".
#
Webhook ResponseLink to the webhook response (upon receiving)