API Reference
Create Group Conversation
Overview
Create a new group conversation in your chat app. The creator becomes the group owner and first admin; selected participants are added alongside them. You can set the group name, description, avatar, permission flags, and optional metadata in a single request.
On success, data.conversation is the full group document — use its _id to open the thread in the SDK, send messages, or manage members later.
When to use this endpoint?
Use Create Group Conversation when:
- A user taps "New group" in the chat SDK and picks contacts from the people picker.
- You need a multi-participant thread (team channel, project room, support desk group).
- You want to seed default permission flags (
groupPermissions) at creation time. - You attach app-specific context in
metadata(workspace id, external room id, and so on).
Part of the Chat Conversation APIs for the chat package / SDK — not Platform → Conversations. Requires a signed-in chat user Bearer token, not a Platform client Access Token.
Workflow
- 1
Pick participants
In the chat SDK people picker, select chat user ids to include in the new group (excluding the creator, who is added automatically).
- 2
Set group details
Collect groupName, optional description, avatar URL, permissions, and any metadata your app needs.
- 3
Create the group
POST the payload with tenant headers and the signed-in chat user Bearer token. The API returns the full group conversation document.
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
| participants | string[] | Required | Chat user ids to add to the group (excluding the creator, who is added automatically as owner and admin). |
| groupName | string | Required | Display name shown in the SDK conversation list and group header. |
| creator | string | Required | Chat user id of the person creating the group. Becomes owner and is included in groupAdmins. |
| groupDescription | string | Optional | Short description shown in group info screens. |
| groupImage | string | Optional | URL for the group avatar image. |
| groupPermissions | object | Optional | Permission flags for messaging, editing, and membership. See Group Permissions for each flag. |
| metadata | object | Optional | Arbitrary key-value map for app-specific attributes. |
{baseUrl}/api/{apiVersion}/conversation/group/createAuthentication
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 the signed-in participant creating 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
Example creating a Dev Team group with two participants, a creator, default permissions, and workspace metadata:
{
"participants": [
"694b...a1",
"694b...a2"
],
"groupName": "Dev Team",
"creator": "694b...a3",
"groupDescription": "Sprint coordination",
"groupImage": "https://cdn.example.com/group.png",
"groupPermissions": {
"onlyAdminCanSendMessage": false,
"onlyAdminCanEditInfo": false,
"senderCanEditMessage": true,
"allowMemberAdd": true,
"allowMemberRemove": false,
"moderationEnabled": false
},
"metadata": {
"workspaceId": "c1"
}
}Success Response (HTTP 200 OK)
On success, the API returns the created group conversation. The creator is included in participants and groupAdmins, and set as owner.
{
"success": true,
"message": "Group conversation created 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": [],
"isArchived": false,
"lastMessage": "70a1...c4",
"metadata": {
"workspaceId": "c1"
},
"createdAt": "2026-07-10T09:00:00.000Z",
"updatedAt": "2026-07-10T09:00:00.000Z"
}
},
"error": null
}Common Errors
Create fails when the chat user token is missing or invalid, required fields are absent, or the caller lacks permission to create groups.
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 400 Bad Request — Missing required fields
{
"success": false,
"message": "participants and groupName are required",
"data": null,
"error": null
}| Code | Reason |
|---|---|
| 401 Unauthorized | Chat user token is missing, invalid, or expired. |
| 403 Forbidden | Caller is not allowed to create group conversations. |
| 400 Bad Request | Missing participants, groupName, or creator; invalid user ids. |
| 500 Internal Server Error | An unexpected error occurred while creating the group. |
Best Practices
- Pass the signed-in user's id as
creator— do not rely on the token alone to infer ownership. - Exclude the creator from
participantsto avoid duplicate entries; the API adds them automatically. - Set sensible default
groupPermissionsat create time so the SDK UI matches your product rules from the first message. - Store the returned
conversation._idin your chat state and navigate the SDK to that thread immediately after create.
Group created
Open the new thread in the chat SDK using data.conversation._id. Use Group Participants or Group Admins to adjust membership after creation.