|
通过托管OAuth认证访问ClickFunnels 2.0 API。管理联系人、产品、订单、课程、表单、Webhook等。
bash
https://gateway.maton.ai/clickfunnels/{native-api-path}
将{native-api-path}替换为实际的ClickFunnels API端点路径。网关将请求代理到{subdomain}.myclickfunnels.com,并自动注入您的OAuth令牌。
所有请求都需要在Authorization头中包含Maton API密钥,以及User-Agent头:
Authorization: Bearer $MATONAPIKEY
User-Agent: Maton/1.0
环境变量: 将您的API密钥设置为MATONAPIKEY:
bash
export MATONAPIKEY=YOURAPIKEY
在https://ctrl.maton.ai管理您的ClickFunnels OAuth连接。
bash
python <
req = urllib.request.Request(https://ctrl.maton.ai/connections?app=clickfunnels&status=ACTIVE)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
bash
python <
data = json.dumps({app: clickfunnels}).encode()
req = urllib.request.Request(https://ctrl.maton.ai/connections, data=data, method=POST)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
req.add_header(Content-Type, application/json)
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
bash
python <
req = urllib.request.Request(https://ctrl.maton.ai/connections/{connection_id})
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
响应:
json
{
connection: {
connection_id: 21fd90f9-5935-43cd-b6c8-bde9d915ca80,
status: ACTIVE,
creation_time: 2025-12-08T07:20:53.488460Z,
lastupdatedtime: 2026-01-31T20:03:32.593153Z,
url: https://connect.maton.ai/?session_token=...,
app: clickfunnels,
metadata: {}
}
}
在浏览器中打开返回的url以完成OAuth授权。
bash
python <
req = urllib.request.Request(https://ctrl.maton.ai/connections/{connection_id}, method=DELETE)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
如果您有多个ClickFunnels连接,请使用Maton-Connection头指定要使用的连接:
bash
python <
req = urllib.request.Request(https://gateway.maton.ai/clickfunnels/api/v2/teams)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
req.add_header(User-Agent, Maton/1.0)
req.add_header(Maton-Connection, 21fd90f9-5935-43cd-b6c8-bde9d915ca80)
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
如果省略,网关将使用默认(最旧的)活动连接。
bash
GET /clickfunnels/api/v2/teams
响应:
json
[
{
id: 412840,
public_id: vPNqAp,
name: 我的团队,
time_zone: 太平洋时间(美国及加拿大),
locale: en,
created_at: 2026-02-07T09:28:29.709Z,
updated_at: 2026-02-07T11:14:32.118Z
}
]
bash
GET /clickfunnels/api/v2/teams/{team_id}
bash
GET /clickfunnels/api/v2/teams/{team_id}/workspaces
响应:
json
[
{
id: 435231,
public_id: JZqWGb,
team_id: 412840,
name: 我的工作区,
subdomain: myworkspace,
created_at: 2026-02-07T09:28:31.268Z,
updated_at: 2026-02-07T09:28:34.498Z
}
]
bash
GET /clickfunnels/api/v2/workspaces/{workspace_id}
bash
GET /clickfunnels/api/v2/workspaces/{workspace_id}/contacts
带筛选:
bash
GET /clickfunnels/api/v2/workspaces/{workspaceid}/contacts?filter[emailaddress]=user@example.com
响应:
json
[
{
id: 1087091674,
public_id: PWzmxEx,
workspace_id: 435231,
email_address: user@example.com,
first_name: 张三,
last_name: 李,
phone_number: null,
time_zone: null,
uuid: eb7a970c-727d-4c82-9209-bd8f7457a801,
tags: [],
custom_attributes: {},
created_at: 2026-02-07T09:28:52.713Z,
updated_at: 2026-02-07T09:28:52.777Z
}
]
bash
GET /clickfunnels/api/v2/contacts/{contact_id}
bash
POST /clickfunnels/api/v2/workspaces/{workspace_id}/contacts
Content-Type: application/json
{
contact: {
email_address: newuser@example.com,
first_name: 王,
last_name: 小芳,
phone_number: +1234567890
}
}
bash
PUT /clickfunnels/api/v2/contacts/{contact_id}
Content-Type: application/json
{
contact: {
first_name: 已更新姓名,
phone_number: +1987654321
}
}
bash
DELETE /clickfunnels/api/v2/contacts/{contact_id}
成功时返回HTTP 204。
根据匹配的电子邮件创建或更新联系人:
bash
POST /clickfunnels/api/v2/workspaces/{workspace_id}/contacts/upsert
Content-Type: application/json
{
contact: {
email_address: user@example.com,
first_name: 已更新
}
}
bash
DELETE /clickfunnels/api/v2/workspaces/{workspaceid}/contacts/{contactid}/gdpr_destroy
bash
GET /clickfunnels/api/v2/workspaces/{workspace_id}/products
响应:
json
[
{
id: 962732,
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 clickfunnels-1776333922 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 clickfunnels-1776333922 技能
skillhub install clickfunnels-1776333922
文件大小: 5.68 KB | 发布时间: 2026-4-17 14:14