🚀 What you’ll build

You’ll send messages through your QR-connected WhatsApp number using the Vambe API. Choose between AI-generated messages or manual control.
QR messaging works like WhatsApp Web but with AI automation. Perfect for personal numbers and quick setup.

Prerequisites


Two Ways to Send Messages

Let Vambe AI create intelligent messages for you:
1

Get QR Channel ID

curl -X GET \
  -H "x-api-key: YOUR_API_KEY" \
  https://api.vambeai.com/api/public/channels/web-whatsapp
Save the id field as your phoneId for the ticket endpoint.
2

Get Pipeline Stage ID

curl -X GET \
  -H "x-api-key: YOUR_API_KEY" \
  https://api.vambeai.com/api/public/pipeline
Save the stage ID where you want to start the conversation.
3

Create AI-Generated Message

curl -X POST \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to_phone_number": "+1234567890",
    "contact_name": "John Doe",
    "stage_id": "stage_initial_001",
    "contact_metadata": {
      "source": "api",
      "priority": "normal"
    },
    "ticket_metadata": {
      "topic": "product_inquiry"
    }
  }' \
  https://api.vambeai.com/api/public/ticket/open/web-whatsapp/{phoneId}
AI automatically creates appropriate message content and initiates the conversation based on your pipeline configuration.

Option 2: Manual Message Control

For when you want full control over message content:
1

Get QR Channel ID

curl -X GET \
  -H "x-api-key: YOUR_API_KEY" \
  https://api.vambeai.com/api/public/channels/web-whatsapp
Save the id field as your phoneId.
2

Get Pipeline Stage ID

curl -X GET \
  -H "x-api-key: YOUR_API_KEY" \
  https://api.vambeai.com/api/public/pipeline
Save the stage ID where you want to send the message.
3

Send Your Custom Message

curl -X POST \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Hello! This is a custom message from Vambe.",
    "stage": "stage_initial_001",
    "toPhoneNumber": "+1234567890",
    "contactName": "John Doe",
    "metaData": {}
  }' \
  https://api.vambeai.com/api/public/web-whatsapp-message/send/1001/message

What Happens Behind the Scenes

When you send a message through QR API, Vambe automatically:

AI Processing

  • Extracts contact data using GPT
  • Creates or updates contact records
  • Generates intelligent content (ticket mode)
  • Validates data format automatically

Conversation Management

  • Links contact to pipeline stage
  • Preserves conversation history
  • Tracks customer journey progression
  • Enables AI responses for incoming messages

API Comparison

FeatureAI-Generated (Ticket)Manual Message
Setup3 steps3 steps
Message CreationAI creates contentYou write content
Required FieldsMinimalAll manual
Best ForAutomationFull control

Error Handling

If your phone is disconnected:
  • Check phone internet connection
  • Ensure WhatsApp is running
  • Reconnect QR in Vambe dashboard
If stage ID doesn’t exist:
  • Get stage ID from pipeline API
  • Verify pipeline is active
  • Check stage belongs to your account
If too many messages:
  • QR limit: ~250 messages/day
  • Add delays between messages
  • Consider Business API for higher volume

Next Steps

You’re now ready to send messages through your WhatsApp QR connection.
Pro Tip: Start with AI-generated messages for easier setup, then use manual control when you need specific content formatting.