W2A
Documentation engine

Advanced requests and extras

Read the details of how to use it in Requests.

There's a lib for nodejs here: Click here

Engine: baileys (JS)

You are viewing Baileys docs. Baileys uses camelCase method names (sendMessage, groupCreate) and JSON message shapes — see Non-Media/Media Messages examples below. Responses are JSON-serialized Baileys WAMessage objects. Persistence: Mongo connections-auth collection.


Send a "read" message
{
  "connectionId": "YOUR_CONNECTION_ID",
  "method": "readMessages",
  "params": [
    {
      "remoteJid": "[email protected]",
      "id": "MESSAGE_ID",
      "participant": "OPTIONAL_PARTICIPANT_FOR_GROUP"
    }
  ]
}

Send presence (typing / recording / online)

Accepts: 'unavailable', 'available', 'composing', 'recording', 'paused'

{
  "connectionId": "YOUR_CONNECTION_ID",
  "method": "sendPresenceUpdate",
  "params": [
    "composing",
    "[email protected]"
  ]
}

Deleting messages
{
  "connectionId": "YOUR_CONNECTION_ID",
  "method": "sendMessage",
  "params": [
    "[email protected]",
    {
      "delete": {
        "id": "MESSAGE_ID"
      },
      "fromMe": true
    }
  ]
}

Modifying Chats
Archive a chat! Replace the lastMessages with the last messages from the chat which you have stored in your database.
{
  "connectionId": "YOUR_CONNECTION_ID",
  "method": "chatModify",
  "params": [
    {
      "archive": true,
      "lastMessages": []
    },
    "[email protected]"
  ]
}
Mute a chat!
{
  "connectionId": "YOUR_CONNECTION_ID",
  "method": "chatModify",
  "params": [
    {
      "mute": 86400
    },
    "[email protected]"
  ]
}
Mark as read/unread! Replace the lastMessages with the last messages from the chat which you have stored in your database.
{
  "connectionId": "YOUR_CONNECTION_ID",
  "method": "chatModify",
  "params": [
    {
      "markRead": true,
      "lastMessages": []
    },
    "[email protected]"
  ]
}
Delete a chat! Replace the lastMessages with the last messages from the chat which you have stored in your database.
{
  "connectionId": "YOUR_CONNECTION_ID",
  "method": "chatModify",
  "params": [
    {
      "delete": true,
      "lastMessages": []
    },
    "[email protected]"
  ]
}
Pin/unpin a chat!
{
  "connectionId": "YOUR_CONNECTION_ID",
  "method": "chatModify",
  "params": [
    {
      "pin": true
    },
    "[email protected]"
  ]
}

Check if id is on WhatsApp
{
  "connectionId": "YOUR_CONNECTION_ID",
  "method": "onWhatsApp",
  "params": [
    [
      "[email protected]",
      "5516999999999"
    ]
  ]
}

Change own status
{
  "connectionId": "YOUR_CONNECTION_ID",
  "method": "updateProfileAbout",
  "params": [
    "New about text"
  ]
}

Change own name
{
  "connectionId": "YOUR_CONNECTION_ID",
  "method": "updateProfileName",
  "params": [
    "New display name"
  ]
}

Get display picture of a person/group
{
  "connectionId": "YOUR_CONNECTION_ID",
  "method": "profilePictureUrl",
  "params": [
    "[email protected]",
    "image"
  ]
}