Skip to main content
POST
/
api
/
{session}
/
events
Send an event message
curl --request POST \
  --url https://{host}/api/{session}/events \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '{
  "chatId": "5511999999999@c.us",
  "reply_to": null,
  "event": {
    "name": "John'\''s Nail Appointment 💅",
    "description": "It'\''s time for your nail care session! 🌟\\n\\nYou'\''ll be getting a *classic gel manicure* – clean, polished, and long-lasting. 💖\\n\\n📍 *Location:* Luxe Nail Studio\\nWe'\''re on the *2nd floor of the Plaza Mall*, next to the flower shop. Look for the *pink neon sign*!\\n\\nFeel free to arrive *5–10 mins early* so we can get started on time 😊",
    "startTime": 2063137000,
    "endTime": null,
    "location": {
      "name": "Luxe Nail Studio 💅"
    },
    "extraGuestsAllowed": false
  }
}'
{
  "success": true,
  "messageId": "3EB0XXXXXX"
}

Description

This endpoint allows you to send event messages to individual contacts or groups on WhatsApp. Events can include information about name, description, time, location, and permission for extra guests.

URL Parameters

session
string
required
Authenticated session ID that will send the event

Body

{
  "jid": "5511999999999@s.whatsapp.net",
  "event": {
    "name": "Team Meeting",
    "description": "Description",
    "startTime": 0,
    "endTime": 0,
    "location": {
      "name": "Team Meeting",
      "latitude": -23.5505,
      "longitude": -46.6333
    },
    "extraGuestsAllowed": true
  }
}

Body Parameters

PropertyTypeRequiredDescription
jidstring✅ YesRecipient identifier (WhatsApp JID). Format: 5511999999999@s.whatsapp.net for contacts or 120363XXXXX@g.us for groups
eventobject✅ YesObject containing event information
event.namestring✅ YesName of the event
event.descriptionstring❌ NoEvent description
event.startTimenumber✅ YesUnix timestamp (in milliseconds) indicating the event start time
event.endTimenumber❌ NoUnix timestamp (in milliseconds) indicating the event end time
event.locationobject✅ YesEvent location information
event.location.namestring✅ YesLocation name or address
event.location.latitudenumber❌ NoLocation latitude
event.location.longitudenumber❌ NoLocation longitude
event.extraGuestsAllowedboolean✅ YesDefines whether extra guests are allowed at the event
{
  "success": true,
  "messageId": "3EB0XXXXXX"
}

Status Codes

  • 200 - Event sent successfully
  • 400 - Invalid parameters
  • 401 - Unauthorized session
  • 404 - Session not found

Usage Example

curl -X POST https://api.wappfy.com.br/api/my-session/events \
  -H "Content-Type: application/json" \
  -d '{
    "jid": "5511999999999@s.whatsapp.net",
    "event": {
      "name": "Reunião de Equipe",
      "description": "Discussion about Q1 project",
      "startTime": 1704034800000,
      "endTime": 1704038400000,
      "location": {
        "name": "Conference Room A, 1000 Main Street",
        "latitude": -23.561684,
        "longitude": -46.655981
      },
      "extraGuestsAllowed": true
    }
  }'

Important Notes

  • Timestamps must be in Unix format (milliseconds)
  • Location is required, but latitude and longitude are optional
  • If extraGuestsAllowed is true, guests will be able to bring additional people
  • The event will be displayed on WhatsApp with a special card containing all provided information

Authorizations

apikey
string
header
required

Your Wappfy API key (get it at dash.wappfy.com.br)

Path Parameters

session
string
required

Session name (instanceName)

Body

application/json
chatId
string
required
Example:

"5511999999999@c.us"

event
object
required
reply_to
string

Message ID you want to reply to

Example:

null

Response

201 - application/json
id
string
required

Message ID

Example:

"false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA"

timestamp
number
required

Unix timestamp of when the message was created

Example:

1666943582

from
string
required

Chat ID to which this message was sent

Example:

"5511999999999@c.us"

fromMe
boolean
required

Indicates if the message was sent by the current user

source
enum<string>
required

The device that sent the message - either API or APP. Available in events (webhooks/websockets) only and only "fromMe: true" messages.

Available options:
api,
app
Example:

"api"

to
string
required
  • ID for who this message is for.
  • If the message is sent by the current user, it will be the Chat to which the message is being sent.
  • If the message is sent by another user, it will be the ID for the current user.
Example:

"5511999999999@c.us"

participant
string
required

For groups - participant who sent the message

body
string
required

Message content

hasMedia
boolean
required

Indicates if the message has media available for download

ack
enum<number>
required

Message acknowledgement (ACK) status

Available options:
-1,
0,
1,
2,
3,
4
ackName
string
required

Message acknowledgement status name

media
object

Message media object, if any and downloaded

author
string

If the message was sent to a group, this field will contain the user who sent the message

location
object

Location information contained in the message

vCards
string[]

List of vCards contained in the message

_data
object

Message in raw WhatsApp format. May change at any time, use with caution!

replyTo
object
I