Dashboard
Back to Webhooks Overview

Getting Started with Webhooks

Learn how to set up your first webhook in just a few minutes.

Quick Setup (3 Steps)

1

Create Your Webhook Endpoint

Set up an HTTP endpoint in your application to receive webhook notifications.

// Example Express.js endpoint
app.post('/webhook/pollybot', (req, res) => {
  const payload = req.body;
  // Process the webhook data
  if (payload.event === 'LEAD_CREATED') {
    const lead = payload.data;
    // Handle new lead...
  }
  
  res.status(200).json({ received: true });
});
2

Configure Webhook in Dashboard

Add your webhook URL in your chatbot settings.

  1. Go to your chatbot settings page
  2. Click on the "Webhooks" tab
  3. Click "Create Webhook"
  4. Enter your webhook URL (e.g., https://yourapp.com/webhook/pollybot)
  5. Select event types (LEAD_CREATED)
  6. Save the webhook secret securely
3

Test Your Integration

Verify webhooks are working by creating a test lead.

Test with our endpoint:
http://localhost:3000/api/test-webhook

Requirements

Your Webhook Endpoint Must:

  • • Accept HTTP POST requests
  • • Use HTTPS in production
  • • Return 2xx status code for success
  • • Respond within 30 seconds
  • • Handle JSON content-type

Important Notes:

  • • Webhook secrets are shown only once
  • • Failed deliveries are retried automatically
  • • Verify signatures for security
  • • Monitor delivery statistics
  • • Test thoroughly before production
    PollyBot.ai - Smart Conversations, Seamless Automation