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