ActiveCampaign
Read and write the core CRM objects in ActiveCampaign through its v3 REST API. The tool lists and creates contacts and deals, the building blocks of ActiveCampaign's automation pipelines.
It uses the Python standard library only (no third-party packages) and returns the raw API response so you always see exactly what ActiveCampaign returned.
What it does
| Operation | Method + path | Description |
|---|---|---|
list_contacts |
GET /api/3/contacts |
List contacts, optionally filtered by email. |
create_contact |
POST /api/3/contacts |
Create a contact from email (+ optional name/phone). |
list_deals |
GET /api/3/deals |
List deals in your pipelines. |
create_deal |
POST /api/3/deals |
Create a deal in a pipeline stage. |
Each call publishes:
status— the HTTP status code (e.g.200,201,422).result— the response body as a JSON string.
Base URL and authentication
ActiveCampaign's API is account-specific. The base URL is:
https://<account>.api-us1.com/api/3
where <account> is your account subdomain. Authentication is a single API key
sent in the Api-Token HTTP header — there is no OAuth or JWT step.
apiKey setup
- Log in to ActiveCampaign.
- Go to Settings > Developer.
- Copy the API URL (the host gives you
<account>— e.g. forhttps://acme.api-us1.comthe account isacme) and the API Key. - Pass the account subdomain as
accountand the key asapiKey.
Inputs
| Name | Required | Used by | Notes |
|---|---|---|---|
account |
yes | all | Account subdomain (prefix of <account>.api-us1.com). |
apiKey |
yes | all | API key, sent as Api-Token. |
operation |
yes | all | One of the four operations above. |
email |
yes for create_contact | contacts | Contact email; also filters list_contacts. |
firstName |
no | create_contact | |
lastName |
no | create_contact | |
phone |
no | create_contact | |
title |
yes for create_deal | create_deal | Deal title. |
value |
yes for create_deal | create_deal | Deal value in cents (integer). |
currency |
no | create_deal | ISO code, lowercase (default usd). |
contact |
no | create_deal | Contact id to associate. |
group |
yes for create_deal | create_deal | Pipeline (deal group) id. |
stage |
yes for create_deal | create_deal | Deal stage id. |
owner |
yes for create_deal | create_deal | Owner (user) id. |
limit |
no | list_* | Page size (default 20, max 100). |
Examples
List contacts matching an email:
{
"account": "acme",
"apiKey": "YOUR_API_KEY",
"operation": "list_contacts",
"email": "[email protected]"
}
Create a contact:
{
"account": "acme",
"apiKey": "YOUR_API_KEY",
"operation": "create_contact",
"email": "[email protected]",
"firstName": "John",
"lastName": "Doe",
"phone": "7223224241"
}
List deals:
{
"account": "acme",
"apiKey": "YOUR_API_KEY",
"operation": "list_deals",
"limit": "50"
}
Create a deal (value is in cents — 15000 = $150.00):
{
"account": "acme",
"apiKey": "YOUR_API_KEY",
"operation": "create_deal",
"title": "Acme renewal",
"value": "15000",
"currency": "usd",
"group": "1",
"stage": "1",
"owner": "1",
"contact": "12"
}
Notes
- Deal
valueis in cents andcurrencyshould match your pipeline's configured currency. group(pipeline),stage, andownerare numeric ids you can discover via ActiveCampaign's/api/3/dealGroups,/api/3/dealStages, and/api/3/usersendpoints (not exposed by this tool — look them up in the UI or API once).- The tool never raises on a 4xx/5xx; it returns ActiveCampaign's status and
error body so validation failures (e.g.
422) are visible inresult.
Grounded in the official API reference: https://developers.activecampaign.com/reference/overview
Publishes
The keys a later task may reference as {{taskName.key}}. Referencing anything not listed here resolves to nothing at run time.
errorresultstatus
Input Properties
Every property this tool accepts, from its own tool.iml.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
account |
string | yes | — | ActiveCampaign account subdomain — the prefix of https:// |
apiKey |
string | yes | — | DEPRECATED — bind an API Key credential to the task with credentialName instead. A key pasted here is stored in the workflow definition in clear and appears in every export of it. Still honoured for workflows built before the change. |
operation |
string | yes | — | One of: list_contacts, create_contact, list_deals, create_deal |
email |
string | no | — | Contact email address. Required for create_contact. |
firstName |
string | no | — | Contact first name for create_contact. |
lastName |
string | no | — | Contact last name for create_contact. |
phone |
string | no | — | Contact phone number for create_contact. |
title |
string | no | — | Deal title for create_deal. Required for create_deal. |
value |
string | no | — | Deal value in cents (integer) for create_deal. Required for create_deal. |
currency |
string | no | — | Deal currency ISO code (lowercase, e.g. usd) for create_deal. Defaults to usd. |
contact |
string | no | — | Contact id to associate with the deal for create_deal. |
group |
string | no | — | Pipeline (deal group) id for create_deal. Required for create_deal. |
stage |
string | no | — | Deal stage id for create_deal. Required for create_deal. |
owner |
string | no | — | Deal owner (user) id for create_deal. Required for create_deal. |
limit |
string | no | — | Max number of results for list_* operations (maps to the API limit param, default 20, max 100). |