Is it possible to insert multiple records in Salesforce using cURL at the same time?

I am using cURL to insert data into salesforce. It works with single record but I need to insert multiple records at a time. Is it possible to do so and is it possible via a REST interface?


You can’t insert multiple rows in a single call in the rest api, you need to use the bulk api.

You can develop custom REST wrapper webservice through APEX language of sfdc to get this set up


global with sharing class Mycontacts{

  global static List<Contact> doPost(List<Contact> lstcnts){
      insert lstcnts;
      return lstcnts;


This is pretty raw version.You can follow best practices and track successful Ids and failed records .

If there are two much of records i would suggest you to use BULK API of sfdc as the REST API has size limitations and all apex governor limits apply


As per latest update this is now possible with tree API provided

Source : Link , Question Author : Vineeth , Answer Author : Mohith Shrivastava

Leave a Comment