function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mahesh Kumar RaikalMahesh Kumar Raikal 

Create an Account Using REST API and Workbench error

Hi,

I am trying to create account record in Rest Explorer but getting "Method not allowed" error. Anyone faced this issue earlier?

Thanks,
Mahesh Kumar Raikal..

Suraj Tripathi 47Suraj Tripathi 47
Hi,

If you are solving the trailhead module this might help you.
https://developer.salesforce.com/forums/?id=906F0000000kCkSIAU
https://learndataanalysis.org/create-an-account-using-rest-api-and-workbench-module-trailhead-solutions/

Please mark it as Best Answer if it helps you.

Thanks & Regards
Suraj Tripath
i
sakhisakhi
Hi Mahesh,

Please find the steps below to create an Account using REST API:

* Login to Workbench (https://workbench.developerforce.com/login.php).
* Navigate to 'Utilities -> REST Explorer'
* Select the 'Method' as 'POST'
* Paste the below line in the text box:
/services/data/v46.0/sobjects/account
* Click on 'Headers' and paste the below:
Content-Type:application/json
Accept: application/xml
* In the Request Body, paste the below content:
 
{
  "Name" : "Account from REST API",
  "ShippingCity" : "Delhi"
}


* Click 'Execute'. The Account will be created.

Refer Trailhead (https://trailhead.salesforce.com/en/content/learn/modules/api_basics/api_basics_rest) module for more information about REST API.
Refer this link  (https://stackoverflow.com/questions/12794302/salesforce-authentication-failing/29112224#29112224) for the steps to know your Client ID and Client Secret.

Please mark this answer as 'Best Answer' if this answers your question.