curl --request GET \
--url https://apix.us.amity.co/api/v2/search/messages \
--header 'Authorization: Bearer <token>'{
"status": "<string>",
"data": {
"messages": [
{
"_id": "<string>",
"path": "<string>",
"messageId": "<string>",
"channelId": "<string>",
"userId": "<string>",
"type": "text",
"data": {},
"channelSegment": 123,
"parentId": "<string>",
"fileId": "<string>",
"tags": [
"<string>"
],
"metadata": {},
"flagCount": 123,
"hashFlag": {
"bits": 123,
"hashes": 123,
"hash": [
"<string>"
]
},
"childrenNumber": 123,
"reactionsCount": 123,
"reactions": {},
"myReactions": [
"<string>"
],
"latestReaction": {
"referenceId": "<string>",
"referenceType": "<string>",
"reactionName": "<string>",
"userId": "<string>",
"userDisplayName": "<string>",
"reactionId": "<string>",
"eventName": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
},
"isDeleted": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"editedAt": "2023-11-07T05:31:56Z",
"mentionees": [
{
"type": "user",
"userIds": [
"<string>"
],
"userPublicIds": [
"<string>"
],
"userInternalIds": [
"<string>"
]
}
]
}
],
"messageFeeds": [
{
"messageFeedId": "a85dca058f5b585f86a29f14",
"channelId": "abc665aed9dbb8d036037eeb",
"channelPublicId": "abc665aed9dbb8d036037eeb",
"channelType": "community",
"name": "text",
"creatorId": "8aa313c8dbb00af911b07672",
"path": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239",
"childCount": 123,
"isDeleted": false,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"lastMessageId": "9530b11ec8de87db22b06b21",
"lastMessageTimestamp": "2023-11-07T05:31:56Z",
"editedAt": "2023-11-07T05:31:56Z",
"messagePreviewId": "<string>"
}
],
"channels": [
{
"channelId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"_id": "<string>",
"path": "<string>",
"channelInternalId": "<string>",
"channelPublicId": "<string>",
"isDistinct": true,
"metadata": {},
"type": "standard",
"tags": [
"<string>"
],
"isMuted": true,
"isRateLimited": true,
"muteTimeout": "2023-11-07T05:31:56Z",
"rateLimit": 123,
"rateLimitWindow": 123,
"rateLimitTimeout": "2023-11-07T05:31:56Z",
"displayName": "<string>",
"messageAutoDeleteEnabled": true,
"autoDeleteMessageByFlagLimit": 123,
"memberCount": 123,
"messageCount": 123,
"lastActivity": "2023-11-07T05:31:56Z",
"avatarFileId": "<string>",
"isDeleted": false,
"messagePreviewId": "<string>",
"isPublic": true,
"notificationMode": "default",
"attachedTo": {
"postId": "<string>",
"videoStreamId": "<string>",
"roomId": "<string>"
}
}
],
"users": [
{
"userId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"_id": "<string>",
"path": "<string>",
"userInternalId": "<string>",
"userPublicId": "<string>",
"roles": [
"<string>"
],
"permissions": [
"MUTE_CHANNEL"
],
"displayName": "<string>",
"profileHandle": "<string>",
"description": "<string>",
"avatarFileId": "<string>",
"avatarCustomUrl": "<string>",
"flagCount": 123,
"hashFlag": {
"bits": 123,
"hashes": 123,
"hash": [
"<string>"
]
},
"metadata": {},
"isGlobalBan": true,
"isBrand": true,
"isDeleted": true
}
],
"files": [
{
"fileId": "<string>",
"fileUrl": "<string>",
"type": "image",
"accessType": "public",
"altText": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"attributes": {
"name": "<string>",
"extension": "<string>",
"size": 123,
"mimeType": "<string>",
"metadata": {
"exif": {},
"gps": {},
"height": 123,
"width": 123,
"isFull": true
}
}
}
],
"roles": [
{
"roleId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"permissions": [
"<string>"
],
"isDeleted": false,
"displayName": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"totalCount": 123,
"paging": {
"next": "<string>",
"prev": "<string>"
},
"search": {
"query": "<string>",
"limit": 123,
"sortBy": "<string>",
"orderBy": "<string>"
}
}
}Retrieve messages based on search criteria
curl --request GET \
--url https://apix.us.amity.co/api/v2/search/messages \
--header 'Authorization: Bearer <token>'{
"status": "<string>",
"data": {
"messages": [
{
"_id": "<string>",
"path": "<string>",
"messageId": "<string>",
"channelId": "<string>",
"userId": "<string>",
"type": "text",
"data": {},
"channelSegment": 123,
"parentId": "<string>",
"fileId": "<string>",
"tags": [
"<string>"
],
"metadata": {},
"flagCount": 123,
"hashFlag": {
"bits": 123,
"hashes": 123,
"hash": [
"<string>"
]
},
"childrenNumber": 123,
"reactionsCount": 123,
"reactions": {},
"myReactions": [
"<string>"
],
"latestReaction": {
"referenceId": "<string>",
"referenceType": "<string>",
"reactionName": "<string>",
"userId": "<string>",
"userDisplayName": "<string>",
"reactionId": "<string>",
"eventName": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
},
"isDeleted": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"editedAt": "2023-11-07T05:31:56Z",
"mentionees": [
{
"type": "user",
"userIds": [
"<string>"
],
"userPublicIds": [
"<string>"
],
"userInternalIds": [
"<string>"
]
}
]
}
],
"messageFeeds": [
{
"messageFeedId": "a85dca058f5b585f86a29f14",
"channelId": "abc665aed9dbb8d036037eeb",
"channelPublicId": "abc665aed9dbb8d036037eeb",
"channelType": "community",
"name": "text",
"creatorId": "8aa313c8dbb00af911b07672",
"path": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239",
"childCount": 123,
"isDeleted": false,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"lastMessageId": "9530b11ec8de87db22b06b21",
"lastMessageTimestamp": "2023-11-07T05:31:56Z",
"editedAt": "2023-11-07T05:31:56Z",
"messagePreviewId": "<string>"
}
],
"channels": [
{
"channelId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"_id": "<string>",
"path": "<string>",
"channelInternalId": "<string>",
"channelPublicId": "<string>",
"isDistinct": true,
"metadata": {},
"type": "standard",
"tags": [
"<string>"
],
"isMuted": true,
"isRateLimited": true,
"muteTimeout": "2023-11-07T05:31:56Z",
"rateLimit": 123,
"rateLimitWindow": 123,
"rateLimitTimeout": "2023-11-07T05:31:56Z",
"displayName": "<string>",
"messageAutoDeleteEnabled": true,
"autoDeleteMessageByFlagLimit": 123,
"memberCount": 123,
"messageCount": 123,
"lastActivity": "2023-11-07T05:31:56Z",
"avatarFileId": "<string>",
"isDeleted": false,
"messagePreviewId": "<string>",
"isPublic": true,
"notificationMode": "default",
"attachedTo": {
"postId": "<string>",
"videoStreamId": "<string>",
"roomId": "<string>"
}
}
],
"users": [
{
"userId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"_id": "<string>",
"path": "<string>",
"userInternalId": "<string>",
"userPublicId": "<string>",
"roles": [
"<string>"
],
"permissions": [
"MUTE_CHANNEL"
],
"displayName": "<string>",
"profileHandle": "<string>",
"description": "<string>",
"avatarFileId": "<string>",
"avatarCustomUrl": "<string>",
"flagCount": 123,
"hashFlag": {
"bits": 123,
"hashes": 123,
"hash": [
"<string>"
]
},
"metadata": {},
"isGlobalBan": true,
"isBrand": true,
"isDeleted": true
}
],
"files": [
{
"fileId": "<string>",
"fileUrl": "<string>",
"type": "image",
"accessType": "public",
"altText": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"attributes": {
"name": "<string>",
"extension": "<string>",
"size": 123,
"mimeType": "<string>",
"metadata": {
"exif": {},
"gps": {},
"height": 123,
"width": 123,
"isFull": true
}
}
}
],
"roles": [
{
"roleId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"permissions": [
"<string>"
],
"isDeleted": false,
"displayName": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"totalCount": 123,
"paging": {
"next": "<string>",
"prev": "<string>"
},
"search": {
"query": "<string>",
"limit": 123,
"sortBy": "<string>",
"orderBy": "<string>"
}
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Keyword for searching
1 - 1024Flag to indicate exact match
Channel ID to scope the search
Message Feed ID to scope the search
Array of user public IDs to filter creators
1 - 10 elements1Array of message types to include
10text, image, video, audio, file Array of tags to include
101 - 30Additional search options
Show child attributes