DEV Community

Miquel Palet
Miquel Palet

Posted on

How to Send WhatsApp Messages with One API Call (No Meta Developer App Needed)

Integrating WhatsApp's Cloud API directly means navigating five different Meta products, waiting for template approvals, handling webhooks that silently fail, and dealing with docs that contradict themselves.

We just launched WhatsApp support on Zernio, our unified social media API, and I wanted to share how you can start sending WhatsApp messages in under 5 minutes.

The Problem with Direct Integration

To send a WhatsApp message via Meta's Cloud API, you need to:

  1. Create a Meta developer app
  2. Set up a WhatsApp Business Account
  3. Navigate Business Manager to link everything
  4. Register and verify a phone number
  5. Pass App Review
  6. Configure webhooks manually
  7. Handle template approvals and category reclassification

That's 4-6 weeks of work before you send your first production message.

The Shortcut: One API Call

With Zernio, you skip all of that:

No Meta developer app. No Business Manager. Connect your WhatsApp account in one click via Embedded Signup.

npm install @zernio/node
Enter fullscreen mode Exit fullscreen mode
import Zernio from '@zernio/node';

const zernio = new Zernio(); // uses ZERNIO_API_KEY env var

// Step 1: Create a WhatsApp broadcast with a Meta-approved template
const { data: broadcast } = await zernio.broadcasts.createBroadcast({
  body: {
    profileId: 'YOUR_PROFILE_ID',
    accountId: 'YOUR_WHATSAPP_ACCOUNT_ID',
    platform: 'whatsapp',
    name: 'Welcome Campaign',
    template: {
      name: 'hello_world',
      language: 'en'
    }
  }
});

// Step 2: Add recipients by phone number
await zernio.broadcasts.addBroadcastRecipients({
  path: { broadcastId: broadcast.broadcast.id },
  body: {
    phones: ['+1234567890', '+0987654321']
  }
});

// Step 3: Send the broadcast
const { data: result } = await zernio.broadcasts.sendBroadcast({
  path: { broadcastId: broadcast.broadcast.id }
});

console.log(`Sent: ${result.sent}, Failed: ${result.failed}`);
Enter fullscreen mode Exit fullscreen mode

Send Template Messages

WhatsApp requires approved templates for business-initiated conversations (outside the 24h reply window). With Zernio, you can manage templates via API:

import Zernio from '@zernio/node';

const zernio = new Zernio(); // uses ZERNIO_API_KEY env var

// Create a template (submitted to Meta for approval)
await zernio.whatsapp.createWhatsAppTemplate({
  body: {
    accountId: 'YOUR_ACCOUNT_ID',
    name: 'order_shipped',
    category: 'UTILITY',
    language: 'en',
    components: [{
      type: 'BODY',
      text: 'Hi {{1}}, your order #{{2}} has shipped! Track it here: {{3}}'
    }]
  }
});

// Once approved, send it via a broadcast
const { data: broadcast } = await zernio.broadcasts.createBroadcast({
  body: {
    profileId: 'YOUR_PROFILE_ID',
    accountId: 'YOUR_WHATSAPP_ACCOUNT_ID',
    platform: 'whatsapp',
    name: 'Shipping Notification',
    template: {
      name: 'order_shipped',
      language: 'en',
      components: [{
        type: 'body',
        parameters: [
          { type: 'text', text: 'Sarah' },
          { type: 'text', text: '12345' },
          { type: 'text', text: 'https://tracking.example.com/12345' }
        ]
      }]
    }
  }
});

await zernio.broadcasts.addBroadcastRecipients({
  path: { broadcastId: broadcast.broadcast.id },
  body: { phones: ['+1234567890'] }
});

await zernio.broadcasts.sendBroadcast({
  path: { broadcastId: broadcast.broadcast.id }
});
Enter fullscreen mode Exit fullscreen mode

Broadcast to Multiple Recipients

Create a broadcast campaign and send to up to 100 recipients per request:

// Create a broadcast draft
const { data: broadcast } = await zernio.broadcasts.createBroadcast({
  body: {
    profileId: 'YOUR_PROFILE_ID',
    accountId: 'YOUR_WHATSAPP_ACCOUNT_ID',
    platform: 'whatsapp',
    name: 'March Promo',
    template: { name: 'march_sale', language: 'en' }
  }
});

// Add recipients by phone number (auto-creates contacts)
await zernio.broadcasts.addBroadcastRecipients({
  path: { broadcastId: broadcast.broadcast.id },
  body: {
    phones: ['+1111111111', '+2222222222']
  }
});

// Or add existing contacts by ID
await zernio.broadcasts.addBroadcastRecipients({
  path: { broadcastId: broadcast.broadcast.id },
  body: {
    contactIds: ['contact_1', 'contact_2']
  }
});

// Or auto-populate from segment filters (e.g., all contacts tagged "vip")
await zernio.broadcasts.addBroadcastRecipients({
  path: { broadcastId: broadcast.broadcast.id },
  body: { useSegment: true }
});

// Schedule for later instead of sending immediately
await zernio.broadcasts.scheduleBroadcast({
  path: { broadcastId: broadcast.broadcast.id },
  body: { scheduledAt: '2026-04-01T10:00:00.000Z' }
});
Enter fullscreen mode Exit fullscreen mode

What's Included

37 endpoints covering the full WhatsApp surface:

  • Messaging: text, templates, media (images, video, docs, audio), interactive (buttons, lists), location, contacts
  • Broadcasts: campaigns with per-user personalization, scheduling, delivery tracking
  • Contact CRM: bulk import, tags, groups, opt-in tracking, segmentation
  • Template CRUD: create, list, update, delete (submissions to Meta handled automatically)
  • Phone numbers: search, purchase, and verify WhatsApp-ready US numbers
  • Business profile: read and update via API

Pricing

WhatsApp requires the Inbox addon (7-day free trial). Zernio passes through Meta's per-conversation pricing with zero markup, no additional platform fees.

To celebrate the launch, we've reset every expired Inbox trial. If you already used yours, you get a fresh 7 days. If you're mid-trial, we added 7 extra days.

Links

WhatsApp is the 14th platform on Zernio, alongside Instagram, TikTok, YouTube, LinkedIn, X, Facebook, Pinterest, Reddit, Bluesky, Threads, Google Business, Telegram, and Snapchat. Same API format across all of them.

Top comments (0)