Zindua

Instant communication platform for businesses, optimized for developers.

Product
  • WhatsApp
  • Campaigns
  • Bot builder
  • MailGuard
  • Verify
  • Pricing
Developers
  • Documentation
  • Node.js
  • Next.js
  • PHP
  • FastAPI
  • MCP / Cursor
Solutions
  • Public sector
  • Health & care
  • Banking & fintech
  • NGOs & associations
  • SaaS & product teams
  • All solutions
Company
  • About
  • Blog
  • Contact
  • Status
  • Terms
  • Privacy

Product

  • WhatsApp
  • Campaigns
  • Bot builder
  • MailGuard
  • Verify
  • Pricing

Developers

  • Documentation
  • Node.js
  • Next.js
  • PHP
  • FastAPI
  • MCP / Cursor

Solutions

  • Public sector
  • Health & care
  • Banking & fintech
  • NGOs & associations
  • SaaS & product teams
  • All solutions

Company

  • About
  • Blog
  • Contact
  • Status
  • Terms
  • Privacy

© 2026 Zindua, Inc. All rights reserved.

System status
Zindua
How it WorksPricingCompare
Sign in
Get started

Zindua for Fastify

TypeScript-first Node backends with @zindua/sdk v1.4.1. send(), templates, logs, and webhooks. Same API as Next.js, built for Fastify route handlers and plugins.

npmnpm i @zindua/sdk
Stacknpm i fastify

Fastify is your HTTP framework (npm i fastify). Zindua ships only @zindua/sdk on npm.

npm 1.4.1API referenceNext.js starter

TypeScript native

Full types for send(), ZinduaError, and ZinduaSendResult. Works in JavaScript too (Node 18+).

Validated payloads

Fastify JSON schema on routes + SDK checks channel/to before the HTTP call.

Email + WhatsApp

One send() for both channels. cc, bcc, replyTo on email.

Zero npm deps

@zindua/sdk uses Node fetch. Server-side only (throws in the browser).

Plugin ready

Register Zindua once with fastify.decorate() and reuse in all routes.

CLI + dashboard

Smoke test with @zindua/cli. Trace delivery with logId, Logs, and webhooks.

Install and send

Install SDK, email OTP, or WhatsApp OTP. The TypeScript snippet updates.

Install SDK

CLI

Add @zindua/sdk and fastify. Set ZINDUA_API_KEY in .env.

terminal

TypeScript
1# Zindua SDK (official npm package)2npm i @zindua/sdk3 4# Fastify: your HTTP framework (not published by Zindua)5npm i fastify6 7# .env8ZINDUA_API_KEY=znd_test_your_key_here

Four steps

From project key to dashboard logs.

From project key to first OTP in four steps.

Step 0101

Create a Zindua project

Sign up at zindua.run, create a project, copy the API key. Connect email (Gmail/SMTP Service) and/or WhatsApp in the dashboard. Create templates (e.g. otp-verification).

Code examples

JSON schema, plugins, OTP + Redis, errors, and response shape.

JSON schema

Validate request bodies in Fastify before send(). SDK validates channel and to again.

TS
otp-email.ts
import type { FastifyInstance } from "fastify";import type { ZinduaSendResult } from "@zindua/sdk"; const sendOtpSchema = {  body: {    type: "object",    required: ["to", "code"],    properties: {      to: { type: "string", format: "email" },      code: { type: "string", minLength: 4, maxLength: 8 },      lang: { type: "string", enum: ["fr", "en"] },    },  },} as const; fastify.post<{ Body: { to: string; code: string; lang?: string } }>(  "/otp/email",  { schema: sendOtpSchema },  async (request, reply): Promise<ZinduaSendResult> => {    const { to, code, lang } = request.body;    return zindua.send({      to,      template: "otp-verification",      ...(lang ? { lang } : {}),      variables: { code },    });  });

API reference

send() fields, channels, methods, errors, security, and environment.

All fields accepted by @zindua/sdk. Plain JavaScript works the same without types.

Requiredrequired

to

Email if channel is email (default). E.164 phone with + for WhatsApp (e.g. +243812345678).

Logs and analytics

Persist logId from send() and correlate with the dashboard.

There is no public SDK method for logs or analytics. Delivery history and send volume live in the Zindua dashboard (session auth). From Fastify, persist result.logId in your database and correlate with dashboard Logs or inbound webhooks.

Dashboard

Logs

Filter by channel, status, recipient. Search by logId from send().

Open →

Test first with the CLI

doctor checks the key. send smoke-tests a template. Use znd_test_ keys with isTestMode() in staging.

terminal
npx @zindua/cli@latest doctor

Python backend?

Use httpx with FastAPI for async OTP routes on Python 3.10+.

FastAPI guideWhatsApp OTP