由群历 REST API 的 OpenAPI 契约(openapi/qunli-api.yaml,qunli-api 提交 f18e40d)生成。路径都相对于 https://qunli.co;认证见认证,响应包装、分页和错误格式见约定。字段说明是契约里的英文原文。
团队
GET/api/v1/accounts
The caller's active teams, most recently joined first (the same
order the OAuth consent page lists teams in). With an API key, only
the key's own account is listed.
Teams the signed-in human owns that are scheduled for deletion and can still be restored (POST /accounts/{id}/restore), most recently deleted first. Empty for API keys and OAuth tokens.
Undoes a team deletion within its grace period (before purge_at). Any human owner of the team, from a signed-in session. To everyone else — other members, API keys, OAuth tokens — the deleted team is a 404, as is a team that isn't deleted or was already purged.
Schedules the team for deletion. Only a human team owner, from a signed-in session, may delete the team; admins, members, agents and API keys get 403. From now on the team is hidden and locked for every member and credential (API keys, OAuth tokens, calendar feeds, email forwarding, notifications); open clients receive account.deleted on the account channel. Any owner may undo it until purge_at (30 days) with POST /accounts/{id}/restore; after that the team and all its data, files included, are deleted permanently.
Human team owners/admins only (403 otherwise; an admin can't change an owner or admin, or make anyone owner). 409 when it would demote the team's last owner.
参数
参数
位置
类型
必填
说明
account_id
路径
string
是
团队的数字 id,和网页地址里的相同,例如 2025。
id
路径
string
是
User UUID or member ref ("U12"); bare numbers never resolve.
Sets the member's membership_status to "left" (the row is kept so the person still resolves by name in projects, shown as "已离开"). Only an owner or admin may remove members; an admin may not remove an owner or another admin. You cannot remove yourself here (use DELETE /user_accounts/{id}); the last remaining owner cannot be removed.
参数
参数
位置
类型
必填
说明
account_id
路径
string
是
团队的数字 id,和网页地址里的相同,例如 2025。
id
路径
string
是
User UUID or member ref ("U12"); bare numbers never resolve.
响应
状态
说明
返回
200
Member soft-left; returns the updated account user.
Leave a team (离开团队) — the same soft leave as being removed by an admin: the membership stays as left, so the person's content keeps their name, and their access to the team ends. Signed-in human sessions only; an agent, API key or OAuth token gets 403 (with an API key, another team's membership is 404). 409 when the caller is the team's only owner (make someone else owner, or delete the team) or still manages agents (transfer them first, POST /accounts/{account_id}/agents/transfer_all).
Whether this user may create a new team from waitlist approval.
avatar_url
string | null
否
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.
UserAccount
字段
类型
必填
说明
id
string (uuid)
是
user_id
string (uuid)
是
account_id
string (uuid)
是
role
string | null
是
created_at
string (date-time)
是
updated_at
string (date-time)
是
Invitation
字段
类型
必填
说明
id
string (uuid)
是
token
string | null
是
Bearer credential for /join. Returned only by the token lookup (GET /invitations/{token}) and to project managers on the project invite link endpoint; always null for team email invitations (the token reaches the invitee by email only).