List Messages
Retrieve all chat messages within a particular dialog.
Recipes
Filter messages by word
Filter messages by word
1. Set the ID of the dialog
chat_dialog_id to refer to a specific dialog.2. Set a search operator for a field
ctn operator is applied to a message field with the guys value.3. As a result, the API will return messages satisfying the specified criteria.
Filter and sort messages
Filter and sort messages
1. Set the ID of the dialog
chat_dialog_id to refer to a specific dialog.2. Set a search operator for a field
lt operator is applied to a date_sent field.3. Set a sort operator for a field
sort_desc operator is applied to the date_sent field.4. As a result, the API returns messages filtered and sorted upon the request.
Get message by its ID
Get message by its ID
1. Set the ID of the dialog
chat_dialog_id to refer to a specific dialog.2. Set the ID of the message
_id parameter to refer to a particular message.3. As a result, the API returns a specified message.
Get message by its ID with API key
Get message by its ID with API key
1. Use 'Authorization' header to pass API key
2. Use 'On-Behalf-Of' header to pass user id
3. Set the ID of the dialog
chat_dialog_id to refer to a specific dialog.4. Set the ID of the message
_id parameter to refer to a particular message.5. As a result, the API returns a specified message.
Filter messages by word with API key
Filter messages by word with API key
1. Use 'Authorization' header to pass API key
2. Use 'On-Behalf-Of' header to pass user id
3. Set the ID of the dialog
chat_dialog_id to refer to a specific dialog.4. Set a search operator for a field
ctn operator is applied to a message field with the guys value.5. As a result, the API will return messages satisfying the specified criteria.
Filter and sort messages with API key
Filter and sort messages with API key
1. Use 'Authorization' header to pass API key
2. Use 'On-Behalf-Of' header to pass user id
3. Set the ID of the dialog
chat_dialog_id to refer to a specific dialog.4. Set a search operator for a field
lt operator is applied to a date_sent field.5. Set a sort operator for a field
sort_desc operator is applied to the date_sent field.6. As a result, the API returns messages filtered and sorted upon the request.
Messages will be marked in 2 cases:
- if the current user ID is in
occupants_idsfield fortype=2(GROUP) dialog; - if dialog’s
type=1(PUBLIC) dialog.
Query Parameters
mark_as_read=1 to perform. As a result, when the message is retreived by the opponent, the opponent ID is added to the array of read_ids field. Works only if the message had the unread status previously, not backwards. You can update message status using the Update Message request. Headers
ApiKey {your_api_key}. Must be used either QB-Token or Authorization.Responses
403
403
404
404