API Reference
Group Participants
Overview
Add or remove participants on an existing group conversation. Set type to add or remove, and pass chat user ids in the participants array.
Who may add or remove members depends on groupPermissions.allowMemberAdd and allowMemberRemove — admins can typically manage membership regardless. The response returns the updated conversation document.
When to use this endpoint?
Use Group Participants when:
- A user adds contacts from the SDK people picker to an existing group.
- An admin or permitted member removes someone from the group.
- You sync membership after an org change (new hire joins the project channel).
- A user leaves the group (remove their own id with
type: removeif your app supports self-removal).
Part of the Chat Conversation APIs for the chat package / SDK — not Platform → Conversations. Requires a chat user Bearer token with permission to modify membership on the group.
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
| conversationId | string | Required | The group conversation's _id. |
| type | string | Required | Operation to perform: add or remove. |
| participants | string[] | Required | Chat user ids to add to or remove from the group. For add, users need not already be in the conversation. |
{baseUrl}/api/{apiVersion}/conversation/group/participants/add-removeAuthentication
Required (Bearer token)
Tenant-scoped
Yes (tenant DB — requires x-client-id)
Request Headers
| Header | Value | Description |
|---|---|---|
| Authorization | Bearer <chat_user_token> | Chat user Bearer token for a participant with permission to add or remove members. |
| is-tenant | true | Targets the tenant DB ("true", needs x-client-id). |
| x-client-id | {{clientId}} | Tenant (client) id. Required when is-tenant=true. |
| Content-Type | application/json | JSON request body. |
Request Payload
Add participants — invite users from the people picker:
{
"conversationId": "694b...d8",
"type": "add",
"participants": [
"694b...a4",
"694b...a5"
]
}Remove participants — remove one or more members from the group:
{
"conversationId": "694b...d8",
"type": "remove",
"participants": [
"694b...a4"
]
}Success Response (HTTP 200 OK)
On success, data.conversation.participants reflects the updated membership. The success message varies by operation (for example "Members added successfully").
{
"success": true,
"message": "Members added successfully",
"data": {
"conversation": {
"_id": "694b...d8",
"conversationType": "group",
"groupName": "Dev Team",
"groupDescription": "Sprint coordination",
"groupImage": null,
"participants": [
"694b...a1",
"694b...a2",
"694b...a3"
],
"groupAdmins": [
"694b...a3"
],
"owner": "694b...a3",
"groupPermissions": {
"onlyAdminCanSendMessage": false,
"onlyAdminCanEditInfo": false,
"senderCanEditMessage": true,
"allowMemberAdd": true,
"allowMemberRemove": false,
"moderationEnabled": false
},
"unreadCount": {},
"pinnedMessage": [],
"lastMessage": "70a1...c4",
"metadata": {
"workspaceId": "c1"
},
"createdAt": "2026-07-10T09:00:00.000Z",
"updatedAt": "2026-07-10T09:00:00.000Z"
}
},
"error": null
}Common Errors
Participant changes fail when the token is invalid, the conversation is missing, the caller lacks membership privileges, or the payload is malformed.
HTTP 401 Unauthorized — No token
{
"success": false,
"message": "No token, authorization denied",
"data": null,
"error": "Unauthorized"
}HTTP 403 Forbidden — Insufficient permissions
{
"success": false,
"message": "Access denied: insufficient permissions",
"data": null,
"error": null
}HTTP 404 Not Found — Conversation missing
{
"success": false,
"message": "Conversation not found",
"data": null,
"error": null
}HTTP 400 Bad Request — Invalid type or empty list
{
"success": false,
"message": "type must be add or remove",
"data": null,
"error": null
}| Code | Reason |
|---|---|
| 401 Unauthorized | Chat user token is missing, invalid, or expired. |
| 403 Forbidden | Caller cannot add/remove members per role or groupPermissions flags. |
| 404 Not Found | No group conversation matches conversationId. |
| 400 Bad Request | Invalid type, empty participants, or user already in/not in the group. |
| 500 Internal Server Error | An unexpected error occurred while updating participants. |
Best Practices
- Respect
allowMemberAddandallowMemberRemovebefore showing people-picker or remove actions to non-admins. - After adding members, notify them via your app or rely on SDK realtime updates so new participants see the thread.
- When removing the group owner, transfer ownership or demote via Group Admins first according to your product rules.
- Batch multiple ids in one request when inviting several people from the picker to reduce round trips.
Participants updated
Refresh the SDK member list from data.conversation.participants. Newly added users can open the group thread immediately; removed users should be routed out of the conversation view.