API DocsAPI Docs
post/api/group/{groupId}/members
post/api/group/{groupId}/members
添加或更新小组成员
Basic Information
Request Method:
post
Request URL:
https://www.lycoo.com/api/group/{groupId}/members
Tags:
小组成员管理
Description
添加新成员到小组或更新现有成员的角色。
用途:
- 管理员添加新成员到小组
- 管理员更新现有成员的角色
- 如果成员已存在,则更新其角色;如果不存在,则创建新成员
- 可用于管理员批准加入申请,将"等待加入"(pending)角色的成员更新为普通成员(member)或管理员(admin)
Path Parameters
Path Parameters Explanation
Path parameters are variables in the URL path, for example:
https://www.lycoo.com/api/group/:groupId/members
Parameter Name | Type | Required | Example Value | Description |
---|---|---|---|---|
groupId | string | Required | example | 小组ID |
Header Parameters
Header Parameters Explanation
Header parameters are used to pass additional information, such as authentication credentials, content type, etc.
Parameter Name | Type | Required | Example Value | Description |
---|---|---|---|---|
Authorization | string | Required | Bearer sha_1234567890abcdef... | The authentication header is used to verify the identity of API requests, containing an access token Format: Bearer {token} |
Request Body Parameters
Request Body Parameters Explanation
Request body parameters are used to pass complex structured data, typically using the following format: application/json
Parameter Details
Parameter Name | Type | Required | Example Value | Description |
---|---|---|---|---|
userId | string | Required | abc123 | 要添加或更新的用户ID 格式: uuid |
role | string | Optional | admin | 用户角色,可选值有 admin(管理员)、member(普通成员) 可选值: admin, member |
JSON Example
{
"userId": "123e4567-e89b-12d3-a456-426614174000",
"role": "member"
}
Response Example
200成员添加或更新成功
{
"success": true,
"message": "成员添加或更新成功"
}
400参数错误
{
"success": false,
"message": "用户ID不能为空"
}
401
403无权限管理小组成员
{
"success": false,
"message": "您没有权限管理小组成员"
}
404
500