Newer Version Available
Feed Element
Access, edit, or delete a feed element. Feed items are the only type of feed element that can be
edited.
- Resource
-
1/chatter/feed-elements/feedElementId1/connect/communities/communityId/chatter/feed-elements/feedElementId - Available version
- 31.0
- Requires Chatter
- Yes
- HTTP methods
- GET, DELETE, PATCH
PATCH is supported in version 34.0 and later to edit a comment’s body. PATCH can’t be used to update a comment’s capabilities.
- Request parameters for GET
-
Parameter Name Type Description Required or Optional Available Version commentSort String Order of comments. Values are: - CreatedDateLatestAsc—Sorts by most recently created comments in ascending order.
- CreatedDateOldestAsc—Sorts by oldest comments in ascending order.
- Relevance—Sorts by most relevant content.
Sorting in descending order isn’t supported.
Optional 41.0 elementsPerBundle Integer Maximum number of feed elements per bundle. The default and maximum value is 10. Optional 31.0 recentCommentCount Integer Maximum number of comments to return with each feed element. The default value is 3. Optional 31.0 threadedCommentsCollapsed Boolean Specifies whether to return threaded comments in a collapsed style (true) or not (false). If you don’t specify, the default is false. Optional 44.0 - Response body for GET
- Generic Feed Element or Feed Item
- Request body for PATCH
- Feed Item Input
- Response body for PATCH
- Feed Item
- Example for editing a feed post using the request body
-
1{ 2 "body":{ 3 "messageSegments":[ 4 { 5 "type":"Text", 6 "text":"Check out the latest API documentation on developer.salesforce.com." 7 } 8 ] 9 } 10} - Example for editing a question title and post
-
1{ 2 "body":{ 3 "messageSegments":[ 4 { 5 "type":"Text", 6 "text":"The latest public versions are on developer.salesforce.com." 7 } 8 ] 9 }, 10 "capabilities":{ 11 "questionAndAnswers" : { 12 "questionTitle" : "Where can I find API documentation" 13 } 14 } 15} - Example for moving a feed post from one public group to another
-
1{ 2 "subjectId": "0F9xx00000000CM" 3} - Response body for DELETE
- 204: Successful Delete