How can I create post to an Opportunity's feed via the REST API?
2 Answers
You could use this endpoint url
/services/data/v36.0/sobjects/FeedItem
And use POST method and pass the body
{
"ParentId": "0069000000K8YjL",
"Body" : "hello there",
"type" : "TextPost",
"Title" : "New Post"
}
Result
You can also use the Chatter REST API. (You'll need to use it if you want to include @mentions, which aren't supported when inserting FeedItem sObjects. Here's the example from the docs.)