Newer Version Available
Create a Record
Use the sObject Basic Information resource to create new records. You supply the required field values in
the request data, and then use the POST method of the resource. The response body will
contain the ID of the created record if the call is successful.
The following example creates a new Account record, with the field values provided in newaccount.json.
- Example for creating a new Account
-
1curl https://yourInstance.salesforce.com/services/data/v52.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
-
1{ 2 "Name" : "Express Logistics and Transport" 3} - Example response body after successfully creating a new Account
-
1{ 2 "id" : "001D000000IqhSLIAZ", 3 "errors" : [ ], 4 "success" : true 5}