Skip to main content
POST
/
instances
/
{instanceId}
/
token
/
{token}
/
send-text
Mention everyone
curl --request POST \
  --url https://api.z-api.io/instances/{instanceId}/token/{token}/send-text \
  --header 'Client-Token: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "phone": "<string>",
  "message": "<string>",
  "mentionAll": true
}
'

Documentation Index

Fetch the complete documentation index at: https://developer.z-api.io/llms.txt

Use this file to discover all available pages before exploring further.

Overview

This method is responsible for mentioning all participants in a group at once, without the need to list each number individually.
For the mention to appear as @everyone highlighted in green on WhatsApp (as a real mention), the message content must include @all.Example: "Test message @all"
  • @everyone and @todos do not work — only @all is recognized by WhatsApp
  • Works only in groups — not compatible with Newsletters

Attributes

instanceId
string
required
Your instance ID. Available in the Z-API panel under Instances.
token
string
required
Your Z-API instance token.

Required

phone
string
required
ID of the group where all participants will be mentioned
message
string
required
Text to be sent. For the mention to appear correctly on WhatsApp, include @all in the message content
mentionAll
boolean
required
When true, mentions all participants in the group

Optional

delayMessage
number
Delay added to the message. You can choose a range from 1 to 15 seconds. The default delay if not specified is 1 to 3 seconds

Request Body

{
  "phone": "120363019502650977-group",
  "message": "Test message @all",
  "mentionAll": true
}

Response

200

{
  "zaapId": "019DXXXXXXXXXXXXXXXXXXXXXXXX8B",
  "messageId": "3EXXXXXXXXXXXXXXXD",
  "id": "3XXXXXXXXXXXXXXXXX1D"
}

400

{
  "error": "mentionAll can only be used in groups"
}

405

In this case, make sure you are correctly sending the method specification, i.e. 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” of the object you are sending in the request headers, in most cases “application/json”.