Given a folder ID, I wanted to be able to 'upload' an sObject of type 'Document' from within my code to the salesforce instance for the authenticated user.

I was going through the api reference, but, couldn't find anything.

Pointers will be useful.

1 Answer 1


There isn't anything specific to Documents. They're treated just like any other sObject, so post to that objects endpoint, i.e.


And include pass a json representation of the object. Note you'll need to base64 encode the body (not shown in example).

    "folderid": "00l50000000thwt",
    "body": "hello world",
    "name": "testdoc"

You must log in to answer this question.

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