Getting Started

Welcome to Campaign Hub! This guide will help you get up and running in minutes.

What is Campaign Hub?

Campaign Hub is a powerful WhatsApp Business API platform that enables you to send messages, automate conversations, and engage with customers at scale.

Setup & Installation

Step 1: Create an Account

Sign up for a Campaign Hub account at campaignhub.com.

Step 2: Verify Your Business

Complete the business verification process to get access to WhatsApp Business API.

Step 3: Get Your API Key

Navigate to Settings → API Keys to generate your API key. Keep this secure!

API_KEY=your_api_key_here

Send Your First Message

Let's send your first WhatsApp message using our API.

curl -X POST https://api.campaignhub.com/v1/messages \\
  -H "Authorization: Bearer YOUR_API_KEY" \\
  -H "Content-Type: application/json" \\
  -d '{
    "to": "+1234567890",
    "type": "text",
    "text": {
      "body": "Hello! This is your first message from Campaign Hub."
    }
  }'

Bulk Messaging

Send messages to multiple recipients at once using our bulk messaging feature.

curl -X POST https://api.campaignhub.com/v1/messages/bulk \\
  -H "Authorization: Bearer YOUR_API_KEY" \\
  -H "Content-Type: application/json" \\
  -d '{
    "recipients": ["+1234567890", "+0987654321"],
    "message": {
      "type": "text",
      "text": "Your personalized message here"
    }
  }'

Chat Automation

Set up automated responses and workflows to handle customer inquiries 24/7.

Creating a Workflow

  1. Go to Automation → Workflows
  2. Click "Create New Workflow"
  3. Define triggers and actions
  4. Test and activate your workflow

Message Templates

Create and manage message templates for marketing and notifications.

Template Format

Templates must be approved by WhatsApp before use. They can include variables for personalization.

{
  "name": "welcome_message",
  "language": "en",
  "components": [
    {
      "type": "body",
      "text": "Hello {{1}}, welcome to {{2}}!"
    }
  ]
}

Webhooks

Receive real-time notifications when messages are sent, delivered, or read.

Setting Up Webhooks

  1. Go to Settings → Webhooks
  2. Enter your webhook URL
  3. Select events you want to receive
  4. Save and verify your webhook

API Authentication

All API requests require authentication using your API key.

Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Send Message API

Endpoint

POST /v1/messages

Request Body

{
  "to": "string (required)",
  "type": "text|image|document|template",
  "text": {
    "body": "string"
  }
}

Receive Messages

Messages sent to your WhatsApp Business number will be delivered via webhooks.

Webhook Payload

{
  "messages": [{
    "from": "+1234567890",
    "id": "message_id",
    "timestamp": "1234567890",
    "type": "text",
    "text": {
      "body": "Customer message"
    }
  }]
}