@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

Webhook verification needs the optional svix peer:
Requirements: Node 20+, ESM or CJS. Types ship with the package.

Hello, world

That’s the whole contract: create a client, pick your channel_id, call a resource method.
For error handling in production, see Utilities → Error handling.

Resource layout

Wazapin scopes most messaging work to a channel (your connected WhatsApp number). Pass channel_id on sends; list channels once at startup and cache the id.

Common calls

Configuration

Never ship your API key to the browser. Call Wazapin from your server, serverless function, or background worker only.

Where to next

Quickstart

Install, find your channel id, send your first message.

Messages

Text, buttons, lists, catalog — plus read, react, and delivery status.

Templates

List, sync, and send approved WhatsApp templates.

Webhooks

Manage endpoints and verify signed deliveries.

Utilities

Builders, pagination, errors, and the low-level API client.

API reference

Every HTTP endpoint with an interactive playground.

Other languages

cURL, Python, and Go when you are not using TypeScript.