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

Overview

The campaign.published event is triggered when a campaign transitions from draft status to live/active status for the first time. This is a one-time event that marks the official launch of a campaign.

When This Event Fires

  • Draft campaign is published for the first time
  • Campaign status changes from draft to active
  • “Publish” button is clicked in the dashboard
  • Campaign is published via the API
This event only fires once when a campaign is first published. Subsequent status changes use campaign.updated. If a campaign is paused and then reactivated, that uses campaign.updated, not campaign.published.

Webhook Payload

{
  "id": "evt_yza567bcd890",
  "type": "campaign.published",
  "created_at": "2024-02-01T10: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": "active",
    "type": "event",
    "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",
    "published_at": "2024-02-01T10:00:00Z",
    "created_at": "2024-01-15T09:00:00Z",
    "updated_at": "2024-02-01T10: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 (typically 0 at launch)
status
string
required
Campaign status. Always active for this event.
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)
published_at
string
required
ISO 8601 timestamp when the campaign was published
created_at
string
required
ISO 8601 timestamp when the campaign was originally created
updated_at
string
required
ISO 8601 timestamp when the campaign was last updated

Common Use Cases

Automatically trigger marketing activities when campaign goes live:
async function handleCampaignPublished(event) {
  const { title, url, goal, end_date } = event.data;

  // Send launch email to mailing list
  await email.sendCampaignLaunch({
    subject: `New Campaign: ${title}`,
    campaign_url: url,
    goal: goal / 100,
    end_date: end_date
  });

  // Schedule social media posts
  await socialMedia.schedulePosts({
    campaign: title,
    url: url,
    schedule: [
      { platform: 'twitter', time: 'now' },
      { platform: 'facebook', time: '+2 hours' },
      { platform: 'instagram', time: '+4 hours' }
    ]
  });

  // Create Google Ads campaign
  await googleAds.createCampaign({
    name: title,
    landing_url: url,
    budget: 100,
    duration: calculateDaysBetween(new Date(), end_date)
  });
}
Alert your team when campaigns go live:
async function handleCampaignPublished(event) {
  const { title, url, goal, type } = event.data;

  await sendNotifications([
    {
      channel: '#campaigns',
      platform: 'slack',
      message: `🚀 Campaign launched: "${title}"`,
      details: {
        type: type,
        goal: `$${goal / 100}`,
        url: url
      }
    },
    {
      recipients: ['[email protected]'],
      platform: 'email',
      subject: `Campaign "${title}" is now live`,
      body: `The campaign has been published and is accepting donations at ${url}`
    }
  ]);
}
Enable analytics and tracking when campaign launches:
async function handleCampaignPublished(event) {
  const { id, title, url, goal } = event.data;

  // Start real-time analytics
  await analytics.activateCampaign({
    campaign_id: id,
    name: title,
    goal: goal / 100,
    track_events: ['pageview', 'donation', 'share']
  });

  // Set up conversion tracking
  await conversionTracking.enable({
    campaign_id: id,
    url: url,
    goals: [
      { name: 'donation_started', trigger: 'form_opened' },
      { name: 'donation_completed', trigger: 'payment_success' }
    ]
  });

  // Create monitoring alerts
  await monitoring.createAlerts({
    campaign_id: id,
    alerts: [
      { type: 'no_donations_24h', notify: '[email protected]' },
      { type: 'goal_50_percent', notify: 'slack:#milestones' },
      { type: 'goal_reached', notify: 'all' }
    ]
  });
}
Automate post-launch tasks and verifications:
async function handleCampaignPublished(event) {
  const { id, title, url } = event.data;

  // Run launch checklist
  const results = await runChecklist({
    campaign_id: id,
    checks: [
      { name: 'Page loads correctly', test: () => testPageLoad(url) },
      { name: 'Donation form works', test: () => testDonationForm(url) },
      { name: 'Social sharing works', test: () => testSocialShare(url) },
      { name: 'Mobile responsive', test: () => testMobileView(url) },
      { name: 'Tracking pixels active', test: () => testTracking(url) }
    ]
  });

  // Report results
  await sendReport({
    to: '[email protected]',
    subject: `Launch checklist results for "${title}"`,
    results: results,
    passed: results.every(r => r.passed)
  });
}

Launch Checklist Ideas

Common automations to trigger when a campaign goes live:
  • Send launch announcement emails
  • Post to social media channels
  • Enable advertising campaigns
  • Activate real-time analytics
  • Set up monitoring and alerts
  • Execute pre-launch checklist
  • Notify team members
  • Update website homepage
  • Start drip email sequence
  • Create reporting dashboard