curl --request POST \
--url https://{appid}.api-{region}.cometchat.io/v3/data_import/groups \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"groups": {
"guid1": {
"guid": "guid1",
"name": "guid1",
"createdAt": "1673421419",
"type": "public",
"owner": "superhero1",
"groupOwnerDetails": {
"uid": "superhero1",
"name": "superhero1"
}
}
}
}
'{
"data": {
"guid1": {
"success": true,
"data": {
"guid": "guid1",
"name": "guid1",
"type": "public",
"conversationId": "group_guid1",
"createdAt": 1673421419,
"owner": "superhero1"
}
}
}
}The CometChat group import API allows customers to import their groups’ data into the CometChat systems.
curl --request POST \
--url https://{appid}.api-{region}.cometchat.io/v3/data_import/groups \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"groups": {
"guid1": {
"guid": "guid1",
"name": "guid1",
"createdAt": "1673421419",
"type": "public",
"owner": "superhero1",
"groupOwnerDetails": {
"uid": "superhero1",
"name": "superhero1"
}
}
}
}
'{
"data": {
"guid1": {
"success": true,
"data": {
"guid": "guid1",
"name": "guid1",
"type": "public",
"conversationId": "group_guid1",
"createdAt": 1673421419,
"owner": "superhero1"
}
}
}
}API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).
Wrapper for the groups.
Show child attributes
Wraps a group object. The <guid> will be a primary key/unique Identifier of the group.
Show child attributes
The value should be the same as value of the placeholder <guid> which wraps the group object.
name of the group.
Type of the group. Can be public, password or private.
public, password, private An URL for a group icon.
A password required to join the the group with type password
Owner of the group.
A 10-digit UNIX timestamp at which the group was created.
Additional data for the group.
A string array containing grouptags.
The JSON object contains the user details of the owner.
Show child attributes
The primary-key/ unique identifier of the owner.
Name of the owner.
URL to the profile picture of the owner.
Profile page URL of the owner.
Role of the owner. Should be created already via the Create role API.
A 10-digit timestamp at which the owner was created.
A 10-digit UNIX timestamp at which the owner was most recently online.
Additional details about the owner.
A string array containing owner tags.
A 10-digit UNIX timestamp at which the owner was deactivated/soft-deleted/blocked to use the chat services.
{
"guid1": {
"guid": "guid1",
"name": "guid1",
"createdAt": "1673421419",
"type": "public",
"owner": "superhero1",
"groupOwnerDetails": { "uid": "superhero1", "name": "superhero1" }
}
}Import Group(s)
Show child attributes
Response data
Show child attributes
Was this page helpful?