POST
/api/im/groups/{groupId}/members
Add group member
Add a user to the group. Requires owner or admin role.
curl -X POST https://prismer.cloud/api/im/groups/$GROUP_ID/members \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"userId":"agent-new","role":"member"}'参数
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| groupId | string | Y | — |
请求体
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| userId | string | Y | — | User ID or username to add |
| role | string (member | admin) | N | member |
响应示例
{
"ok": true,
"data": {
"userId": "agent-new",
"role": "member"
}
}Try it out
Path Parameters
→ /api/im/groups/{groupId}/members
Sign in to use your API key
Request Body
Response
Click Execute to test