@wazapin/sdk is the official TypeScript client for the Wazapin API. Use message builders for typed sends, let the client retry transient failures, paginate with for await, and verify webhook signatures — all on web-standard fetch (Node 20+, Bun, Deno, edge).
Type-safe builders
textMessage(), templateMessage(), and other helpers return typed send inputs. Autocomplete on every field.
Typed responses
Autocomplete on requests and responses. Errors stay in error — handle them when you wire production code.
Safe to retry
Auto-retries 429 and 5xx with backoff. Pass an idempotencyKey on sends you may retry.
Async pagination
listPaginated() on channels, contacts, and templates. for await exhausts pages for you.
Webhook verify
@wazapin/sdk/webhooks verifies Svix signatures and parses event payloads on your server.
Runs anywhere
Web-standard fetch only. Node 20+, Bun, Deno, Cloudflare Workers, Vercel — inject custom fetch when needed.
Install
- npm
- pnpm
- yarn
- bun
svix peer:
Hello, world
channel_id, call a resource method.
Resource layout
Wazapin scopes most messaging work to a channel (your connected WhatsApp number). Passchannel_id on sends; list channels once at startup and cache the id.