Events Client API
Generated client method reference for the events namespace.
This page documents 7 schema-registry client methods in the events namespace.
cancelEvent
Cancel an event created by this account using WhatsApp’s encrypted event edit action.
Signature client.cancelEvent(eventId: string): Promise<boolean>
Usage
const result = await client.cancelEvent("false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB");Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<boolean> |
Resolves to boolean. A rejected Promise indicates input validation or dispatch failure.
In-process Client resolves to Promise<boolean>. The contract above is for the remote Node.js client; HTTP wraps that result in its data property.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | events |
| Action | update |
| Functionality | both |
| Positional parameter order | eventId |
| Aliases | events.cancelEvent |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/events/cancelEvent | cancelEvent | Active |
| Alias | POST | /api/cancelEvent | cancelEvent | Active |
editEvent
Edit an event created by this account. Unspecified fields retain their current values; endTime: null removes the end time.
Signature client.editEvent(eventId: string, changes: { description?: string; endTime?: number \| null; location?: string; name?: string; startTime?: number }): Promise<boolean>
Usage
const result = await client.editEvent("false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB", {"description":"Updated meetup details"});Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<boolean> |
Resolves to boolean. A rejected Promise indicates input validation or dispatch failure.
In-process Client resolves to Promise<boolean>. The contract above is for the remote Node.js client; HTTP wraps that result in its data property.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | events |
| Action | update |
| Functionality | both |
| Positional parameter order | eventId, changes |
| Aliases | events.editEvent |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/events/editEvent | editEvent | Active |
| Alias | POST | /api/editEvent | editEvent | Active |
getEvent
Retrieve an event by message ID from WhatsApp local history. Returns null when absent.
Signature client.getEvent(eventId: string): Promise<WhatsAppEvent \| null>
Usage
const result = await client.getEvent("false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB");Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<WhatsAppEvent | null> |
| WhatsAppEvent | View fields |
Resolves to WhatsAppEvent \| null. A rejected Promise indicates input validation or dispatch failure.
In-process Client resolves to Promise<WhatsAppEvent \| null>. The contract above is for the remote Node.js client; HTTP wraps that result in its data property.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | events |
| Action | read |
| Functionality | both |
| Positional parameter order | eventId |
| Aliases | events.getEvent |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/events/getEvent | getEvent | Active |
| Alias | GET | /api/getEvent | getEvent | Active |
getEventResponses
Get the latest decrypted RSVP per participant, including responses persisted in WhatsApp local history.
Signature client.getEventResponses(eventId: string): Promise<EventResponse[]>
Usage
const result = await client.getEventResponses("false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB");Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<EventResponse[]> |
| EventResponse | View fields |
Resolves to EventResponse[]. A rejected Promise indicates input validation or dispatch failure.
In-process Client resolves to Promise<EventResponse[]>. The contract above is for the remote Node.js client; HTTP wraps that result in its data property.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | events |
| Action | read |
| Functionality | both |
| Positional parameter order | eventId |
| Aliases | events.getEventResponses |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/events/getEventResponses | getEventResponses | Active |
| Alias | GET | /api/getEventResponses | getEventResponses | Active |
getEvents
Page through a chat’s locally synced event history, newest first. Pass nextCursor as options.before to retrieve the next page.
Signature client.getEvents(chatId: string, options?: { before?: string; limit?: number }): Promise<EventPage>
Usage
const result = await client.getEvents("447123456789@c.us");Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<EventPage> |
| EventPage | View fields |
Resolves to EventPage. A rejected Promise indicates input validation or dispatch failure.
In-process Client resolves to Promise<EventPage>. The contract above is for the remote Node.js client; HTTP wraps that result in its data property.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | events |
| Action | read |
| Functionality | both |
| Positional parameter order | chatId, options |
| Aliases | events.get |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/events/get | getEvents | Active |
| Alias | GET | /api/getEvents | getEvents | Active |
respondToEvent
RSVP through WhatsApp’s native encrypted event-response action.
Signature client.respondToEvent(eventId: string, response: "going" \| "notGoing" \| "maybe"): Promise<boolean>
Usage
const result = await client.respondToEvent("false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB", "going");Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<boolean> |
Resolves to boolean. A rejected Promise indicates input validation or dispatch failure.
In-process Client resolves to Promise<boolean>. The contract above is for the remote Node.js client; HTTP wraps that result in its data property.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | events |
| Action | send |
| Functionality | both |
| Positional parameter order | eventId, response |
| Aliases | events.respondToEvent |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/events/respondToEvent | respondToEvent | Active |
| Alias | POST | /api/respondToEvent | respondToEvent | Active |
sendEvent
Send a native WhatsApp event with Unix-second times. Returns its submitted message ID; delivery is observed through ACKs.
Signature client.sendEvent(to: string, event: { callType?: "voice" \| "video"; description?: string; endTime?: number; extraGuestsAllowed?: boolean; isScheduledCall?: boolean; location?: string; name: string; quotedMsgId?: string; requireApproval?: boolean; startTime: number }): Promise<string>
Usage
const result = await client.sendEvent("447123456789@c.us", {"name":"Community meetup","startTime":1893456000,"description":"Meet the community"});Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<string> |
Message ID
In-process Client resolves to Promise<MessageId>. The contract above is for the remote Node.js client; HTTP wraps that result in its data property.
Message ID
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | events |
| Action | send |
| Functionality | both |
| Positional parameter order | to, event |
| Aliases | events.sendEvent |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/events/sendEvent | sendEvent | Active |
| Alias | POST | /api/sendEvent | sendEvent | Active |
Was this helpful?
Your answer includes the page path and docs version.
