Active Campaign is an email marketing service. Typical functions you'd want to trigger from your website include;
- Add subscriber
- Add subscriber to group
- Remove subscriber
Authentication
Get your API key
In Active Campaign, your API key can be found in your account on the Settings page under the "Developer" tab. Each user in your ActiveCampaign account has their own unique API key.
Setup HTTP Request Block in Logic
In your Webflow Logic flow, create a Make HTTP Request block where you want this step to occur.
Use these settings;
IMPORTANT: Not actually tested, this is based on the docs. Let me know if you try it, and any problems you're encountering.
- Authentication - select API token
- Add to - select Header
- Header - enter Api-Token
- Credential - create as follows;
- > Name - anything you like
- > Type - API token
- > Token - YOUR-TOKEN-ID
Base Url
From the Active Campaign API docs;
The API is accessed using a base URL that is specific to your account. In the examples provided in the API documentation, the following URL is used as a placeholder;
youraccountname.api-us1.com
You must replace these with your account-specific API base URL, which can be found in your account on the My Settings page under the "Developer" tab.
In addition, URL paths should begin with /api/3 to specify version 3 of the API.
Generally, the URL will be in the form ;
https://<your-account>.api-us1.com/api/3/<resource>
Common Uses
Add Subscriber
Known as Create a Contact in Active Campaign terminology.
- Request method - select POST
- URL - enter ( Base URL )/contacts
- Headers - add
- > Content-Type : application/json
The request body will be JSON.
The minimum you need to add a subscriber is the email, e.g;
{
"contact": {
"email": "(insert email field here)"
}
}
See the API documentation for additional fields you can add, e.g. name, phone, and custom field values.
Resources
FAQs
Answers to frequently asked questions.