ConnectApi.FeedItemInput

Used to create rich feed items, for example, feed items that include @mentions or files.

Subclass of ConnectApi.FeedElementInput as of version 31.0.

PropertyTypeDescriptionRequired or OptionalAvailable Version
attachmentConnectApi.​Feed​Item​Attachment​​InputSpecifies the attachment for the feed item. The feed item type is inferred based on the provided attachment. Important: As of API version 32.0, use the inherited capabilities property.Optional28.0–31.0
bodyConnectApi.​Message​​Body​InputMessage body. The body can contain up to 10,000 characters and 25 mentions. Because the character limit can change, clients should make a describeSObjects() call on the FeedItem or FeedComment object and look at the length of the Body or CommentBody field to determine the maximum number of allowed characters.
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, use updateFeedElement(communityId, feedElementId, feedElement). Editing feed posts is supported in version 34.0 and later.
Required unless the feed item has a link capability or a content capability.28.0
isBookmarked​​ByCurrentUserBooleanSpecifies if the new feed item should be bookmarked for the user (true) or not (false). Important: As of API version 32.0, use the capabilities.bookmarks.isBookmarkedByCurrentUser property.Optional28.0–31.0
original​FeedElementIdStringTo share a feed element, specify its 18-character ID. Important: As of API version 39.0, use the capabilities.feedEntity​Share.feedEntityId property.Optional31.0–38.0
original​FeedItemIdStringTo share a feed item, specify its 18-character ID. Important: 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.Optional28.0–31.0
visibilityConnectApi.​FeedItem​VisibilityType EnumType of users who can see a feed item.
  • AllUsers—Visibility is not limited to internal users.
  • InternalUsers—Visibility is limited to internal users.

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.
Optional28.0