Teams
List teams, invite one or several members, and create, update, or delete teams. Team endpoints are forwarded to the server and require the client to be signed in.
Showing 5 of 5 endpoints
GET
/team/listList teams
Lists all teams accessible to the signed-in account, without pagination.
AuthBearer API Key
Request parameters
None
Response fields
| Field | Type | Description |
|---|---|---|
data | object[] | List teams |
data[].id | number | Team primary key ID, i.e. the teamId used by other endpoints |
data[].userId | number | User ID of the team creator |
data[].name | string | Team name |
data[].windowNum | number | Number of windows occupied |
data[].memberNum | number | Number of member seats occupied |
data[].remark | string | Team remark |
data[].limitWindow | number | Window quota limit |
data[].limitMember | number | Member quota limit |
data[].combo | string | Plan code, e.g. COMBO_1 |
data[].comboExpire | string | Plan expiration time |
data[].actived | string | Enabled switch: ON, OFF |
data[].createdAt | string | Creation time |
data[].updatedAt | string | Update time |
data[].creater | string | Creator email |
data[].teamMember | object | Membership info of the signed-in account in this team |
data[].teamMember.roleId | number | Role ID, 0 means regular member |
data[].teamMember.nick | string | Member nickname |
data[].teamMember.switchPinned | string | Pin-to-top switch: ON, OFF |
data[].teamMember.role | object | Role details, null for regular members |
data[].teamMember.role.name | string | Role name |
data[].teamMember.role.menuId | string | JSON text of the role's menu permission ID list |
Response example
{
"code": 0,
"msg": "成功",
"data": [
{
"id": 2001,
"userId": 1001,
"name": "默认团队",
"windowNum": 3,
"memberNum": 2,
"remark": "default team",
"limitWindow": 50,
"limitMember": 10,
"combo": "COMBO_1",
"comboExpire": "2027-01-15 23:59:59",
"actived": "ON",
"createdAt": "2026-01-15 10:00:00",
"updatedAt": "2026-06-01 12:30:00",
"teamMember": {
"id": 3001,
"teamId": 2001,
"userId": 1001,
"roleId": 4001,
"seq": 1,
"switchPinned": "OFF",
"createdAt": "2026-01-15 10:00:00",
"updatedAt": "2026-01-15 10:00:00",
"role": {
"id": 4001,
"teamId": 2001,
"name": "管理员",
"menuId": "[1, 2, 3, 4, 5]",
"createdAt": "2026-01-15 10:00:00",
"updatedAt": "2026-06-01 12:30:00"
}
}
}
]
}
POST
/team/inviteInvite team member
Adds a registered user to the current team by email and sends an in-app notification.
AuthBearer API Key
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Required | Registered email of the invited user; an unregistered email returns a user-not-found error |
Notes
- The target team is always the current team, and the teamId parameter is not accepted; new members get roleId 0 (regular member).
- Returns a business error when the member count exceeds the team's limitMember or the plan has expired.
Response fields
| Field | Type | Description |
|---|---|---|
data | null | No response data; success is indicated by code=0 |
Response example
{
"code": 0,
"msg": "成功",
"data": null
}
POST
/team/batch_inviteBatch invite team members
Forwards to the same backend command as /team/invite and still handles only one email per call; to invite in batch, call it once per email.
AuthBearer API Key
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Required | Registered email of the invited user |
Notes
- The backend command reads only a single email field; passing an array of emails has no effect.
Response fields
| Field | Type | Description |
|---|---|---|
data | null | No response data; success is indicated by code=0 |
Response example
{
"code": 0,
"msg": "成功",
"data": null
}
POST
/team/modifyCreate or update team
Saves team info; with item.id it updates the team, without it creates a new team and automatically creates an admin role.
AuthBearer API Key
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
item | object | Required | Team object; all team fields go at this level |
item.id | number | Optional | Team ID; omit to create a new team; updates by anyone other than the creator return a permission-denied error |
item.name | string | Optional | Team name |
item.remark | string | Optional | Team remark |
Notes
- combo, comboExpire, windowNum, memberNum, limitWindow, limitMember, and actived are cleared by the server and cannot be modified through this endpoint.
Response fields
| Field | Type | Description |
|---|---|---|
data.id | number | Team ID; the newly generated ID when creating |
data.userId | number | Owner user ID of the team, written by the server from the signed-in account |
data.name | string | Team name |
data.remark | string | Team remark |
Response example
{
"code": 0,
"msg": "成功",
"data": {
"id": 2001,
"userId": 1001,
"name": "默认团队",
"remark": "default team"
}
}
POST
/team/deleteDelete teams
Batch-deletes teams you created and moves their members out of those teams.
AuthBearer API Key
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
items | number[] | Required | Array of team IDs |
Notes
- If any team was not created by you, the batch includes the current team, or a team still has windows, the whole batch is rejected with the corresponding business error.
Response fields
| Field | Type | Description |
|---|---|---|
data | null | No response data; success is indicated by code=0 |
Response example
{
"code": 0,
"msg": "成功",
"data": null
}