|
通过托管OAuth认证访问Clio Manage API。管理法律实务中的事项、联系人、活动、任务、文档、日历条目、时间条目和计费。
bash
https://gateway.maton.ai/clio/{native-api-path}
将{native-api-path}替换为实际的Clio API端点路径。网关将请求代理到app.clio.com并自动注入您的OAuth令牌。
所有请求都需要在Authorization头中包含Maton API密钥:
Authorization: Bearer $MATONAPIKEY
环境变量: 将您的API密钥设置为MATONAPIKEY:
bash
export MATONAPIKEY=YOURAPIKEY
在https://ctrl.maton.ai管理您的Clio OAuth连接。
bash
python <
req = urllib.request.Request(https://ctrl.maton.ai/connections?app=clio&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: clio}).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: clio,
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
如果您有多个Clio连接,使用Maton-Connection头指定要使用的连接:
bash
python <
req = urllib.request.Request(https://gateway.maton.ai/clio/api/v4/matters)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
req.add_header(Maton-Connection, 21fd90f9-5935-43cd-b6c8-bde9d915ca80)
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
如果省略,网关将使用默认(最旧)的活动连接。
默认情况下,Clio返回最少字段(id、etag)。使用fields参数请求特定字段:
bash
GET /clio/api/v4/matters?fields=id,display_number,description,status
对于嵌套资源,使用花括号语法:
bash
GET /clio/api/v4/activities?fields=id,type,matter{id,description}
bash
GET /clio/api/v4/matters?fields=id,displaynumber,description,status,clientreference
bash
GET /clio/api/v4/matters/{id}?fields=id,displaynumber,description,status,opendate,close_date
bash
POST /clio/api/v4/matters
Content-Type: application/json
{
data: {
description: 新法律事项,
status: open,
client: {id: 12345}
}
}
bash
PATCH /clio/api/v4/matters/{id}
Content-Type: application/json
{
data: {
description: 已更新的事项描述,
status: closed
}
}
bash
DELETE /clio/api/v4/matters/{id}
bash
GET /clio/api/v4/contacts?fields=id,name,type,primaryemailaddress,primaryphonenumber
bash
GET /clio/api/v4/contacts/{id}?fields=id,name,type,firstname,lastname,company
bash
POST /clio/api/v4/contacts
Content-Type: application/json
{
data: {
type: Person,
first_name: 张三,
last_name: 李,
email_addresses: [
{name: 工作, address: zhangsan@example.com, default_email: true}
]
}
}
bash
POST /clio/api/v4/contacts
Content-Type: application/json
{
data: {
type: Company,
name: Acme公司
}
}
bash
PATCH /clio/api/v4/contacts/{id}
Content-Type: application/json
{
data: {
first_name: 王五
}
}
bash
DELETE /clio/api/v4/contacts/{id}
bash
GET /clio/api/v4/activities?fields=id,type,date,quantity,matter{id,description}
bash
GET /clio/api/v4/activities/{id}?fields=id,type,date,quantity,note
bash
POST /clio/api/v4/activities
Content-Type: application/json
{
data: {
type: TimeEntry,
date: 2026-02-11,
quantity: 3600,
matter: {id: 12345},
note: 法律研究
}
}
bash
PATCH /clio/api/v4/activities/{id}
Content-Type: application/json
{
data: {
note: 已更新备注
}
}
bash
DELETE /clio/api/v4/activities/{id}
bash
GET /clio/api/v4/tasks?fields=id,name,status,due_at,priority,matter{id,description}
bash
GET /clio/api/v4/tasks/{id}?fields=id,name,description,status,due_at,priority
需要assignee同时包含id和type(User或Contact):
bash
POST /clio/api/v4/tasks
Content-Type: application/json
{
data: {
name: 审查合同,
due_at: 2026-02-15T17:00:00Z,
priority: Normal,
assignee: {id: 12345, type: User
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 clio-1776419977 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 clio-1776419977 技能
skillhub install clio-1776419977
文件大小: 4.9 KB | 发布时间: 2026-4-17 19:53