/
v3.0.11Get access

getUserMessages

Returns the list of messages for the current user. It includes inbox messages with subject, body, date, read status, and whether each message can be deleted. It is used to show the user’s inbox and message details, and to support marking messages as read and deleting them.

Request parameters:

Name
DescriptionTypeValuesDefault
type
0 – Incoming messages 1 – Outgoing messagesstringUser Message Types-
messageId
The ID of a specific messagenumber--
from
Unix timestamp (milliseconds) for filtering messages from a specific datenumber--
to
Unix timestamp (milliseconds) for filtering messages to a specific datenumber--
category
This field keeps filtration for internal messages, Now available 'internal' type of this parameterstring-User Message Categories

Call example:

getUserMessages({
  type: 1,
  fromDate: 1717000000,
  toDate: 1719000000
})

Response examples:

{
  hasError: false,
  errorDetails: {
    key: '',
    message: ''
  },
  data: [{
    body: '<p><font face=Roboto, sans-serif style=box-sizing:border-box;><font size=4>Hello  Julia,</font>',
    checked: 1,
    date: 1773353033,
    id: 4387705177,
    subject: '€4 CopyCredits just for you – Opt in today!',
    is_deletable: true
  }]
}

Response parameters:

NameDescriptionTypeValues
messages
List of user messages array-
└─ body
Message body (HTML) string-
└─ checked
Read status Possible values - 0: unread, 1: readnumber0 / 1
└─ date
Message timestamp (Unix) number-
└─ id
Message identifier number-
└─ subject
Message subject string-
└─ is_deletable
Whether the message can be deleted booleantrue / false