Feed Item Input

Feed item input.
Root XML tag
<feedItem>
JSON
The following example attaches a poll to a feed item:
{
   "body":{
      "messageSegments":[
         {
            "type":"Text",
            "text":"When should we meet for release planning?"
         }
      ]
   },
   "capabilities":{
      "poll":{
         "choices":[
            "Monday",
            "Tuesday"
         ]
      }
   },
   "feedElementType":"FeedItem",
   "subjectId":"me"
}
Properties
Name Type Description Required or Optional Available Version
attachment Depends on type. You can specify only one of these values in the attachment parameter. Values are:

As of API version 32.0, use the capabilities property.

Important

Optional
body Message Body Input Description of message body. Feed item and comment bodies have a 10,000 character limit. Because this limit can change, we recommend that clients make a describeSObjects() call on the FeedItem or FeedComment object. To determine the maximum number of allowed characters, look at the length of the Body or CommentBody field. The body can contain up to 25 mentions.

If you specify originalFeedElementId to share a feed item, use the body property to add the first comment to the feed item.

To edit this property in a feed item, make a PATCH request to /chatter/feed-elements​/feedElementId. Editing feed posts is supported in version 34.0 and later.

Required unless the feed item has a content capability or a link capability 23.0
capabilities Feed Element Capabilities Input The capabilities that define the behavior of this feed element. Optional 31.0
isBookmarked​ByCurrentUser Boolean Specifies whether to bookmark the new feed item for the user (true) or not (false). The default value is false.

As of API version 32.0, use the capabilities.bookmarks.​isBookmarkedByCurrentUser property.

Important

Optional 24.0–31.0
feedElementType String The type of feed element this input represents.

The only valid value is FeedItem.

Required when creating a feed item (POST)

Optional when updating a feed item (PATCH)

31.0
originalFeed​ElementId String To share a feed element, specify its 18-character ID.

You can’t share a post and upload a file in the same request body.

Note

In API version 39.0 and later, use the capabilities.feedEntity​Share.feedEntityId property.

Important

Optional 31.0–38.0
originalFeedItemId String To share a feed item, specify its 18-character ID.

In API version 32.0–38.0, use the originalFeedElementId property. In API version 39.0 and later, use the capabilities.feedEntity​Share.feedEntityId property.

Important

Optional 24.0–31.0
subjectId String The ID of the parent this feed element is being posted to. This value can be the ID of a user, group, or record, or the string me to indicate the context user.

In version 45.0 and later, you can move a feed element from one public group to another by setting this property to the ID of the new public group. You can’t include or change any other properties when moving a feed element.

Required 31.0
visibility String Who can see the post. Valid values are:
  • InternalUsers—If digital experiences is enabled, only members of the default, internal site can see the feed item.
  • AllUsers—If digital experiences is enabled, all members of the site can see the feed item.
Default values:
  • For external users, the default value is AllUsers. External users must use this value to see their posts.
  • For internal users, the default value is InternalUsers. Internal users can accept this value or use the value AllUsers to allow external users to see their posts.
If the parent of the feed item is a user, group, or direct message, the visibility of the feed item must be AllUsers.
Optional 26.0