Reply to a message
This action replies to a specific message in a channel. You can only reply to text and file messages, not admin messages.
Sending reply messages works much like sending regular messages to a channel except replies require an additional parent_message_id
property.
HTTP request
Parameters
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 |
channel_url | string | Specifies the URL of the target channel. |
Request body
The following tables list the properties of an HTTP request that this action supports for a text message, file message, multiple file message, and admin message.
List of properties for text message
Properties
Required | Type | Description |
---|---|---|
message_type | string | Specifies the type of the message. The value of |
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. This property serves as a container for a long text of any type of characters which can also be a JSON-formatted string like |
send_push | boolean | Determines whether to send a push notification of the message to the channel members. This property only applies to group channels. |
push_message_template | string or object | Specifies the content of a push notification customized for the message. This property only applies to group channels. |
push_message_template.title | string | Specifies the title of the custom push notification template. You can customize the title using the variables |
push_message_template.body | string | Specifies the body of the custom push notification template. You can customize the body using the variables |
mention_type | string | Specifies the mentioning method that indicates which user gets a notification of the message. Acceptable values are |
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 |
sorted_metaarray | array of objects | Specifies an array of JSON objects consisting of key-values items that store additional message information to be used for classification and filtering. Items are saved and returned in the exact order they've been specified. More details on what can be stored in this field are available here. |
created_at | long | Specifies the time when the message was sent in Unix milliseconds format. This property can be used when migrating messages from another system to the Sendbird server. If specified, the server sets the time of message creation as the property value. |
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 the Sendbird server. If specified, the server performs a duplicate check using the property value. |
reply_to_channel | boolean | Determines whether to send the message as a reply to the channel. (Default: |
List of properties for file message
Properties
Required | Type | Description |
---|---|---|
message_type | string | Specifies the type of the message. The value of |
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. |
file | string | When sending a single file with a message, specifies the data of the file to upload to the Sendbird server in raw binary format. When sending a request containing a file, change the value of the |
files | array of objects | When sending a single file through its URL or sending multiple files, specifies the data of files to upload to the Sendbird server either in raw binary format or by their location. When sending a request containing files, change the value of the |
| long | (Deprecated) Reserved value. This must be the same as |
| string | (Deprecated) 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 or objects | If the |
thumbnail1 | string | If 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. This property serves as a container for a long text of any type of characters which can also be a JSON-formatted string like |
require_auth | boolean | Determines whether to require an authentication key to verify if the file is being properly accessed. Only the user who uploaded the file or users who are in the channel where the file was uploaded should have access. The authentication key managed internally by the Sendbird system is generated every time a user logs in to the Sendbird server and is valid for three days starting from the last login. If set to |
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 |
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 |
sorted_metaarray | array of objects | Specifies an array of JSON objects consisting of key-values items that store additional message information to be used for classification and filtering. Items are saved and returned in the exact order they've been specified. More details on what can be stored in this field are available here. |
created_at | long | Specifies the time when the message was sent in Unix milliseconds format. This property can be used when migrating messages from another system to the Sendbird server. If specified, the server sets the time of message creation as the property value. |
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 the Sendbird server. If specified, the server performs a duplicate check using the property value. |
reply_to_channel | boolean | Determines whether to send the message as a reply to the channel. (Default: |
Response
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.