Send Event
#
Method#
/send-eventPOST
https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/send-event
#
HeaderKey | Value |
---|---|
Client-Token | ACCOUNT SECURITY TOKEN |
#
ConceptIn this method, you can send messages of type Event. You can only send this type to a group.
#
Attributes#
RequiredAttributes | 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 |
#
EventAttributes | 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#
200Attributes | 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
#
405In 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.
#
415If 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 ResponseLink to the webhook response (upon receiving)