Skip to main content
POST
https://api.givebutter.com
/
v1
/
campaigns
curl -X POST "https://api.givebutter.com/v1/campaigns" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Annual Gala 2024",
    "description": "Join us for our annual fundraising gala.",
    "goal": 5000000,
    "status": "draft",
    "end_date": "2024-06-30T23:59:59Z"
  }'
{
  "id": "camp_abc123",
  "title": "Annual Gala 2024",
  "description": "Join us for our annual fundraising gala.",
  "goal": 5000000,
  "total_raised": 0,
  "status": "draft",
  "url": "https://givebutter.com/annual-gala-2024",
  "image_url": null,
  "video_url": null,
  "end_date": "2024-06-30T23:59:59Z",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}
Creates a new campaign in your Givebutter account. Campaigns are created in draft status by default.

Request Body

title
string
required
Campaign title. Maximum 100 characters.
description
string
Campaign description. Supports basic HTML formatting.
goal
integer
required
Fundraising goal in cents. Minimum: 100 ($1.00)
status
string
default:"draft"
Campaign status. Options: draft, active
end_date
string
Campaign end date in ISO 8601 format (e.g., “2024-12-31T23:59:59Z”)
image_url
string
URL to campaign cover image. Image should be at least 1200x630px.
video_url
string
URL to campaign video (YouTube, Vimeo, or direct video URL)

Response

Returns the created campaign object with a 201 Created status code.
id
string
Unique identifier for the created campaign
title
string
Campaign title
description
string
Campaign description
goal
integer
Fundraising goal in cents
status
string
Campaign status
url
string
Public campaign URL
created_at
string
ISO 8601 timestamp of creation
curl -X POST "https://api.givebutter.com/v1/campaigns" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Annual Gala 2024",
    "description": "Join us for our annual fundraising gala.",
    "goal": 5000000,
    "status": "draft",
    "end_date": "2024-06-30T23:59:59Z"
  }'
{
  "id": "camp_abc123",
  "title": "Annual Gala 2024",
  "description": "Join us for our annual fundraising gala.",
  "goal": 5000000,
  "total_raised": 0,
  "status": "draft",
  "url": "https://givebutter.com/annual-gala-2024",
  "image_url": null,
  "video_url": null,
  "end_date": "2024-06-30T23:59:59Z",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}

Validation Rules

  • title: Required, maximum 100 characters
  • goal: Required, minimum 100 (cents), maximum 100,000,000 (cents)
  • description: Optional, maximum 5,000 characters
  • status: Must be draft or active
  • end_date: Must be a future date in ISO 8601 format
  • image_url: Must be a valid URL
  • video_url: Must be a valid URL

Publishing a Campaign

Campaigns are created as draft by default. To publish immediately, set status: "active":
{
  "title": "Annual Gala 2024",
  "goal": 5000000,
  "status": "active"
}
Or update a draft campaign to active using the Update Campaign endpoint.

Best Practices

Create campaigns as drafts first, configure all settings, then publish:
// 1. Create as draft
const campaign = await createCampaign({ status: 'draft', ... });

// 2. Add images, configure settings
await uploadCampaignImage(campaign.id, imageFile);

// 3. Publish when ready
await updateCampaign(campaign.id, { status: 'active' });
Research suggests campaigns with achievable goals have higher completion rates:
// Good: Realistic, achievable goal
const campaign = await createCampaign({
  title: 'Community Garden Project',
  goal: 500000, // $5,000
  ...
});
Campaigns with detailed descriptions raise 30% more on average:
const campaign = await createCampaign({
  title: 'Annual Gala 2024',
  description: `
    <h2>Join Us for an Unforgettable Evening</h2>
    <p>Support local education programs...</p>
    <ul>
      <li>Live music and entertainment</li>
      <li>Gourmet dinner</li>
      <li>Silent auction</li>
    </ul>
  `,
  ...
});
Always handle validation errors gracefully:
try {
  const campaign = await createCampaign(data);
  console.log('Campaign created:', campaign.id);
} catch (error) {
  if (error.response.status === 422) {
    const errors = error.response.data.error.details;
    // Display field-specific errors to user
    Object.keys(errors).forEach(field => {
      console.error(`${field}: ${errors[field].join(', ')}`);
    });
  }
}

Next Steps