ActiveCampaign is a multi-purpose cloud software platform for small-to-mid-sized businesses. The platform offers solutions for customer experience automation, including email marketing, marketing automation, sales automation, and CRM. If your product needs to interact with CRM data or any related automation tools, an integration with ActiveCampaign is essential.
Building an ActiveCampaign integration is not a walk in the park due to the platform's diverse features and varied functionalities. Fortunately, we’ve already gone through the headache of building and maintaining a complex native ActiveCampaign integration. In this guide, we share all the wisdom and gotchas we’ve picked up over the years.
If you’re unfamiliar with what native integrations are in the first place, you can reference our previous blog post aptly titled what are native integrations?
As a side note, I’ll be using the Vessel SDK to build this integration so I don’t have to worry about setting up Auth or handling any ActiveCampaign API quirks. If you want to follow along you can sign up here.
If you don’t want to use Vessel, no worries, I’ve kept this guide as generic as possible and it will be useful regardless of how you decide to build your native ActiveCampaign integration.
Before you dive into writing code for your ActiveCampaign integration, there are a few logistical things you’ll want to get out of the way.
First, you’ll need access to a developer or sandbox account. ActiveCampaign provides a free sandbox account that allows you to test your integration without affecting real customer data and also comes with some fake test data.
Once you have a developer account, you'll need to get an API key. The API key is used to authenticate your integration with ActiveCampaign's API and it’s what lets us make API calls. To get your API key, go to Settings > Developer
Authentication is the first step in making API calls to ActiveCampaign. To authenticate your integration, you'll need to include your API key in the request headers. Here's an example of how to authenticate using the ActiveCampaign API key:
Make sure to replace YOUR_API_KEY with your actual ActiveCampaign API key.
Now that you’re able to authenticate your user, you can begin making API calls to their CRM 🥳! In this section, we’ll explore how to read and write to the ActiveCampaign API in real-time.
Reading from the ActiveCampaign API is relatively straightforward, however, here are a few things to keep in mind:
Here's an example API call for reading contacts using the ActiveCampaign API:
If you're using the Vessel SDK, you can simplify the process of making API calls to the ActiveCampaign API. Here's an example of how to use the Vessel SDK to fetch a list of contacts:
Note that we can use the unified API for this call so that we don’t have to rebuild this flow if we want to support other marketing automation tools like Mailchimp.
When writing to the ActiveCampaign, make sure you handle errors correctly and also follow best practices like sleeping for 1000 milliseconds before retrying.
Here's an example API call for creating a contact using the ActiveCampaign API:
If you're using the Vessel SDK, you can simplify the process of making API calls to the Mailchimp API. Here's an example of how to use the Vessel SDK to add a new subscriber:
Again, we can use the unified API to avoid having to build this out for multiple marketing automation integrations.
While using the ActiveCampaign API offers the most flexibility and is more maintainable if you want to support more integrations, you can also build an ActiveCampaign integration through their App Studio builder.
Hopefully, you found this article helpful for building out your native ActiveCampaign integration. I know I certainly wish something like this existed when we built out our ActiveCampaign integration.
If you decided to give Vessel a spin while following this tutorial, thank you. If you have any feedback while using the SDK, don’t hesitate to reach out at support@vessel.dev. We’re a team of engineers at heart and take every piece of feedback extremely seriously.
if you’re curious to learn more about why we started Vessel and how we view the future of customer-facing integrations, you can read more in our “what are native integration platforms” posts.
On that note, if you ever have any questions about building an ActiveCampaign integration while you’re going through this tutorial, regardless of if you decide to use Vessel, don’t hesitate to reach out at zach@vessel.dev and I’ll be more than happy to personally help.