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

智能电话追踪与营销归因

CallRail · v1.0.2
专业技能 安全 S 级 作者 byungkyu 公开目录收录
3.5k 下载 3 安装 9.8k 收藏 41 浏览

简介

通过托管 OAuth 连接 CallRail,追踪分析来电数据、管理追踪号码与企业标签,助力营销归因与客户洞察。

原始描述

CallRail API integration with managed OAuth. Track and analyze phone calls, manage tracking numbers, companies, and tags. Use this skill when users want to a...

通过你的 Agent 添加

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

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

或者手动安装

Claude Code~/.claude/skills/callrail/
Codex CLI~/.codex/skills/callrail/
DeepSeek Harness~/.agents/skills/callrail/

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

中文使用说明 来自收录源

核心用法

CallRail Skill 是一个纯文档型 API 集成工具,通过 Maton 代理服务提供对 CallRail 电话追踪平台的托管式 OAuth 访问。用户需配置 MATON_API_KEY 环境变量,即可调用完整的 CallRail v3 API,包括:

  • 通话管理:查询通话记录、更新客户信息、标记线索状态、添加标签
  • 追踪号码:管理用于营销归因的 tracking numbers 和来源追踪器
  • 数据分析:获取通话汇总统计和时间序列数据,支持按公司、来源、媒介等维度分组
  • 组织架构:管理账户、公司、用户权限和集成配置

所有 API 请求通过 https://api.maton.ai/callrail/ 代理转发,Maton 自动注入 OAuth token,无需直接处理 CallRail 认证流程。

显著优点

  1. 简化 OAuth 流程:通过 Maton 的连接管理服务,用户只需在浏览器中完成一次授权,后续调用自动处理 token 刷新
  2. 完整 API 覆盖:支持 CallRail v3 的全部核心端点,包括 calls、trackers、companies、tags、users、integrations 等
  3. 灵活的分页机制:支持传统 offset 分页和相对分页(relative_pagination=true),便于处理大量通话数据
  4. 多连接管理:支持通过 Maton-Connection 头部在多个 CallRail 账户间切换
  5. 安全合规:通过 TLS 1.3 加密传输,明确声明写操作需用户显式批准

潜在缺点与局限性

  1. 依赖第三方代理:所有请求需经过 Maton 服务,若 Maton 服务不可用则无法访问 CallRail
  2. 速率限制:通用 API 每小时 1,000 次、每日 10,000 次;SMS 和Outbound Call 有更严格限制
  3. 数据保留期:通话记录仅保留 25 个月,历史数据需自行归档
  4. 纯文档型工具:无内置 SDK 或封装函数,需自行构造 HTTP 请求和处理响应
  5. 环境变量依赖:必须在运行环境正确配置 MATON_API_KEY,在多用户场景下需额外注意密钥管理

适合人群

  • 需要程序化访问 CallRail 通话数据的营销分析团队
  • 希望将电话追踪数据集成到内部 CRM 或 BI 系统的开发者
  • 管理多账户 CallRail 配置的系统管理员
  • 需要自动化通话标签管理和线索评分的运营团队

常规风险

  • API 密钥泄露:MATON_API_KEY 若被泄露,攻击者可访问绑定的 CallRail 账户数据。建议存储于 secrets 管理服务,避免硬编码
  • 误操作风险:更新通话、删除标签等写操作可能影响业务数据,文档明确要求操作前确认目标和意图
  • 速率限制触发:高频调用可能导致 429 错误,需实现指数退避重试机制
  • 多连接混淆:多账户场景下若未指定 Maton-Connection,可能操作非预期账户

安全评估结论

该 Skill 通过 ClawHub 平台安全认证,获 S 级评分(90/100)。纯 Markdown 文档结构无可执行代码,所有外部 API 调用指向可信官方域名(maton.ai、callrail.com),环境变量访问模式符合安全最佳实践。

技能正文


name: callrail description: | CallRail API integration with managed OAuth. Track and analyze phone calls, manage tracking numbers, companies, and tags. Use this skill when users want to access call data, manage tracking numbers, view call analytics, or organize calls with tags. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). compatibility: Requires network access and valid Maton API key metadata: author: maton version: "1.0" clawdbot: emoji: 🧠 requires: env: - MATON_API_KEY

CallRail

Access the CallRail API with managed OAuth authentication. Track calls, manage tracking numbers, analyze call data, and organize with tags.

Quick Start

# List all calls
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/callrail/v3/a/{account_id}/calls.json')
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/callrail/{native-api-path}

Maton proxies requests to api.callrail.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 CallRail 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=callrail&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': 'callrail'}).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-10T09:55:17.574212Z",
    "last_updated_time": "2026-02-10T09:55:34.693801Z",
    "url": "https://connect.maton.ai/?session_token=...",
    "app": "callrail",
    "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 CallRail 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/callrail/v3/a.json')
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 calls, accounts, companies, trackers, and integrations within the connected CallRail 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.

