CRM & Sales
OAuth 2.0
Salesforce REST API
CRM & Sales Cloud REST API Reference
The Salesforce REST API provides programmatic access to Salesforce CRM data and functionality. Query records, manage leads, create opportunities, and automate sales workflows. Supports both SOQL queries and standard CRUD operations on any Salesforce object.
Base URL
https://yourInstance.salesforce.com/services/data/v60.0
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /sobjects | List all available SObjects (Account, Contact, Lead, etc.) |
| GET | /sobjects/Account | Get Account object metadata and field definitions |
| GET | /sobjects/Account/{id} | Retrieve a specific Account record by ID |
| POST | /sobjects/Account | Create a new Account record |
| PATCH | /sobjects/Account/{id} | Update an existing Account record |
| DELETE | /sobjects/Account/{id} | Delete an Account record |
| GET | /query?q={soql} | Execute a SOQL query (e.g., SELECT Id, Name FROM Account) |
| GET | /sobjects/Lead | Get Lead object metadata |
| POST | /sobjects/Lead | Create a new Lead |
| GET | /sobjects/Opportunity | Get Opportunity object metadata |
| POST | /sobjects/Opportunity | Create a new Opportunity |
| GET | /search?q={sosl} | Full-text search across all objects using SOSL |
Code Examples
# Authenticate and get access token
curl -X POST https://login.salesforce.com/services/oauth2/token \
-d "grant_type=password" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET" \
-d "username=YOUR_USERNAME" \
-d "password=YOUR_PASSWORD"
# Query accounts
curl https://yourInstance.salesforce.com/services/data/v60.0/query \
-G --data-urlencode "q=SELECT Id, Name, Industry FROM Account LIMIT 10" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
# Create a new lead
curl -X POST https://yourInstance.salesforce.com/services/data/v60.0/sobjects/Lead \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"FirstName":"John","LastName":"Doe","Company":"Acme Corp"}'
Connect Salesforce to AI
Deploy a Salesforce MCP server on IOX Cloud and connect it to Claude, ChatGPT, Cursor, or any AI client. Your AI assistant gets direct access to Salesforce through these tools:
query_salesforce
Execute a SOQL query and return results
create_lead
Create a new lead with name, company, and email
update_opportunity
Update opportunity stage, amount, or close date
search_contacts
Full-text search across all contacts
get_account
Retrieve account details by ID or name
Deploy in 60 seconds
Describe what you need, AI generates the code, and IOX deploys it globally.
Deploy Salesforce MCP Server →