Feed Elements, Post and Search
POST {{_endpoint}}/services/data/v{{version}}/chatter/feed-elements
Request Body
{"body"=>{"messageSegments"=>[{"type"=>"Text", "text"=>"Chatter Feed Item Created via API: "}, {"markupType"=>"Paragraph", "type"=>"MarkupBegin"}, {"markupType"=>"Bold", "type"=>"MarkupBegin"}, {"text"=>"First line of text.", "type"=>"Text"}, {"markupType"=>"Bold", "type"=>"MarkupEnd"}, {"markupType"=>"Paragraph", "type"=>"MarkupEnd"}, {"markupType"=>"Paragraph", "type"=>"MarkupBegin"}, {"text"=>" ", "type"=>"Text"}, {"markupType"=>"Paragraph", "type"=>"MarkupEnd"}, {"markupType"=>"Paragraph", "type"=>"MarkupBegin"}, {"text"=>"Second line of text.", "type"=>"Text"}, {"markupType"=>"Paragraph", "type"=>"MarkupEnd"}, {"markupType"=>"Code", "type"=>"MarkupBegin"}, {"text"=>"<script>\nvar i, t = 0;\nfor (i = 0; i < 5; i++) {\n t += i;\n}\n</script>", "type"=>"Text"}, {"markupType"=>"Code", "type"=>"MarkupEnd"}, {"type"=>"Mention", "id"=>"<USER_GROUP_ID>"}]}, "capabilities"=>{"files"=>{"items"=>[{"id"=>"<FILE_ID>"}]}}, "subjectId"=>"<USER_RECORD_GROUP_ID>", "feedElementType"=>"FeedItem"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: Created
{"actor":{"additionalLabel":null,"communityNickname":"User1696423780773910041","companyName":"Salesforce","displayName":"Name","firstName":"Firstname","id":"005...","isActive":true,"isInThisCommunity":true,"lastName":"Name","motif":{"color":"1B96FF","largeIconUrl":"/img/icon/profile64.png","mediumIconUrl":"/img/icon/profile32.png","smallIconUrl":"/img/icon/profile16.png","svgIconUrl":null},"mySubscription":null,"name":"Name","outOfOffice":{"message":""},"photo":{"fullEmailPhotoUrl":"https://\u003cmy_domain\u003e/ncsphoto/1wsMlOd3tVC7boygqBO8wMT9KzA0D6tqzpbs-Uw0IogXzXAXaYKJnuWCNQmXymRq?fromEmail=1","largePhotoUrl":"https://\u003cmy_domain\u003e/profilephoto/729.../F","mediumPhotoUrl":"https://\u003cmy_domain\u003e/profilephoto/729.../M","photoVersionId":"729...","smallPhotoUrl":"https://\u003cmy_domain\u003e/profilephoto/729.../T","standardEmailPhotoUrl":"https://\u003cmy_domain\u003e/ncsphoto/1wsMlOd3tVC7boygqBO8wMT9KzA0D6tqzpbs-Uw0Ioi-dtynkoFWsl46as__TDFU?fromEmail=1","url":"/services/data/v58.0/connect/user-profiles/005.../photo"},"reputation":null,"title":null,"type":"User","url":"/services/data/v58.0/chatter/users/005...","userType":"Internal"},"body":{"isRichText":true,"messageSegments":[{"text":"Chatter Feed Item Created via API: ","type":"Text"},{"altText":null,"htmlTag":"p","markupType":"Paragraph","text":"","type":"MarkupBegin","url":null},{"altText":null,"htmlTag":"b","markupType":"Bold","text":"","type":"MarkupBegin","url":null},{"text":"First line of text.","type":"Text"},{"htmlTag":"b","markupType":"Bold","text":"","type":"MarkupEnd"},{"htmlTag":"p","markupType":"Paragraph","text":"\n","type":"MarkupEnd"},{"altText":null,"htmlTag":"p","markupType":"Paragraph","text":"","type":"MarkupBegin","url":null},{"text":" ","type":"Text"},{"htmlTag":"p","markupType":"Paragraph","text":"\n","type":"MarkupEnd"},{"altText":null,"htmlTag":"p","markupType":"Paragraph","text":"","type":"MarkupBegin","url":null},{"text":"Second line of text.","type":"Text"},{"htmlTag":"p","markupType":"Paragraph","text":"\n","type":"MarkupEnd"},{"altText":null,"htmlTag":"code","markupType":"Code","text":"[Start code block]\n","type":"MarkupBegin","url":null},{"text":"\u0026lt;script\u0026gt;\nvar i, t = 0;\nfor (i = 0; i \u0026lt; 5; i++) {\n t += i;\n}\n\u0026lt;/script\u0026gt;","type":"Text"},{"htmlTag":"code","markupType":"Code","text":"\n[End code block]","type":"MarkupEnd"},{"accessible":true,"name":"Name","record":{"additionalLabel":null,"communityNickname":"User1696423780773910041","companyName":"Salesforce","displayName":"Name","firstName":"Firstname","id":"005...","isActive":true,"isInThisCommunity":true,"lastName":"Name","motif":{"color":"1B96FF","largeIconUrl":"/img/icon/profile64.png","mediumIconUrl":"/img/icon/profile32.png","smallIconUrl":"/img/icon/profile16.png","svgIconUrl":null},"mySubscription":null,"name":"Name","outOfOffice":{"message":""},"photo":{"fullEmailPhotoUrl":"https://\u003cmy_domain\u003e/ncsphoto/1wsMlOd3tVC7boygqBO8wMT9KzA0D6tqzpbs-Uw0IogXzXAXaYKJnuWCNQmXymRq?fromEmail=1","largePhotoUrl":"https://\u003cmy_domain\u003e/profilephoto/729.../F","mediumPhotoUrl":"https://\u003cmy_domain\u003e/profilephoto/729.../M","photoVersionId":"729...","smallPhotoUrl":"https://\u003cmy_domain\u003e/profilephoto/729.../T","standardEmailPhotoUrl":"https://\u003cmy_domain\u003e/ncsphoto/1wsMlOd3tVC7boygqBO8wMT9KzA0D6tqzpbs-Uw0Ioi-dtynkoFWsl46as__TDFU?fromEmail=1","url":"/services/data/v58.0/connect/user-profiles/005.../photo"},"reputation":null,"title":null,"type":"User","url":"/services/data/v58.0/chatter/users/005...","userType":"Internal"},"text":"@Name","type":"Mention"}],"text":"Chatter Feed Item Created via API: First line of text.\n \nSecond line of text.\n[Start code block]\n\u0026lt;script\u0026gt;\nvar i, t = 0;\nfor (i = 0; i \u0026lt; 5; i++) {\n t += i;\n}\n\u0026lt;/script\u0026gt;\n[End code block]@Name"},"capabilities":{"associatedActions":{"platformActionGroups":[]},"bookmarks":{"isBookmarkedByCurrentUser":false},"chatterLikes":{"isLikedByCurrentUser":false,"likesMessage":null,"myLike":null,"page":{"currentPageToken":0,"currentPageUrl":"/services/data/v58.0/chatter/feed-elements/0D5.../capabilities/chatter-likes/items","items":[],"nextPageToken":null,"nextPageUrl":null,"previousPageToken":null,"previousPageUrl":null,"total":0}},"close":{"canContextUserUpdateIsClosed":true,"isClosed":false},"comments":{"page":{"currentPageToken":null,"currentPageUrl":"/services/data/v58.0/chatter/feed-elements/0D5.../capabilities/comments/items","items":[],"nextPageToken":null,"nextPageUrl":null,"previousPageToken":null,"previousPageUrl":null,"total":0}},"edit":{"isEditRestricted":false,"isEditableByMeUrl":"/services/data/v58.0/chatter/feed-elements/0D5.../capabilities/edit/is-editable-by-me","lastEditedBy":null,"lastEditedDate":null,"latestRevision":1,"relativeLastEditedDate":null},"interactions":{"count":0},"mute":{"isMutedByMe":false},"readBy":{"isReadByMe":true,"lastReadDateByMe":"2023-11-22T11:08:37.000Z","page":{"currentPageToken":null,"currentPageUrl":"/services/data/v58.0/chatter/feed-elements/0D5.../capabilities/read-by/items?pageSize=3","items":[],"nextPageToken":null,"nextPageUrl":null,"previousPageToken":null,"previousPageUrl":null,"total":0}},"status":{"feedEntityStatus":"Published","isApprovableByMe":true},"topics":{"canAssignTopics":true,"items":[]},"upDownVote":{"downVoteCount":0,"myVote":"None","upVoteCount":0}},"clientInfo":{"applicationName":"Postman Playground","applicationUrl":null},"createdDate":"2023-11-22T11:08:37.000Z","event":false,"feedElementType":"FeedItem","hasVerifiedComment":false,"header":{"isRichText":null,"messageSegments":[{"motif":{"color":"1B96FF","largeIconUrl":"/img/icon/profile64.png","mediumIconUrl":"/img/icon/profile32.png","smallIconUrl":"/img/icon/profile16.png","svgIconUrl":null},"reference":{"id":"005...","url":"/services/data/v58.0/chatter/users/005..."},"text":"Name","type":"EntityLink"}],"text":"Name"},"id":"0D5...","isDeleteRestricted":false,"isSharable":false,"modifiedDate":"2023-11-22T11:08:37.000Z","originalFeedItem":null,"originalFeedItemActor":null,"parent":{"entityLabel":{"label":"Account","labelPlural":"Accounts"},"id":"001...","motif":{"color":"5867E8","largeIconUrl":"/img/icon/accounts64.png","mediumIconUrl":"/img/icon/accounts32.png","smallIconUrl":"/img/icon/accounts16.png","svgIconUrl":null},"mySubscription":null,"name":"Burlington Textiles Corp of America","type":"Account","url":"/services/data/v58.0/chatter/records/001..."},"photoUrl":"https://\u003cmy_domain\u003e/profilephoto/729.../T","relativeCreatedDate":"Just now","type":"TextPost","url":"/services/data/v58.0/chatter/feed-elements/0D5...","visibility":"InternalUsers"}