Model: Message

Back to overview

Model Fields

Field Description Type Optional Nullable Default
type

The message type

Allowed values: "text", "image", "video", "audio", "file", "location", "contact", "status", "voipStatus", "ballot"

String False False
id

The message id

String False False
body

The message body

String True False
thumbnail

The message thumbnail

Map<Thumbnail> True False
date

The message's date (last modification) as a unix timestamp in seconds

Integer True False
events

A list of message events

Array<MessageEvent> True False
sortKey

A number used for sorting messages, higher means newer, may not be negative

Integer False False
partnerId

The identity of the sender of this message

String True False
isOutbox

Whether this message was sent by the user

Boolean False False
isStatus

Whether this is a status message

Boolean False False
statusType

The status message type

Allowed values: "text", "firstUnreadMessage"

String True False
caption

The message caption

String True False
unread

Whether this message is unread

Boolean True False False
state

The message state

  • "pending": Message created and stored in the app's database. No attempt to deliver the message to the chat server has been made, yet.
  • "sending": Message created and stored in the app's database. The app now attempts to deliver the message to the chat server.
  • "send-failed": The message could not be delivered to the server. User action is required for retrying.
  • "sent": Associated blobs have been uploaded and the message has been delivered to the chat server.
  • "delivered": The messsage has been received by the recipient.
  • "read": Message has been read by the recipient.
  • "user-ack": Message has been acknowledged by the recipient.
  • "user-dec": Message has been declined by the recipient.

Allowed values: "pending", "sending", "send-failed", "sent", "delivered", "read", "user-ack", "user-dec"

String True False
lastEditedAt

Unix timestamp in milliseconds of the last edit, or undefined if this message was not edited

Integer True False
quote

The message quote

Map<Quote> True False
file

The file info

Map<File> True False
video

The video info

Map<Video> True False
audio

The audio info

Map<Audio> True False
location

The location info

Map<Location> True False
voip

The voip status info

Map<VoIP> True False