Import Messages
Messages
Import Messages
The CometChat message import API allows customers to import their messages’ data into the CometChat systems.
POST
Import Messages
For the complete error reference, see Error Guide.Documentation Index
Fetch the complete documentation index at: https://cometchat-22654f5b-docs-campaigns-service-rest-api.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).
Body
application/json
Wrapper for the messages.
Example:
{
"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://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-1.webp"
}
],
"metadata": { "key": "value" },
"custodata": { "key": "value" }
},
"sentAt": "1674104348",
"deliveredAt": "1674224684",
"readAt": "1674224684",
"senderUserDetails": {
"uid": "s12",
"name": "user1",
"avatar": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-1.webp",
"createdAt": "1674228536",
"metadata": { "key": "value" }
},
"receiverUserDetails": {
"uid": "r123",
"name": "cometchat-uid-",
"type": "public",
"description": "Hello group",
"icon": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-1.webp",
"owner": "cometchat-uid-1",
"avatar": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-1.webp",
"createdAt": "1674228536",
"metadata": { "key": "value" }
},
"tags": ["tag1"]
}
}Response
200 - application/json
Import Message(s)