As per the documentation i understood that we can create account in the following way.

Example for creating a new Account

curl https://na1.salesforce.com/services/data/v20.0/sobjects/Account/ -H "Authorization: Bearer token -H "Content-Type: application/json" -d "@newaccount.json"

Example request body newaccount.json file for creating a new Account

    "Name" : "Express Logistics and Transport"

Example response body after successfully creating a new Account

    "id" : "001D000000IqhSLIAZ",
    "errors" : [ ],
    "success" : true

Is there a way to create multiple accounts in one shot and if it is possible what could be the JSON structure? Please suggest.


Right now SFDC standards REST API does not support bulk insert. So you have two options.

1) Use BULK API ( https://www.salesforce.com/us/developer/docs/api_asynch/)

2) Create your custom API that accept list of accounts. Here is example of how to do it. Check Mohits's answer. Is it possible to pass sObjects to the REST api

  • 1
    or, if willing to abandon REST, use SOAP API – cropredy Dec 17 '14 at 3:00
  • Yes, SOAP makes more sense for this requirement. – AtulRajguru9 Dec 17 '14 at 4:52

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.