Skip to main content

Message Content Type Documentation

ContentType 📄​

Overview​

  • Explanation of supported message types for the contentType field in the msg/send_msg API request, including specific fields within content for each message type.

ContentType Message Type Explanations​

ContentType ValueType Description
101Text Message
102Image Message
103Audio Message
104Video Message
105File Message
106@ Mention Message
109Location Message
110Custom Message
1400System Notification

Content Details 📋​

  • content is a JSON object, and each message type has a unique structure.

Text Message 📜​

{
"content": {
"content": "Hello"
}
}
ParameterRequiredTypeDescription
contentYesstringContent of the text

Contact Card Message 🏷ī¸â€‹

{
"content": {
"userID": "",
"nickname": "",
"faceURL": "",
"ex": ""
}
}
ParameterRequiredTypeDescription
userIDYesstringUser ID
nicknameYesstringUsername
faceURLYesstringProfile URL
exNostringExtension

Image Message 📷​

{
"content": {
"sourcePath": "",
"sourcePicture": {
"uuid": "",
"type": "",
"size": 0,
"width": 0,
"height": 0,
"url": ""
},
"bigPicture": {
"uuid": "",
"type": "",
"size": 0,
"width": 0,
"height": 0,
"url": ""
},
"snapshotPicture": {
"uuid": "",
"type": "",
"size": 0,
"width": 0,
"height": 0,
"url": ""
}
}
}
ParameterRequiredTypeDescription
sourcePathNostringLocal file path
sourcePictureYesobjectOriginal image
bigPictureYesobjectFull-size image
snapshotPictureYesobjectThumbnail image
uuidNostringUnique image ID
typeYesstringImage type
sizeNointImage size
widthYesintImage width
heightYesintImage height
urlYesstringDownload URL

Audio Message 🎤​

{
"content": {
"uuid": "",
"soundPath": "",
"sourceUrl": "",
"dataSize": 0,
"duration": 0,
"soundType": ""
}
}
ParameterRequiredTypeDescription
uuidNostringUnique audio ID
soundPathNostringLocal file path
sourceUrlYesstringDownload URL
dataSizeNointFile size
durationYesintDuration
soundTypeNostringAudio file type

Video Message 📹​

{
"content": {
"videoPath": "",
"videoUUID": "",
"videoUrl": "",
"videoType": "",
"videoSize": 0,
"duration": 0,
"snapshotPath": "",
"snapshotUUID": "",
"snapshotSize": 0,
"snapshotUrl": "",
"snapshotWidth": 0,
"snapshotHeight": 0
}
}
ParameterRequiredTypeDescription
videoPathNostringLocal file path
videoUUIDNostringUnique video ID
videoUrlYesstringDownload URL
videoTypeYesstringVideo type
videoSizeYesintFile size
durationYesintDuration
snapshotPathNostringThumbnail local path
snapshotUUIDNostringUnique thumbnail ID
snapshotSizeNointThumbnail file size
snapshotUrlYesstringThumbnail download URL
snapshotWidthYesintThumbnail width
snapshotHeightYesintThumbnail height

File Message 📁​

{
"content": {
"filePath": "",
"uuid": "",
"sourceUrl": "",
"fileName": "",
"fileSize": 0,
"fileType": ""
}
}
ParameterRequiredTypeDescription
filePathNostringLocal file path
uuidNostringUnique file ID
sourceUrlYesstringDownload URL
fileNameYesstringFile name
fileSizeYesintFile size
fileTypeNostringFile type

Emoji Message 😄​

{
"content": {
"index": 0,
"data": ""
}
}
ParameterRequiredTypeDescription
indexYesintEmoji index
dataNostringCustom emoji JSON data

Location Message 📍​

{
"content": {
"description": "",
"longitude": 0,
"latitude": 0
}
}
ParameterRequiredTypeDescription
descriptionNostringLocation text
longitudeYesdoubleLongitude
latitudeYesdoubleLatitude

@ Mention Message đŸ“ĸ​

{
"content": {
"text": "",
"atUserList": ["user1"],
"isAtSelf": false
}
}
ParameterRequiredTypeDescription
textNostringMessage text
atUserListYesarrayList of users
isAtSelfNobooleanMention yourself

Custom Message 🖌ī¸â€‹

{
"content": {
"data": "",
"description": "",
"extension": ""
}
}
ParameterRequiredTypeDescription
dataYesstringCustom message data
descriptionNostringAdditional details
extensionNostringExtension field

System Notification Message đŸ“ĸ​

As a special custom message, system notifications create a standalone conversation with a fixed type of 4, and the sender ID is the system notification ID userID.

{
"content": {
"notificationName": "notification",
"notificationFaceURL": "http://example.com/avatar",
"notificationType": 1,
"text": "hello!",
"externalUrl": "",
"mixType": 0,
"pictureElem": {
"sourcePath": "",
"sourcePicture": {
"uuid": "",
"type": "",
"size": 0,
"width": 0,
"height": 0,
"url": ""
},
"bigPicture": {
"uuid": "",
"type": "",
"size": 0,
"width": 0,
"height": 0,
"url": ""
},
"snapshotPicture": {
"uuid": "",
"type": "",
"size": 0,
"width": 0,
"height": 0,
"url": ""
}
},
"soundElem": {
"uuid": "",
"soundPath": "",
"sourceUrl": "",
"dataSize": 0,
"duration": 0
},
"videoElem": {
"videoPath": "",
"videoUUID": "",
"videoUrl": "",
"videoType": "",
"videoSize": 0,
"duration": 0,
"snapshotPath": "",
"snapshotUUID": "",
"snapshotSize": 0,
"snapshotUrl": "",
"snapshotWidth": 0,
"snapshotHeight": 0
},
"fileElem": {
"filePath": "",
"uuid": "",
"sourceUrl": "",
"fileName": "",
"fileSize": 0
},
"ex": ""
}
}
ParameterRequiredTypeDescription
notificationNameYesstringNotification title
notificationFaceURLNostringNotification avatar URL
notificationTypeYesintNotification type, e.g., 1: onboarding, 2: departure
textYesstringNotification content
externalUrlNostringURL to navigate upon click
mixTypeYesintNotification mix type
0: Text only
1: Text + Image
2: Text + Video
3: Text + File
4: Text + Sound
5: Text + Sound + Image
pictureElemNoobjectImage element
sourcePictureNoobjectOriginal image
bigPictureNoobjectLarge image
snapshotPictureNoobjectThumbnail image
soundElemNoobjectSound element
videoElemNoobjectVideo element
fileElemNoobjectFile element
exNostringExtension field