API Reference

URL Pattern

All CallRail API endpoints follow this pattern:

/callrail/v3/a/{account_id}/{resource}.json

Account IDs start with ACC, Company IDs start with COM, Call IDs start with CAL, Tracker IDs start with TRK, User IDs start with USR.


Accounts

List Accounts

GET /callrail/v3/a.json

Response:

{
  "page": 1,
  "per_page": 100,
  "total_pages": 1,
  "total_records": 1,
  "accounts": [
    {
      "id": "ACC019c46b8a0807fbdb81c8bf12af91cb3",
      "name": "My Account",
      "numeric_id": 518664017,
      "inbound_recording_enabled": false,
      "outbound_recording_enabled": false,
      "hipaa_account": false,
      "created_at": "2026-02-10 03:43:50 -0500"
    }
  ]
}

Get Account

GET /callrail/v3/a/{account_id}.json

Companies

List Companies

GET /callrail/v3/a/{account_id}/companies.json

Response:

{
  "page": 1,
  "per_page": 100,
  "total_pages": 1,
  "total_records": 1,
  "companies": [
    {
      "id": "COM019c46b8a26376a9a4f29671dcdd49e9",
      "name": "My Company",
      "status": "active",
      "time_zone": "America/Los_Angeles",
      "created_at": "2026-02-10T08:43:51.280Z",
      "callscore_enabled": false,
      "lead_scoring_enabled": true,
      "callscribe_enabled": true
    }
  ]
}

Get Company

GET /callrail/v3/a/{account_id}/companies/{company_id}.json

Calls

List Calls

GET /callrail/v3/a/{account_id}/calls.json

Query Parameters:

Parameter Description
page Page number (default: 1)
per_page Results per page (default: 100, max: 250)
date_range Preset: recent, today, yesterday, last_7_days, last_30_days, this_month, last_month
start_date ISO 8601 date (e.g., 2026-02-01T00:00:00-08:00)
end_date ISO 8601 date
company_id Filter by company
tracker_id Filter by tracker
search Search term
fields Comma-separated field names to return
sort Field to sort by
order Sort order: asc or desc

Response:

{
  "page": 1,
  "per_page": 100,
  "total_pages": 1,
  "total_records": 1,
  "calls": [
    {
      "id": "CAL019c46b9fc277a7881e3728fea20869b",
      "answered": false,
      "customer_name": "John Doe",
      "customer_phone_number": "+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",
      "tracking_phone_number": "+18017846712",
      "voicemail": true
    }
  ]
}

Get Call

GET /callrail/v3/a/{account_id}/calls/{call_id}.json

Update Call

PUT /callrail/v3/a/{account_id}/calls/{call_id}.json
Content-Type: application/json

{
  "customer_name": "John Smith",
  "note": "Follow up scheduled",
  "lead_status": "good_lead",
  "spam": false
}

Updatable Fields:

Field Description
customer_name Customer's name
note Call notes
lead_status good_lead, not_a_lead, previously_marked_good_lead
spam Mark as spam (boolean)
tag_list Array of tag names to apply
value Call value (numeric)
append_tags Add tags without removing existing

Call Summary

GET /callrail/v3/a/{account_id}/calls/summary.json

Get aggregated call statistics for a date range.

Query Parameters:

Parameter Description
date_range Preset date range
start_date Start date (ISO 8601)
end_date End date (ISO 8601)
group_by Group results: company, tracker, source, medium, etc.

Response:

{
  "start_date": "2026-02-03T00:00:00-0800",
  "end_date": "2026-02-10T23:59:59-0800",
  "time_zone": "Pacific Time (US & Canada)",
  "total_results": {
    "total_calls": 42
  }
}

Call Timeseries

GET /callrail/v3/a/{account_id}/calls/timeseries.json

Get call data over time for charts and graphs.

Response:

{
  "start_date": "2026-02-03T00:00:00-0800",
  "end_date": "2026-02-10T23:59:59-0800",
  "data": [
    {"key": "2026-02-03", "date": "2026-02-03", "total_calls": 5},
    {"key": "2026-02-04", "date": "2026-02-04", "total_calls": 8}
  ]
}

Trackers (Tracking Numbers)

List Trackers

GET /callrail/v3/a/{account_id}/trackers.json

Response:

{
  "page": 1,
  "per_page": 100,
  "total_records": 1,
  "trackers": [
    {
      "id": "TRK019c46b9f18174d68bb8d7985260a11f",
      "name": "Google My Business",
      "type": "source",
      "status": "active",
      "destination_number": "+18019234886",
      "tracking_numbers": ["+18017846712"],
      "sms_supported": true,
      "sms_enabled": true,
      "company": {
        "id": "COM019c46b8a26376a9a4f29671dcdd49e9",
        "name": "My Company"
      },
      "source": {"type": "google_my_business"},
      "call_flow": {
        "type": "basic",
        "recording_enabled": true,
        "destination_number": "+18019234886"
      }
    }
  ]
}

