Newer Version Available

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

Post a Comment and Include a File from Salesforce

This example posts a comment with a file that has already been uploaded to Salesforce. To upload a new file, see Uploading Binary Files.

Resource
/chatter/feed-elements/feedElementId/capabilities/comments/items
HTTP method
POST
Request body
Comment Input

This Comment 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 Comment Input request body also includes a capabilities property that is a Comment Capabilities Input request body. In this example, the Comment Capabilities Input includes a content property that is a Content Capability Input request body.

Request parameter
text
Request body example
Returns
Comment