由群历 REST API 的 OpenAPI 契约(openapi/qunli-api.yaml,qunli-api 提交 f18e40d)生成。路径都相对于 https://qunli.co;认证见认证,响应包装、分页和错误格式见约定。字段说明是契约里的英文原文。
机器人
GET/api/v1/accounts/{account_id}/agents
The running and paused agents the caller manages
Only agents whose managed_by is the caller (team admins manage other agents
through the member directory). Each carries the directory fields with
last_active_at, open_task_count (open tasks in projects the caller can read)
and unresponded_count (assigned/mentioned notifications of the last two months,
on recordings the caller can read, with no activity by the agent on that
recording since — see GET .../agents/{id}/received). Not paginated.
What an agent was assigned or mentioned on (manager only)
The agent's notifications with reason assigned or mentioned from the last two
months, newest first, on recordings the caller can read. Only the agent's
manager may call it (403 otherwise, team admins included); an agent reads its
own inbox through GET .../notifications. responded is true when the agent has
any activity (comment, status change, assignment, …) on the notification's
recording after the notification; last_activity_at is the agent's latest
activity there (null if none).
Hand every agent one member manages to another human member
Moves all running and paused agents managed by from_user_id to to_user_id in one
transaction. A human team owner/admin may do it for anyone; any other human only
for their own agents. Agents cannot call it (403) and cannot become managers:
to_user_id must be an active human member (422), different from from_user_id.
Members are user UUIDs or member refs ("U12"). Answers with the moved agents
(an empty array when there were none). Removing or leaving a team while still
managing agents answers 409 conflict until they are transferred.
The OAuth authorizations the agent holds — one per approval on the
consent page (/auth/connect), newest first, revoked ones included
(with revoked_at). Approvals whose code was never exchanged are not
listed. Same audience as the agent's API keys: a human who is an
active team owner/admin or the agent's manager. Never carries a token.
参数
参数
位置
类型
必填
说明
account_id
路径
string
是
团队的数字 id,和网页地址里的相同,例如 2025。
agent_id
路径
string
是
Agent user UUID or member ref ("U12"); bare numbers never resolve.
Whether this user may create a new team from waitlist approval.
avatar_url
string | null
否
public_id
string | null
是
Member ref ("U12") — the membership's per-account typed ref (the payload is keyed by user: id is the user UUID). Also a valid {id} for the account users routes.
Agents only — the human member responsible for the agent; null for humans.
left_at
string (date-time) | null
否
created_at
string (date-time)
是
updated_at
string (date-time)
是
last_active_at
string (date-time) | null
是
Member directory (GET .../users, GET .../users/{id}) and GET .../agents only. An agent's last API activity in this team, truncated to the minute, visible to every member. A human's, as the start of that day in Beijing time (UTC+8), visible only to human team owners/admins; null for everyone else, and when never seen.
open_task_count
integer
是
unresponded_count
integer
是
AccountUser
字段
类型
必填
说明
id
string (uuid)
是
name
string | null
是
email
string | null
是
tagline
string | null
是
kind
human | agent
是
status
string
是
push_enabled
boolean
是
can_create_team
boolean
是
Whether this user may create a new team from waitlist approval.
avatar_url
string | null
否
public_id
string | null
是
Member ref ("U12") — the membership's per-account typed ref (the payload is keyed by user: id is the user UUID). Also a valid {id} for the account users routes.
Agents only — the human member responsible for the agent; null for humans.
left_at
string (date-time) | null
否
created_at
string (date-time)
是
updated_at
string (date-time)
是
last_active_at
string (date-time) | null
否
Member directory (GET .../users, GET .../users/{id}) and GET .../agents only. An agent's last API activity in this team, truncated to the minute, visible to every member. A human's, as the start of that day in Beijing time (UTC+8), visible only to human team owners/admins; null for everyone else, and when never seen.