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

法律事务所智能数据中枢

clio · vv1.0.0
专业技能 安全 S 级 作者 byungkyu 公开目录收录
下载 2.8k 安装 643 收藏 12.5k 浏览 19.4k
原始页面

简介

Maton官方开发的Clio Manage API集成工具,通过托管OAuth实现法律事务、客户、计费全流程管理,为律所提供专业化SaaS数据互通能力。

原始描述

Clio API integration with managed OAuth. Legal practice management including matters, contacts, activities, tasks, documents, calendar entries, time entries, and billing. Use this skill when users want to manage legal practice data in Clio Manage. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.

中文使用说明 来自收录源

核心用法

clio skill是Maton官方推出的Clio Manage API集成解决方案,采用纯文档型设计,用户通过Maton网关(gateway.maton.ai)代理访问Clio官方API。核心工作流包括:获取Maton API密钥→在ctrl.maton.ai完成OAuth授权→通过标准HTTP请求操作法律数据。支持完整的法律实践管理场景,涵盖案件(Matters)、联系人(Contacts)、活动记录(Activities)、任务(Tasks)、日程(Calendar Entries)、文档(Documents)、计时计费(Time Entries)及账单(Bills)八大核心模块。

使用上需特别注意Clio的字段选择机制——默认仅返回id和etag,必须通过fields参数显式指定所需字段,且支持嵌套资源查询(如matter{id,description}})。对于多连接场景,可通过Maton-Connection头部指定特定OAuth连接。

显著优点

专业化法律场景覆盖:深度对接北美主流法律SaaS平台Clio Manage,提供从案件立案到账单生成的完整业务闭环,字段设计贴合法律行业术语(如display_number案件编号、client_reference客户引用)。

托管式OAuth体验:用户无需自行处理复杂的OAuth 2.0流程,Maton统一管控令牌生命周期,支持多账户连接切换,大幅降低集成门槛。

透明可控的数据流:所有请求经Maton网关中转至Clio官方服务,数据最终存储于Clio专业法律云平台,符合法律行业合规要求。

完善的开发者支持:提供JavaScript/Python多语言示例、详尽的字段指南链接、速率限制提示及错误码对照表,配套Discord社区和官方客服通道。

潜在缺点与局限性

第三方网关依赖风险:所有API调用必须经由Maton网关,形成单点依赖。若Maton服务中断或策略变更,将直接影响业务连续性。

功能边界限制:纯文档型skill无本地执行能力,复杂业务逻辑需用户自行编码实现;部分高级功能(如Activities、Documents、Bills)需额外OAuth权限范围,首次配置可能繁琐。

嵌套与分页约束:仅支持一级资源嵌套查询,复杂关联数据需多次请求;采用cursor分页而非offset,对习惯传统分页的开发者需适应成本。

地域与生态局限:Clio主要面向北美法律市场,国内律所使用可能存在数据跨境合规顾虑;与Clio Grow等其他产品线未明确打通。

适合的目标群体

  • 北美地区中小型律所:已使用或计划采用Clio Manage作为核心业务系统的法律团队
  • 法律科技开发者:构建律所管理工具、案件协作平台、计费分析系统的独立开发者或SaaS厂商
  • 企业法务部门:需将外部律所Clio数据与内部系统对接的大型企业in-house团队
  • 法律流程自动化顾问:为客户设计RPA或自动化工作流的咨询服务商

使用风险

性能与稳定性:Clio API存在50 req/min的峰值速率限制,高并发场景需设计缓存或队列机制;Maton网关作为中间层引入额外网络跳数,可能增加延迟。

数据安全合规:案件信息、客户隐私、计费记录均属高敏感数据,需确保MATON_API_KEY及OAuth令牌的安全存储,避免环境变量泄露;跨境数据传输需评估GDPR/CCPA等合规要求。

供应商锁定:深度绑定Maton+Clio双平台生态,迁移成本较高;建议定期导出关键数据备份。

功能迭代滞后:作为第三方封装,新API特性支持可能存在延迟,需关注Maton更新公告。

技能正文


name: clio description: | Clio API integration with managed OAuth. Legal practice management including matters, contacts, activities, tasks, documents, calendar entries, time entries, and billing. Use this skill when users want to manage legal practice data in Clio Manage. 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

