Create a group

Create a group with required members to start a group conversation using below API.


{your-domain-name} can be obtained from the MirrorFly console.

HTTP request#

curl -X POST "https://{your-domain-name}/api/v1/group/group"
-H "accept: */*"
-H "Authorization: xxxxxxxxxxxxxxxxxx"
-H "Content-Type: application/json"
-d "{ \"groupId\": \"xxxxxxx\", \"groupImageUrl\": \"xxxxxxx\", \"groupMembers\": [{\"admin\": xxxx, \"jid\": \"xxxxxxxxx\"}], \"groupName\": \"xxxxxxxxx\"}"

Request Params#

groupIdStringYesGroup id for the group
groupImageUrlStringNoGroup profile picture url
groupMembersArray of objectsYesList of members to be added to this group
groupMembers.adminbooleanYesWhether to add this member as admin
groupMembers.jidStringYesId of the member to be added
groupNameStringYesA name for this group


If successful, this action creates a group and adds provided members to it.

"status": 200,
"data": {
"groupId": "Sample group name"
"message": "Group created successfully"


In the case of an error, an error object like below is returned.

When the token passed in Headers is expired

"status": 401,
"message": "Token Expired"

In the case of a Bad Request, an error message is returned

"status": 400,
"message": "Error Message"