User Messages, General

Get private messages for the context user. Search across private messages and post a private message.

To get all private conversations for the context user, see User Conversations, General.

Private messages and direct messages are different features. Direct messages are newer and offer a richer feature set for private communication in Experience Cloud sites. Direct messages are a capability within Chatter feeds. To work with direct messages, see Feed Elements, Post and Search.

Resource
/chatter/users/userId/messages
/connect/communities/communityId/chatter/users/userId/messages

userId must be the ID of the context user or the alias me.

Note

Available since version
23.0
Requires Chatter
Yes
HTTP methods
GET, HEAD, POST
Request parameters for GET
Parameter Name Type Required or Optional Description Available Version
page String Optional A page token that indicates where retrieval begins. Get this token from the NextPageUrl property in the response body. 23.0
pageSize Integer Optional Specifies the number of items per page. Valid values are from 1 through 100. If you don't specify a size, the default is 25. 23.0
q String Optional Specifies the string to search. The search string must contain at least two characters, not including any wildcards. For more information about wildcards, see Wildcards. This parameter is optional.

The query parameter only searches message text bodies, not user names, titles, and so on.

Note

24.0
Response body for GET
Message Collection
Request body for POST
Root XML tag
<message>
Properties
Name Type Description Available Version
body String Text of the message body 23.0
inReplyTo String ID of an existing message that identifies which conversation this message is part of. Specify either recipients or inReplyTo. Specify one or the other, not both. 23.0
recipients User Recipient List Input List of users who are the intended message recipients, up to 9. Comma-separated list of user IDs. Specify either recipients or inReplyTo. Specify one or the other, not both. 23.0
Example XML format:
<message>
   <body>Text of the message</body>
   <recipients>
      <recipient>userID</recipient>
      <recipient>userID</recipient>
   </recipients>
   <inReplyTo>messageID</inReplyTo>
</message>
Example JSON format:
{
   "body": "Text of the message",
   "recipients": ["userID","userID"],
   "inReplyTo": "messageID"
}
Request parameters for POST
Parameter Name Type Required or Optional Description Available Version
inReplyTo String Specify either recipients or inReplyTo. You cannot specify both. ID of an existing message that identifies which conversation this message is part of 23.0
recipients String Specify either recipients or inReplyTo. You cannot specify both. List of users who are the intended message recipients, up to 9. Comma-separated list of user IDs. 23.0
text String Required The text of the message, up to 10,000 characters 23.0
Response body for POST
Message