All URIs are relative to https://api-APP_ID.sendbird.com
Method | HTTP request | Description |
---|---|---|
addEmojiCategories | POST /v3/emoji_categories | Add emoji categories |
addEmojis | POST /v3/emojis | Add emojis |
addExtraDataToMessage | POST /v3/{channel_type}/{channel_url}/messages/{message_id}/sorted_metaarray | Add extra data to a message |
addReactionToAMessage | POST /v3/{channel_type}/{channel_url}/messages/{message_id}/reactions | Add a reaction to a message |
deleteEmojiByKey | DELETE /v3/emojis/{emoji_key} | Delete an emoji |
deleteEmojiCategoryById | DELETE /v3/emoji_categories/{emoji_category_id} | Delete an emoji category |
deleteMessageById | DELETE /v3/{channel_type}/{channel_url}/messages/{message_id} | Delete a message |
enableReactions | PUT /v3/applications/settings/reactions | Enable reactions |
gcMarkAllMessagesAsDelivered | PUT /v3/group_channels/{channel_url}/messages/mark_as_delivered | Mark all messages as delivered |
gcMarkAllMessagesAsRead | PUT /v3/group_channels/{channel_url}/messages/mark_as_read | Mark all messages as read |
gcViewNumberOfEachMembersUnreadMessages | GET /v3/group_channels/{channel_url}/messages/unread_count | View number of each member's unread messages |
getEmojiByKey | GET /v3/emojis/{emoji_key} | Get an emoji |
getEmojiCategoryById | GET /v3/emoji_categories/{emoji_category_id} | Get an emoji category |
listAllEmojisAndEmojiCategories | GET /v3/emoji_categories | List all emojis and emoji categories |
listAnnouncements | GET /v3/announcements | List announcements |
listEmojis | GET /v3/emojis | List emojis |
listMessages | GET /v3/{channel_type}/{channel_url}/messages | List messages |
listReactionsOfMessage | GET /v3/{channel_type}/{channel_url}/messages/{message_id}/reactions | List reactions of a message |
migrateMessagesByUrl | POST /v3/migration/{target_channel_url} | Migrate messages |
removeExtraDataFromMessage | DELETE /v3/{channel_type}/{channel_url}/messages/{message_id}/sorted_metaarray | Remove extra data from a message |
removeReactionFromAMessage | DELETE /v3/{channel_type}/{channel_url}/messages/{message_id}/reactions | Remove a reaction from a message |
sendMessage | POST /v3/{channel_type}/{channel_url}/messages | Send a message |
translateMessageIntoOtherLanguages | POST /v3/{channel_type}/{channel_url}/messages/{message_id}/translation | Translate a message into other languages |
updateEmojiCategoryUrlById | PUT /v3/emoji_categories/{emoji_category_id} | Update an emoji category URL |
updateEmojiUrlByKey | PUT /v3/emojis/{emoji_key} | Update an emoji URL |
updateExtraDataInMessage | PUT /v3/{channel_type}/{channel_url}/messages/{message_id}/sorted_metaarray | Update extra data in a message |
updateMessageById | PUT /v3/{channel_type}/{channel_url}/messages/{message_id} | Update a message |
useDefaultEmojis | PUT /v3/applications/settings/use_default_emoji | Use default emojis |
viewMessageById | GET /v3/{channel_type}/{channel_url}/messages/{message_id} | View a message |
viewTotalNumberOfMessagesInChannel | GET /v3/{channel_type}/{channel_url}/messages/total_count | View total number of messages in a channel |
AddEmojiCategoriesResponse addEmojiCategories()
Add emoji categories Adds a list of one or more new emoji categories to the application. https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-add-emoji-categories
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiAddEmojiCategoriesRequest = {
// string (optional)
apiToken: "{{API_TOKEN}}",
// any (optional)
body: {},
};
apiInstance.addEmojiCategories(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
body | any | ||
apiToken | [string] | (optional) defaults to undefined |
AddEmojiCategoriesResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AddEmojisResponse addEmojis()
Add emojis Adds a list of one or more new emojis to the application. https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-add-emojis
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiAddEmojisRequest = {
// string (optional)
apiToken: "{{API_TOKEN}}",
// AddEmojisData (optional)
addEmojisData: {
emojiCategoryId: 1,
emojis: [
{},
],
},
};
apiInstance.addEmojis(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
addEmojisData | AddEmojisData | ||
apiToken | [string] | (optional) defaults to undefined |
AddEmojisResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AddExtraDataToMessageResponse addExtraDataToMessage()
Add extra data to a message Adds one or more key-values items which store additional information for a message. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-add-extra-data-to-a-message ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiAddExtraDataToMessageRequest = {
// string
channelType: "channel_type_example",
// string
channelUrl: "channel_url_example",
// string
messageId: "message_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// AddExtraDataToMessageData (optional)
addExtraDataToMessageData: {
channelType: "channelType_example",
channelUrl: "channelUrl_example",
messageId: 1,
sortedMetaarray: "sortedMetaarray_example",
},
};
apiInstance.addExtraDataToMessage(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
addExtraDataToMessageData | AddExtraDataToMessageData | ||
channelType | [string] | defaults to undefined | |
channelUrl | [string] | defaults to undefined | |
messageId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
AddExtraDataToMessageResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AddReactionToAMessageResponse addReactionToAMessage()
Add a reaction to a message Adds a specific reaction to a message. > Note: Currently, this action is only available in group channels. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-add-a-reaction-to-a-message ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiAddReactionToAMessageRequest = {
// string
channelType: "channel_type_example",
// string
channelUrl: "channel_url_example",
// string
messageId: "message_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// AddReactionToAMessageData (optional)
addReactionToAMessageData: {
channelType: "channelType_example",
channelUrl: "channelUrl_example",
messageId: 1,
userId: "userId_example",
reaction: "reaction_example",
},
};
apiInstance.addReactionToAMessage(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
addReactionToAMessageData | AddReactionToAMessageData | ||
channelType | [string] | defaults to undefined | |
channelUrl | [string] | defaults to undefined | |
messageId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
AddReactionToAMessageResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void deleteEmojiByKey()
Delete an emoji Deletes an emoji from the application. https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-delete-an-emoji ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiDeleteEmojiByKeyRequest = {
// string
emojiKey: "emoji_key_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
};
apiInstance.deleteEmojiByKey(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
emojiKey | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
void
No authorization required
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
any deleteEmojiCategoryById()
Delete an emoji category Deletes an emoji category with the specified ID. https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-delete-an-emoji-category ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiDeleteEmojiCategoryByIdRequest = {
// string
emojiCategoryId: "emoji_category_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
};
apiInstance.deleteEmojiCategoryById(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
emojiCategoryId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
any
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
any deleteMessageById()
Delete a message Deletes a message from a channel. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-delete-a-message ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiDeleteMessageByIdRequest = {
// string
channelType: "channel_type_example",
// string
channelUrl: "channel_url_example",
// string
messageId: "message_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
};
apiInstance.deleteMessageById(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
channelType | [string] | defaults to undefined | |
channelUrl | [string] | defaults to undefined | |
messageId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
any
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EnableReactionsResponse enableReactions()
Enable reactions Turn on or off reactions in a Sendbird application. > Note: This action also allows reactions in UIKit. https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-enable-reactions
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiEnableReactionsRequest = {
// string (optional)
apiToken: "{{API_TOKEN}}",
// EnableReactionsData (optional)
enableReactionsData: {
enabled: true,
},
};
apiInstance.enableReactions(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
enableReactionsData | EnableReactionsData | ||
apiToken | [string] | (optional) defaults to undefined |
EnableReactionsResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GcMarkAllMessagesAsDeliveredResponse gcMarkAllMessagesAsDelivered()
Mark all messages as delivered Marks all messages in a group channel as delivered for a given user. This action is only applicable for users in a group channel. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-mark-all-messages-as-delivered ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiGcMarkAllMessagesAsDeliveredRequest = {
// string
channelUrl: "channel_url_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// GcMarkAllMessagesAsDeliveredData (optional)
gcMarkAllMessagesAsDeliveredData: {
applicationId: "applicationId_example",
channelUrl: "channelUrl_example",
userId: "userId_example",
},
};
apiInstance.gcMarkAllMessagesAsDelivered(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
gcMarkAllMessagesAsDeliveredData | GcMarkAllMessagesAsDeliveredData | ||
channelUrl | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
GcMarkAllMessagesAsDeliveredResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
any gcMarkAllMessagesAsRead()
Mark all messages as read Marks all messages in a group channel as read for a given user. This action is only applicable for users in a group channel. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-mark-all-messages-as-read ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiGcMarkAllMessagesAsReadRequest = {
// string
channelUrl: "channel_url_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// GcMarkAllMessagesAsReadData (optional)
gcMarkAllMessagesAsReadData: {
channelUrl: "channelUrl_example",
userId: "userId_example",
timestamp: 1,
},
};
apiInstance.gcMarkAllMessagesAsRead(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
gcMarkAllMessagesAsReadData | GcMarkAllMessagesAsReadData | ||
channelUrl | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
any
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GcViewNumberOfEachMembersUnreadMessagesResponse gcViewNumberOfEachMembersUnreadMessages()
View number of each member's unread messages Retrieves the total number of each member's unread messages in a group channel. This action is only applicable for users in a group channel. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-view-number-of-each-member-s-unread-messages ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiGcViewNumberOfEachMembersUnreadMessagesRequest = {
// string
channelUrl: "channel_url_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// Array<string> (optional)
userIds: [
"user_ids_example",
],
};
apiInstance.gcViewNumberOfEachMembersUnreadMessages(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
channelUrl | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined | |
userIds | Array<string> | (optional) defaults to undefined |
GcViewNumberOfEachMembersUnreadMessagesResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SendBirdEmoji getEmojiByKey()
Get an emoji Retrieves an emoji with the specified key. https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-get-an-emoji ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiGetEmojiByKeyRequest = {
// string
emojiKey: "emoji_key_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
};
apiInstance.getEmojiByKey(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
emojiKey | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
SendBirdEmoji
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SendBirdEmojiCategory getEmojiCategoryById()
Get an emoji category Retrieves an emoji category with the specified ID, including its emojis. https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-get-an-emoji-category ---------------------------- emoji_category_id
Type: int Description: Specifies the unique ID of the emoji category to retrieve.
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiGetEmojiCategoryByIdRequest = {
// string
emojiCategoryId: "emoji_category_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
};
apiInstance.getEmojiCategoryById(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
emojiCategoryId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
SendBirdEmojiCategory
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListAllEmojisAndEmojiCategoriesResponse listAllEmojisAndEmojiCategories()
List all emojis and emoji categories Retrieves a list of all emoji categories registered to the application, including their emojis. https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-list-all-emojis-and-emoji-categories
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiListAllEmojisAndEmojiCategoriesRequest = {
// string (optional)
apiToken: "{{API_TOKEN}}",
};
apiInstance.listAllEmojisAndEmojiCategories(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
apiToken | [string] | (optional) defaults to undefined |
ListAllEmojisAndEmojiCategoriesResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListAnnouncementsResponse listAnnouncements()
List announcements Retrieves a list of announcements. https://sendbird.com/docs/chat/v3/platform-api/guides/announcements#2-list-announcements ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiListAnnouncementsRequest = {
// string (optional)
apiToken: "{{API_TOKEN}}",
// string (optional)
token: "token_example",
// number (optional)
limit: 1,
// string (optional)
order: "order_example",
// string (optional)
status: "status_example",
// string (optional)
announcementGroup: "announcement_group_example",
};
apiInstance.listAnnouncements(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
apiToken | [string] | (optional) defaults to undefined | |
token | [string] | (optional) defaults to undefined | |
limit | [number] | (optional) defaults to undefined | |
order | [string] | (optional) defaults to undefined | |
status | [string] | (optional) defaults to undefined | |
announcementGroup | [string] | (optional) defaults to undefined |
ListAnnouncementsResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListEmojisResponse listEmojis()
List emojis Retrieves a list of all emojis registered to the application. https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-list-emojis
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiListEmojisRequest = {
// string (optional)
apiToken: "{{API_TOKEN}}",
};
apiInstance.listEmojis(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
apiToken | [string] | (optional) defaults to undefined |
ListEmojisResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListMessagesResponse listMessages()
List messages Retrieves a list of past messages of a channel. > This message retrieval is one of Sendbird's premium features. Contact our sales team for further assistance. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-list-messages ---------------------------- channel_type
Type: string Description: Specifies the type of the channel. Either open_channels or group_channels. channel_url
Type: string Description: Specifies the URL of the channel to retrieve a list of past messages.
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiListMessagesRequest = {
// string
channelType: "channel_type_example",
// string
channelUrl: "channel_url_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// string (optional)
messageTs: "message_ts_example",
// number (optional)
messageId: 1,
// number (optional)
prevLimit: 1,
// number (optional)
nextLimit: 1,
// boolean (optional)
include: true,
// boolean (optional)
reverse: true,
// string (optional)
senderId: "sender_id_example",
// string (optional)
senderIds: "sender_ids_example",
// string (optional)
operatorFilter: "operator_filter_example",
// string (optional)
customTypes: "custom_types_example",
// string (optional)
messageType: "message_type_example",
// boolean (optional)
includingRemoved: true,
// boolean (optional)
includeReactions: true,
// 'NONE' | 'ALL' | 'ONLY_REPLY_TO_CHANNEL' | One of following values: NONE, ALL, ONLY_REPLY_TO_CHANNEL (optional)
includeReplyType: "NONE",
// boolean (optional)
includeParentMessageInfo: true,
// boolean (optional)
withSortedMetaArray: true,
// boolean (optional)
showSubchannelMessagesOnly: true,
// string (optional)
userId: "user_id_example",
// string (optional)
customType: "custom_type_example",
// boolean (optional)
withMetaArray: true,
};
apiInstance.listMessages(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
channelType | [string] | defaults to undefined | |
channelUrl | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined | |
messageTs | [string] | (optional) defaults to undefined | |
messageId | [number] | (optional) defaults to undefined | |
prevLimit | [number] | (optional) defaults to undefined | |
nextLimit | [number] | (optional) defaults to undefined | |
include | [boolean] | (optional) defaults to undefined | |
reverse | [boolean] | (optional) defaults to undefined | |
senderId | [string] | (optional) defaults to undefined | |
senderIds | [string] | (optional) defaults to undefined | |
operatorFilter | [string] | (optional) defaults to undefined | |
customTypes | [string] | (optional) defaults to undefined | |
messageType | [string] | (optional) defaults to undefined | |
includingRemoved | [boolean] | (optional) defaults to undefined | |
includeReactions | [boolean] | (optional) defaults to undefined | |
includeReplyType | [**'NONE' | 'ALL' | 'ONLY_REPLY_TO_CHANNEL'**]Array<'NONE' | 'ALL' | 'ONLY_REPLY_TO_CHANNEL'> |
includeParentMessageInfo | [boolean] | (optional) defaults to undefined | |
withSortedMetaArray | [boolean] | (optional) defaults to undefined | |
showSubchannelMessagesOnly | [boolean] | (optional) defaults to undefined | |
userId | [string] | (optional) defaults to undefined | |
customType | [string] | (optional) defaults to undefined | |
withMetaArray | [boolean] | (optional) defaults to undefined |
ListMessagesResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListReactionsOfMessageResponse listReactionsOfMessage()
List reactions of a message Retrieves a list of reactions made to a message. > Note: Currently, this action is only available in group channels. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-list-reactions-of-a-message ---------------------------- channel_type
Type: string Description: Specifies the type of the channel. Either open_channels or group_channels. channel_url
Type: string Description: Specifies the URL of the target channel. message_id
Type: long Description: Specifies the unique ID of the message to add a reaction to.
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiListReactionsOfMessageRequest = {
// string
channelType: "channel_type_example",
// string
channelUrl: "channel_url_example",
// string
messageId: "message_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// boolean (optional)
listUsers: true,
};
apiInstance.listReactionsOfMessage(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
channelType | [string] | defaults to undefined | |
channelUrl | [string] | defaults to undefined | |
messageId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined | |
listUsers | [boolean] | (optional) defaults to undefined |
ListReactionsOfMessageResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void migrateMessagesByUrl()
Migrate messages Using our migration API, you can migrate the messages from another system into a Sendbird system's channel which consists of users, messages, and other chat-related data. > To turn on this feature, contact our support team. There are three things to do in advance before the migration. Follow the instructions below: 1. Register the users of your current chat solution to your Sendbird application. You can migrate the users into the Sendbird system using the user creation API. 2. Create either an open or a group channel to migrate the messages of your chat solution. The Sendbird system doesn't create a channel for your migration automatically. 3. The maximum number of migrated messages per call is 100. To avoid the failure during your migration, you must adjust the number of messages to process at once via the API. https://sendbird.com/docs/chat/v3/platform-api/guides/migration#2-migrate-messages ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiMigrateMessagesByUrlRequest = {
// string
targetChannelUrl: "target_channel_url_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// any (optional)
body: {},
};
apiInstance.migrateMessagesByUrl(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
body | any | ||
targetChannelUrl | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
void
No authorization required
- Content-Type: application/json
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
any removeExtraDataFromMessage()
Remove extra data from a message Removes specific items from a message by their keys. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-remove-extra-data-from-a-message ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiRemoveExtraDataFromMessageRequest = {
// string
channelType: "channel_type_example",
// string
channelUrl: "channel_url_example",
// string
messageId: "message_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// Array<string> (optional)
keys: [
"keys_example",
],
};
apiInstance.removeExtraDataFromMessage(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
channelType | [string] | defaults to undefined | |
channelUrl | [string] | defaults to undefined | |
messageId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined | |
keys | Array<string> | (optional) defaults to undefined |
any
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RemoveReactionFromAMessageResponse removeReactionFromAMessage()
Remove a reaction from a message Removes a specific reaction from a message. > Note: Currently, this action is only available in group channels. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-remove-a-reaction-from-a-message ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiRemoveReactionFromAMessageRequest = {
// string
channelType: "channel_type_example",
// string
channelUrl: "channel_url_example",
// string
messageId: "message_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// string (optional)
userId: "user_id_example",
// string (optional)
reaction: "reaction_example",
};
apiInstance.removeReactionFromAMessage(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
channelType | [string] | defaults to undefined | |
channelUrl | [string] | defaults to undefined | |
messageId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined | |
userId | [string] | (optional) defaults to undefined | |
reaction | [string] | (optional) defaults to undefined |
RemoveReactionFromAMessageResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SendBirdMessageResponse sendMessage()
Send a message Sends a message to a channel. You can send a text message, a file message, and an admin message. >Note: With Sendbird Chat SDKs and the platform API, any type of files in messages can be uploaded to Sendbird server. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-send-a-message ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiSendMessageRequest = {
// string
channelType: "channel_type_example",
// string
channelUrl: "channel_url_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// SendMessageData (optional)
sendMessageData: {
userId: "userId_example",
channelType: "channelType_example",
channelUrl: "channelUrl_example",
messageType: "messageType_example",
message: "message_example",
customType: "customType_example",
data: "data_example",
sendPush: true,
mentionType: "mentionType_example",
mentionedUserIds: [
"mentionedUserIds_example",
],
isSilent: true,
sortedMetaarray: "sortedMetaarray_example",
createdAt: 1,
dedupId: "dedupId_example",
apnsBundleId: "apnsBundleId_example",
sound: "sound_example",
volume: 3.14,
url: "url_example",
file: "file_example",
fileName: "fileName_example",
fileSize: 3.14,
fileType: "fileType_example",
thumbnails: [
"thumbnails_example",
],
thumbnail1: "thumbnail1_example",
thumbnail2: "thumbnail2_example",
thumbnail3: "thumbnail3_example",
},
};
apiInstance.sendMessage(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
sendMessageData | SendMessageData | ||
channelType | [string] | defaults to undefined | |
channelUrl | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
SendBirdMessageResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SendBirdMessageResponse translateMessageIntoOtherLanguages()
Translate a message into other languages Translates a message into specific languages. Only text messages of which type is MESG can be translated into other languages. > Note: Message translation is powered by Google Cloud Translation API recognition engine. Find language codes supported by the engine in the Miscellaneous page or visit the Language Support for Google Cloud Translation. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-translate-a-message-into-other-languages ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiTranslateMessageIntoOtherLanguagesRequest = {
// string
channelType: "channel_type_example",
// string
channelUrl: "channel_url_example",
// string
messageId: "message_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// TranslateMessageIntoOtherLanguagesData (optional)
translateMessageIntoOtherLanguagesData: {
targetLangs: [
"targetLangs_example",
],
},
};
apiInstance.translateMessageIntoOtherLanguages(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
translateMessageIntoOtherLanguagesData | TranslateMessageIntoOtherLanguagesData | ||
channelType | [string] | defaults to undefined | |
channelUrl | [string] | defaults to undefined | |
messageId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
SendBirdMessageResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SendBirdEmojiCategory updateEmojiCategoryUrlById()
Update an emoji category URL Updates the URL of an emoji category with the specified ID. https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-update-an-emoji-category-url ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiUpdateEmojiCategoryUrlByIdRequest = {
// string
emojiCategoryId: "emoji_category_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// UpdateEmojiCategoryUrlByIdData (optional)
updateEmojiCategoryUrlByIdData: {
emojiCategoryId: 1,
url: "url_example",
},
};
apiInstance.updateEmojiCategoryUrlById(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
updateEmojiCategoryUrlByIdData | UpdateEmojiCategoryUrlByIdData | ||
emojiCategoryId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
SendBirdEmojiCategory
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SendBirdEmoji updateEmojiUrlByKey()
Update an emoji URL Updates the image URL of an emoji with the specified key. https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-update-an-emoji-url ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiUpdateEmojiUrlByKeyRequest = {
// string
emojiKey: "emoji_key_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// UpdateEmojiUrlByKeyData (optional)
updateEmojiUrlByKeyData: {
emojiKey: "emojiKey_example",
url: "url_example",
},
};
apiInstance.updateEmojiUrlByKey(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
updateEmojiUrlByKeyData | UpdateEmojiUrlByKeyData | ||
emojiKey | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
SendBirdEmoji
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateExtraDataInMessageResponse updateExtraDataInMessage()
Update extra data in a message Updates the values of specific items by their keys. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-update-extra-data-in-a-message ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiUpdateExtraDataInMessageRequest = {
// string
channelType: "channel_type_example",
// string
channelUrl: "channel_url_example",
// string
messageId: "message_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// UpdateExtraDataInMessageData (optional)
updateExtraDataInMessageData: {
channelType: "channelType_example",
channelUrl: "channelUrl_example",
messageId: 1,
sortedMetaarray: "sortedMetaarray_example",
mode: "mode_example",
upsert: true,
},
};
apiInstance.updateExtraDataInMessage(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
updateExtraDataInMessageData | UpdateExtraDataInMessageData | ||
channelType | [string] | defaults to undefined | |
channelUrl | [string] | defaults to undefined | |
messageId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
UpdateExtraDataInMessageResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SendBirdMessageResponse updateMessageById()
Update a message Updates information on a message in a channel. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-update-a-message ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiUpdateMessageByIdRequest = {
// string
channelType: "channel_type_example",
// string
channelUrl: "channel_url_example",
// string
messageId: "message_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// UpdateMessageByIdData (optional)
updateMessageByIdData: {
channelType: "channelType_example",
channelUrl: "channelUrl_example",
messageId: 1,
messageType: "messageType_example",
message: "message_example",
customType: "customType_example",
data: "data_example",
mentionType: "mentionType_example",
mentionedUserIds: [
"mentionedUserIds_example",
],
},
};
apiInstance.updateMessageById(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
updateMessageByIdData | UpdateMessageByIdData | ||
channelType | [string] | defaults to undefined | |
channelUrl | [string] | defaults to undefined | |
messageId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
SendBirdMessageResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UseDefaultEmojisResponse useDefaultEmojis()
Use default emojis Determines whether to use the 7 default emojis initially provided. https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-use-default-emojis
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiUseDefaultEmojisRequest = {
// string (optional)
apiToken: "{{API_TOKEN}}",
// UseDefaultEmojisData (optional)
useDefaultEmojisData: {
useDefaultEmoji: true,
},
};
apiInstance.useDefaultEmojis(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
useDefaultEmojisData | UseDefaultEmojisData | ||
apiToken | [string] | (optional) defaults to undefined |
UseDefaultEmojisResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SendBirdMessageResponse viewMessageById()
View a message Retrieves information on a message. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-view-a-message ---------------------------- channel_type
Type: string Description: Specifies the type of the channel. Either open_channels or group_channels. channel_url
Type: string Description: Specifies the URL of the target channel. message_id
Type: long Description: Specifies the unique ID of the message to retrieve.
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiViewMessageByIdRequest = {
// string
channelType: "channel_type_example",
// string
channelUrl: "channel_url_example",
// string
messageId: "message_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// boolean (optional)
withSortedMetaArray: true,
// boolean (optional)
withMetaArray: true,
// boolean (optional)
includeParentMessageInfo: true,
};
apiInstance.viewMessageById(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
channelType | [string] | defaults to undefined | |
channelUrl | [string] | defaults to undefined | |
messageId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined | |
withSortedMetaArray | [boolean] | (optional) defaults to undefined | |
withMetaArray | [boolean] | (optional) defaults to undefined | |
includeParentMessageInfo | [boolean] | (optional) defaults to undefined |
SendBirdMessageResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ViewTotalNumberOfMessagesInChannelResponse viewTotalNumberOfMessagesInChannel()
View total number of messages in a channel Retrieves the total number of messages in a channel. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-view-total-number-of-messages-in-a-channel ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MessageApi(configuration);
let body:Sendbird.MessageApiViewTotalNumberOfMessagesInChannelRequest = {
// string
channelType: "channel_type_example",
// string
channelUrl: "channel_url_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
};
apiInstance.viewTotalNumberOfMessagesInChannel(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
channelType | [string] | defaults to undefined | |
channelUrl | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
ViewTotalNumberOfMessagesInChannelResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]