Back

Donorbox API Essential Guide

Aug 16, 20246 minute read

What type of API does Donorbox provide?

Based on the search results provided, Donorbox appears to have a REST API. The API documentation refers to REST-style endpoints and HTTP methods, uses basic authentication with an API key, and follows a typical REST API structure with endpoints like https://donorbox.org/{endpoint}. The API also uses standard HTTP methods like GET for retrieving data from endpoints. While the search results don't explicitly state "Donorbox has a REST API", the API structure and conventions described are consistent with REST APIs.

Does the Donorbox API have webhooks?

Webhook Availability

Yes, the official Donorbox API does offer webhooks.

Types of Events

The Donorbox API provides webhooks for the following types of events:

  1. New or Updated Campaign
  2. New or Updated Donation
  3. New or Updated Plan
  4. New or Updated Donor
  5. New or Updated Tickets Purchase Transaction

Key Points to Consider

  • Webhooks are available for all API endpoints documented in the Donorbox API guide.
  • To enable webhooks, you need to follow the Custom Webhooks Configuration in Donorbox.
  • The API & Zapier integration, which includes webhook functionality, costs $17/month.
  • Webhooks allow for instant triggering of events, as opposed to polling the API.

Best Practices

  1. Use webhooks for real-time updates rather than frequently polling the API.
  2. Ensure your webhook endpoint can handle the expected volume of events.
  3. Implement proper authentication and validation for your webhook endpoint to ensure security.
  4. Consider using Zapier integrations for easier setup and management of webhooks if you don't want to implement them directly.

In summary, the Donorbox API offers comprehensive webhook support for various events related to campaigns, donations, plans, donors, and ticket purchases. This allows for real-time integration and automation with other systems and services.

Rate Limits and other limitations

Unfortunately, I could not find specific information about the API rate limits for the Donorbox API in the provided search results. The search results contain information about Box API rate limits and general Donorbox API details, but do not mention Donorbox API rate limits.

To get accurate information about Donorbox API rate limits, I would recommend:

  1. Checking the official Donorbox API documentation, if available.

  2. Contacting Donorbox support directly to inquire about their current API rate limit policies.

  3. Looking for any rate limit information in the API responses when making requests (there may be headers indicating remaining requests or rate limit status).

  4. Starting with conservative request rates and gradually increasing to determine any practical limits through testing.

Without official documentation on rate limits, it's best to use the API responsibly and avoid making an excessive number of requests in a short time period. If you encounter any rate limiting, you may need to implement backoff and retry logic in your integration.

Latest API Version

Based on the search results provided, here is the most up-to-date information about the Donorbox API:

Current Version

The search results do not explicitly mention a specific version number for the Donorbox API. However, the API documentation refers to endpoints using the format "/api/v1/", suggesting that the current version is v1 [1].

Key Points

  • The Donorbox API uses basic authentication, requiring an organization login email as the username and an API key as the password [1].

  • To access the API, users need to sign up at https://donorbox.org and enable the "API & Zapier Integration" feature, which costs $17/month [1].

  • The API provides endpoints for accessing campaigns, donations, donors, and plans [1][5].

  • All API endpoints support pagination and ordering of results [1].

  • The API allows filtering of results using various parameters such as date ranges, campaign names, donor information, and more [1].

Best Practices

  1. Securely store your API key, as it is only shown once for security reasons [1].

  2. Use appropriate filters to limit the data retrieved and improve performance [1].

  3. Implement pagination when dealing with large datasets to manage resource usage [1].

  4. Consider using environmental variables to store API credentials for better security [5].

  5. Familiarize yourself with the available endpoints and their specific filtering options to optimize your API usage [1][5].

Code Example

Here's a basic example of how to use the Donorbox API with Python, using the Parsons library:

from parsons import Donorbox # Initialize the Donorbox client donorbox = Donorbox(email='[email protected]', api_key='YOUR_API_KEY') # Get all campaigns campaigns = donorbox.get_campaigns() # Get donations for a specific campaign donations = donorbox.get_donations(campaign_name="My Campaign") # Get donors with pagination donors = donorbox.get_donors(page=1, per_page=50) # Get plans started after a specific date plans = donorbox.get_plans(date_from="2023-01-01")

This example demonstrates how to initialize the Donorbox client and make basic API calls to retrieve campaigns, donations, donors, and plans [5].

In summary, while the exact version number is not specified, the Donorbox API provides a comprehensive set of endpoints and features for accessing and managing donation-related data. Users should refer to the official documentation for the most up-to-date and detailed information on using the API.

How to get a Donorbox developer account and API Keys?

  1. Sign up for a Donorbox account

To get started, you'll need to sign up for a regular Donorbox account at https://donorbox.org if you don't already have one.

  1. Enable API access

Once you have a Donorbox account:

  • Log in to your Donorbox account
  • Click on "Account" in the top navigation
  • Click on "API & Zapier Integration" on the left sidebar
  • Select "Enable API & Zapier Integration"
  • Confirm and add your billing information
  1. Generate an API key

After enabling API access:

  • Select "Set new API Key"
  • Copy the generated API key and store it securely - it will only be shown once for security reasons
  1. Start using the API

With your API key, you can now make API calls to Donorbox:

  • Use your organization login email as the username
  • Use the API key as the password
  • The base URL for API endpoints is https://donorbox.org/api/v1/

What can you do with the Donorbox API?

Based on the provided information, here are the key data models you can interact with using the Donorbox API:

  1. Campaigns

    • Retrieve campaign details
    • List campaigns
  2. Donations

    • Retrieve donation details
    • List donations
    • Filter donations by:
      • Email
      • Date range
      • Campaign name
      • Campaign ID
      • Donation ID
      • Donor's first name
      • Donor's last name
      • Donor ID
      • Amount (including min/max ranges)
  3. Donors

    • Donor information is included in donation data
    • Can filter donations by donor attributes
  4. Events (implied from Salesforce integration)

    • Sync event data with Salesforce
  5. Recurring Donations

    • Sync recurring donation data with Salesforce
    • Create recurring donation records
  6. Custom Fields

    • Map custom field data to Salesforce objects

While not explicitly stated as API endpoints, the Salesforce integration suggests these data models are accessible:

  1. Contacts

    • Create and update contact records
  2. Accounts

    • Create and update account/household records
  3. Opportunities

    • Create opportunity records for donations

Key points:

  • The API uses basic authentication with your organization email and API key
  • Webhooks are available for real-time data updates
  • The API & Zapier integration costs $17/month
  • Detailed filtering options are available for donations
  • The API allows for comprehensive data synchronization with Salesforce

Note that the full extent of the API capabilities may not be covered in the provided information, and you should refer to the complete API documentation for a comprehensive list of endpoints and operations.