MessageClient reference
Complete reference for the MessageClient in the Knock JavaScript SDK.
Client for interacting with message operations in the Knock API.
Constructor#
Initializes a new message client instance.
Parameters:
Returns: MessageClient
Methods#
get
#Retrieves a specific message by its ID.
Parameters:
Returns: Promise<Message>
Example:
updateStatus
#Updates the engagement status of a message. For the "interacted" status, additional metadata can be provided.
Parameters:
Returns: Promise<Message>
Example:
removeStatus
#Removes an engagement status from a message. Note: Cannot remove "interacted" status.
Parameters:
Returns: Promise<Message>
Example:
batchUpdateStatuses
#Updates the engagement status of multiple messages in a single request.
Parameters:
Returns: Promise<Message[]>
Example:
bulkUpdateAllStatusesInChannel
#Updates the engagement status of all messages in a specific channel.
Parameters:
Returns: Promise<BulkOperation>
Example: