Messages Client API
Generated client method reference for the messages namespace.

Messages Client API
Generated file warning: this page is generated by
packages/schema/scripts/gen-client-reference-docs.ts. Do not edit generated method content by hand.
This page documents 37 schema-registry client methods in the messages namespace.
deleteMessage
Deletes a message
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | delete |
| Functionality | both |
| Positional parameter order | chatId, messageId, onlyLocal |
| Aliases | messages.delete |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | DELETE | /api/messages/delete | deleteMessage | Active |
| Alias | DELETE | /api/deleteMessage | deleteMessage | Active |
Usage
const result = await client.deleteMessage({
chatId: "447123456789@c.us",
messageId: ["false_447123456789@c.us_ABC123","false_447123456789@c.us_DEF456"],
onlyLocal: true,
});const result = await client.messages.delete({
chatId: "447123456789@c.us",
messageId: ["false_447123456789@c.us_ABC123","false_447123456789@c.us_DEF456"],
onlyLocal: true,
});curl -X DELETE "http://localhost:8080/api/messages/delete" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"chatId": "447123456789@c.us",
"messageId": [
"false_447123456789@c.us_ABC123",
"false_447123456789@c.us_DEF456"
],
"onlyLocal": true
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | boolean |
forwardMessages
Forwards messages to a chat
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | to, messages, skipMyMessages |
| Aliases | messages.forward |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/forward | forwardMessages | Active |
| Alias | POST | /api/forwardMessages | forwardMessages | Active |
Usage
const result = await client.forwardMessages({
to: "447123456789@c.us",
messages: ["false_447123456789@c.us_ABC123","false_447123456789@c.us_DEF456"],
skipMyMessages: false,
});const result = await client.messages.forward({
to: "447123456789@c.us",
messages: ["false_447123456789@c.us_ABC123","false_447123456789@c.us_DEF456"],
skipMyMessages: false,
});curl -X POST "http://localhost:8080/api/messages/forward" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"to": "447123456789@c.us",
"messages": [
"false_447123456789@c.us_ABC123",
"false_447123456789@c.us_DEF456"
],
"skipMyMessages": false
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | object { _serialized }[] | boolean |
getAllMessages
Retrieves all messages in the session
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | read |
| Functionality | both |
| Positional parameter order | chatId, includeMe, includeNotifications |
| Aliases | listMessages, messages.all, messages.getAll, messages.list |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/messages/getAll | getAllMessages | Active |
| Alias | GET | /api/getAllMessages | getAllMessages | Active |
| Alias | GET | /api/listMessages | listMessages | Active |
| Alias | GET | /api/messages/all | messages.all | Active |
| Alias | GET | /api/messages/list | messages.list | Active |
Usage
const result = await client.getAllMessages({
chatId: "447123456789@c.us",
includeMe: true,
includeNotifications: true,
});const result = await client.messages.getAll({
chatId: "447123456789@c.us",
includeMe: true,
includeNotifications: true,
});curl -G "http://localhost:8080/api/messages/getAll" \
-H "x-api-key: YOUR_API_KEY" \
--data-urlencode "chatId=447123456789@c.us" \
--data-urlencode "includeMe=true" \
--data-urlencode "includeNotifications=true"Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | unknown[] |
getMessageById
Retrieves a specific message by ID
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | read |
| Functionality | both |
| Positional parameter order | messageId |
| Aliases | getMessage, messages.get, messages.getById |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/messages/get | getMessageById | Active |
| Alias | GET | /api/getMessage | getMessage | Active |
| Alias | GET | /api/getMessageById | getMessageById | Active |
| Alias | GET | /api/messages/getById | messages.getById | Active |
Usage
const result = await client.getMessageById({
messageId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
});const result = await client.messages.get({
messageId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
});curl -G "http://localhost:8080/api/messages/get" \
-H "x-api-key: YOUR_API_KEY" \
--data-urlencode "messageId=false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB"Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | unknown |
getMessageInfo
Get message delivery info
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | read |
| Functionality | both |
| Positional parameter order | messageId |
| Aliases | messages.getInfo |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/messages/getInfo | getMessageInfo | Active |
| Alias | GET | /api/getMessageInfo | getMessageInfo | Active |
Usage
const result = await client.getMessageInfo({
messageId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
});const result = await client.messages.getInfo({
messageId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
});curl -G "http://localhost:8080/api/messages/getInfo" \
-H "x-api-key: YOUR_API_KEY" \
--data-urlencode "messageId=false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB"Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | unknown |
getMessagesForLLM
Get messages formatted for LLMs
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | read |
| Functionality | both |
| Positional parameter order | chatId, last |
| Aliases | getGptArray, messages.getForLLM, messages.getGptArray |
| Deprecated aliases | getGptArray, messages.getGptArray |
| License | none |
| WAPI override | getGptArray |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/messages/getForLLM | getMessagesForLLM | Active |
| Deprecated alias | GET | /api/getGptArray | getGptArray | Deprecated |
| Alias | GET | /api/getMessagesForLLM | getMessagesForLLM | Active |
| Deprecated alias | GET | /api/messages/getGptArray | messages.getGptArray | Deprecated |
Usage
const result = await client.getMessagesForLLM({
chatId: "447123456789@c.us",
last: 1,
});const result = await client.messages.getForLLM({
chatId: "447123456789@c.us",
last: 1,
});curl -G "http://localhost:8080/api/messages/getForLLM" \
-H "x-api-key: YOUR_API_KEY" \
--data-urlencode "chatId=447123456789@c.us" \
--data-urlencode "last=1"Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | unknown |
getMyLastMessage
Get last message sent by host
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | read |
| Functionality | both |
| Positional parameter order | chatId |
| Aliases | messages.getMyLast |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/messages/getMyLast | getMyLastMessage | Active |
| Alias | GET | /api/getMyLastMessage | getMyLastMessage | Active |
Usage
const result = await client.getMyLastMessage({
chatId: "447123456789@c.us",
});const result = await client.messages.getMyLast({
chatId: "447123456789@c.us",
});curl -G "http://localhost:8080/api/messages/getMyLast" \
-H "x-api-key: YOUR_API_KEY" \
--data-urlencode "chatId=447123456789@c.us"Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | unknown |
getStarredMessagesInsiders
Get starred messages
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | read |
| Functionality | both |
| Positional parameter order | chatId |
| Aliases | messages.getStarred |
| Deprecated aliases | - |
| License | insiders |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/messages/getStarred | getStarredMessages | Active |
| Alias | GET | /api/getStarredMessages | getStarredMessages | Active |
Usage
const result = await client.getStarredMessages({
chatId: "447123456789@c.us",
});const result = await client.messages.getStarred({
chatId: "447123456789@c.us",
});curl -G "http://localhost:8080/api/messages/getStarred" \
-H "x-api-key: YOUR_API_KEY" \
--data-urlencode "chatId=447123456789@c.us"Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | unknown[] |
getUnsentMessages
Get unsent/pending messages
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | read |
| Functionality | both |
| Positional parameter order | - |
| Aliases | messages.getUnsent |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/messages/getUnsent | getUnsentMessages | Active |
| Alias | GET | /api/getUnsentMessages | getUnsentMessages | Active |
Usage
const result = await client.getUnsentMessages({});const result = await client.messages.getUnsent({});curl -X GET "http://localhost:8080/api/messages/getUnsent" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{}'Parameters
This method does not define input parameters.
Output
| Prop | Value |
|---|---|
| Return type | unknown[] |
getVCards
Extract vCards from message
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | read |
| Functionality | both |
| Positional parameter order | messageId |
| Aliases | messages.getVCards |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/messages/getVCards | getVCards | Active |
| Alias | GET | /api/getVCards | getVCards | Active |
Usage
const result = await client.getVCards({
messageId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
});const result = await client.messages.getVCards({
messageId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
});curl -G "http://localhost:8080/api/messages/getVCards" \
-H "x-api-key: YOUR_API_KEY" \
--data-urlencode "messageId=false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB"Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | string[] |
loadEarlierMessages
Loads earlier messages from a chat
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | read |
| Functionality | both |
| Positional parameter order | chatId, count, includeMe |
| Aliases | loadOlderMessages, messages.loadEarlier, messages.loadOlder |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/loadEarlier | loadEarlierMessages | Active |
| Alias | POST | /api/loadEarlierMessages | loadEarlierMessages | Active |
| Alias | POST | /api/loadOlderMessages | loadOlderMessages | Active |
| Alias | POST | /api/messages/loadOlder | messages.loadOlder | Active |
Usage
const result = await client.loadEarlierMessages({
chatId: "447123456789@c.us",
count: 1,
includeMe: true,
});const result = await client.messages.loadEarlier({
chatId: "447123456789@c.us",
count: 1,
includeMe: true,
});curl -X POST "http://localhost:8080/api/messages/loadEarlier" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"chatId": "447123456789@c.us",
"count": 1,
"includeMe": true
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | unknown[] |
react
React to message with emoji
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | messageId, emoji |
| Aliases | messages.react |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/react | react | Active |
| Alias | POST | /api/react | react | Active |
Usage
const result = await client.react({
messageId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
emoji: "emoji",
});const result = await client.messages.react({
messageId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
emoji: "emoji",
});curl -X POST "http://localhost:8080/api/messages/react" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"messageId": "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
"emoji": "emoji"
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | boolean |
sendAdvancedButtonsInsiders
Sends an advanced button message with media (deprecated)
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | to, body, buttons, text, footer, filename |
| Aliases | messages.sendAdvancedButtons |
| Deprecated aliases | - |
| License | insiders |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/sendAdvancedButtons | sendAdvancedButtons | Active |
| Alias | POST | /api/sendAdvancedButtons | sendAdvancedButtons | Active |
Usage
const result = await client.sendAdvancedButtons({
to: "447123456789@c.us",
body: "body",
buttons: [],
text: "text",
footer: "footer",
filename: "filename",
});const result = await client.messages.sendAdvancedButtons({
to: "447123456789@c.us",
body: "body",
buttons: [],
text: "text",
footer: "footer",
filename: "filename",
});curl -X POST "http://localhost:8080/api/messages/sendAdvancedButtons" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"to": "447123456789@c.us",
"body": "body",
"buttons": [],
"text": "text",
"footer": "footer",
"filename": "filename"
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | object { _serialized } | boolean |
sendAudio
Sends an audio file to a chat
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | to, file, filename, quotedMsgId |
| Aliases | messages.sendAudio |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/sendAudio | sendAudio | Active |
| Alias | POST | /api/sendAudio | sendAudio | Active |
Usage
const result = await client.sendAudio({
to: "447123456789@c.us",
file: "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAA...",
filename: "document.pdf",
quotedMsgId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
});const result = await client.messages.sendAudio({
to: "447123456789@c.us",
file: "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAA...",
filename: "document.pdf",
quotedMsgId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
});curl -X POST "http://localhost:8080/api/messages/sendAudio" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"to": "447123456789@c.us",
"file": "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAA...",
"filename": "document.pdf",
"quotedMsgId": "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB"
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | object { _serialized } | boolean |
sendBanner
Sends a banner image
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | to, base64 |
| Aliases | messages.sendBanner |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/sendBanner | sendBanner | Active |
| Alias | POST | /api/sendBanner | sendBanner | Active |
Usage
const result = await client.sendBanner({
to: "447123456789@c.us",
base64: "base64",
});const result = await client.messages.sendBanner({
to: "447123456789@c.us",
base64: "base64",
});curl -X POST "http://localhost:8080/api/messages/sendBanner" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"to": "447123456789@c.us",
"base64": "base64"
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | object { _serialized } | boolean |
sendButtonsInsiders
Sends a button message (deprecated)
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | to, body, buttons, title, footer |
| Aliases | messages.sendButtons |
| Deprecated aliases | - |
| License | insiders |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/sendButtons | sendButtons | Active |
| Alias | POST | /api/sendButtons | sendButtons | Active |
Usage
const result = await client.sendButtons({
to: "447123456789@c.us",
body: "body",
buttons: [],
title: "title",
footer: "footer",
});const result = await client.messages.sendButtons({
to: "447123456789@c.us",
body: "body",
buttons: [],
title: "title",
footer: "footer",
});curl -X POST "http://localhost:8080/api/messages/sendButtons" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"to": "447123456789@c.us",
"body": "body",
"buttons": [],
"title": "title",
"footer": "footer"
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | object { _serialized } | boolean |
sendContact
Sends a single contact
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | to, contactId |
| Aliases | messages.sendContact |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/sendContact | sendContact | Active |
| Alias | POST | /api/sendContact | sendContact | Active |
Usage
const result = await client.sendContact({
to: "447123456789@c.us",
contactId: [],
});const result = await client.messages.sendContact({
to: "447123456789@c.us",
contactId: [],
});curl -X POST "http://localhost:8080/api/messages/sendContact" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"to": "447123456789@c.us",
"contactId": []
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | object { _serialized } | boolean |
sendFile
Sends a file or document to a chat
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | to, file, filename, caption |
| Aliases | messages.sendFile |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/sendFile | sendFile | Active |
| Alias | POST | /api/sendFile | sendFile | Active |
Usage
const result = await client.sendFile({
to: "447123456789@c.us",
file: "data:application/pdf;base64,JVBERi0xLjQK...",
filename: "document.pdf",
caption: "Check out this image!",
});const result = await client.messages.sendFile({
to: "447123456789@c.us",
file: "data:application/pdf;base64,JVBERi0xLjQK...",
filename: "document.pdf",
caption: "Check out this image!",
});curl -X POST "http://localhost:8080/api/messages/sendFile" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"to": "447123456789@c.us",
"file": "data:application/pdf;base64,JVBERi0xLjQK...",
"filename": "document.pdf",
"caption": "Check out this image!"
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | object { _serialized } | string |
sendFileFromUrl
Downloads a file from a URL and sends it to a chat
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | to, url, filename, caption, headers |
| Aliases | messages.sendFileFromUrl |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/sendFileFromUrl | sendFileFromUrl | Active |
| Alias | POST | /api/sendFileFromUrl | sendFileFromUrl | Active |
Usage
const result = await client.sendFileFromUrl({
to: "447123456789@c.us",
url: "url",
filename: "filename",
caption: "caption",
headers: {},
});const result = await client.messages.sendFileFromUrl({
to: "447123456789@c.us",
url: "url",
filename: "filename",
caption: "caption",
headers: {},
});curl -X POST "http://localhost:8080/api/messages/sendFileFromUrl" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"to": "447123456789@c.us",
"url": "url",
"filename": "filename",
"caption": "caption",
"headers": {}
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | string | boolean |
sendImage
Sends an image to a chat
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | to, imgData, filename, caption, id, waitForId |
| Aliases | messages.sendImage |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/sendImage | sendImage | Active |
| Alias | POST | /api/sendImage | sendImage | Active |
Usage
const result = await client.sendImage({
to: "447123456789@c.us",
imgData: "data:image/png;base64,iVBORw0KGgo...",
filename: "document.pdf",
caption: "Check out this image!",
id: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
waitForId: true,
});const result = await client.messages.sendImage({
to: "447123456789@c.us",
imgData: "data:image/png;base64,iVBORw0KGgo...",
filename: "document.pdf",
caption: "Check out this image!",
id: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
waitForId: true,
});curl -X POST "http://localhost:8080/api/messages/sendImage" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"to": "447123456789@c.us",
"imgData": "data:image/png;base64,iVBORw0KGgo...",
"filename": "document.pdf",
"caption": "Check out this image!",
"id": "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
"waitForId": true
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | object { _serialized } | boolean | string |
sendLinkWithAutoPreview
Sends a link with auto-generated preview
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | to, url, text, thumbnail, quotedMsgId, customSize |
| Aliases | messages.sendLink, messages.sendLinkWithAutoPreview, sendLink |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/sendLinkWithAutoPreview | sendLinkWithAutoPreview | Active |
| Alias | POST | /api/messages/sendLink | messages.sendLink | Active |
| Alias | POST | /api/sendLink | sendLink | Active |
| Alias | POST | /api/sendLinkWithAutoPreview | sendLinkWithAutoPreview | Active |
Usage
const result = await client.sendLinkWithAutoPreview({
to: "447123456789@c.us",
url: "url",
text: "Hello, world!",
thumbnail: "thumbnail",
quotedMsgId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
customSize: {},
});const result = await client.messages.sendLinkWithAutoPreview({
to: "447123456789@c.us",
url: "url",
text: "Hello, world!",
thumbnail: "thumbnail",
quotedMsgId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
customSize: {},
});curl -X POST "http://localhost:8080/api/messages/sendLinkWithAutoPreview" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"to": "447123456789@c.us",
"url": "url",
"text": "Hello, world!",
"thumbnail": "thumbnail",
"quotedMsgId": "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
"customSize": {}
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | object { _serialized } | boolean |
sendListMessageInsiders
Sends a list/menu message (deprecated)
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | to, sections, title, description, actionText |
| Aliases | messages.sendList, sendList |
| Deprecated aliases | - |
| License | insiders |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/sendList | sendListMessage | Active |
| Alias | POST | /api/sendList | sendList | Active |
| Alias | POST | /api/sendListMessage | sendListMessage | Active |
Usage
const result = await client.sendListMessage({
to: "447123456789@c.us",
sections: [],
title: "title",
description: "description",
actionText: "actionText",
});const result = await client.messages.sendList({
to: "447123456789@c.us",
sections: [],
title: "title",
description: "description",
actionText: "actionText",
});curl -X POST "http://localhost:8080/api/messages/sendList" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"to": "447123456789@c.us",
"sections": [],
"title": "title",
"description": "description",
"actionText": "actionText"
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | object { _serialized } | boolean |
sendLocation
Sends a location to a chat
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | to, lat, lng, loc, address, url |
| Aliases | messages.sendLocation |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/sendLocation | sendLocation | Active |
| Alias | POST | /api/sendLocation | sendLocation | Active |
Usage
const result = await client.sendLocation({
to: "447123456789@c.us",
lat: 51.5074,
lng: -0.1278,
loc: "London, UK",
address: "address",
url: "url",
});const result = await client.messages.sendLocation({
to: "447123456789@c.us",
lat: 51.5074,
lng: -0.1278,
loc: "London, UK",
address: "address",
url: "url",
});curl -X POST "http://localhost:8080/api/messages/sendLocation" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"to": "447123456789@c.us",
"lat": 51.5074,
"lng": -0.1278,
"loc": "London, UK",
"address": "address",
"url": "url"
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | object { _serialized } | boolean |
sendMessageWithThumb
Sends a link preview message with custom thumbnail
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | thumb, url, title, description, content, to, quotedMsgId, customSize |
| Aliases | messages.sendLinkWithThumbnail, messages.sendWithThumb, sendLinkWithThumbnail |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/sendLinkWithThumbnail | sendMessageWithThumb | Active |
| Alias | POST | /api/messages/sendWithThumb | messages.sendWithThumb | Active |
| Alias | POST | /api/sendLinkWithThumbnail | sendLinkWithThumbnail | Active |
| Alias | POST | /api/sendMessageWithThumb | sendMessageWithThumb | Active |
Usage
const result = await client.sendMessageWithThumb({
thumb: "thumb",
url: "url",
title: "title",
description: "description",
content: "Hello, world!",
to: "447123456789@c.us",
quotedMsgId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
customSize: {},
});const result = await client.messages.sendLinkWithThumbnail({
thumb: "thumb",
url: "url",
title: "title",
description: "description",
content: "Hello, world!",
to: "447123456789@c.us",
quotedMsgId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
customSize: {},
});curl -X POST "http://localhost:8080/api/messages/sendLinkWithThumbnail" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"thumb": "thumb",
"url": "url",
"title": "title",
"description": "description",
"content": "Hello, world!",
"to": "447123456789@c.us",
"quotedMsgId": "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
"customSize": {}
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | object { _serialized } | boolean |
sendMultipleContacts
Sends multiple contacts
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | to, contactIds |
| Aliases | messages.sendContacts, messages.sendMultipleContacts, sendContacts |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/sendContacts | sendMultipleContacts | Active |
| Alias | POST | /api/messages/sendMultipleContacts | messages.sendMultipleContacts | Active |
| Alias | POST | /api/sendContacts | sendContacts | Active |
| Alias | POST | /api/sendMultipleContacts | sendMultipleContacts | Active |
Usage
const result = await client.sendMultipleContacts({
to: "447123456789@c.us",
contactIds: "447123456789@c.us",
});const result = await client.messages.sendContacts({
to: "447123456789@c.us",
contactIds: "447123456789@c.us",
});curl -X POST "http://localhost:8080/api/messages/sendContacts" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"to": "447123456789@c.us",
"contactIds": "447123456789@c.us"
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | object { _serialized } | boolean |
sendPaymentRequest
Sends a payment request message
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | to, amount, currency, message |
| Aliases | messages.sendPaymentRequest |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/sendPaymentRequest | sendPaymentRequest | Active |
| Alias | POST | /api/sendPaymentRequest | sendPaymentRequest | Active |
Usage
const result = await client.sendPaymentRequest({
to: "447123456789@c.us",
amount: 1,
currency: "currency",
message: "message",
});const result = await client.messages.sendPaymentRequest({
to: "447123456789@c.us",
amount: 1,
currency: "currency",
message: "message",
});curl -X POST "http://localhost:8080/api/messages/sendPaymentRequest" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"to": "447123456789@c.us",
"amount": 1,
"currency": "currency",
"message": "message"
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | object { _serialized } | boolean |
sendPoll
Sends a poll message
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | to, name, options, selectableCount |
| Aliases | messages.sendPoll |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/sendPoll | sendPoll | Active |
| Alias | POST | /api/sendPoll | sendPoll | Active |
Usage
const result = await client.sendPoll({
to: "447123456789@c.us",
name: "name",
options: [],
selectableCount: 1,
});const result = await client.messages.sendPoll({
to: "447123456789@c.us",
name: "name",
options: [],
selectableCount: 1,
});curl -X POST "http://localhost:8080/api/messages/sendPoll" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"to": "447123456789@c.us",
"name": "name",
"options": [],
"selectableCount": 1
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | object { _serialized } | boolean |
sendPtt
Sends a voice note (push-to-talk) to a chat
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | to, file, quotedMsgId |
| Aliases | messages.sendPtt, messages.sendVoiceNote, sendVoiceNote |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/sendPtt | sendPtt | Active |
| Alias | POST | /api/messages/sendVoiceNote | messages.sendVoiceNote | Active |
| Alias | POST | /api/sendPtt | sendPtt | Active |
| Alias | POST | /api/sendVoiceNote | sendVoiceNote | Active |
Usage
const result = await client.sendPtt({
to: "447123456789@c.us",
file: "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAA...",
quotedMsgId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
});const result = await client.messages.sendPtt({
to: "447123456789@c.us",
file: "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAA...",
quotedMsgId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
});curl -X POST "http://localhost:8080/api/messages/sendPtt" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"to": "447123456789@c.us",
"file": "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAA...",
"quotedMsgId": "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB"
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | object { _serialized } | boolean |
sendReplyWithMentions
Sends a reply to a message that includes @mentions
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | to, content, replyMessageId, hideTags, mentions |
| Aliases | messages.sendReplyWithMentions |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/sendReplyWithMentions | sendReplyWithMentions | Active |
| Alias | POST | /api/sendReplyWithMentions | sendReplyWithMentions | Active |
Usage
const result = await client.sendReplyWithMentions({
to: "447123456789@c.us",
content: "Hello, world!",
replyMessageId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
hideTags: true,
mentions: ["447123456789@c.us","441234567890@c.us"],
});const result = await client.messages.sendReplyWithMentions({
to: "447123456789@c.us",
content: "Hello, world!",
replyMessageId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
hideTags: true,
mentions: ["447123456789@c.us","441234567890@c.us"],
});curl -X POST "http://localhost:8080/api/messages/sendReplyWithMentions" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"to": "447123456789@c.us",
"content": "Hello, world!",
"replyMessageId": "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
"hideTags": true,
"mentions": [
"447123456789@c.us",
"441234567890@c.us"
]
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | object { _serialized } | boolean |
sendSeen
Mark message as seen
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | update |
| Functionality | both |
| Positional parameter order | chatId |
| Aliases | messages.sendSeen |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/messages/sendSeen | sendSeen | Active |
| Alias | PUT | /api/sendSeen | sendSeen | Active |
Usage
const result = await client.sendSeen({
chatId: "447123456789@c.us",
});const result = await client.messages.sendSeen({
chatId: "447123456789@c.us",
});curl -X PUT "http://localhost:8080/api/messages/sendSeen" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"chatId": "447123456789@c.us"
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | boolean |
sendText
Sends a text message to a chat
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | to, content, options |
| Aliases | messages.sendText |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/sendText | sendText | Active |
| Alias | POST | /api/sendText | sendText | Active |
Usage
const result = await client.sendText({
to: "447123456789@c.us",
content: "Hello, world!",
options: {"quotedMsg":"messageId","mentionedJidList":["447123456789@c.us"]},
});const result = await client.messages.sendText({
to: "447123456789@c.us",
content: "Hello, world!",
options: {"quotedMsg":"messageId","mentionedJidList":["447123456789@c.us"]},
});curl -X POST "http://localhost:8080/api/messages/sendText" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"to": "447123456789@c.us",
"content": "Hello, world!",
"options": {
"quotedMsg": "messageId",
"mentionedJidList": [
"447123456789@c.us"
]
}
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | object { _serialized } | boolean | string |
sendTextWithMentions
Sends a text message that includes @mentions
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | to, content, hideTags, mentions |
| Aliases | messages.sendTextWithMentions |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/sendTextWithMentions | sendTextWithMentions | Active |
| Alias | POST | /api/sendTextWithMentions | sendTextWithMentions | Active |
Usage
const result = await client.sendTextWithMentions({
to: "447123456789@c.us",
content: "Hello, world!",
hideTags: true,
mentions: ["447123456789@c.us","441234567890@c.us"],
});const result = await client.messages.sendTextWithMentions({
to: "447123456789@c.us",
content: "Hello, world!",
hideTags: true,
mentions: ["447123456789@c.us","441234567890@c.us"],
});curl -X POST "http://localhost:8080/api/messages/sendTextWithMentions" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"to": "447123456789@c.us",
"content": "Hello, world!",
"hideTags": true,
"mentions": [
"447123456789@c.us",
"441234567890@c.us"
]
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | object { _serialized } | boolean |
sendVCard
Sends a contact card (vCard)
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | to, vcard, contactName, contactNumber |
| Aliases | messages.sendVCard |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/sendVCard | sendVCard | Active |
| Alias | POST | /api/sendVCard | sendVCard | Active |
Usage
const result = await client.sendVCard({
to: "447123456789@c.us",
vcard: "vcard",
contactName: "contactName",
contactNumber: "contactNumber",
});const result = await client.messages.sendVCard({
to: "447123456789@c.us",
vcard: "vcard",
contactName: "contactName",
contactNumber: "contactNumber",
});curl -X POST "http://localhost:8080/api/messages/sendVCard" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"to": "447123456789@c.us",
"vcard": "vcard",
"contactName": "contactName",
"contactNumber": "contactNumber"
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | boolean |
sendVideoAsGif
Sends a video as an animated GIF
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | to, file, filename, caption, quotedMsgId |
| Aliases | messages.sendVideoAsGif |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/sendVideoAsGif | sendVideoAsGif | Active |
| Alias | POST | /api/sendVideoAsGif | sendVideoAsGif | Active |
Usage
const result = await client.sendVideoAsGif({
to: "447123456789@c.us",
file: "data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21...",
filename: "document.pdf",
caption: "Check out this image!",
quotedMsgId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
});const result = await client.messages.sendVideoAsGif({
to: "447123456789@c.us",
file: "data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21...",
filename: "document.pdf",
caption: "Check out this image!",
quotedMsgId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
});curl -X POST "http://localhost:8080/api/messages/sendVideoAsGif" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"to": "447123456789@c.us",
"file": "data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21...",
"filename": "document.pdf",
"caption": "Check out this image!",
"quotedMsgId": "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB"
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | object { _serialized } | boolean |
sendYouTubeLink
Sends a YouTube link with auto-generated preview
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | send |
| Functionality | both |
| Positional parameter order | to, url, text, thumbnail, quotedMsgId, customSize |
| Aliases | messages.sendYoutubeLink, messages.sendYouTubeLink, sendYoutubeLink |
| Deprecated aliases | messages.sendYoutubeLink, sendYoutubeLink |
| License | none |
| WAPI override | sendYoutubeLink |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/messages/sendYouTubeLink | sendYouTubeLink | Active |
| Deprecated alias | POST | /api/messages/sendYoutubeLink | messages.sendYoutubeLink | Deprecated |
| Deprecated alias | POST | /api/sendYoutubeLink | sendYoutubeLink | Deprecated |
| Alias | POST | /api/sendYouTubeLink | sendYouTubeLink | Active |
Usage
const result = await client.sendYouTubeLink({
to: "447123456789@c.us",
url: "url",
text: "Hello, world!",
thumbnail: "thumbnail",
quotedMsgId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
customSize: {},
});const result = await client.messages.sendYouTubeLink({
to: "447123456789@c.us",
url: "url",
text: "Hello, world!",
thumbnail: "thumbnail",
quotedMsgId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
customSize: {},
});curl -X POST "http://localhost:8080/api/messages/sendYouTubeLink" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"to": "447123456789@c.us",
"url": "url",
"text": "Hello, world!",
"thumbnail": "thumbnail",
"quotedMsgId": "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
"customSize": {}
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | object { _serialized } | boolean |
starMessage
Star a message
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | update |
| Functionality | both |
| Positional parameter order | messageId |
| Aliases | messages.star |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/messages/star | starMessage | Active |
| Alias | PUT | /api/starMessage | starMessage | Active |
Usage
const result = await client.starMessage({
messageId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
});const result = await client.messages.star({
messageId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
});curl -X PUT "http://localhost:8080/api/messages/star" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"messageId": "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB"
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | boolean |
unstarMessage
Unstar a message
Overview
| Prop | Value |
|---|---|
| Namespace | messages |
| Action | update |
| Functionality | both |
| Positional parameter order | messageId |
| Aliases | messages.unstar |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/messages/unstar | unstarMessage | Active |
| Alias | PUT | /api/unstarMessage | unstarMessage | Active |
Usage
const result = await client.unstarMessage({
messageId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
});const result = await client.messages.unstar({
messageId: "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB",
});curl -X PUT "http://localhost:8080/api/messages/unstar" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"messageId": "false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB"
}'Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | boolean |

Was this helpful?
Wally and his cute companion coffee mug are coding day and night to keep this up-to-date!
