Skip to main content
Get started with the Givebutter API in just a few steps. This guide will walk you through authentication and making your first API request.

Prerequisites

  • A Givebutter account (sign up here)
  • Basic knowledge of making HTTP requests
  • An HTTP client or programming language (cURL, JavaScript, Python, etc.)

Step 1: Get Your API Key

1

Log into Dashboard

Sign in to your Givebutter Dashboard
2

Navigate to API Settings

Go to SettingsIntegrationsAPI Keys
3

Create API Key

Click Create New API Key and give it a descriptive name (e.g., “My First Integration”)
4

Copy Your Key

Copy your API key immediately - you won’t be able to see it again!
Important: Keep your API key secure! Never commit it to version control or expose it in client-side code.

Step 2: Make Your First Request

Let’s fetch a list of your campaigns. Choose your preferred language:
curl "https://api.givebutter.com/v1/campaigns" \
  -H "Authorization: Bearer YOUR_API_KEY"

Step 3: Understand the Response

You’ll receive a JSON response with your campaigns:
{
  "data": [
    {
      "id": "camp_abc123",
      "title": "Annual Gala 2024",
      "goal": 50000,
      "total_raised": 12500,
      "status": "active",
      "url": "https://givebutter.com/annual-gala-2024",
      "created_at": "2024-01-15T10:30:00Z"
    }
    // ... more campaigns
  ],
  "links": {
    "first": "https://api.givebutter.com/v1/campaigns?page=1",
    "last": "https://api.givebutter.com/v1/campaigns?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "per_page": 20,
    "total": 5
  }
}
  • data: Array of campaign objects - links: URLs for pagination (first, last, prev, next pages) - meta: Pagination metadata (current page, total items, etc.)

Step 4: Handle Errors

Always check for errors in your requests:
const response = await fetch('https://api.givebutter.com/v1/campaigns', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

if (!response.ok) {
const error = await response.json();
console.error('Error:', error.error.message);
throw new Error(error.error.message);
}

const data = await response.json();
console.log('Success:', data);

Common Errors

Error CodeWhat It MeansHow to Fix
401Invalid API keyCheck your API key is correct and includes Bearer prefix
403Permission deniedVerify your API key has access to this resource
404Resource not foundCheck the URL and resource ID are correct
429Rate limit exceededWait before making more requests, see Rate Limits

What’s Next?

Now that you’ve made your first request, explore these resources:

Test vs Production

Start with a test API key (prefix: test_) to safely develop your integration without affecting production data. When ready, create a live API key (prefix: live_) for production use.

Need Help?

Pro tip: Use environment variables to store your API key and never commit it to version control:
.env
GIVEBUTTER_API_KEY=your_api_key_here