WhatsApp Messaging API APIs
REST API for WhatsApp: log in with a QR or pairing code, send text messages, read the inbox and chat history, download media, validate contacts, and create groups. Session-based, integrate in minutes from Python, Node.js, or cURL. For support bots, marketing automation, and CRM sync.
Create a WhatsApp Session (QR / Pairing Login)
Start logging in to your WhatsApp account and get a sessionId used by every other endpoint. Choose mode=qr to scan a QR code (recommended) or mode=pairing to enter a pairing code on your phone (requires phoneNumber). The response includes the session status and, for QR sessions, a scannable qrImage plus a qrPageUrl — a ready-to-open page that shows the live QR code and login status. Poll Get Session Status until it reads CONNECTED, then start sending messages. deviceName sets the label shown under WhatsApp's Linked Devices.
Send a Text Message
Send a WhatsApp text message from a connected session to any recipient. The session must have completed login; if the connection has dropped since then, it is reconnected automatically before sending. Pass the recipient's full international number (digits only, no +) in to and the message in text. Returns the upstream messageId and a sent status. Fails with 400 only if the session never logged in, was logged out, or cannot be reconnected.
List Recent Incoming Messages
Return messages received while the session was connected, newest last. Each item includes the message id, chatJid, sender, type, text, and timestamp. Use limit (max 500) to cap how many are returned. Ideal for polling new inbound messages to power auto-replies and two-way conversations.
List All Chats
Return a summary of every chat in the session's local store, which fills in as history syncs after login. Each summary includes the chat name, jid, whether it is a group, the unread count, and the number of stored messages. Use it to build a conversation list or to discover chatJids for reading message history.
List Messages in a Chat
Return the most recent messages of one chat from the local store, oldest to newest. Provide the chatJid (e.g. 8613800138000@s.whatsapp.net for a direct chat or 120363...@g.us for a group). Each message includes id, chatJid, fromMe, timestamp, text, and type. Use limit to control how many are returned.
Download Message Media
Download and decrypt the media (image, video, audio, or document) attached to a message and return it base64-encoded along with its byte size. Provide the sessionId, chatJid, and messageId (from chat history). The referenced message must contain media, otherwise the request fails.
List Contacts
Return the contacts currently held in the session's local store. Each contact includes its jid, name, and phone. The list fills in as contact and history data syncs after login. Use it to enumerate known contacts for enrichment or messaging.
Check Whether a Number Is on WhatsApp
Check whether a given phone number has an active WhatsApp account, using a connected session. Pass the full international number (digits only, no +) in the path. Returns the phoneNumber and an exists flag. Use it to validate recipients before sending to improve deliverability and reduce wasted sends.
Get a Contact's About Text
Return a contact's public About (status) text, or null if it is hidden by privacy or not set. Pass the full international number (digits only, no +) in the path. Uses a connected session to query the value in real time.
Get a Contact's Profile Picture URL
Return the URL of a contact's profile picture, or null if it is hidden by privacy or not set. Pass the full international number (digits only, no +) in the path. Uses a connected session to resolve the current picture URL.
Get Logged-in Account Info
Return information about the account logged in on this session: its jid, display name, About text, and registration timestamps (creation and last registration). Use it to confirm which account a session is connected as and to display your own profile.
Get Group Metadata
Return a group's metadata: its subject (name), description, and the list of participant JIDs. Provide the sessionId and the groupJid (ending with @g.us). Use it to inspect group membership and details.
Create a WhatsApp Group
Create a WhatsApp group with a name and an initial set of participants, and get back the new group's JID and metadata. Pass the request body as a JSON object with name (string) and participants (array of full international numbers, digits only), for example: {"name":"Support Group","participants":[8613800138000,4915256515060]}.