Chatter REST API

Integrate mobile apps, intranet sites, and third-party web applications with Salesforce using Chatter REST API. Include hyperlinks in posts, purge mission activity for users, and take advantage of generally available Next Best Actions.
Note

Note

To create custom Chatter and communities experiences in Salesforce, use ConnectApi (Chatter in Apex): New and Changed Classes and Enums.

New and Changed Chatter REST API Resources

These resources are new or have changes.

Chatter Feeds

Include a hyperlink in a post
Make a POST request to the existing /chatter/feed-elements resource with the updated Message Segment Input: Markup Begin and Message Segment Input: Markup End request bodies.
Include a hyperlink in a comment
Make a POST request to the existing /chatter/feed-elements/feedElementId/capabilities/comments/items resource with the updated Message Segment Input: Markup Begin and Message Segment Input: Markup End request bodies.
Move a post from one public group to another
Make a PATCH request to the existing /chatter/feed-elements/feedElementId resource with the existing Feed Item Input request body. Set the subjectId property of the Feed Item Input request body to the new public group ID.

Missions

Export mission activity for a user
Make a GET request to the new /connect/communities/communityId/missions/users/userId/activities/export-job resource.
Start a job to purge mission activity for a user
Make a POST request to the new /connect/communities/communityId/missions/users/userId/activities/purge-job resource.
Note

Note

POST takes no request parameters nor a request body.

Update the mission activity counts for a user
Make a PATCH request to the new /connect/communities/communityId/missions/users/userId resource with the new User Mission Activity Input request body.

Next Best Actions (Generally Available)

All the Next Best Action resources, including resources introduced in versions 43.0 and 44.0, now have a minimum version of 45.0. All properties of the related request and response bodies also have a minimum version of 45.0.
Get a recommendation
Make a GET request to the new /connect/recommendations/recommendationId resource.
Note

Note

This resource replaces /connect/propositions/propositionId.

Execute a strategy, and request trace information
Make a POST request to the existing /connect/recommendation-strategies/strategyName/recommendations resource with the updated Next Best Action Strategy Input request body or with the new debugTrace parameter set to true.
Get recommendation reactions
Make a GET request to the existing /connect/recommendation-strategies/reactions resource.
Users with the Manage Next Best Action Recommendations or Modify All Data permission can get recommendation reactions.
Get a recommendation reaction
Make a GET request to the new /connect/recommendation-strategies/reactions/reactionId resource.
Users with the Manage Next Best Action Recommendations or Modify All Data permission can get recommendation reactions.
Delete a recommendation reaction
Make a DELETE request to the new /connect/recommendation-strategies/reactions/reactionId resource.
Users with the Manage Next Best Action Recommendations or Modify All Data permission can delete recommendation reactions.

Social Engagement

Get available intents for a social post
Make a GET request to the new /connect/social-engagement/social-posts/socialPostId/intents resource.
Follow a social persona
Make a PUT request to the new /connect/social-engagement/social-persona/socialPersonaId/intents/follow/socialAccountId resource.

socialPersonaId is the ID of the persona to follow, and socialAccountId is the ID of the account that follows the persona.

Make a PUT request to the new /connect/social-engagement/social-posts/socialPostId/intents/follow/socialAccountId resource.

socialPostId is the ID of the post authored by the persona to follow, and socialAccountId is the ID of the account that follows the persona.

Stop following a social persona
Make a DELETE request to the new /connect/social-engagement/social-persona/socialPersonaId/intents/follow/socialAccountId resource.

socialPersonaId is the ID of the persona to stop following, and socialAccountId is the ID of the account that stops following the persona.

Make a DELETE request to the new /connect/social-engagement/social-posts/socialPostId/intents/follow/socialAccountId resource.

socialPostId is the ID of the post authored by the persona to stop following, and socialAccountId is the ID of the account that stops following the persona.

Social Engagement Setup

Get the Social Customer Service configuration
Make a GET request to the new /connect/social-engagement/setup/config resource.
Update the Social Customer Service configuration
Make a PATCH request to the new /connect/social-engagement/setup/config resource with the existing Social Customer Service Configuration request body.

Users

Get and search a user’s groups, and get more detailed group information
Make a GET request to the existing /chatter/users/userId/groups resource. This resource now returns a User Group Detail Collection response body.

New and Changed Chatter REST API Request Bodies

These request bodies are new or have changes.

Chatter Feeds

Message Segment Input: Markup Begin
This request body has these new and changed properties.
  • altText—Alternative text for the Hyperlink segment.
  • markupType—Now supports hyperlink markup.
  • url—URL for the Hyperlink segment. Supported hyperlink URLs start with http:// or https://.
Message Segment Input: Markup End
This request body has this changed property.
  • markupType—Now supports hyperlink markup.

Missions

User Mission Activity Input
This new request body has these properties.
  • activityCount—Number of mission activities of the specified type for the user.
  • activityType—Type of mission activity for a user. Values are:
    • FeedItemAnswerAQuestion—User answered a question.
    • FeedItemLikeSomething—User liked a post or comment.
    • FeedItemMarkAnswerAsBest—User marked an answer as the best answer.
    • FeedItemPostQuestion—User posted a question.
    • FeedItemReceiveAComment—User received a comment on a post.
    • FeedItemReceiveALike—User received a like on a post or comment.
    • FeedItemReceiveAnAnswer—User received an answer to a question.
    • FeedItemWriteAComment—User commented on a post.
    • FeedItemWriteAPost—User made a post.
    • FeedItemYourAnswerMarkedBest—​User’s answer was marked as the best answer.

Next Best Actions (Generally Available)

Next Best Action Strategy Input
This request body has one new property.
  • debugTrace—Specifies whether to return trace and debug information in the response (true) or not (false). If unspecified, the default is false.
