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

Overview

The contact.created event is triggered when a new contact (supporter, donor, or subscriber) is added to your Givebutter account. This happens when someone makes a donation, purchases a ticket, signs up for your mailing list, or is manually added.

When This Event Fires

  • Someone makes their first donation
  • New ticket purchaser is added
  • Supporter signs up for mailing list
  • Contact is manually added in the dashboard
  • Contact is created via the API
  • New volunteer or team member registers
A contact is only created once per unique email address. Subsequent donations from the same email won’t trigger this event - use transaction.created for those.

Webhook Payload

{
  "id": "evt_efg123hij456",
  "type": "contact.created",
  "created_at": "2024-01-15T10:30:00Z",
  "data": {
    "id": "cont_987654321",
    "first_name": "Jane",
    "last_name": "Doe",
    "email": "[email protected]",
    "phone": "+1234567890",
    "address": {
      "line1": "123 Main St",
      "line2": "Apt 4B",
      "city": "San Francisco",
      "state": "CA",
      "postal_code": "94102",
      "country": "US"
    },
    "company": "Acme Corporation",
    "source": "donation",
    "tags": ["donor", "first-time"],
    "subscribed": true,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  },
  "account_id": "acct_xyz789"
}

Event Data Fields

id
string
required
Unique identifier for the contact (prefixed with cont_)
first_name
string
required
Contact’s first name
last_name
string
required
Contact’s last name
email
string
required
Contact’s email address (unique identifier)
phone
string
Contact’s phone number in E.164 format
address
object
Contact’s mailing address
company
string
Company or organization name
source
string
required
How the contact was created: donation, ticket, signup, manual, api, or import
tags
array
Array of tags applied to the contact
subscribed
boolean
required
Whether the contact is subscribed to email communications
created_at
string
required
ISO 8601 timestamp when the contact was created
updated_at
string
required
ISO 8601 timestamp when the contact was last updated

Common Use Cases

Automatically add new supporters to your CRM or marketing platform:
async function handleContactCreated(event) {
  const { first_name, last_name, email, phone, company, source } = event.data;

  await crm.createContact({
    firstName: first_name,
    lastName: last_name,
    email: email,
    phone: phone,
    company: company,
    source: `Givebutter - ${source}`,
    tags: ['givebutter-supporter'],
    lists: ['all-supporters']
  });
}
Welcome new supporters with an automated email:
async function handleContactCreated(event) {
  const { first_name, email, source, subscribed } = event.data;

  // Only send if they're subscribed
  if (subscribed) {
    await sendEmail({
      to: email,
      subject: 'Welcome to our community!',
      template: 'welcome',
      data: {
        firstName: first_name,
        source: source
      }
    });
  }
}
Enroll new contacts in drip campaigns or email sequences:
async function handleContactCreated(event) {
  const { id, email, first_name, source, tags } = event.data;

  // Add to appropriate sequence based on source
  const sequences = {
    donation: 'donor-nurture',
    ticket: 'event-attendee',
    signup: 'newsletter-welcome'
  };

  if (sequences[source]) {
    await emailPlatform.addToSequence({
      email: email,
      sequence: sequences[source],
      variables: {
        first_name: first_name,
        contact_id: id
      }
    });
  }
}
Notify your team when important contacts are added:
async function handleContactCreated(event) {
  const { first_name, last_name, email, source, company } = event.data;

  // Notify for major donations or corporate contacts
  if (source === 'donation' || company) {
    await sendSlackNotification({
      channel: '#new-supporters',
      message: `👋 New contact: ${first_name} ${last_name}`,
      details: {
        email: email,
        company: company || 'Individual',
        source: source
      }
    });
  }
}
Build comprehensive supporter profiles in your database:
async function handleContactCreated(event) {
  const contact = event.data;

  await database.supporters.create({
    givebutter_id: contact.id,
    first_name: contact.first_name,
    last_name: contact.last_name,
    email: contact.email,
    phone: contact.phone,
    address: contact.address,
    company: contact.company,
    source: contact.source,
    tags: contact.tags,
    subscribed: contact.subscribed,
    first_interaction_date: contact.created_at,
    lifetime_donations: 0,
    donation_count: 0,
    last_donation_date: null
  });
}

Contact Sources

SourceDescription
donationCreated during donation checkout
ticketCreated during ticket purchase
signupSigned up via email signup form
manualManually added in dashboard
apiCreated via API
importImported from CSV or other source