Replies to a specific message in a channel. You can only reply to text and file messages, not admin messages.
Note: Sending reply messages works much like sending regular messages to a channel except replies require an additional
parent_message_id
property.
The following table lists the parameters that this action supports.
Required
Parameter name | Type | Description |
---|---|---|
channel_type | string | Specifies the type of the channel. Acceptable values are open_channels and group_channels. |
channel_url | string | Specifies the URL of the target channel. |
The following tables list the properties of an HTTP request that this action supports for a text message, file message, and admin message.
Properties
Required | Type | Description |
---|---|---|
message_type | string | Specifies the type of the message. The value of MESG represents a text message. |
user_id | string | Specifies the user ID of the sender. |
message | string | Specifies the content of the message. |
parent_message_id | long | Specifies the unique ID of a message to add a reply to. |
Optional | Type | Description |
---|---|---|
custom_type | string | Specifies a custom message type used for message grouping. The length is limited to 128 characters. |
data | string | Specifies additional message information such as custom font size, font type, or |
send_push | boolean | Determines whether to send a push notification of the message to the channel members. This property only applies to group channels. |
mention_type | string | Specifies the mentioning method that indicates which user gets a notification of the message. Acceptable values are users and channels. If set to users, only the users specified in the |
mentioned_user_ids[] | array of strings | Specifies an array of one or more IDs of the users who get a notification of the message. |
mark_as_read | boolean | Determines whether to mark the message as read for the sender. If set to false, the sender's |
sorted_metaarray | array of objects | Specifies an array of one or more |
created_at | long | Specifies the time when the message was sent in Unix milliseconds |
dedup_id | string | Specifies a unique ID for the message created by another system. In general, this property is used to prevent the same message data from getting inserted when migrating messages from another system to Sendbird server. If specified, the server checks for duplicates using the property value. |
reply_to_channel | boolean | Determines whether to send the message as a reply to the channel. (Default: false) |
Properties
Required | Type | Description |
---|---|---|
message_type | string | Specifies the type of the message. The value of FILE represents a file message. |
user_id | string | Specifies the user ID of the sender. |
parent_message_id | long | Specifies the unique ID of a message to add a reply to. |
| long | (Deprecated) Reserved value. This must be the same as |
file | string | Depending on the file upload method, this specifies the data of the file to upload to Sendbird server either in raw binary format or by the file's location. When sending a request containing a file, you must change the value of the |
url | string | Specifies the URL of the file hosted on the server of your own or other third-party companies. If this |
Optional | Type | Description |
---|---|---|
file_name | string | If the |
file_size | int | If the |
file_type | string | If the |
thumbnails[] | array of strings | Specifies an array of one or more URLs of external thumbnail images that are generated from the image specified by the |
custom_type | string | Specifies a custom message type used for message grouping. The length is limited to 128 characters. |
data | string | Specifies additional message information regarding the file in |
require_auth | boolean | Determines whether the files and thumbnail images in a message are only accessible by users who are in the same channel. This property is only effective when using the share encrypted files feature. This feature encrypts any type of uploaded files and the automatically-generated thumbnail images with |
send_push | boolean | Determines whether to send a push notification of the message to the channel members. This property only applies to group channels. |
mention_type | string | Specifies the mentioning method that indicates which user gets a notification of the message. Acceptable values are users and channels. If set to users, only the users specified in the |
mentioned_user_ids[] | array of strings | Specifies an array of one or more IDs of the users who get a notification of the message. |
mark_as_read | boolean | Determines whether to mark the message as read for the sender. If set to false, the sender's |
sorted_metaarray | array of objects | Specifies an array of one or more |
created_at | long | Specifies the time when the message was sent in Unix milliseconds |
dedup_id | string | Specifies the unique message ID created by another system. In general, this property is used to prevent the same message data from getting inserted when migrating messages from another system to Sendbird server. If specified, the server checks for duplicates using the property value. |
reply_to_channel | boolean | Determines whether to send the message as a reply to the channel. (Default: false) |
If successful, this action returns a message resource in the response body.
In the case of an error, an error object is returned. A detailed list of error codes is available here.