Skip to main content
Coming Soon - Webhook functionality is currently in development. This page documents the planned implementation.

Overview

The campaign.created event is triggered when a new fundraising campaign is created in your Givebutter account. This event fires for all campaign types including fundraisers, events, and crowdfunding campaigns.

When This Event Fires

  • New campaign is created in the dashboard
  • Campaign is duplicated from an existing campaign
  • Campaign is created via the API
  • Any new fundraising page is set up
This event fires when the campaign is created, regardless of whether it’s published or still in draft status. Check the status field to determine if the campaign is live.

Webhook Payload

{
  "id": "evt_mno345pqr678",
  "type": "campaign.created",
  "created_at": "2024-01-15T09:00:00Z",
  "data": {
    "id": "camp_abc123",
    "title": "Annual Gala 2024",
    "description": "Join us for our annual fundraising gala supporting education programs.",
    "goal": 50000,
    "total_raised": 0,
    "status": "draft",
    "type": "fundraiser",
    "url": "https://givebutter.com/annual-gala-2024",
    "campaign_code": "annual-gala-2024",
    "currency": "USD",
    "start_date": "2024-03-01T00:00:00Z",
    "end_date": "2024-03-31T23:59:59Z",
    "created_at": "2024-01-15T09:00:00Z",
    "updated_at": "2024-01-15T09:00:00Z"
  },
  "account_id": "acct_xyz789"
}

Event Data Fields

id
string
required
Unique identifier for the campaign (prefixed with camp_)
title
string
required
Campaign title or name
description
string
Campaign description or story
goal
integer
required
Fundraising goal in cents (e.g., 50000 = $500.00)
total_raised
integer
required
Amount raised so far in cents. Always 0 for newly created campaigns.
status
string
required
Campaign status: draft, active, paused, or completed
type
string
required
Campaign type: fundraiser, event, crowdfunding, peer_to_peer, or registry
url
string
required
Public URL for the campaign page
campaign_code
string
required
Unique campaign code used in the URL
currency
string
required
Three-letter ISO currency code (e.g., USD, CAD, EUR)
start_date
string
ISO 8601 timestamp when campaign starts (if scheduled)
end_date
string
ISO 8601 timestamp when campaign ends (if set)
created_at
string
required
ISO 8601 timestamp when the campaign was created
updated_at
string
required
ISO 8601 timestamp when the campaign was last updated

Common Use Cases

Automatically set up tracking and analytics for new campaigns:
async function handleCampaignCreated(event) {
  const { id, title, goal, type } = event.data;

  // Create analytics dashboard
  await analytics.createCampaignDashboard({
    campaign_id: id,
    campaign_name: title,
    goal: goal / 100,
    campaign_type: type
  });

  // Set up conversion tracking
  await tracking.setupCampaign({
    id: id,
    url: event.data.url,
    goals: [
      { name: 'donation', value: 'transaction.created' },
      { name: 'page_view', value: 'pageview' }
    ]
  });
}
Alert your team when new campaigns are created:
async function handleCampaignCreated(event) {
  const { title, goal, status, type, url } = event.data;

  await sendSlackNotification({
    channel: '#campaigns',
    message: `🎉 New ${type} campaign created: "${title}"`,
    details: {
      goal: `$${goal / 100}`,
      status: status,
      url: url
    }
  });
}
Create tasks or projects in your PM tool for campaign launch:
async function handleCampaignCreated(event) {
  const { id, title, start_date, end_date } = event.data;

  await projectManagement.createProject({
    name: `Launch: ${title}`,
    campaign_id: id,
    start_date: start_date,
    due_date: end_date,
    tasks: [
      { name: 'Review campaign page', assignee: 'marketing' },
      { name: 'Set up social media posts', assignee: 'social' },
      { name: 'Prepare email campaign', assignee: 'communications' },
      { name: 'Test donation flow', assignee: 'operations' }
    ]
  });
}
Set up third-party integrations for the new campaign:
async function handleCampaignCreated(event) {
  const { id, title, url } = event.data;

  // Add to Google Analytics
  await googleAnalytics.createCampaign({
    campaign_id: id,
    name: title,
    source: 'givebutter',
    medium: 'fundraising'
  });

  // Set up Facebook pixel tracking
  await facebookPixel.trackCustomEvent('CampaignCreated', {
    campaign_id: id,
    campaign_name: title
  });

  // Add to email marketing lists
  await emailPlatform.createCampaignSegment({
    name: `${title} - Campaign Supporters`,
    campaign_url: url
  });
}

Campaign Types

TypeDescription
fundraiserStandard fundraising campaign
eventEvent with ticketing and registration
crowdfundingCrowdfunding campaign with rewards/perks
peer_to_peerPeer-to-peer fundraising with team pages
registryGift registry or wishlist

Campaign Statuses

StatusDescription
draftCampaign is being set up, not yet public
activeCampaign is live and accepting donations
pausedCampaign is temporarily paused
completedCampaign has ended