Newer Version Available
Post a Feed Element and Include Files from Salesforce
- 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.
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 includes a files property that is a Files Capability Input request body. The Files Capability Input request body includes an items property that is a collection of File ID Input request bodies.
- Request body example
-
1{ 2 "body":{ 3 "messageSegments":[ 4 { 5 "type":"Text", 6 "text":"Please take a look at these files." 7 } 8 ] 9 }, 10 "capabilities":{ 11 "files":{ 12 "items": [ 13 {"id": "069D00000001IOh"}, 14 {"id": "069D00000002IOg"} 15 ] 16 } 17 }, 18 "subjectId":"me", 19 "feedElementType":"FeedItem" 20} - Returns
- Feed Item