2

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

2

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

| improve this answer | |
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.)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.