Send Event
Method#
/send-event#
POST https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/send-event
Header#
| Key | Value | 
|---|---|
| Client-Token | ACCOUNT SECURITY TOKEN | 
Concept#
In this method, you can send messages of type Event. You can only send this type to a group.

Attributes#
Required#
| Attributes | Type | Description | 
|---|---|---|
| phone | string | Recipient's phone number (or group ID for group messages) in the format CC DDD NUMBER. IMPORTANT Send only numbers, without formatting or masks. | 
| event | Event | Event data | 
Event#
| Attributes | Type | Description | 
|---|---|---|
| name | string | Event name | 
| description | string (optional) | Event description | 
| dateTime | string | Event date and time (without timezone) | 
| location | Location (optional) | Event location | 
| callLinkType | string (voice/video) (optional) | Event call type (voice or video) | 
| canceled | boolean | Defines if the event is canceled | 
Request Body#
Response#
200#
| Attributes | Type | Description | 
|---|---|---|
| zaapId | string | Z-api id | 
| messageId | string | WhatsApp id | 
| id | string | Added for compatibility with Zapier, it has the same value as messageId | 
Example
405#
In this case, make sure you are correctly sending the method specification, meaning check if you sent the 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, mostly "application/json".
Webhook Response#
Link to the webhook response (upon receiving)