Clio

Access the Clio Manage API with managed OAuth authentication. Manage matters, contacts, activities, tasks, documents, calendar entries, time entries, and billing for legal practice management.

Quick Start

# List matters
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://gateway.maton.ai/clio/api/v4/matters?fields=id,display_number,description,status')
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/clio/{native-api-path}

Replace {native-api-path} with the actual Clio API endpoint path. The gateway proxies requests to app.clio.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 Clio 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=clio&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': 'clio'}).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

Response:

{
  "connection": {
    "connection_id": "21fd90f9-5935-43cd-b6c8-bde9d915ca80",
    "status": "ACTIVE",
    "creation_time": "2025-12-08T07:20:53.488460Z",
    "last_updated_time": "2026-01-31T20:03:32.593153Z",
    "url": "https://connect.maton.ai/?session_token=...",
    "app": "clio",
    "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

If you have multiple Clio 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/clio/api/v4/matters')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Maton-Connection', '21fd90f9-5935-43cd-b6c8-bde9d915ca80')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

If omitted, the gateway uses the default (oldest) active connection.

API Reference

Field Selection

By default, Clio returns minimal fields (id, etag). Use the fields parameter to request specific fields:

GET /clio/api/v4/matters?fields=id,display_number,description,status

For nested resources, use curly bracket syntax:

GET /clio/api/v4/activities?fields=id,type,matter{id,description}

Matters

List Matters

GET /clio/api/v4/matters?fields=id,display_number,description,status,client_reference

Get Matter

GET /clio/api/v4/matters/{id}?fields=id,display_number,description,status,open_date,close_date

Create Matter

POST /clio/api/v4/matters
Content-Type: application/json

{
  "data": {
    "description": "New Legal Matter",
    "status": "open",
    "client": {"id": 12345}
  }
}

Update Matter

PATCH /clio/api/v4/matters/{id}
Content-Type: application/json

{
  "data": {
    "description": "Updated Matter Description",
    "status": "closed"
  }
}

Delete Matter

DELETE /clio/api/v4/matters/{id}

Contacts

List Contacts

GET /clio/api/v4/contacts?fields=id,name,type,primary_email_address,primary_phone_number

Get Contact

GET /clio/api/v4/contacts/{id}?fields=id,name,type,first_name,last_name,company

Create Contact (Person)

POST /clio/api/v4/contacts
Content-Type: application/json

{
  "data": {
    "type": "Person",
    "first_name": "John",
    "last_name": "Doe",
    "email_addresses": [
      {"name": "Work", "address": "john@example.com", "default_email": true}
    ]
  }
}

Create Contact (Company)

POST /clio/api/v4/contacts
Content-Type: application/json

{
  "data": {
    "type": "Company",
    "name": "Acme Corporation"
  }
}

Update Contact

PATCH /clio/api/v4/contacts/{id}
Content-Type: application/json

{
  "data": {
    "first_name": "Jane"
  }
}

Delete Contact

DELETE /clio/api/v4/contacts/{id}

Activities

List Activities

GET /clio/api/v4/activities?fields=id,type,date,quantity,matter{id,description}

Get Activity

GET /clio/api/v4/activities/{id}?fields=id,type,date,quantity,note

Create Activity

POST /clio/api/v4/activities
Content-Type: application/json

{
  "data": {
    "type": "TimeEntry",
    "date": "2026-02-11",
    "quantity": 3600,
    "matter": {"id": 12345},
    "note": "Legal research"
  }
}

Update Activity

PATCH /clio/api/v4/activities/{id}
Content-Type: application/json

{
  "data": {
    "note": "Updated note"
  }
}

Delete Activity

DELETE /clio/api/v4/activities/{id}

Tasks

List Tasks

GET /clio/api/v4/tasks?fields=id,name,status,due_at,priority,matter{id,description}

Get Task

GET /clio/api/v4/tasks/{id}?fields=id,name,description,status,due_at,priority

Create Task

Requires assignee with both id and type ("User" or "Contact"):

POST /clio/api/v4/tasks
Content-Type: application/json

{
  "data": {
    "name": "Review contract",
    "due_at": "2026-02-15T17:00:00Z",
    "priority": "Normal",
    "assignee": {"id": 12345, "type": "User"},
    "matter": {"id": 67890}
  }
}

Update Task

PATCH /clio/api/v4/tasks/{id}
Content-Type: application/json

{
  "data": {
    "status": "complete"
  }
}

Delete Task

DELETE /clio/api/v4/tasks/{id}

Calendar Entries

List Calendar Entries

GET /clio/api/v4/calendar_entries?fields=id,summary,start_at,end_at,matter{id,description}

Get Calendar Entry

GET /clio/api/v4/calendar_entries/{id}?fields=id,summary,description,start_at,end_at,location

Create Calendar Entry

Requires calendar_owner with id and type:

POST /clio/api/v4/calendar_entries
Content-Type: application/json

{
  "data": {
    "summary": "Client Meeting",
    "start_at": "2026-02-15T10:00:00Z",
    "end_at": "2026-02-15T11:00:00Z",
    "calendar_owner": {"id": 12345, "type": "User"}
  }
}

Note: Associating a matter with a calendar entry during creation may return a 404 error. To link a matter, update the calendar entry after creation using PATCH.

Update Calendar Entry

PATCH /clio/api/v4/calendar_entries/{id}
Content-Type: application/json

{
  "data": {
    "summary": "Updated Meeting Title"
  }
}

Delete Calendar Entry

DELETE /clio/api/v4/calendar_entries/{id}

Documents

List Documents

GET /clio/api/v4/documents?fields=id,name,content_type,size,matter{id,description}

Get Document

GET /clio/api/v4/documents/{id}?fields=id,name,content_type,size,created_at

Download Document

GET /clio/api/v4/documents/{id}/download

Users

Get Current User

GET /clio/api/v4/users/who_am_i?fields=id,name,email,enabled

List Users

GET /clio/api/v4/users?fields=id,name,email,enabled,rate

Bills

List Bills

GET /clio/api/v4/bills?fields=id,number,issued_at,due_at,total,balance,state

Get Bill

GET /clio/api/v4/bills/{id}?fields=id,number,issued_at,due_at,total,balance,state

Pagination

Clio uses cursor-based pagination. Response includes pagination metadata:

GET /clio/api/v4/matters?fields=id,description&limit=50

Response includes pagination info in the meta object:

{
  "data": [...],
  "meta": {
    "paging": {
      "next": "https://app.clio.com/api/v4/matters?page_token=xyz123"
    },
    "records": 50
  }
}

Use the page_token parameter to fetch the next page:

GET /clio/api/v4/matters?fields=id,description&page_token=xyz123

Code Examples

JavaScript

const response = await fetch(
  'https://gateway.maton.ai/clio/api/v4/matters?fields=id,display_number,description',
  {
    headers: {
      'Authorization': `Bearer ${process.env.MATON_API_KEY}`
    }
  }
);
const data = await response.json();

Python

import os
import requests

response = requests.get(
    'https://gateway.maton.ai/clio/api/v4/matters',
    headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'},
    params={'fields': 'id,display_number,description'}
)
data = response.json()

Notes

  • Field selection is important - default responses only include id and etag
  • Nested resources use curly bracket syntax: matter{id,description}
  • Only one level of nesting is supported
  • Contact types: Person or Company
  • Task assignees require both id and type ("User" or "Contact")
  • Calendar entries require calendar_owner with id and type; associating a matter during creation may fail - use PATCH to link matters after creation
  • Activity quantity is in seconds (3600 = 1 hour)
  • Contact records limited to 20 email addresses, phone numbers, and addresses each
  • Activities, Documents, and Bills endpoints require additional OAuth scopes beyond the basic integration
  • 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 Missing Clio connection or bad request
401 Invalid or missing Maton API key
404 Resource not found
429 Rate limited (50 req/min during peak hours)
4xx/5xx Passthrough error from Clio API

Rate Limit Headers

Clio includes rate limit headers in responses:

  • X-RateLimit-Limit - Maximum requests in 60-second window
  • X-RateLimit-Remaining - Requests remaining in current window
  • X-RateLimit-Reset - Unix timestamp for window reset
  • Retry-After - Seconds to wait (when throttled)

Resources

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

其他来源收录

同一技能在不同目录的原始页面:

标签

legalapiproductivitybackendautomationfinance-accounting

同类 Skill