---
schema_version: "1"
id: 532f8f06e99c1fef8deecedebb84d60e36e19f9f3abf379af41abcdf25ca6dc0
title: Post a Feed Element
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexcode/connectapi_examples_post_feed_element.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/connectapi_examples_post_feed_element.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: e08df1bcc0c1ca62683fd46d09c6a7978721d27d4b201d875c5d7f797a90e9e4
description: Make a call to post a feed element.
---
# Post a Feed Element

Make a call to post a feed element.

Call [postFeedElement(communityId, subjectId, feedElementType, text)](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexref.meta/apexref/apex_ConnectAPI_ChatterFeeds_static_methods.htm#apex_ConnectAPI_ChatterFeeds_postFeedElement_1) to post a string of text.

ConnectApi.FeedElement feedElement = ConnectApi.ChatterFeeds.postFeedElement(Network.getNetworkId(), '0F9d0000000TreH', ConnectApi.FeedElementType.FeedItem, 'On vacation this week.');

The second parameter, subjectId is the ID of the parent this feed element is posted to. The value can be the ID of a user, group, or record, or the string me to indicate the context user.