REST API
Salesforce REST API is a RESTful web service interface that provides access to Salesforce org data and functionality using standard HTTP methods (GET, POST, PATCH, DELETE) and resource-based URIs.
Definition
Salesforce REST API is a RESTful web service interface that provides access to Salesforce org data and functionality using standard HTTP methods (GET, POST, PATCH, DELETE) and resource-based URIs. It primarily uses JSON as the data format (XML is also supported) and is accessed at endpoints like /services/data/vXX.0/sobjects/Account/. REST API is the most widely used Salesforce API for web applications, mobile apps, and lightweight integrations. It supports CRUD operations, SOQL and SOSL queries, metadata retrieval, file uploads, Composite requests (batching multiple API calls), and SObject Tree for creating related records in a single request.
In plain English
“Salesforce REST API is a RESTful web service interface for accessing your org data and functionality using standard HTTP methods and JSON. It's the most widely used Salesforce API for web apps, mobile apps, and lightweight integrations, supporting CRUD operations, queries, file uploads, and batching.”
Worked example
An external mobile app at Northport Hospitality calls the Salesforce REST API to read and write Reservation records. A GET request to /services/data/v60.0/sobjects/Reservation/abc123 returns the reservation as JSON; a PATCH request to the same endpoint with a JSON body updates fields. The app uses an OAuth 2.0 access token in the Authorization header, batches multiple operations via Composite requests when needed, and runs SOQL queries via the /services/data/v60.0/query endpoint. REST API is the most widely-used Salesforce API for modern web and mobile apps - JSON, HTTP verbs, simple URIs.
Why REST API matters
Salesforce REST API is a RESTful web service interface that provides access to Salesforce org data and functionality using standard HTTP methods (GET, POST, PATCH, DELETE) and resource-based URIs. It primarily uses JSON as the data format (XML is also supported) and is accessed at endpoints like /services/data/vXX.0/sobjects/Account/. REST API is the most widely used Salesforce API for web applications, mobile apps, and lightweight integrations.
REST API supports CRUD operations, SOQL and SOSL queries, metadata retrieval, file uploads, Composite requests (batching multiple API calls), and SObject Tree for creating related records in a single request. Composite requests in particular are valuable for efficiency, letting you bundle multiple operations into a single round trip. Mature Salesforce integrations use REST API extensively, with careful attention to bulk operations and rate limits.
How organizations use REST API
Uses Salesforce REST API for all web and mobile integrations, treating it as the default API choice.
Uses Composite requests to batch multiple operations into single calls for efficiency.
Builds CI/CD pipelines that use REST API for deployment validation and automated testing.
Related free tool
Trust & references
Straight from the source - Salesforce's reference material on REST API.
- Authorization Through External Client Apps or Connected Apps and OAuth 2.0Salesforce Developers
- Set Up AuthenticationSalesforce Developers
Test your knowledge
Q1. What is Salesforce REST API?
Q2. What's a Composite request?
Q3. What URL pattern does REST API use?
Discussion
Loading discussion…