open-wa
DocsAPI reference

Events Client API

Generated client method reference for the events namespace.

Events Client API

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

PropValue
Return typePromise<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

PropValue
Namespaceevents
Actionupdate
Functionalityboth
Positional parameter ordereventId
Aliasesevents.cancelEvent
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPOST/api/events/cancelEventcancelEventActive
AliasPOST/api/cancelEventcancelEventActive

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

PropValue
Return typePromise<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

PropValue
Namespaceevents
Actionupdate
Functionalityboth
Positional parameter ordereventId, changes
Aliasesevents.editEvent
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPOST/api/events/editEventeditEventActive
AliasPOST/api/editEventeditEventActive

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

PropValue
Return typePromise<WhatsAppEvent | null>
WhatsAppEventView 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

PropValue
Namespaceevents
Actionread
Functionalityboth
Positional parameter ordereventId
Aliasesevents.getEvent
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryGET/api/events/getEventgetEventActive
AliasGET/api/getEventgetEventActive

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

PropValue
Return typePromise<EventResponse[]>
EventResponseView 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

PropValue
Namespaceevents
Actionread
Functionalityboth
Positional parameter ordereventId
Aliasesevents.getEventResponses
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryGET/api/events/getEventResponsesgetEventResponsesActive
AliasGET/api/getEventResponsesgetEventResponsesActive

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

PropValue
Return typePromise<EventPage>
EventPageView 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

PropValue
Namespaceevents
Actionread
Functionalityboth
Positional parameter orderchatId, options
Aliasesevents.get
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryGET/api/events/getgetEventsActive
AliasGET/api/getEventsgetEventsActive

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

PropValue
Return typePromise<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

PropValue
Namespaceevents
Actionsend
Functionalityboth
Positional parameter ordereventId, response
Aliasesevents.respondToEvent
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPOST/api/events/respondToEventrespondToEventActive
AliasPOST/api/respondToEventrespondToEventActive

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

PropValue
Return typePromise<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

PropValue
Namespaceevents
Actionsend
Functionalityboth
Positional parameter orderto, event
Aliasesevents.sendEvent
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPOST/api/events/sendEventsendEventActive
AliasPOST/api/sendEventsendEventActive

Was this helpful?

Your answer includes the page path and docs version.

On this page