Chatter REST API

Integrate mobile apps, intranet sites, and third-party web applications with Salesforce using Chatter REST API. Create and publish communities, get mission activity progress for a user, and do more with social posts.
Note

Note

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

New and Changed Chatter REST API Resources

These resources are new or have changes.

Communities

Create a community
Make a POST request to the existing /connect/communities resource with the new Community Input request body.
Publish a community
Make a POST request to the new /connect/communities/communityId/publish resource.
Note

Note

POST takes no request parameters nor a request body.

Get the community templates available to the context user
Make a GET request to the new /connect/communities/templates resource.

Files

Set the master label and developer name when creating an asset file
Make a POST request to the existing /connect/files/fileId/asset resource with the new optional assetLabel and developerName parameters.

Missions

Get mission activity progress for a user
Make a GET request to the new /connect/communities/communityId/missions/users/userId/progress resource.

Social Engagement

Approve or reject the publishing of up to 200 of social posts
Make a PATCH request to the new /connect/social-engagement/social-posts/intents/approvals resource with the new Social Post Mass Approval Input request body.
Delete a social post from its social network
Note

Note

Deleting a social post from its social network doesn’t delete the record from Salesforce.

Make a PUT request to the new /connect/social-engagement/social-posts/socialPostId/intents/deletes/socialAccountId resource.
Like a social post
Make a PUT request to the new /connect/social-engagement/social-posts/socialPostId/intents/likes/socialAccountId resource.
Unlike a social post
Make a DELETE request to the new /connect/social-engagement/social-posts/socialPostId/intents/likes/socialAccountId resource.
Hide a social post
Make a PUT request to the new /connect/social-engagement/social-posts/socialPostId/intents/hide/socialAccountId resource.
Unhide a social post
Make a DELETE request to the new /connect/social-engagement/social-posts/socialPostId/intents/hide/socialAccountId resource.
Recall an approval request to publish a social post
Make a DELETE request to the new /connect/social-engagement/social-posts/socialPostId/intents/approval resource.
Get the follow relationship between a managed social account and a social persona
Make a GET request to the new /connect/social-engagement/managed-social-accounts/id/relationships/socialPersonaId resource.

New and Changed Chatter REST API Request Bodies

These request bodies are new or have changes.

Communities

Community Input
This new request body has these properties.
  • description—Description of the community.
  • name—Name of the community.
  • templateName—Name of the template for the community.
  • urlPathPrefix—URL prefix for the community.

Next Best Actions

Recommendation Reaction Input
This request body has this new property.
  • externalId—External ID of the recommendation. This ID doesn’t need to be a Salesforce 18-character ID. For example, it can be a product number from an external system.

Social Engagement

Social Post Mass Approval Input
This new request body has these properties.
  • isApproved—Specifies whether to approve (true) or reject (false) publishing the social posts.
  • socialPostIdList—A list of up to 200 social post IDs.

New and Changed Chatter REST API Response Bodies

These response bodies are new or have changes.

Communities

Community
This response body has this new property.
  • templateName—Name of the community’s template.
Community Create
This new response body has these properties.
  • message—Message saying that create is in progress.
  • name—Name of the community.
Community Publish
This new response body has these properties.
  • id—ID of the community.
  • message—Message describing the result of publishing the community.
  • name—Name of the community.
  • url—URL to the community.
Community Template
This new response body has these properties.
  • publisher—Name of the publisher of the community’s template.
  • templateName—Name of the community’s template.
Community Template Collection
This new response body has these properties.
  • templates—List of community templates.
  • total—Total count of community templates.

Files

File Detail
This response body has this new property.
  • isFileAsset—Specifies whether the file is an asset.
File Summary
This response body has this new property.
  • isFileAsset—Specifies whether the file is an asset.

Missions

User Mission
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. 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.
  • missionName—Name of the mission.
  • missionThreshold—Threshold of the mission. When a user reaches this activity count, the mission is achieved.

Next Best Actions

Next Best Action Recommendation
This response body has this new property.
  • externalId—External ID of the recommendation. This ID doesn’t need to be a Salesforce 18-character ID. For example, it can be a product number from an external system.
Recommendation Object
This response body has this new property.
  • externalId—External ID of the recommendation. This ID doesn’t need to be a Salesforce 18-character ID. For example, it can be a product number from an external system.
Recommendation Reaction
This response body has this new property.
  • externalId—External target ID of the recommendation reacted on. This ID doesn’t need to be a Salesforce 18-character ID. For example, it can be a product number from an external system.

Social Engagement

Delete Social Post Intent
This new response body has these properties.
  • socialAccountId—ID of the social account that deletes the social post.
  • socialPostId—ID of the social post to delete.
Like Social Post Intent
This new response body has these properties.
  • socialAccountId—ID of the social account that likes the social post.
  • socialPostId—ID of the social post to like.
Social Account Relationship
This new response body has these properties.
  • isFollowed—Specifies whether the social account is followed by the social persona.
  • isFollowing—Specifies whether the social account is following the social persona.
  • socialAccountId—ID of the social account.
  • socialPersonaId—ID of the social persona.
Social Post Mass Approval
This new response body has this property.
  • isApproved—Specifies whether the social posts were approved (true) or rejected (false) for publishing.