Get Tracker

GET /callrail/v3/a/{account_id}/trackers/{tracker_id}.json

Tags

List Tags

GET /callrail/v3/a/{account_id}/tags.json

Response:

{
  "page": 1,
  "per_page": 100,
  "total_records": 6,
  "tags": [
    {
      "id": 7886733,
      "name": "Schedule requested",
      "tag_level": "account",
      "color": "orange3",
      "background_color": "gray1",
      "company_id": null,
      "status": "enabled"
    },
    {
      "id": 7886728,
      "name": "Opportunity",
      "tag_level": "company",
      "color": "gray1",
      "company_id": "COM019c46b8a26376a9a4f29671dcdd49e9",
      "status": "enabled"
    }
  ]
}

Create Tag

POST /callrail/v3/a/{account_id}/tags.json
Content-Type: application/json

{
  "name": "New Tag",
  "tag_level": "account",
  "color": "blue1"
}

Tag Levels:

  • account - Available to all companies in the account
  • company - Specific to a company (requires company_id)

Colors: gray1, blue1, blue2, green1, green2, orange1, orange2, orange3, red1, etc.

Update Tag

PUT /callrail/v3/a/{account_id}/tags/{tag_id}.json
Content-Type: application/json

{
  "name": "Updated Tag Name",
  "color": "green1"
}

Delete Tag

DELETE /callrail/v3/a/{account_id}/tags/{tag_id}.json

Users

List Users

GET /callrail/v3/a/{account_id}/users.json

Response:

{
  "page": 1,
  "per_page": 100,
  "total_records": 1,
  "users": [
    {
      "id": "USR019c46b8a0557b2e85e5e1c651452509",
      "email": "user@example.com",
      "first_name": "John",
      "last_name": "Doe",
      "name": "John Doe",
      "role": "admin",
      "accepted": true,
      "created_at": "2026-02-10T03:43:50.798-05:00",
      "companies": [
        {"id": "COM...", "name": "My Company"}
      ]
    }
  ]
}

Get User

GET /callrail/v3/a/{account_id}/users/{user_id}.json

Integrations

List Integrations

GET /callrail/v3/a/{account_id}/integrations.json?company_id={company_id}

Note: company_id is required.


Notifications

List Notifications

GET /callrail/v3/a/{account_id}/notifications.json

Pagination

CallRail uses offset-based pagination:

GET /callrail/v3/a/{account_id}/calls.json?page=2&per_page=50

Response includes:

{
  "page": 2,
  "per_page": 50,
  "total_pages": 10,
  "total_records": 487,
  "calls": [...]
}

Parameters:

  • page - Page number (default: 1)
  • per_page - Results per page (default: 100, max: 250)

For the calls endpoint, you can also use relative pagination:

GET /callrail/v3/a/{account_id}/calls.json?relative_pagination=true

This returns next_page URL and has_next_page boolean for efficient pagination of large datasets.

Code Examples

JavaScript

const response = await fetch(
  'https://api.maton.ai/callrail/v3/a/{account_id}/calls.json',
  {
    headers: {
      'Authorization': `Bearer ${process.env.MATON_API_KEY}`
    }
  }
);
const data = await response.json();
console.log(data.calls);

Python

import os
import requests

response = requests.get(
    'https://api.maton.ai/callrail/v3/a/{account_id}/calls.json',
    headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'},
    params={'per_page': 50, 'date_range': 'last_30_days'}
)
data = response.json()
for call in data['calls']:
    print(f"{call['customer_name']}: {call['duration']}s")

Rate Limits

Endpoint Type Hourly Limit Daily Limit
General API 1,000 10,000
SMS Send 150 1,000
Outbound Calls 100 2,000

Exceeding limits returns HTTP 429. Implement exponential backoff for retries.

Notes

  • Account IDs start with ACC
  • Company IDs start with COM
  • Call IDs start with CAL
  • Tracker IDs start with TRK
  • User IDs start with USR
  • All endpoints end with .json
  • Communication records are retained for 25 months
  • Date/time values use ISO 8601 format with timezone
  • IMPORTANT: When using curl commands, use curl -g when URLs contain brackets to disable glob parsing
  • 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 Bad request or missing required parameter
401 Invalid or missing Maton API key
403 Forbidden - insufficient permissions
404 Resource not found
422 Unprocessable entity
429 Rate limited
500 Internal server error
503 Service unavailable

Troubleshooting: API Key Issues

  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

Troubleshooting: Invalid App Name

  1. Ensure your URL path starts with callrail. For example:
  • Correct: https://api.maton.ai/callrail/v3/a.json
  • Incorrect: https://api.maton.ai/v3/a.json

Resources

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

标签

call-trackingtelephonymarketing-attributioncrm-integrationoauthanalyticssales

同类 Skill