by Salesforce
Create a record
Creates a record of any object, such as a Lead, Contact or Opportunity, and returns its new ID.
Updated Sep 29, 2026
create-record.md
Create a record
Creates a record of any object, such as a Lead, Contact or Opportunity, and returns its new ID.
Set up
Use the first option your agent supports.
MCP (official, remote)
Add this server to your agent's MCP settings, then sign in when asked.
{ "mcpServers": { "salesforce": { "url": "https://api.salesforce.com/platform/mcp/v1/platform/sobject-mutations" } } }
Call the MCP tool createSobjectRecord.
Server URL: https://api.salesforce.com/platform/mcp/v1/platform/sobject-mutations
Note: An admin creates an External Client App and activates the server first. It never deletes records.
CLI (official)
Install the command and sign in with it, then confirm it runs.
npm install @salesforce/cli --global
sf --version
Run sf data create record.
Note: Sign in with sf org login web; sf org display then prints the instance URL and API version.
API (official)
- Base URL: https://{my_domain}.my.salesforce.com
- Endpoint:
POST /services/data/vXX.X/sobjects/{sobject}/ - Auth: an OAuth access token, sent as
Authorization: Bearer <token> - Docs: https://developer.salesforce.com/docs/platform/api-rest/guide/intro-rest.html
Note: {my_domain} is your org's My Domain name, and paths carry the API version as vXX.X; sf org display prints both as Instance Url and Api Version.
Before anything else, confirm access with the cheapest read-only call, like a list or a search. Never send or change anything to test access.
Rules
- Ask the user before anything that sends messages, costs money, or changes data, and say how many records it touches. One approval covers a batch the user has seen.
- Never print API keys.
Ways in
Workflows using Create a record
SContributed by shipgtmTurn a hiring signal into a worked LinkedIn leadShortlists your ICP in Clay, watches for a matching job posting, logs the lead in Salesforce, and queues a LinkedIn opener in HeyReach.
C
S
H
TContributed by thedogwiththedataonitReopen closed-lost deals when something has changedFinds Salesforce deals lost months ago, checks who is still there and what changed, and queues an email to them in lemlist.
S
Al