Skip to main content
Use our official SDKs to integrate Zavu into your application with minimal code.

Available SDKs

Quick Comparison

FeatureNode.jsPython
Package@zavu/nodezavu
Min VersionNode 18+Python 3.8+
AsyncNative Promisesasyncio support
TypeScriptFull typesType hints

Installation

npm install @zavu/node
# or
bun add @zavu/node

Basic Usage

import { Zavu } from '@zavu/node';

const zavu = new Zavu(process.env.ZAVU_API_KEY);

const message = await zavu.messages.send({
  to: '+56912345678',
  text: 'Hello from Zavu!'
});

console.log('Message ID:', message.id);

Common Operations

Send a Message

const message = await zavu.messages.send({
  to: '+56912345678',
  text: 'Your code is 123456',
  channel: 'sms'
});

Use a Template

const message = await zavu.messages.send({
  to: '+56912345678',
  templateId: 'tpl_abc123',
  data: {
    name: 'John',
    orderId: '12345'
  }
});

Check Message Status

const message = await zavu.messages.get('msg_abc123');
console.log('Status:', message.status);

List Messages

const { items, nextCursor } = await zavu.messages.list({
  status: 'delivered',
  limit: 50
});

Error Handling

import { ZavuError } from '@zavu/node';

try {
  await zavu.messages.send({ to: 'invalid', text: 'Hello' });
} catch (error) {
  if (error instanceof ZavuError) {
    console.error('API Error:', error.code, error.message);
  } else {
    throw error;
  }
}

Need Another Language?

We’re always adding new SDKs. In the meantime, you can use our REST API directly with any HTTP client. Request a new SDK on GitHub.