W2A
Documentation engine

Documentation

How to use the API and receive events

Whats2API is a simple and easy to use API, you can send and receive messages from whatsapp, and receive all events, such as: messages, contacts, etc

To use the API, you need to create a connection, and start it, after that, you will receive a QRCode, and you need to scan it with your whatsapp app, after that, all events will be sent to you.

Engines

Connections run on one of two WhatsApp engines (Baileys or hypermeow). The engine is set when you create a connection and cannot be changed — switching requires a new connection and re-scanning the QR. Wire formats differ between engines.

MCP for AI assistants

Plug Whats2API into Claude, Cursor, VS Code or any MCP-compatible client. Generate a long-lived token in the dashboard, paste the URL + token, and your AI can list, create, start and stop WhatsApp sessions on your behalf.

Read the MCP guide

For the NodeJS lib: Click here

To start sending request, as send messages, you will need to authenticate, look at the authentication section: Click here

To send messages, you have to make a Rest request to your endpoint with the right headers, let's see how to do it: Click here

Finally to receive events, you need to configure a endpoint, and all events will be sent to you, let's see how to do it: Click here