Skip to main content
The WSAPI Python SDK provides a typed client (Pydantic v2) for sending WhatsApp messages, managing groups and chats, and receiving real-time events via webhooks or Server-Sent Events (SSE).

Installation

Requirements

  • Python 3.9 or later
  • Valid WSAPI API key and instance ID

Quick start

Always call client.close() when done, or use the client as a context manager.

Error handling

The SDK provides two patterns for every operation:
Standard methods raise ApiException on failure:

Available resources

Receiving events via SSE

Handling webhooks

Available event types

GitHub

github.com/wsapi-chat/wsapi-python