- 11 typed API operations
- 4 synced entities (
businessProfiles,contacts,messages,phoneNumbers) for fast.search()/.list() - 2 incoming webhook event types
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
Store the WhatsApp API key before the first call: More: API Key
pnpm corsair setup --plugin=whatsapp --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
businessProfiles.get
media.upload
Query synced data
Synced entities supporttenant.whatsapp.db.<entity>.search() and .list(): businessProfiles, contacts, messages, phoneNumbers.
See Database for filters and operators.
Webhooks
This plugin registers 2 webhook event types. Configure the provider to POST to your Corsair HTTP handler, then usewebhookHooks on the plugin factory.
See Webhooks for every event path and payload shape, and Webhooks concept for routing.
What’s next
API reference
Every
whatsapp.api.* operation with input and output types.Database
Synced entities, search filters, and operators.
Webhooks
Event paths, payloads, and
webhookHooks examples.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.