简介
Maton官方提供的ActiveCampaign API集成技能,通过托管OAuth网关实现营销自动化、CRM和邮件 campaign 管理,需配置MATON_API_KEY环境变量。
原始描述
ActiveCampaign API integration with managed OAuth. Marketing automation, CRM, contacts, deals, and email campaigns. Use this skill when users want to manage...
通过你的 Agent 添加
安装目录:active-campaign/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
active-campaign skill 是一个纯文档型的 API 集成工具,通过 Maton 托管网关代理访问 ActiveCampaign 的完整 API 能力。用户需先在 maton.ai 注册获取 MATON_API_KEY,然后通过 https://gateway.maton.ai/active-campaign/api/3// 端点进行所有操作。支持的功能模块包括:联系人管理(增删改查、标签、列表订阅)、交易与管道管理(deals、stages、pipelines)、营销自动化(automations、campaigns)、自定义字段、笔记和 Webhook 等。OAuth 认证流程通过 ctrl.maton.ai 连接管理中心完成,支持多连接切换。
显著优点
- 零本地代码风险:纯 Markdown 文档架构,无可执行文件,彻底杜绝本地代码注入和恶意执行风险。
- 托管 OAuth 简化集成:无需自行处理复杂的 OAuth 2.0 流程,Maton 平台统一托管令牌刷新和生命周期管理。
- 完整 API 覆盖:涵盖 ActiveCampaign v3 API 的核心能力,从联系人管理到交易管道、自动化流程一应俱全。
- 多语言示例丰富:提供 Bash、Python、JavaScript 等完整代码示例,降低接入门槛。
- 连接管理灵活:支持多账户连接,通过
Maton-Connection 头部可指定特定连接,适合代运营或多租户场景。
潜在缺点与局限性
- 强外部依赖:核心功能完全依赖 Maton 网关(gateway.maton.ai)和 ActiveCampaign 服务的可用性,任一服务故障将导致功能中断。
- 速率限制严格:ActiveCampaign 原生限制 5 req/sec,大规模数据同步需自行实现分页和节流逻辑。
- 无本地缓存:每次调用均实时请求 API,高频场景下延迟和成本较高。
- 错误信息透传:4xx/5xx 错误直接透传自 ActiveCampaign,调试体验取决于上游服务质量。
- 功能边界限制:仅支持读取和基础 CRUD,复杂的自动化构建、可视化编辑等需返回 ActiveCampaign 原生界面操作。
适合的目标群体
- 营销运营团队:需要批量管理联系人、标签、列表订阅状态,执行邮件 campaign 的自动化运营人员。
- CRM 管理员:负责销售管道、交易阶段、客户数据维护的 CRM 运营者。
- 系统集成开发者:需要将 ActiveCampaign 数据同步至内部 BI、数据仓库或与其他 SaaS 打通的技术团队。
- 代运营服务商:管理多个客户 ActiveCampaign 账户,需要统一 API 接入和连接切换能力的代理商。
使用风险
- API 密钥泄露风险:
MATON_API_KEY 是访问所有连接和数据的万能钥匙,一旦泄露可能导致全部客户数据暴露,必须严格保管。
- 服务可用性风险:Maton 网关或 ActiveCampaign 服务中断将直接影响业务连续性,建议实现熔断和降级机制。
- 数据合规风险:联系人数据跨境传输至 ActiveCampaign(美国公司),需确保符合 GDPR、个人信息保护法等法规要求。
- 速率限制触发:高频调用易触发 429 限流,可能导致数据同步延迟或任务失败,需设计指数退避重试策略。
- OAuth 授权过期:长期未使用的连接可能因令牌过期失效,需监控连接状态并设计重新授权流程。
Maton-Connection 头部可指定特定连接,适合代运营或多租户场景。- 强外部依赖:核心功能完全依赖 Maton 网关(gateway.maton.ai)和 ActiveCampaign 服务的可用性,任一服务故障将导致功能中断。
- 速率限制严格:ActiveCampaign 原生限制 5 req/sec,大规模数据同步需自行实现分页和节流逻辑。
- 无本地缓存:每次调用均实时请求 API,高频场景下延迟和成本较高。
- 错误信息透传:4xx/5xx 错误直接透传自 ActiveCampaign,调试体验取决于上游服务质量。
- 功能边界限制:仅支持读取和基础 CRUD,复杂的自动化构建、可视化编辑等需返回 ActiveCampaign 原生界面操作。
适合的目标群体
- 营销运营团队:需要批量管理联系人、标签、列表订阅状态,执行邮件 campaign 的自动化运营人员。
- CRM 管理员:负责销售管道、交易阶段、客户数据维护的 CRM 运营者。
- 系统集成开发者:需要将 ActiveCampaign 数据同步至内部 BI、数据仓库或与其他 SaaS 打通的技术团队。
- 代运营服务商:管理多个客户 ActiveCampaign 账户,需要统一 API 接入和连接切换能力的代理商。
使用风险
- API 密钥泄露风险:
MATON_API_KEY 是访问所有连接和数据的万能钥匙,一旦泄露可能导致全部客户数据暴露,必须严格保管。
- 服务可用性风险:Maton 网关或 ActiveCampaign 服务中断将直接影响业务连续性,建议实现熔断和降级机制。
- 数据合规风险:联系人数据跨境传输至 ActiveCampaign(美国公司),需确保符合 GDPR、个人信息保护法等法规要求。
- 速率限制触发:高频调用易触发 429 限流,可能导致数据同步延迟或任务失败,需设计指数退避重试策略。
- OAuth 授权过期:长期未使用的连接可能因令牌过期失效,需监控连接状态并设计重新授权流程。
- API 密钥泄露风险:
MATON_API_KEY是访问所有连接和数据的万能钥匙,一旦泄露可能导致全部客户数据暴露,必须严格保管。 - 服务可用性风险:Maton 网关或 ActiveCampaign 服务中断将直接影响业务连续性,建议实现熔断和降级机制。
- 数据合规风险:联系人数据跨境传输至 ActiveCampaign(美国公司),需确保符合 GDPR、个人信息保护法等法规要求。
- 速率限制触发:高频调用易触发 429 限流,可能导致数据同步延迟或任务失败,需设计指数退避重试策略。
- OAuth 授权过期:长期未使用的连接可能因令牌过期失效,需监控连接状态并设计重新授权流程。
技能正文
name: active-campaign
description: |
ActiveCampaign API integration with managed OAuth. Marketing automation, CRM, contacts, deals, and email campaigns.
Use this skill when users want to manage contacts, deals, tags, lists, automations, or campaigns in ActiveCampaign.
For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).
Requires network access and valid Maton API key.
metadata:
author: maton
version: "1.0"
clawdbot:
emoji: 🧠
homepage: "https://maton.ai"
requires:
env:
- MATON_API_KEY
ActiveCampaign
Access the ActiveCampaign API with managed OAuth authentication. Manage contacts, deals, tags, lists, automations, and email campaigns.
Quick Start
# List all contacts
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://gateway.maton.ai/active-campaign/api/3/contacts')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Base URL
https://gateway.maton.ai/active-campaign/{native-api-path}
# List all contacts
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://gateway.maton.ai/active-campaign/api/3/contacts')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
https://gateway.maton.ai/active-campaign/{native-api-path}
Replace {native-api-path} with the actual ActiveCampaign API endpoint path. The gateway proxies requests to {account}.api-us1.com and automatically injects your OAuth token.
Authentication
All requests require the Maton API key in the Authorization header:
Authorization: Bearer $MATON_API_KEY
Environment Variable: Set your API key as MATON_API_KEY:
export MATON_API_KEY="YOUR_API_KEY"
Getting Your API Key
- Sign in or create an account at maton.ai
- Go to maton.ai/settings
- Copy your API key
Connection Management
Manage your ActiveCampaign OAuth connections at https://ctrl.maton.ai.
List Connections
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections?app=active-campaign&status=ACTIVE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Create Connection
python <<'EOF'
import urllib.request, os, json
data = json.dumps({'app': 'active-campaign'}).encode()
req = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Get Connection
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections?app=active-campaign&status=ACTIVE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
python <<'EOF'
import urllib.request, os, json
data = json.dumps({'app': 'active-campaign'}).encode()
req = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Get Connection
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Response:
{
"connection": {
"connection_id": "9e8ba2aa-25ec-4ba0-8815-3068be304dca",
"status": "ACTIVE",
"creation_time": "2026-02-09T20:03:16.595823Z",
"last_updated_time": "2026-02-09T20:04:09.550767Z",
"url": "https://connect.maton.ai/?session_token=...",
"app": "active-campaign",
"metadata": {}
}
}
Open the returned url in a browser to complete OAuth authorization.
Delete Connection
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}', method='DELETE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Specifying Connection
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}', method='DELETE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
If you have multiple ActiveCampaign connections, specify which one to use with the Maton-Connection header:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://gateway.maton.ai/active-campaign/api/3/contacts')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Maton-Connection', '9e8ba2aa-25ec-4ba0-8815-3068be304dca')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
If omitted, the gateway uses the default (oldest) active connection.
API Reference
Contacts
List Contacts
GET /active-campaign/api/3/contacts
GET /active-campaign/api/3/contacts
Query Parameters:
limit- Number of results (default: 20)offset- Starting indexsearch- Search by emailfilters[email]- Filter by emailfilters[listid]- Filter by list ID
Response:
{
"contacts": [
{
"id": "1",
"email": "user@example.com",
"firstName": "John",
"lastName": "Doe",
"phone": "",
"cdate": "2026-02-09T14:03:19-06:00",
"udate": "2026-02-09T14:03:19-06:00"
}
],
"meta": {
"total": "1"
}
}
Get Contact
GET /active-campaign/api/3/contacts/{contactId}
GET /active-campaign/api/3/contacts/{contactId}
Returns contact with related data including lists, tags, deals, and field values.
Create Contact
POST /active-campaign/api/3/contacts
Content-Type: application/json
{
"contact": {
"email": "newcontact@example.com",
"firstName": "John",
"lastName": "Doe",
"phone": "555-1234"
}
}
POST /active-campaign/api/3/contacts
Content-Type: application/json
{
"contact": {
"email": "newcontact@example.com",
"firstName": "John",
"lastName": "Doe",
"phone": "555-1234"
}
}
Response:
{
"contact": {
"id": "2",
"email": "newcontact@example.com",
"firstName": "John",
"lastName": "Doe",
"cdate": "2026-02-09T17:51:39-06:00",
"udate": "2026-02-09T17:51:39-06:00"
}
}
Update Contact
PUT /active-campaign/api/3/contacts/{contactId}
Content-Type: application/json
{
"contact": {
"firstName": "Updated",
"lastName": "Name"
}
}
Delete Contact
DELETE /active-campaign/api/3/contacts/{contactId}
PUT /active-campaign/api/3/contacts/{contactId}
Content-Type: application/json
{
"contact": {
"firstName": "Updated",
"lastName": "Name"
}
}
DELETE /active-campaign/api/3/contacts/{contactId}
Returns 200 OK on success.
Sync Contact (Create or Update)
POST /active-campaign/api/3/contact/sync
Content-Type: application/json
{
"contact": {
"email": "user@example.com",
"firstName": "Updated Name"
}
}
POST /active-campaign/api/3/contact/sync
Content-Type: application/json
{
"contact": {
"email": "user@example.com",
"firstName": "Updated Name"
}
}
Creates the contact if it doesn't exist, updates if it does.
Tags
List Tags
GET /active-campaign/api/3/tags
Response:
{
"tags": [
{
"id": "1",
"tag": "VIP Customer",
"tagType": "contact",
"description": "High-value customers",
"cdate": "2026-02-09T17:51:39-06:00"
}
],
"meta": {
"total": "1"
}
}
Get Tag
GET /active-campaign/api/3/tags/{tagId}
Create Tag
POST /active-campaign/api/3/tags
Content-Type: application/json
{
"tag": {
"tag": "New Tag",
"tagType": "contact",
"description": "Tag description"
}
}
Update Tag
PUT /active-campaign/api/3/tags/{tagId}
Content-Type: application/json
{
"tag": {
"tag": "Updated Tag Name"
}
}
Delete Tag
DELETE /active-campaign/api/3/tags/{tagId}
Contact Tags
Add Tag to Contact
POST /active-campaign/api/3/contactTags
Content-Type: application/json
{
"contactTag": {
"contact": "2",
"tag": "1"
}
}
Remove Tag from Contact
DELETE /active-campaign/api/3/contactTags/{contactTagId}
Get Contact's Tags
GET /active-campaign/api/3/contacts/{contactId}/contactTags
Lists
List All Lists
GET /active-campaign/api/3/lists
GET /active-campaign/api/3/tags/{tagId}
POST /active-campaign/api/3/tags
Content-Type: application/json
{
"tag": {
"tag": "New Tag",
"tagType": "contact",
"description": "Tag description"
}
}
Update Tag
PUT /active-campaign/api/3/tags/{tagId}
Content-Type: application/json
{
"tag": {
"tag": "Updated Tag Name"
}
}
Delete Tag
DELETE /active-campaign/api/3/tags/{tagId}
Contact Tags
Add Tag to Contact
POST /active-campaign/api/3/contactTags
Content-Type: application/json
{
"contactTag": {
"contact": "2",
"tag": "1"
}
}
Remove Tag from Contact
DELETE /active-campaign/api/3/contactTags/{contactTagId}
Get Contact's Tags
GET /active-campaign/api/3/contacts/{contactId}/contactTags
Lists
List All Lists
GET /active-campaign/api/3/lists
PUT /active-campaign/api/3/tags/{tagId}
Content-Type: application/json
{
"tag": {
"tag": "Updated Tag Name"
}
}
DELETE /active-campaign/api/3/tags/{tagId}
Contact Tags
Add Tag to Contact
POST /active-campaign/api/3/contactTags
Content-Type: application/json
{
"contactTag": {
"contact": "2",
"tag": "1"
}
}
Remove Tag from Contact
DELETE /active-campaign/api/3/contactTags/{contactTagId}
Get Contact's Tags
GET /active-campaign/api/3/contacts/{contactId}/contactTags
Lists
List All Lists
GET /active-campaign/api/3/lists
DELETE /active-campaign/api/3/contactTags/{contactTagId}
GET /active-campaign/api/3/contacts/{contactId}/contactTags
Lists
List All Lists
GET /active-campaign/api/3/lists
Response:
{
"lists": [
{
"id": "1",
"stringid": "master-contact-list",
"name": "Master Contact List",
"cdate": "2026-02-09T14:03:20-06:00"
}
],
"meta": {
"total": "1"
}
}
Get List
GET /active-campaign/api/3/lists/{listId}
Create List
POST /active-campaign/api/3/lists
Content-Type: application/json
{
"list": {
"name": "New List",
"stringid": "new-list",
"sender_url": "https://example.com",
"sender_reminder": "You signed up on our website"
}
}
Update List
PUT /active-campaign/api/3/lists/{listId}
Content-Type: application/json
{
"list": {
"name": "Updated List Name"
}
}
Delete List
DELETE /active-campaign/api/3/lists/{listId}
Contact Lists
Subscribe Contact to List
POST /active-campaign/api/3/contactLists
Content-Type: application/json
{
"contactList": {
"contact": "2",
"list": "1",
"status": "1"
}
}
GET /active-campaign/api/3/lists/{listId}
POST /active-campaign/api/3/lists
Content-Type: application/json
{
"list": {
"name": "New List",
"stringid": "new-list",
"sender_url": "https://example.com",
"sender_reminder": "You signed up on our website"
}
}
Update List
PUT /active-campaign/api/3/lists/{listId}
Content-Type: application/json
{
"list": {
"name": "Updated List Name"
}
}
Delete List
DELETE /active-campaign/api/3/lists/{listId}
Contact Lists
Subscribe Contact to List
POST /active-campaign/api/3/contactLists
Content-Type: application/json
{
"contactList": {
"contact": "2",
"list": "1",
"status": "1"
}
}
PUT /active-campaign/api/3/lists/{listId}
Content-Type: application/json
{
"list": {
"name": "Updated List Name"
}
}
DELETE /active-campaign/api/3/lists/{listId}
Contact Lists
Subscribe Contact to List
POST /active-campaign/api/3/contactLists
Content-Type: application/json
{
"contactList": {
"contact": "2",
"list": "1",
"status": "1"
}
}
Status values: 1 = subscribed, 2 = unsubscribed
Deals
List Deals
GET /active-campaign/api/3/deals
Query Parameters:
search- Search by title, contact, or orgfilters[stage]- Filter by stage IDfilters[owner]- Filter by owner ID
Response:
{
"deals": [
{
"id": "1",
"title": "New Deal",
"value": "10000",
"currency": "usd",
"stage": "1",
"owner": "1"
}
],
"meta": {
"total": 0,
"currencies": []
}
}
Get Deal
GET /active-campaign/api/3/deals/{dealId}
Create Deal
POST /active-campaign/api/3/deals
Content-Type: application/json
{
"deal": {
"title": "New Deal",
"value": "10000",
"currency": "usd",
"contact": "2",
"stage": "1",
"owner": "1"
}
}
Update Deal
PUT /active-campaign/api/3/deals/{dealId}
Content-Type: application/json
{
"deal": {
"title": "Updated Deal",
"value": "15000"
}
}
Delete Deal
DELETE /active-campaign/api/3/deals/{dealId}
Deal Stages
List Deal Stages
GET /active-campaign/api/3/dealStages
Create Deal Stage
POST /active-campaign/api/3/dealStages
Content-Type: application/json
{
"dealStage": {
"title": "New Stage",
"group": "1",
"order": "1"
}
}
Deal Groups (Pipelines)
List Pipelines
GET /active-campaign/api/3/dealGroups
Create Pipeline
POST /active-campaign/api/3/dealGroups
Content-Type: application/json
{
"dealGroup": {
"title": "Sales Pipeline",
"currency": "usd"
}
}
Automations
List Automations
GET /active-campaign/api/3/automations
GET /active-campaign/api/3/deals/{dealId}
POST /active-campaign/api/3/deals
Content-Type: application/json
{
"deal": {
"title": "New Deal",
"value": "10000",
"currency": "usd",
"contact": "2",
"stage": "1",
"owner": "1"
}
}
Update Deal
PUT /active-campaign/api/3/deals/{dealId}
Content-Type: application/json
{
"deal": {
"title": "Updated Deal",
"value": "15000"
}
}
Delete Deal
DELETE /active-campaign/api/3/deals/{dealId}
Deal Stages
List Deal Stages
GET /active-campaign/api/3/dealStages
Create Deal Stage
POST /active-campaign/api/3/dealStages
Content-Type: application/json
{
"dealStage": {
"title": "New Stage",
"group": "1",
"order": "1"
}
}
Deal Groups (Pipelines)
List Pipelines
GET /active-campaign/api/3/dealGroups
Create Pipeline
POST /active-campaign/api/3/dealGroups
Content-Type: application/json
{
"dealGroup": {
"title": "Sales Pipeline",
"currency": "usd"
}
}
Automations
List Automations
GET /active-campaign/api/3/automations
PUT /active-campaign/api/3/deals/{dealId}
Content-Type: application/json
{
"deal": {
"title": "Updated Deal",
"value": "15000"
}
}
DELETE /active-campaign/api/3/deals/{dealId}
Deal Stages
List Deal Stages
GET /active-campaign/api/3/dealStages
Create Deal Stage
POST /active-campaign/api/3/dealStages
Content-Type: application/json
{
"dealStage": {
"title": "New Stage",
"group": "1",
"order": "1"
}
}
Deal Groups (Pipelines)
List Pipelines
GET /active-campaign/api/3/dealGroups
Create Pipeline
POST /active-campaign/api/3/dealGroups
Content-Type: application/json
{
"dealGroup": {
"title": "Sales Pipeline",
"currency": "usd"
}
}
Automations
List Automations
GET /active-campaign/api/3/automations
POST /active-campaign/api/3/dealStages
Content-Type: application/json
{
"dealStage": {
"title": "New Stage",
"group": "1",
"order": "1"
}
}
List Pipelines
GET /active-campaign/api/3/dealGroups
POST /active-campaign/api/3/dealGroups
Content-Type: application/json
{
"dealGroup": {
"title": "Sales Pipeline",
"currency": "usd"
}
}
Automations
List Automations
GET /active-campaign/api/3/automations
Response:
{
"automations": [
{
"id": "1",
"name": "Welcome Series",
"cdate": "2026-02-09T14:00:00-06:00",
"mdate": "2026-02-09T14:00:00-06:00",
"status": "1"
}
],
"meta": {
"total": "1"
}
}
Get Automation
GET /active-campaign/api/3/automations/{automationId}
Campaigns
List Campaigns
GET /active-campaign/api/3/campaigns
GET /active-campaign/api/3/automations/{automationId}
List Campaigns
GET /active-campaign/api/3/campaigns
Response:
{
"campaigns": [
{
"id": "1",
"name": "Newsletter",
"type": "single",
"status": "0"
}
],
"meta": {
"total": "1"
}
}
Get Campaign
GET /active-campaign/api/3/campaigns/{campaignId}
Users
List Users
GET /active-campaign/api/3/users
GET /active-campaign/api/3/campaigns/{campaignId}
List Users
GET /active-campaign/api/3/users
Response:
{
"users": [
{
"id": "1",
"username": "admin",
"firstName": "John",
"lastName": "Doe",
"email": "admin@example.com"
}
]
}
Get User
GET /active-campaign/api/3/users/{userId}
Accounts
List Accounts
GET /active-campaign/api/3/accounts
Create Account
POST /active-campaign/api/3/accounts
Content-Type: application/json
{
"account": {
"name": "Acme Inc"
}
}
Custom Fields
List Fields
GET /active-campaign/api/3/fields
Create Field
POST /active-campaign/api/3/fields
Content-Type: application/json
{
"field": {
"type": "text",
"title": "Custom Field",
"descript": "A custom field"
}
}
Field Values
Update Contact Field Value
PUT /active-campaign/api/3/fieldValues/{fieldValueId}
Content-Type: application/json
{
"fieldValue": {
"value": "New Value"
}
}
Notes
List Notes
GET /active-campaign/api/3/notes
Create Note
POST /active-campaign/api/3/notes
Content-Type: application/json
{
"note": {
"note": "This is a note",
"relid": "2",
"reltype": "Subscriber"
}
}
Webhooks
List Webhooks
GET /active-campaign/api/3/webhooks
Create Webhook
POST /active-campaign/api/3/webhooks
Content-Type: application/json
{
"webhook": {
"name": "My Webhook",
"url": "https://example.com/webhook",
"events": ["subscribe", "unsubscribe"],
"sources": ["public", "admin"]
}
}
Pagination
GET /active-campaign/api/3/users/{userId}
List Accounts
GET /active-campaign/api/3/accounts
POST /active-campaign/api/3/accounts
Content-Type: application/json
{
"account": {
"name": "Acme Inc"
}
}
Custom Fields
List Fields
GET /active-campaign/api/3/fields
Create Field
POST /active-campaign/api/3/fields
Content-Type: application/json
{
"field": {
"type": "text",
"title": "Custom Field",
"descript": "A custom field"
}
}
Field Values
Update Contact Field Value
PUT /active-campaign/api/3/fieldValues/{fieldValueId}
Content-Type: application/json
{
"fieldValue": {
"value": "New Value"
}
}
Notes
List Notes
GET /active-campaign/api/3/notes
Create Note
POST /active-campaign/api/3/notes
Content-Type: application/json
{
"note": {
"note": "This is a note",
"relid": "2",
"reltype": "Subscriber"
}
}
Webhooks
List Webhooks
GET /active-campaign/api/3/webhooks
Create Webhook
POST /active-campaign/api/3/webhooks
Content-Type: application/json
{
"webhook": {
"name": "My Webhook",
"url": "https://example.com/webhook",
"events": ["subscribe", "unsubscribe"],
"sources": ["public", "admin"]
}
}
Pagination
POST /active-campaign/api/3/fields
Content-Type: application/json
{
"field": {
"type": "text",
"title": "Custom Field",
"descript": "A custom field"
}
}
Update Contact Field Value
PUT /active-campaign/api/3/fieldValues/{fieldValueId}
Content-Type: application/json
{
"fieldValue": {
"value": "New Value"
}
}
List Notes
GET /active-campaign/api/3/notes
POST /active-campaign/api/3/notes
Content-Type: application/json
{
"note": {
"note": "This is a note",
"relid": "2",
"reltype": "Subscriber"
}
}
Webhooks
List Webhooks
GET /active-campaign/api/3/webhooks
Create Webhook
POST /active-campaign/api/3/webhooks
Content-Type: application/json
{
"webhook": {
"name": "My Webhook",
"url": "https://example.com/webhook",
"events": ["subscribe", "unsubscribe"],
"sources": ["public", "admin"]
}
}
Pagination
POST /active-campaign/api/3/webhooks
Content-Type: application/json
{
"webhook": {
"name": "My Webhook",
"url": "https://example.com/webhook",
"events": ["subscribe", "unsubscribe"],
"sources": ["public", "admin"]
}
}
ActiveCampaign uses offset-based pagination:
GET /active-campaign/api/3/contacts?limit=20&offset=0
Parameters:
limit- Results per page (default: 20)offset- Starting index
Response includes meta:
{
"contacts": [...],
"meta": {
"total": "150"
}
}
For large datasets, use orders[id]=ASC and id_greater parameter for better performance:
GET /active-campaign/api/3/contacts?orders[id]=ASC&id_greater=100
Code Examples
JavaScript
const response = await fetch(
'https://gateway.maton.ai/active-campaign/api/3/contacts',
{
headers: {
'Authorization': `Bearer ${process.env.MATON_API_KEY}`
}
}
);
const data = await response.json();
console.log(data.contacts);
Python
import os
import requests
response = requests.get(
'https://gateway.maton.ai/active-campaign/api/3/contacts',
headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'}
)
data = response.json()
print(data['contacts'])
Python (Create Contact with Tag)
import os
import requests
headers = {
'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}',
'Content-Type': 'application/json'
}
# Create contact
contact_response = requests.post(
'https://gateway.maton.ai/active-campaign/api/3/contacts',
headers=headers,
json={
'contact': {
'email': 'newuser@example.com',
'firstName': 'New',
'lastName': 'User'
}
}
)
contact = contact_response.json()['contact']
print(f"Created contact ID: {contact['id']}")
# Add tag to contact
tag_response = requests.post(
'https://gateway.maton.ai/active-campaign/api/3/contactTags',
headers=headers,
json={
'contactTag': {
'contact': contact['id'],
'tag': '1'
}
}
)
print("Tag added to contact")
Notes
- All endpoints require the
/api/3/ prefix
- Request bodies use singular resource names wrapped in an object (e.g.,
{"contact": {...}})
- IDs are returned as strings
- Timestamps are in ISO 8601 format with timezone
- Rate limit: 5 requests per second per account
- DELETE operations return 200 OK (not 204)
- IMPORTANT: When piping curl output to
jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments
Error Handling
Status
Meaning
400
Missing ActiveCampaign connection or bad request
401
Invalid or missing Maton API key
404
Resource not found
422
Validation error
429
Rate limited (5 req/sec)
4xx/5xx
Passthrough error from ActiveCampaign API
import os
import requests
response = requests.get(
'https://gateway.maton.ai/active-campaign/api/3/contacts',
headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'}
)
data = response.json()
print(data['contacts'])
import os
import requests
headers = {
'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}',
'Content-Type': 'application/json'
}
# Create contact
contact_response = requests.post(
'https://gateway.maton.ai/active-campaign/api/3/contacts',
headers=headers,
json={
'contact': {
'email': 'newuser@example.com',
'firstName': 'New',
'lastName': 'User'
}
}
)
contact = contact_response.json()['contact']
print(f"Created contact ID: {contact['id']}")
# Add tag to contact
tag_response = requests.post(
'https://gateway.maton.ai/active-campaign/api/3/contactTags',
headers=headers,
json={
'contactTag': {
'contact': contact['id'],
'tag': '1'
}
}
)
print("Tag added to contact")
Notes
- All endpoints require the
/api/3/ prefix
- Request bodies use singular resource names wrapped in an object (e.g.,
{"contact": {...}})
- IDs are returned as strings
- Timestamps are in ISO 8601 format with timezone
- Rate limit: 5 requests per second per account
- DELETE operations return 200 OK (not 204)
- IMPORTANT: When piping curl output to
jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments
Error Handling
Status
Meaning
400
Missing ActiveCampaign connection or bad request
401
Invalid or missing Maton API key
404
Resource not found
422
Validation error
429
Rate limited (5 req/sec)
4xx/5xx
Passthrough error from ActiveCampaign API
/api/3/ prefix{"contact": {...}})jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments| Status | Meaning |
|---|---|
| 400 | Missing ActiveCampaign connection or bad request |
| 401 | Invalid or missing Maton API key |
| 404 | Resource not found |
| 422 | Validation error |
| 429 | Rate limited (5 req/sec) |
| 4xx/5xx | Passthrough error from ActiveCampaign API |
Error responses include details:
{
"errors": [
{
"title": "The contact email is required",
"source": {
"pointer": "/data/attributes/email"
}
}
]
}
Troubleshooting: Invalid API Key
When you receive an "Invalid API key" error, ALWAYS follow these steps before concluding there is an issue:
- Check that the
MATON_API_KEYenvironment variable is set:
echo $MATON_API_KEY
- Verify the API key is valid by listing connections:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF