3

How can I create post to an Opportunity's feed via the REST API?

2 Answers 2

3

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"
}

enter image description here

Result

enter image description here

1

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.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .