The CometChat message import API allows customers to import their messages’ data into the CometChat systems.
API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).
Wrapper for the messages.
{
"3118": {
"muid": "3118",
"sender": "s12",
"receiverType": "user",
"receiver": "r123",
"type": "text",
"category": "message",
"data": {
"text": "Hi there",
"attachments": [
{
"name": "hi.png",
"extension": "png",
"size": "350.2",
"mimeType": "image/png",
"url": "https://data-eu.cometchat.io/assets/images/avatars/ironman.png"
}
],
"metadata": { "key": "value" },
"custodata": { "key": "value" }
},
"sentAt": "1674104348",
"deliveredAt": "1674224684",
"readAt": "1674224684",
"senderUserDetails": {
"uid": "s12",
"name": "user1",
"avatar": "https://data-eu.cometchat.io/assets/images/avatars/ironman.png",
"createdAt": "1674228536",
"metadata": { "key": "value" }
},
"receiverUserDetails": {
"uid": "r123",
"name": "superhero",
"type": "public",
"description": "Hello group",
"icon": "https://data-eu.cometchat.io/assets/images/avatars/ironman.png",
"owner": "superhero1",
"avatar": "https://data-eu.cometchat.io/assets/images/avatars/ironman.png",
"createdAt": "1674228536",
"metadata": { "key": "value" }
},
"tags": ["tag1"],
"mentionedUserDetails": {
"example-uid-new": {
"uid": "example-uid-new",
"name": "example-uid"
}
}
}
}Import Message(s)