Add WhatsApp to Your Product

Use WhatsApp in your product & agents as a built-in viaSocket tool. It runs on viaSocket, so there is no account or API key to connect, and each use is paid from your Pass.

Paste it into Cursor, Claude Code or Codex.
Built-in tool

Everything You Need to Run WhatsApp

viaSocket runs WhatsApp for you. Your AI coding assistant does the setup; you call it like any other action.

No Account or API Key

Call WhatsApp straight away. viaSocket runs it, so there is nothing to sign up for, connect or keep signed in.

Paid Per Use

Each use is paid from your viaSocket Pass in AI credits. No separate subscription.

Works With 2,300+ Apps

Use WhatsApp in the same run as the apps your customers connect, and pass data between them.

Managed Data Mapping

Map data between your product & agents and the inputs WhatsApp expects.

Monitoring and Debugging

See every run, its cost and its errors in your logs.

Ready for AI Agents

Every action has an input schema, so your agent can call WhatsApp as a tool.

Available Actions for WhatsApp

What You Can Do with WhatsApp

Call these actions from your product & agents. viaSocket runs them for you.

  • Send WhatsApp MessageSend text, media, template, or bulk messages to a chosen WhatsApp contact or group.
  • Reply to a MessageSends a text reply that quotes one WhatsApp message, identified by its message ID, in a contact chat (phone number with country code) or a group (group ID ending in @g.us); the quoted message must be in that same chat. Fails with an error if the connected WhatsApp account isn't linked (session not ready). Returns the WhatsApp API's raw response for the sent reply.
  • List SessionsList your WhatsApp sessions
  • Get WhatsApp SessionRetrieve WhatsApp session details using a selected session ID.
  • List Active ChatsList active WhatsApp chats from the linked session, with optional chat type filter (person/group) and max results.
  • Get Chat HistoryGet messages from a specific contact or group.
  • Get All ContactsRetrieve WhatsApp contacts; optionally filter saved-only, exclude blocked contacts, and limit results.
  • Check Phone NumberCheck if a phone number is registered on WhatsApp by entering the full number with country code.
  • Add or Remove Message ReactionAdds, changes or removes your reaction emoji on one WhatsApp message, identified by its message ID, in a contact chat (phone number with country code) or a group (group ID ending in @g.us). Choosing Remove clears your existing reaction on that message. Fails with an error if the connected WhatsApp account isn't linked (session not ready). Returns the WhatsApp API's raw response.

Respond to Events in WhatsApp

Use triggers to let your product & agents respond to events from connected WhatsApp accounts.

  • New Message SentFires once for each message sent from the connected WhatsApp account. Each run returns one event with event ("message.sent"), timestamp (ISO 8601), sessionId, idempotencyKey, deliveryId and data (id, from, to, chatId, body, type, timestamp in Unix seconds, fromMe, isGroup, isStatusBroadcast, isLidSender). When isLidSender is true, data.from (and data.to and data.chatId in a direct chat) can be a WhatsApp LID ending in @lid, not a phone number ending in @c.us. Setup fails with an error if the connected WhatsApp account isn't linked (session not ready).
  • New Message ReceivedFires once for each new message received on the connected WhatsApp account: all messages, only messages from chosen contacts, or only messages in chosen groups. Each run returns one event object with the message under data (id, from, to, chatId, body, type, timestamp in Unix seconds, isGroup, fromMe, contact.name, contact.pushName). The top-level timestamp is ISO 8601. When isLidSender is true, data.from (and data.chatId in a direct chat) is a WhatsApp LID ending in @lid, not a phone number ending in @c.us. Setup fails with an error if the connected WhatsApp account isn't linked (session not ready).
  • New Member Joined GroupFires once each time someone joins a WhatsApp group on the connected account: any group, or only the groups you choose. Each run returns one event with event ("group.join"), timestamp (ISO 8601), sessionId, idempotencyKey, deliveryId and data (groupId, participantIds, timestamp in Unix seconds, actorId). Setup fails with an error if the connected WhatsApp account isn't linked (session not ready).

About WhatsApp on viaSocket

WhatsApp is a built-in viaSocket tool. It runs on viaSocket, with no account or API key of your own, and each use is paid from your Pass. Use it on its own or together with the 2,300+ apps viaSocket connects.

How the Pass works
viaSocket

About viaSocket

Connect 2,300+ apps to your product & agents with one prompt. Auth, events and actions handled. Free to start.

Learn more
Frequently Asked Questions

FAQs about using WhatsApp in your product & agents

Answers to common questions about using the built-in WhatsApp tool in your product & agents.

What is the WhatsApp tool?

WhatsApp is a built-in viaSocket tool. Your product & agents call it like any other action, and viaSocket runs it.

Do I need an account or API key for WhatsApp?

No. viaSocket runs WhatsApp for you, so there is no account to create and no API key to manage.

How is WhatsApp charged?

Each use is paid from your viaSocket Pass in AI credits, on every plan. You see the cost of every run in your logs.

Can my AI agent use WhatsApp?

Yes. Every action comes with an input schema, so your agent can call WhatsApp as a tool.

Can I use WhatsApp with other apps?

Yes. Use it in the same run as any of the 2,300+ apps viaSocket connects, and pass data between them.

How do I get started?

Copy the setup prompt and paste it into Cursor, Claude Code or Codex inside your project. Your coding agent sets up viaSocket and calls WhatsApp where your use case needs it.

Use WhatsApp in Your Product & Agents

Paste it into Cursor, Claude Code or Codex.
  • No account needed
  • Paid per use
  • 2,300+ apps
  • Data mapping
  • Monitoring & logs
  • Agent-ready