Zaptickdocs
SDK

Node.js & TypeScript SDK

A zero-dependency client that wraps the entire Zaptick API with strict types, tested retries, and edge-runtime support.

#Install

Shell
npm install zaptick    # or pnpm / bun / yarn
  • Runs on Node 18+, Bun, Deno, Cloudflare Workers, Vercel Edge.
  • Zero runtime dependencies — just the fetch built into your runtime.
  • Ships ESM + CJS builds.

#Configuration

TypeScript
import Zaptick from 'zaptick';

const zaptick = new Zaptick({
  apiKey: process.env.ZAPTICK_API_KEY!,

  // Optional
  baseUrl: 'https://zaptick.io/api', // override for self-hosted
  timeoutMs: 30_000,                 // per-request timeout
  maxRetries: 2,                     // retried on 429/5xx/network
  fetch: customFetch,                // DI for edge runtimes
  userAgent: 'myapp/1.0',
});

Passing just a key string is equivalent to passing { apiKey }.

#Resource namespaces

The client exposes each resource as a namespace:

TypeScript
zaptick.messages           // Send template / text / media
zaptick.templates          // Template CRUD + submission
zaptick.contacts           // Contact CRUD + tags
zaptick.contactGroups      // Segments and static groups
zaptick.campaigns          // Bulk outbound campaigns
zaptick.workflows          // Multi-step automations
zaptick.chatbots           // Decision tree + AI bots
zaptick.inbox              // Live agent inbox + replies
zaptick.interactiveLists   // WA interactive list messages
zaptick.flows              // WhatsApp Flows (native forms)
zaptick.analytics          // Aggregated analytics
zaptick.webhooks           // Webhook endpoint management

#TypeScript everything

Every method parameter and response is fully typed — no any in the public surface. Autocomplete works in every editor that speaks LSP.

TypeScript
import type { Contact, SendTemplateParams } from 'zaptick';

const params: SendTemplateParams = {
  phone: '+91...',
  templateName: 'welcome_message',
  language: 'en',
  variables: { '1': 'Priya' },
};