API Reference
Group Admins
Overview
Add or remove group admins on an existing group conversation. Admins can manage group settings, permissions, and membership depending on your groupPermissions flags.
Set type to add or remove, and pass the affected chat user ids in the groupAdmins array. The response returns the updated conversation document.
When to use this endpoint?
Use Group Admins when:
- A group owner promotes a member to admin from the SDK group settings screen.
- You demote an admin back to a regular member (
type: remove). - You batch-promote multiple members after a role change in your app.
- You sync admin lists from an external workspace or org chart.
Part of the Chat Conversation APIs for the chat package / SDK — not Platform → Conversations. Requires a chat user Bearer token with sufficient group privileges (typically owner or existing admin).
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
| conversationId | string | Required | The group conversation's _id. |
| type | string | Required | Operation to perform: add or remove. |
| groupAdmins | string[] | Required | Chat user ids to promote (add) or demote (remove) as group admins. Users must already be participants when adding. |
{baseUrl}/api/{apiVersion}/conversation/group/admins/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 admin or owner privileges on the group. |
| 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 admins — promote one or more participants:
{
"conversationId": "694b...d8",
"type": "add",
"groupAdmins": [
"694b...a1"
]
}Remove admins — demote admins back to regular members:
{
"conversationId": "694b...d8",
"type": "remove",
"groupAdmins": [
"694b...a1"
]
}Success Response (HTTP 200 OK)
On success, data.conversation reflects the updated groupAdminslist. The success message varies by operation (for example "Admins added successfully").
{
"success": true,
"message": "Admins 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
Admin changes fail when the token is invalid, the conversation does not exist, the caller lacks admin 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 is not a group admin or owner, or cannot modify admins. |
| 404 Not Found | No group conversation matches conversationId. |
| 400 Bad Request | Invalid type, empty groupAdmins, or user is not a participant. |
| 500 Internal Server Error | An unexpected error occurred while updating admins. |
Best Practices
- Only promote users who are already in
participants; add them first via Group Participants if needed. - Avoid removing the last admin unless transferring ownership — keep at least one admin for manageable groups.
- Refresh the SDK group settings UI from
data.conversation.groupAdminsafter each successful PATCH. - Gate promote/demote actions in your UI based on the caller's role (owner vs admin) and your product rules.
Admins updated
Update the SDK admin badges and settings menu from the returned groupAdmins array. Adjust Group Permissions if admin capabilities should change alongside promotions.