Newer Version Available

This content describes an older version of this product. View Latest

Share a Feed Item

Resource
/chatter/feed-elements
HTTP method
POST
Request body
Feed Item Input

This Feed Item Input request body includes a body property that is a Message Body Input request body. In this example, the Message Body Input request body includes a messageSegments property that has one Message Segment Input: Text request body and one Message Segment Input: Mention request body.

This Feed Item Input request body also includes a capabilities property that is a Feed Element Capabilities Input request body. In this example, the Feed Element Capabilities Input request body includes a feedEntityShare property that is a Feed Entity Share Capability Input request body.

Request body example
1{ 
2   "body" : {
3      "messageSegments" : [
4         {
5            "type" : "Text",
6            "text" : "When should we meet for release planning? "
7         },
8         {   
9            "type" : "Mention",
10            "id" : "005D00000016Qxp"
11         }]
12       },
13   "capabilities" : {
14      "feedEntityShare" : {
15         "feedEntityId" : "0D5B000000Py41t"
16         }
17      },
18   "feedElementType" : "FeedItem",
19   "subjectId" : "0F9B000000000W2"
20}
Request parameters

The originalFeedElementId request parameter isn’t supported in version 39.0 and later. Use the request body to share a feed item in version 39.0 and later.

Note

originalFeedElementId, subjectId
Request parameter example
1/services/data/v38.0/chatter/feed-elements?originalFeedElementId=0D5D0000000DaZBKA0&subjectId=me
Returns
Feed Item