API Reference
Group Permissions
Overview
Update permission flags on a group conversation. Flags control who can send messages, edit group info, modify messages, add or remove members, and whether moderation is enabled — the SDK should read these values to show or hide actions in the group settings and composer.
Send the full groupPermissions object with the desired boolean values. The response returns the updated conversation document.
When to use this endpoint?
Use Group Permissions when:
- A group admin toggles "Only admins can send messages" in the SDK settings panel.
- You switch a broadcast-style group to read-only for regular members.
- You enable or disable member self-service add/remove from the people picker.
- You turn on moderation for a moderated community channel.
Part of the Chat Conversation APIs for the chat package / SDK — not Platform → Conversations. Requires a chat user Bearer token with admin privileges on the group (subject to onlyAdminCanEditInfo).
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
| conversationId | string | Required | The group conversation's _id. |
| groupPermissions | object | Required | Boolean flags that define group behavior. See the permission flags table below. |
Permission Flags
Each key inside groupPermissions controls a specific capability in the chat SDK:
| Flag | When true | SDK impact |
|---|---|---|
| onlyAdminCanSendMessage | Only group admins may send new messages. | Hide or disable the message composer for non-admin members; useful for announcement channels. |
| onlyAdminCanEditInfo | Only admins may change group name, description, image, or permissions. | Restrict group settings and permission toggles to admins in the SDK UI. |
| senderCanEditMessage | Message senders may edit their own messages after sending. | Show an edit action on the sender's messages; hide it when false. |
| allowMemberAdd | Regular members (not only admins) may add participants. | Expose "Add people" in the SDK to all members when true; admin-only when false. |
| allowMemberRemove | Regular members may remove other participants (within policy). | Allow member-initiated removals from the participant list; admins can typically always remove members. |
| moderationEnabled | Moderation features are active for this group. | Enable moderation workflows (review, flag, or restrict content) according to your SDK implementation. |
{baseUrl}/api/{apiVersion}/conversation/group/permission/updateAuthentication
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 group admin or owner. |
| 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
Example updating all permission flags for a group conversation:
{
"conversationId": "694b...d8",
"groupPermissions": {
"onlyAdminCanSendMessage": false,
"onlyAdminCanEditInfo": false,
"senderCanEditMessage": true,
"allowMemberAdd": true,
"allowMemberRemove": false,
"moderationEnabled": false
}
}Success Response (HTTP 200 OK)
On success, data.conversation.groupPermissions reflects the new flag values. Sync these in the SDK immediately so composers and settings menus match server state.
{
"success": true,
"message": "Group conversation permissions updated 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
Permission updates fail when the token is invalid, the conversation is missing, the caller is not an admin, or the payload is incomplete.
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 — Missing groupPermissions
{
"success": false,
"message": "groupPermissions object is required",
"data": null,
"error": null
}HTTP 403 Forbidden - Error: locked by workspace admin
{
"success": false,
"message": "These permissions are locked by your workspace admin: onlyAdminCanSendMessage",
"data": null,
"error": ["onlyAdminCanSendMessage"]
}| Code | Reason |
|---|---|
| 401 Unauthorized | Chat user token is missing, invalid, or expired. |
| 403 Forbidden | Caller is not a group admin, or onlyAdminCanEditInfo blocks the change. |
| 404 Not Found | No group conversation matches conversationId. |
| 400 Bad Request | Missing or malformed groupPermissions object. |
| 500 Internal Server Error | An unexpected error occurred while updating permissions. |
Best Practices
- Send all six flags in each update so the server state stays predictable — merge current values in your SDK before PATCHing.
- Reflect
onlyAdminCanSendMessagein the composer immediately; do not rely on failed send attempts alone. - Pair permission changes with UI copy so members understand why actions were disabled.
- Set conservative defaults at group create time via Create Group Conversation, then adjust here as needed.
Permissions updated
Re-read groupPermissions from the response and refresh SDK toggles, the message composer, and member management actions accordingly.