Claude Code skill
WhatsApp Skill for Claude Code
Agent skill that lets Claude Code send WhatsApp messages, manage templates, run broadcasts, and register webhooks via the Gavi WhatsApp API.
Install
- 1. Save the skill content below as
~/.claude/skills/gaviwhatsapp.mdin your project (or user config) directory. - 2. Install the SDK:
npm install @gaviwhatsapp/whatsapp
- 3. Set the API key environment variable:
GAVIVENTURES_API_KEY=gv_...
Get a key → - 4. Restart Claude Code. The agent will now know how to use the Gavi WhatsApp API when you ask it to send messages.
GaviVentures WhatsApp API — Claude Code Instructions
When the user asks to send WhatsApp messages, add WhatsApp notifications, or integrate WhatsApp into their application, follow these instructions.
Setup
Install the SDK and configure the API key:
npm install @gaviwhatsapp/whatsapp
Environment variable required:
GAVIVENTURES_API_KEY=gv_...
Get a key at https://www.gaviventures.com/whatsapp/settings/api-keys
SDK Usage
import { WhatsApp } from '@gaviwhatsapp/whatsapp'
const wa = new WhatsApp({ apiKey: process.env.GAVIVENTURES_API_KEY! })
Send text
await wa.send({ to: '+919876543210', text: 'Hello!' })
Send template
await wa.sendTemplate({
to: '+919876543210',
template: 'order_confirmation',
language: 'en',
variables: { '1': 'ORD-1234', '2': '$49.99' },
})
Send media
await wa.sendMedia({
to: '+919876543210',
type: 'image', // or 'document', 'video', 'audio'
url: 'https://example.com/photo.jpg',
caption: 'Check this out',
})
List templates
const { templates } = await wa.getTemplates()
Send broadcast
await wa.broadcast({
recipients: ['+919876543210', '+919876543211'],
template: 'promo_offer',
language: 'en',
})
Register webhook
const webhook = await wa.registerWebhook({
url: 'https://myapp.com/api/whatsapp-webhook',
events: ['message.received', 'message.delivered'],
})
// Save webhook.secret for HMAC verification
REST API (alternative to SDK)
Base URL: https://www.gaviventures.com
Auth: Authorization: Bearer <api_key>
| Method | Endpoint | Body |
|---|---|---|
| POST | /api/v1/messages/send | { to, text } |
| POST | /api/v1/messages/template | { to, template, language?, variables? } |
| POST | /api/v1/messages/media | { to, type, url, caption?, filename? } |
| GET | /api/v1/messages | ?phone=+91...&limit=20 |
| GET | /api/v1/templates | ?sync=true (optional, pulls from Meta) |
| POST | /api/v1/broadcasts | { recipients, template, language?, variables_per_recipient? } |
| POST | /api/v1/webhooks | { url, events? } |
Python
pip install gaviwhatsapp
from gaviwhatsapp import WhatsApp
import os
wa = WhatsApp(api_key=os.environ["GAVIVENTURES_API_KEY"])
wa.send(to="+919876543210", text="Hello from Python!")
Important Rules
- Phone numbers always include country code: +919876543210
- Template messages must be pre-approved by Meta
- User needs a connected WhatsApp Business Account in the dashboard
- Meta bills message costs directly to the user's Meta Business Account. Meta's pricing changes frequently — see current rates at https://business.whatsapp.com/products/platform-pricing
- The API key starts with
gv_
Other skills
Ready to send your first message?
Get an API key and have Claude Code send a WhatsApp message in under 5 minutes.