Inserting Records in Account or (any other sObject) Through Postman in salesforce

Inserting Records in Account or (any other sObject) Through Postman in Salesforce

We are using postman from API testing and request management to hit API by get or post and received data in the form of JSON and XML.

We can also add a record from postman to our Salesforce org.

We’re going to use OAuth2 and the authorization code flow.

Step 1: create your connected app

  • Inside Salesforce setup, navigate to Build > Create > Apps.
  • In the bottom panel of the page, where it says Connected Apps, click New. This will open a dialog to create a new connected app.
  • In Name, type “Postman”, and supply a mandatory contact email
  • Make sure Enable OAuth settings is ticked.
  • As an additional step, you need to ensure you add to the callback URL list (see below). This is the Postman endpoint that will receive the token.

Postman endpoint that will receive the token

Postman endpoint that will receive the token

Step2: OAuth with Postman

Postman has built-in OAuth-base authorization. In Postman, click on the Authorization tab and select “OAuth 2.0”.

OAuth with Postman

Click on Get New Access Token to launch the OAuth dialog. Use the following values:

Token Name:  My Postman Token or (Any name) Auth URL:  Access Token URL:  Client ID: (the consumer key from your connected app) Client Secret: (the consumer secret from your connected app) Scope: (you can leave this empty) Grant Type: Authorization Code

Get Access Token

Click on Request Token. This will take you to the Salesforce login screen, where you can type your credentials.

Salesforce login screen

Click on Use Token and in the Add token to drop-down, select “Header”, so that the token will be added to the HTTP request headers. You’re now ready to call your web service.

Make the request

Regarding inserting an Account in Salesforce, you have to POST a JSON request like this


“Name” : “From Postman in salesforce”


Click Send.

Get Status code 201

Get Status code 201 Created.

Get record Id.

And “Success”: true,

It will create a record in Salesforce org.

create a record in Salesforce

Blog originally Published Here


Leave a Reply


We're not around right now. But you can send us an email and we'll get back to you, asap.


About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2020 Forcetalks. All Right Reserved.

Log in with your credentials


Forgot your details?