Recommendation Reaction Input
This request body was previously named Next Best Action Reaction Input.

Social Engagement Setup

Social Customer Service Configuration Input
This request body has one new property.
  • providerSettings—List of Social Customer Service settings related to the behavior of specific social networks.
Social Customer Service Message Type Settings Input
This new request body has these properties.
  • enable—Specifies whether to send the message type to Social Customer Service (true) or not (false).
  • messageType—Specifies the message type, such as PrivateMessage.
Social Customer Service Provider Settings Input
This new request body has these properties.
  • messageTypeSettings—List of Social Customer Service settings related to the behavior of specific message types.
  • provider—Specifies the social network provider, such as Facebook.

New and Changed Chatter REST API Response Bodies

These response bodies are new or have changes.

Chatter Feeds

Message Segment: Markup Begin
This response body has these new and changed properties.
  • altText—Alternative text for the segment, if available.
  • markupType—Now supports hyperlink markup.
  • url—URL for the segment, if available.
Message Segment: Markup End
This response body has this changed property.
  • markupType—Now supports hyperlink markup.

Communities

Community
This response body has one new property.
  • memberVisibilityEnabled—Specifies whether community members can see other community members (true) or not (false).

Missions

User Mission Activities Job
This new response body has these properties.
  • jobToken—Token that identifies the mission user activities job.
  • jobType—Type of user activities job, either export or purge.
  • message—Message describing the status and expected outcome of the job.
User Mission Activity
This new response body has these properties.
  • activityCount—Number of mission activities of the specified type for the user.
  • activityType—Type of mission activity for a user.
User Mission Activity Collection
This new response body has these properties.
  • community—Community in which the user performed activities.
  • userId—ID of the user.
  • userMissionActivities—List of mission activities performed by the user.
  • userName—Name of the user.
User Mission Activity Status
This new response body has these properties.
  • message—Success or error message.
  • status—Status of mission activity for a user.

Next Best Actions (Generally Available)

Next Best Action Native Recommendation
This response body was previously named Next Best Action Proposition Recommendation.
Next Best Action Recommendation
These properties are removed from this response body.
  • actionReference
  • id
  • name
  • url
Next Best Action Recommendations
This response body has one new property.
  • trace—Trace information for the recommendation strategy execution, if requested.
Recommendation Object
This response body was previously named Proposition.
Recommendation Reaction
This response body was previously named Next Best Action Reaction. It has one new property.
  • url—URL to the recommendation reaction.
Recommendation Reactions
This new response body has these properties.
  • currentPageUrl—URL to the current page of reactions in the collection.
  • nextPageUrl—URL to the next page of reactions in the collection.
  • reactions—Collection of recommendation reactions.
Strategy Trace
This new response body has these properties.
  • messages—Messages and errors from the strategy execution.
  • nodes—Nodes of the strategy execution used for debugging.
Strategy Trace Node
This new response body has these properties.
  • inputCount—Number of items put into the node.
  • messages—Messages that occurred during node execution.
  • nodeName—Name of the node.
  • nodeTime—Time spent processing inside the node.
  • nodeType—Type of node.
  • outputCount—Number of items returned from the node.
  • outputs—Recommendations that are returned from the node.
  • totalTime—Total time spent processing.

Social Engagement

Approval Social Post Intent
This new response body has this property.
  • isRecallable—Specifies whether the social post can be recalled (true) or not (false).
Delete Intent
This new response body has this property.
  • managedSocialAccount—Managed social account that deletes the social post.
Delete Social Post Intents
This new response body has this property.
  • deletes—List of delete intents for the social post.
Follow Social Persona Intent
This new response body has these properties.
  • managedSocialAccount—Managed social account that follows the social persona.
  • socialPersonaId—ID of the social persona to follow.
Follow Social Persona Intents
This new response body has this property.
  • follows—List of follow intents for the social persona.
Hide Social Post Intent
This new response body has these properties.
  • isHidden—Specifies whether the managed social account hid the social post (true) or not (false).
  • managedSocialAccount—Managed social account that hides the social post.
Like Intent
This new response body has these properties.
  • isLiked—Specifies whether the managed social account liked the social post (true) or not (false).
  • managedSocialAccount—Managed social account that likes the social post.
Like Social Post Intents
This new response body has this property.
  • likes—List of like intents for the social post.
Reply Social Post Intent
This new response body has this property.
  • managedSocialAccount—Managed social account that replies to the social post.
Reply Social Post Intents
This new response body has this property.
  • replies—List of reply intents for the social post.
Social Post Intents
This new response body has these properties.
  • approvalIntent—Approval intent for the social post.
  • deleteIntent—Delete intents for the social post.
  • followIntent—Follow intents for the social persona.
  • hideIntent—Hide intent for the social post.
  • likeIntent—Like intents for the social post.
  • replyIntent—Reply intents for the social post.

Social Engagement Setup

Social Customer Service Configuration
This request body has one new property.
  • providerSettings—List of Social Customer Service settings related to the behavior of specific social networks.
Social Customer Service Message Type Settings
This new request body has these properties.
  • enable—Specifies whether the message type is sent to Social Customer Service (true) or not (false).
  • messageType—Specifies the message type, such as PrivateMessage.
Social Customer Service Provider Settings
This new request body has these properties.
  • messageTypeSettings—List of Social Customer Service settings related to the behavior of specific message types.
  • provider—Specifies the social network provider, such as Facebook.

Users

User Group Detail Collection
This new response body has these properties.
  • currentPageUrl—URL to the current page.
  • groups—Collection of groups that the user is a member of.
  • nextPageUrl—URL to the next page, or null if there is no next page.
  • previousPageUrl—URL to the previous page, or null if there is no previous page.
  • total—Total number of groups that the user is a member of.