微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🧠

智能营销自动化 · 安全 CRM 管控

ActiveCampaign · v1.0.8
办公 安全 S 级 榜单 #40 作者 byungkyu 公开目录收录
4.8k 下载 3 安装 15.1k 收藏 58 浏览

简介

ActiveCampaign 官方 API 代理服务,支持 OAuth 托管认证,可管理联系人、交易、邮件营销、自动化流程及 CRM 数据,所有写入操作需用户确认。

原始描述

ActiveCampaign API integration with managed OAuth. Marketing automation, CRM, contacts, deals, email campaigns, automations, tags, lists, users, accounts, cu...

通过你的 Agent 添加

安装目录:active-campaign/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/activecampaign-15680/
Codex CLI~/.codex/skills/activecampaign-15680/
DeepSeek Harness~/.agents/skills/activecampaign-15680/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心功能

ActiveCampaign 技能是 Maton 平台提供的官方 API 集成服务,通过托管 OAuth 认证机制,让用户能够安全地访问 ActiveCampaign 的营销自动化与客户关系管理功能。该技能完整覆盖了 ActiveCampaign API v3 的核心能力,包括联系人管理、交易管道、邮件营销、自动化工作流、标签分类、用户权限及自定义字段等模块。

显著优点

  1. 托管 OAuth 安全架构:无需用户自行处理复杂的 OAuth 流程,Maton 平台自动管理令牌刷新与存储,降低凭证泄露风险
  2. 完整功能覆盖:支持 contacts、deals、lists、campaigns、automations、tags、webhooks 等 10+ 核心资源类型的 CRUD 操作
  3. 多连接管理:支持同一用户绑定多个 ActiveCampaign 账户,通过 Maton-Connection 头部灵活切换
  4. 开发者友好:提供 Python、JavaScript 等完整代码示例,请求格式遵循 RESTful 规范,响应包含标准 meta 分页信息
  5. 细粒度权限控制:写操作强制要求用户确认,webhook 创建需验证目标 URL,用户/账户管理操作明确标识风险

潜在局限

  • 速率限制:每秒 5 请求/账户的硬限制,大规模数据同步需实现指数退避重试
  • 依赖 Maton 平台:所有请求必须经由 api.maton.ai 代理,无法直连 ActiveCampaign 原生端点,存在单点依赖
  • 功能滞后风险:ActiveCampaign API 更新需等待 Maton 适配,可能无法及时使用最新功能
  • 环境变量依赖:运行时强制要求 MATON_API_KEY,本地调试需额外配置

适合人群

  • 营销自动化工程师:需要程序化管理邮件列表、自动化流程与用户分群
  • CRM 集成开发者:将 ActiveCampaign 数据与内部系统双向同步
  • 销售运营团队:批量更新交易阶段、联系人标签及自定义字段
  • SaaS 产品经理:快速验证与 ActiveCampaign 的集成方案

常规风险

  • 数据误操作风险:DELETE 操作不可逆,批量更新可能导致联系人数据丢失
  • Webhook 数据泄露:配置错误的目标 URL 可能导致敏感客户数据外泄
  • OAuth 令牌过期:长期运行的自动化任务可能因令牌失效中断
  • API 代理故障:Maton 服务异常将导致完全无法访问 ActiveCampaign 数据

安全等级:S(企业级托管 OAuth,强制写确认,明确风险标识) 来源可信度:T1(Maton 官方提供,ActiveCampaign 官方 API 代理)

技能正文


name: active-campaign description: | ActiveCampaign API integration with managed OAuth. Marketing automation, CRM, contacts, deals, email campaigns, automations, tags, lists, users, accounts, custom fields, notes, and webhooks. All write operations require explicit user approval. Webhook creation sends account event data to external URLs — confirm the destination before creating. User and account management are administrative operations that affect shared resources. Use this skill when users want to manage contacts, deals, tags, lists, automations, campaigns, or account settings 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://api.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://api.maton.ai/active-campaign/{native-api-path}

Maton 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

  1. Sign in or create an account at maton.ai
  2. Go to maton.ai/settings
  3. Copy your API key

Connection Management

Manage your ActiveCampaign OAuth connections at https://api.maton.ai.

List Connections

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.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://api.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://api.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": "{connection_id}",
    "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://api.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

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://api.maton.ai/active-campaign/api/3/contacts')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Maton-Connection', '{connection_id}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

If you have multiple connections, always include this header to ensure requests go to the intended account.

Security & Permissions

  • Access is scoped to contacts, deals, lists, campaigns, automations, tags, users, accounts, custom fields, notes, and webhooks within the connected ActiveCampaign account.
  • All write operations require explicit user approval. Before executing any create, update, or delete call, confirm the target resource and intended effect with the user.
  • Webhooks send data to external URLs. Creating a webhook causes account event data to be transmitted to the specified destination. Confirm the URL, events, and intent with the user before creating.
  • User and account management are administrative operations that affect shared resources and team access. Confirm before modifying.

API Reference

Contacts

List Contacts
GET /active-campaign/api/3/contacts

Query Parameters:

  • limit - Number of results (default: 20)
  • offset - Starting index
  • search - Search by email
  • filters[email] - Filter by email
  • filters[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}

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"
  }
}

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}

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"
  }
}

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

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"
  }
}

Status values: 1 = subscribed, 2 = unsubscribed

Deals

List Deals
GET /active-campaign/api/3/deals

Query Parameters:

  • search - Search by title, contact, or org
  • filters[stage] - Filter by stage ID
  • filters[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

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

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

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

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://api.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://api.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://api.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://api.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

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:

  1. Check that the MATON_API_KEY environment variable is set:
echo $MATON_API_KEY
  1. Verify the API key is valid by listing connections:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.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

Resources

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

marketing-automationcrmemail-campaignscontact-managementsales-pipelineoauthwebhooksapi-integration

同类 Skill