Salesforce Sales Cloud SObject Collections API

Bulk CRUD on collections of same-type records

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 3

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /composite/sobjects Create many records of the same type · Salesforce Sales Cloud Create multiple sObject records #
Ask an LLM
“How do I insert up to 200 accounts or leads in one request?”
“Can I make a bulk create fail entirely if one record fails?”
Tell an agent
Create these {records} as a batch.
Insert {records} together with allOrNone {allOrNone}.
PATCH /composite/sobjects Update many records in one request · Salesforce Sales Cloud Update multiple sObject records #
Ask an LLM
“How do I update up to 200 records in a single request?”
“Can I change fields on many accounts at once?”
Tell an agent
Update these {records}.
Bulk patch {records} with allOrNone {allOrNone}.
DELETE /composite/sobjects Delete many records by ID · Salesforce Sales Cloud Delete multiple sObject records #
Ask an LLM
“How do I delete up to 200 records in one call?”
“Can I delete several accounts by their IDs at once?”
Tell an agent destructive · confirm first
Delete records {ids}.
Bulk remove {ids} with allOrNone {allOrNone}.

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/salesforce-sales-cloud:salesforce-sales-cloud-sobject-collections-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

salesforce-sales-cloud-sobject-collections-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Salesforce Sales Cloud Salesforce REST SObject Collections…
  description: Primary REST API for accessing Salesforce data including accounts, contacts, leads, opportunities, and custom objects. Supports JSON and XML formats with a lightweight request and response framework. Provides CRUD operations on standard and custom sObjects, SOQL/SOSL queries, and access to org metadata.
  version: 59.0.0
  termsOfService: https://www.salesforce.com/company/legal/agreements/
  contact:
    name: Salesforce Developer Support
    url: https://developer.salesforce.com/
  license:
    name: Salesforce Master Subscription Agreement
    url: https://www.salesforce.com/company/legal/agreements/
servers:
- url: https://{instance}.salesforce.com/services/data/v59.0
  description: Salesforce Production or Developer Edition
  variables:
    instance:
      default: yourInstance
      description: Your Salesforce instance identifier (e.g., na1, eu5, or custom My Domain)
- url: https://{instance}.sandbox.my.salesforce.com/services/data/v59.0
  description: Salesforce Sandbox
  variables:
    instance:
      default: yourInstance
      description: Your Salesforce sandbox instance identifier
security:
- oauth2: []
- bearerAuth: []
tags:
- name: SObject Collections
  description: Bulk CRUD operations on collections of records
paths:
  /composite/sobjects:
    post:
      operationId: createSObjectCollection
      summary: Salesforce Sales Cloud Create multiple sObject records
      description: Creates up to 200 records in a single request. The request body contains an array of sObject records to create. All records must be of the same sObject type.
      tags:
      - SObject Collections
      parameters:
      - name: allOrNone
        in: query
        description: If true, all records must succeed or all fail
        required: false
        schema:
          type: boolean
          default: false
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                allOrNone:
                  type: boolean
                  default: false
                records:
                  type: array
                  maxItems: 200
                  items:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          type:
                            type: string
                    additionalProperties: true
      responses:
        '200':
          description: Collection create results
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CreateRecordResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
    patch:
      operationId: updateSObjectCollection
      summary: Salesforce Sales Cloud Update multiple sObject records
      description: Updates up to 200 records in a single request. Each record must include an Id field and the sObject type.
      tags:
      - SObject Collections
      parameters:
      - name: allOrNone
        in: query
        description: If true, all records must succeed or all fail
        required: false
        schema:
          type: boolean
          default: false
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                allOrNone:
                  type: boolean
                  default: false
                records:
                  type: array
                  maxItems: 200
                  items:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          type:
                            type: string
                      Id:
                        type: string
                    required:
                    - Id
                    additionalProperties: true
      responses:
        '200':
          description: Collection update results
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CreateRecordResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
    delete:
      operationId: deleteSObjectCollection
      summary: Salesforce Sales Cloud Delete multiple sObject records
      description: Deletes up to 200 records in a single request. Specify the record IDs as a comma-separated list in the ids query parameter.
      tags:
      - SObject Collections
      parameters:
      - name: ids
        in: query
        required: true
        description: Comma-separated list of record IDs to delete
        schema:
          type: string
      - name: allOrNone
        in: query
        description: If true, all records must succeed or all fail
        required: false
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: Collection delete results
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CreateRecordResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    ErrorResponse:
      type: array
      description: Standard Salesforce REST API error response
      items:
        $ref: '#/components/schemas/ApiError'
    ApiError:
      type: object
      description: An API error message
      properties:
        statusCode:
          type: string
          description: The error status code
        message:
          type: string
          description: The error message
        fields:
          type: array
          description: Fields related to the error
          items:
            type: string
    CreateRecordResult:
      type: object
      description: Result from a create, update, or delete operation
      properties:
        id:
          type: string
          description: The ID of the created or affected record
        success:
          type: boolean
          description: Whether the operation succeeded
        errors:
          type: array
          description: List of errors if the operation failed
          items:
            $ref: '#/components/schemas/ApiError'
  responses:
    Unauthorized:
      description: Authentication failed - invalid, expired, or missing access token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    BadRequest:
      description: Invalid request - malformed query, missing required fields, or validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    oauth2:
      type: oauth2
      description: Salesforce OAuth 2.0 authentication
      flows:
        authorizationCode:
          authorizationUrl: https://login.salesforce.com/services/oauth2/authorize
          tokenUrl: https://login.salesforce.com/services/oauth2/token
          refreshUrl: https://login.salesforce.com/services/oauth2/token
          scopes:
            api: Access and manage your Salesforce data
            full: Full access to your Salesforce data
            refresh_token: Allow refresh token access
        clientCredentials:
          tokenUrl: https://login.salesforce.com/services/oauth2/token
          scopes:
            api: Access and manage your Salesforce data
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: OAuth 2.0 Access Token
      description: Bearer token obtained via OAuth 2.0 flow
externalDocs:
  description: Salesforce REST API Developer Guide
  url: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_rest.htm