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

Overview

The campaign.updated event is triggered when details of an existing campaign are modified. This includes changes to campaign settings, content, goals, or other editable fields.

When This Event Fires

  • Campaign title or description is updated
  • Fundraising goal is changed
  • Campaign dates are modified
  • Campaign status changes (except publishing - see campaign.published)
  • Campaign settings are updated
  • Any other editable campaign field is changed
This event does not fire when a campaign is first published. Use campaign.published for that specific event.

Webhook Payload

{
  "id": "evt_stu901vwx234",
  "type": "campaign.updated",
  "created_at": "2024-01-20T14:30:00Z",
  "data": {
    "id": "camp_abc123",
    "title": "Annual Gala 2024 - Virtual Edition",
    "description": "Join us online for our annual fundraising gala supporting education programs.",
    "goal": 75000,
    "total_raised": 12500,
    "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",
    "updated_fields": ["title", "goal", "description"],
    "created_at": "2024-01-15T09:00:00Z",
    "updated_at": "2024-01-20T14:30: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., 75000 = $750.00)
total_raised
integer
required
Amount raised so far in cents
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)
updated_fields
array
required
List of field names that were changed (e.g., ["title", "goal"])
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

Keep external systems updated with campaign modifications:
async function handleCampaignUpdated(event) {
  const { id, title, goal, total_raised, updated_fields } = event.data;

  // Only sync relevant changes
  if (updated_fields.some(field => ['title', 'goal', 'description'].includes(field))) {
    await analytics.updateCampaign({
      campaign_id: id,
      name: title,
      goal: goal / 100,
      raised: total_raised / 100
    });
  }
}
Monitor and alert when campaign goals are adjusted:
async function handleCampaignUpdated(event) {
  const { title, goal, updated_fields } = event.data;

  if (updated_fields.includes('goal')) {
    const previousGoal = await getCachedGoal(event.data.id);

    await sendNotification({
      channel: '#campaigns',
      message: `🎯 Goal updated for "${title}": $${previousGoal / 100} → $${goal / 100}`
    });

    // Cache new goal
    await cacheGoal(event.data.id, goal);
  }
}
Trigger updates to marketing materials when campaign details change:
async function handleCampaignUpdated(event) {
  const { id, title, description, updated_fields, url } = event.data;

  // If title or description changed, update materials
  if (updated_fields.some(field => ['title', 'description'].includes(field))) {
    await sendEmail({
      to: '[email protected]',
      subject: `Campaign "${title}" has been updated`,
      body: `The campaign details have changed. Please review and update any marketing materials, social posts, or email templates.`,
      campaign_url: url
    });
  }
}
Log all campaign modifications for compliance and reporting:
async function handleCampaignUpdated(event) {
  const { id, updated_fields, updated_at } = event.data;

  await auditLog.create({
    event_type: 'campaign_updated',
    campaign_id: id,
    fields_changed: updated_fields,
    timestamp: updated_at,
    previous_values: await getPreviousCampaignValues(id),
    new_values: await getCurrentCampaignValues(id)
  });
}

Commonly Updated Fields

FieldDescription
titleCampaign name changed
descriptionCampaign story or description updated
goalFundraising goal adjusted
end_dateCampaign end date modified
statusCampaign status changed (active, paused, etc.)