|
通过托管OAuth认证访问CallRail API。追踪通话、管理追踪号码、分析通话数据,并使用标签进行组织。
bash
https://gateway.maton.ai/callrail/{native-api-path}
将 {native-api-path} 替换为实际的CallRail API端点路径。网关将请求代理到 api.callrail.com,并自动注入您的OAuth令牌。
所有请求都需要在Authorization头中包含Maton API密钥:
Authorization: Bearer $MATONAPIKEY
环境变量: 将您的API密钥设置为 MATONAPIKEY:
bash
export MATONAPIKEY=YOURAPIKEY
在 https://ctrl.maton.ai 管理您的CallRail OAuth连接。
bash
python <
req = urllib.request.Request(https://ctrl.maton.ai/connections?app=callrail&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: callrail}).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: 75364cb9-7116-4367-a707-1113d426f17d,
status: ACTIVE,
creation_time: 2026-02-10T09:55:17.574212Z,
lastupdatedtime: 2026-02-10T09:55:34.693801Z,
url: https://connect.maton.ai/?session_token=...,
app: callrail,
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
如果您有多个CallRail连接,请使用 Maton-Connection 头指定要使用的连接:
bash
python <
req = urllib.request.Request(https://gateway.maton.ai/callrail/v3/a.json)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
req.add_header(Maton-Connection, 75364cb9-7116-4367-a707-1113d426f17d)
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
如果省略,网关将使用默认(最旧)的活动连接。
所有CallRail API端点遵循以下模式:
/callrail/v3/a/{account_id}/{resource}.json
账户ID以 ACC 开头,公司ID以 COM 开头,通话ID以 CAL 开头,追踪器ID以 TRK 开头,用户ID以 USR 开头。
bash
GET /callrail/v3/a.json
响应:
json
{
page: 1,
per_page: 100,
total_pages: 1,
total_records: 1,
accounts: [
{
id: ACC019c46b8a0807fbdb81c8bf12af91cb3,
name: My Account,
numeric_id: 518664017,
inboundrecordingenabled: false,
outboundrecordingenabled: false,
hipaa_account: false,
created_at: 2026-02-10 03:43:50 -0500
}
]
}
bash
GET /callrail/v3/a/{account_id}.json
bash
GET /callrail/v3/a/{account_id}/companies.json
响应:
json
{
page: 1,
per_page: 100,
total_pages: 1,
total_records: 1,
companies: [
{
id: COM019c46b8a26376a9a4f29671dcdd49e9,
name: My Company,
status: active,
timezone: America/LosAngeles,
created_at: 2026-02-10T08:43:51.280Z,
callscore_enabled: false,
leadscoringenabled: true,
callscribe_enabled: true
}
]
}
bash
GET /callrail/v3/a/{accountid}/companies/{companyid}.json
bash
GET /callrail/v3/a/{account_id}/calls.json
查询参数:
| 参数 | 描述 |
|---|---|
| page | 页码(默认:1) |
| per_page |
响应:
json
{
page: 1,
per_page: 100,
total_pages: 1,
total_records: 1,
calls: [
{
id: CAL019c46b9fc277a7881e3728fea20869b,
answered: false,
customer_name: John Doe,
customerphonenumber: +18886757190,
direction: inbound,
duration: 36,
recording: https://api.callrail.com/v3/a/.../recording,
recording_duration: 36,
start_time: 2026-02-10T00:45:19.781-08:00,
trackingphonenumber: +18017846712,
voicemail: true
}
]
}
bash
GET /callrail/v3/a/{accountid}/calls/{callid}.json
bash
PUT /callrail/v3/a/{accountid}/calls/{callid}.json
Content-Type: application/json
{
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 callrail-1776419963 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 callrail-1776419963 技能
skillhub install callrail-1776419963
文件大小: 5.91 KB | 发布时间: 2026-4-17 18:54