Feed Elements, Batch Post
POST {{_endpoint}}/services/data/v{{version}}/chatter/feed-elements/batch
Post a batch of up to 500 feed elements.
Request Body
{"inputs"=>[{"richInput"=>{"subjectId"=>"<USER_GROUP_RECORD_ID>", "body"=>{"messageSegments"=>[{"type"=>"Text", "text"=>"Post Number 1"}]}, "capabilities"=>{"files"=>{"items"=>[{"id"=>"<FILE_ID>"}]}}, "feedElementType"=>"FeedItem"}}, {"richInput"=>{"subjectId"=>"<USER_GROUP_RECORD_ID>", "body"=>{"messageSegments"=>[{"type"=>"Text", "text"=>"Post Number 2"}]}, "feedElementType"=>"FeedItem"}}, {"richInput"=>{"subjectId"=>"me", "body"=>{"messageSegments"=>[{"type"=>"Text", "text"=>"Post Number 3 with Inline"}, {"type"=>"InlineImage", "fileId"=>"<FILE_ID>", "altText"=>"Test Inline"}]}, "feedElementType"=>"FeedItem"}}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"hasErrors":true,"results":[{"result":{"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":false,"messageSegments":[{"text":"Post Number 1","type":"Text"}],"text":"Post Number 1"},"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:11:25.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:11:25.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:11:25.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"},"statusCode":201},{"result":{"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":false,"messageSegments":[{"text":"Post Number 2","type":"Text"}],"text":"Post Number 2"},"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:11:25.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:11:25.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":true,"modifiedDate":"2023-11-22T11:11:25.000Z","originalFeedItem":null,"originalFeedItemActor":null,"parent":{"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"},"photoUrl":"https://\u003cmy_domain\u003e/profilephoto/729.../T","relativeCreatedDate":"Just now","type":"TextPost","url":"/services/data/v58.0/chatter/feed-elements/0D5...","visibility":"AllUsers"},"statusCode":201},{"result":[{"errorCode":"INVALID_MARKUP","message":"Error while parsing Rich Text Content: The value of attribute \u0026quot;src\u0026quot; associated with an element type \u0026quot;img\u0026quot; must not contain the \u0026#39;\u0026lt;\u0026#39; character."}],"statusCode":400}]}