Salesforce Bulk API

The Salesforce Bulk API is a specialized REST-based interface that enables asynchronous processing of large numbers of records. It is optimized for loading or deleting large sets of data and supports CSV, XML, and JSON formats.

GitHub OpenAPI

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 /async/64.0/job Create a Bulk API 1.0 job · Salesforce Bulk Create Job #
Ask an LLM
“How do I start a Bulk API 1.0 job to insert Accounts from CSV?”
“Which operations, like insert, upsert or delete, can a bulk job run?”
Tell an agent
Create a bulk {operation} job for {object} with content type {content_type}.
Start a Bulk API {operation} job on {object}.
POST /async/64.0/job//spec Upload a transformation spec to a bulk job · Salesforce Bulk Spec #
Ask an LLM
“How do I map CSV columns to fields with a transformation spec for a bulk job?”
“Can I send a compressed spec file to a Bulk API 1.0 job?”
Tell an agent
Upload a transformation spec to my bulk job using {content_encoding} encoding.
Add a field-mapping spec file to the bulk job, compressed as {content_encoding}.
POST /async/64.0/job/ Close or abort a Bulk API 1.0 job · Salesforce Bulk Close Job #
Ask an LLM
“How do I close a bulk job so no more batches are added?”
“Can I abort a Bulk API 1.0 job by changing its state?”
Tell an agent
Set the bulk job state to {state}.
Close my Bulk API 1.0 job by setting state {state}.

Documentation

📖
Documentation
https://developer.salesforce.com/docs/atlas.en-us.api_bulk_v2.meta/api_bulk_v2/
📖
APIReference
https://developer.salesforce.com/docs/atlas.en-us.api_bulk_v2.meta/api_bulk_v2/get_job_info.htm
📖
Authentication
https://developer.salesforce.com/docs/atlas.en-us.api_bulk_v2.meta/api_bulk_v2/bulk_api_2_0_security.htm
📖
Documentation
https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/
📖
GettingStarted
https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/ui_api_get_started.htm
📖
APIReference
https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/ui_api_resources_list.htm
📖
Documentation
https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/rest-api.html
📖
GettingStarted
https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/get-started-spec.html
📖
APIReference
https://developer.salesforce.com/docs/marketing/marketing-cloud/references/mc_rest_overview.html
📖
Authentication
https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/access-token-s2s.html
📖
Documentation
https://developer.salesforce.com/
📖
Documentation
https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/
📖
GettingStarted
https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_quickstart.htm
📖
APIReference
https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_reference.htm
📖
Authentication
https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_concepts_security.htm

Specifications

Schemas & Data

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:salesforce-bulk-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-bulk-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Salesforce Bulk API
  description: Find the resources you need to start building.
  contact: {}
  version: '1.0'
servers:
- url: https://login.salesforce.com
  variables: {}
- url: https://id
  variables: {}
- url: https://services
  variables: {}
- url: '{{url}}{{site}}/services/oauth2'
  variables:
    url:
      default: DefaultParameterValue
    site:
      default: DefaultParameterValue
security:
- oauth2:
  - api
tags:
- name: Bulk
paths:
  /async/64.0/job:
    parameters: []
    post:
      tags:
      - Bulk
      summary: Salesforce Bulk Create Job
      operationId: BulkCreateJob
      parameters:
      - name: X-SFDC-Session
        in: header
        description: ''
        required: true
        schema:
          type: string
        example: example_value
      - name: charset
        in: header
        description: ''
        required: true
        schema:
          type: string
          examples:
          - UTF-8
        example: example_value
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/BulkCreateJobRequest'
              - examples:
                - operation: insert
                  object: Account
                  contentType: CSV
              contentMediaType: application/json
            example:
              operation: insert
              object: Account
              contentType: CSV
        required: true
      responses:
        '201':
          description: Created
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Thu, 16 Nov 2023 16:07:11 GMT
            Strict-Transport-Security:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: max-age=63072000; includeSubDomains
            X-Content-Type-Options:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: nosniff
            X-XSS-Protection:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: 1; mode=block
            X-Robots-Tag:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: none
            Cache-Control:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: no-cache,must-revalidate,max-age=0,no-store,private
            Location:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: /services/async/58.0/job/7502o00000kjNCsAAM
            Content-Encoding:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: gzip
            Transfer-Encoding:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: chunked
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/SuccessfulBulkCreateJob'
                - examples:
                  - apexProcessingTime: 0
                    apiActiveProcessingTime: 0
                    apiVersion: 58
                    assignmentRuleId: null
                    concurrencyMode: Parallel
                    contentType: CSV
                    createdById: 005...
                    createdDate: <date_time>
                    externalIdFieldName: null
                    fastPathEnabled: false
                    id: 750...
                    numberBatchesCompleted: 0
                    numberBatchesFailed: 0
                    numberBatchesInProgress: 0
                    numberBatchesQueued: 0
                    numberBatchesTotal: 0
                    numberRecordsFailed: 0
                    numberRecordsProcessed: 0
                    numberRetries: 0
                    object: <Object>
                    operation: insert
                    state: Open
                    systemModstamp: <date_time>
                    totalProcessingTime: 0
                contentMediaType: application/json
              example:
                apexProcessingTime: 0
                apiActiveProcessingTime: 0
                apiVersion: 58
                assignmentRuleId: null
                concurrencyMode: Parallel
                contentType: CSV
                createdById: 005...
                createdDate: <date_time>
                externalIdFieldName: null
                fastPathEnabled: false
                id: 750...
                numberBatchesCompleted: 0
                numberBatchesFailed: 0
                numberBatchesInProgress: 0
                numberBatchesQueued: 0
                numberBatchesTotal: 0
                numberRecordsFailed: 0
                numberRecordsProcessed: 0
                numberRetries: 0
                object: <Object>
                operation: insert
                state: Open
                systemModstamp: <date_time>
                totalProcessingTime: 0
      deprecated: false
      servers:
      - url: https://services
        variables: {}
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /async/64.0/job//spec:
    parameters: []
    post:
      tags:
      - Bulk
      summary: Salesforce Bulk Spec
      operationId: BulkSpec
      parameters:
      - name: X-SFDC-Session
        in: header
        description: ''
        required: true
        schema:
          type: string
        example: example_value
      - name: charset
        in: header
        description: ''
        required: true
        schema:
          type: string
          examples:
          - UTF-8
        example: example_value
      - name: Accept-Encoding
        in: header
        description: ''
        required: true
        schema:
          type: string
          examples:
          - gzip
        example: example_value
      - name: Content-Encoding
        in: header
        description: ''
        required: true
        schema:
          type: string
          examples:
          - gzip
        example: example_value
      requestBody:
        description: ''
        content:
          text/csv:
            schema:
              type: string
              examples:
              - 'Salesforce Field,Csv Header,Value,Hint

                Name,Full Name,,'
              contentMediaType: text/csv
            example: 'Salesforce Field,Csv Header,Value,Hint

              Name,Full Name,,'
        required: true
      responses:
        '201':
          description: Created
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Thu, 16 Nov 2023 16:12:34 GMT
            Strict-Transport-Security:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: max-age=63072000; includeSubDomains
            X-Content-Type-Options:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: nosniff
            X-XSS-Protection:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: 1; mode=block
            Content-Security-Policy:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: upgrade-insecure-requests
            X-Robots-Tag:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: none
            Cache-Control:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: no-cache,must-revalidate,max-age=0,no-store,private
            Location:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: /services/async/58.0/job/7502o00000kjNCsAAM/spec/0Aj2o000000PbakCAC
            Vary:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Accept-Encoding
            Content-Encoding:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: gzip
            Transfer-Encoding:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: chunked
          content: {}
      deprecated: false
      servers:
      - url: https://services
        variables: {}
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /async/64.0/job/:
    parameters: []
    post:
      tags:
      - Bulk
      summary: Salesforce Bulk Close Job
      operationId: BulkCloseJob
      parameters:
      - name: X-SFDC-Session
        in: header
        description: ''
        required: true
        schema:
          type: string
        example: example_value
      - name: charset
        in: header
        description: ''
        required: true
        schema:
          type: string
          examples:
          - UTF-8
        example: example_value
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/BulkCloseJobRequest'
              - examples:
                - state: Closed
              contentMediaType: application/json
            example:
              state: Closed
        required: true
      responses:
        '200':
          description: OK
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Thu, 16 Nov 2023 16:23:52 GMT
            Strict-Transport-Security:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: max-age=63072000; includeSubDomains
            X-Content-Type-Options:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: nosniff
            X-XSS-Protection:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: 1; mode=block
            X-Robots-Tag:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: none
            Cache-Control:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: no-cache,must-revalidate,max-age=0,no-store,private
            Content-Encoding:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: gzip
            Transfer-Encoding:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: chunked
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/SuccessfulBulkCloseJob'
                - examples:
                  - apexProcessingTime: 64
                    apiActiveProcessingTime: 225
                    apiVersion: 58
                    assignmentRuleId: null
                    concurrencyMode: Parallel
                    contentType: CSV
                    createdById: 005...
                    createdDate: <date_time>
                    externalIdFieldName: null
                    fastPathEnabled: false
                    id: 750...
                    numberBatchesCompleted: 1
                    numberBatchesFailed: 0
                    numberBatchesInProgress: 0
                    numberBatchesQueued: 0
                    numberBatchesTotal: 1
                    numberRecordsFailed: 0
                    numberRecordsProcessed: 1
                    numberRetries: 0
                    object: <Object>
                    operation: insert
                    state: Closed
                    systemModstamp: <date_time>
                    totalProcessingTime: 403
                contentMediaType: application/json
              example:
                apexProcessingTime: 64
                apiActiveProcessingTime: 225
                apiVersion: 58
                assignmentRuleId: null
                concurrencyMode: Parallel
                contentType: CSV
                createdById: 005...
                createdDate: <date_time>
                externalIdFieldName: null
                fastPathEnabled: false
                id: 750...
                numberBatchesCompleted: 1
                numberBatchesFailed: 0
                numberBatchesInProgress: 0
                numberBatchesQueued: 0
                numberBatchesTotal: 1
                numberRecordsFailed: 0
                numberRecordsProcessed: 1
                numberRetries: 0
                object: <Object>
                operation: insert
                state: Closed
                systemModstamp: <date_time>
                totalProcessingTime: 403
      deprecated: false
      servers:
      - url: https://services
        variables: {}
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    BulkCloseJobRequest:
      title: BulkCloseJobRequest
      required:
      - state
      type: object
      properties:
        state:
          type: string
          example: example_value
      examples:
      - state: Closed
    SuccessfulBulkCloseJob:
      title: SuccessfulBulkCloseJob
      required:
      - apexProcessingTime
      - apiActiveProcessingTime
      - apiVersion
      - assignmentRuleId
      - concurrencyMode
      - contentType
      - createdById
      - createdDate
      - externalIdFieldName
      - fastPathEnabled
      - id
      - numberBatchesCompleted
      - numberBatchesFailed
      - numberBatchesInProgress
      - numberBatchesQueued
      - numberBatchesTotal
      - numberRecordsFailed
      - numberRecordsProcessed
      - numberRetries
      - object
      - operation
      - state
      - systemModstamp
      - totalProcessingTime
      type: object
      properties:
        apexProcessingTime:
          type: integer
          contentEncoding: int32
          example: 1700000000000
        apiActiveProcessingTime:
          type: integer
          contentEncoding: int32
          example: 1700000000000
        apiVersion:
          type: integer
          contentEncoding: int32
          example: 10
        assignmentRuleId:
          type:
          - string
          - 'null'
          example: '500123'
        concurrencyMode:
          type: string
          example: example_value
        contentType:
          type: string
          example: example_value
        createdById:
          type: string
          example: '500123'
        createdDate:
          type: string
          example: example_value
        externalIdFieldName:
          type:
          - string
          - 'null'
          example: example_value
        fastPathEnabled:
          type: boolean
          example: true
        id:
          type: string
          example: abc123
        numberBatchesCompleted:
          type: integer
          contentEncoding: int32
          example: 10
        numberBatchesFailed:
          type: integer
          contentEncoding: int32
          example: 10
        numberBatchesInProgress:
          type: integer
          contentEncoding: int32
          example: 10
        numberBatchesQueued:
          type: integer
          contentEncoding: int32
          example: 10
        numberBatchesTotal:
          type: integer
          contentEncoding: int32
          example: 42
        numberRecordsFailed:
          type: integer
          contentEncoding: int32
          example: 10
        numberRecordsProcessed:
          type: integer
          contentEncoding: int32
          example: 10
        numberRetries:
          type: integer
          contentEncoding: int32
          example: 10
        object:
          type: string
          example: example_value
        operation:
          type: string
          example: example_value
        state:
          type: string
          example: example_value
        systemModstamp:
          type: string
          example: example_value
        totalProcessingTime:
          type: integer
          contentEncoding: int32
          example: 1700000000000
      examples:
      - apexProcessingTime: 64
        apiActiveProcessingTime: 225
        apiVersion: 58
        assignmentRuleId: null
        concurrencyMode: Parallel
        contentType: CSV
        createdById: 005...
        createdDate: <date_time>
        externalIdFieldName: null
        fastPathEnabled: false
        id: 750...
        numberBatchesCompleted: 1
        numberBatchesFailed: 0
        numberBatchesInProgress: 0
        numberBatchesQueued: 0
        numberBatchesTotal: 1
        numberRecordsFailed: 0
        numberRecordsProcessed: 1
        numberRetries: 0
        object: <Object>
        operation: insert
        state: Closed
        systemModstamp: <date_time>
        totalProcessingTime: 403
    BulkCreateJobRequest:
      title: BulkCreateJobRequest
      required:
      - operation
      - object
      - contentType
      type: object
      properties:
        operation:
          type: string
          example: example_value
        object:
          type: string
          example: example_value
        contentType:
          type: string
          example: example_value
      examples:
      - operation: insert
        object: Account
        contentType: CSV
    SuccessfulBulkCreateJob:
      title: SuccessfulBulkCreateJob
      required:
      - apexProcessingTime
      - apiActiveProcessingTime
      - apiVersion
      - assignmentRuleId
      - concurrencyMode
      - contentType
      - createdById
      - createdDate
      - externalIdFieldName
      - fastPathEnabled
      - id
      - numberBatchesCompleted
      - numberBatchesFailed
      - numberBatchesInProgress
      - numberBatchesQueued
      - numberBatchesTotal
      - numberRecordsFailed
      - numberRecordsProcessed
      - numberRetries
      - object
      - operation
      - state
      - systemModstamp
      - totalProcessingTime
      type: object
      properties:
        apexProcessingTime:
          type: integer
          contentEncoding: int32
          example: 1700000000000
        apiActiveProcessingTime:
          type: integer
          contentEncoding: int32
          example: 1700000000000
        apiVersion:
          type: integer
          contentEncoding: int32
          example: 10
        assignmentRuleId:
          type:
          - string
          - 'null'
          example: '500123'
        concurrencyMode:
          type: string
          example: example_value
        contentType:
          type: string
          example: example_value
        createdById:
          type: string
          example: '500123'
        createdDate:
          type: string
          example: example_value
        externalIdFieldName:
          type:
          - string
          - 'null'
          example: example_value
        fastPathEnabled:
          type: boolean
          example: true
        id:
          type: string
          example: abc123
        numberBatchesCompleted:
          type: integer
          contentEncoding: int32
          example: 10
        numberBatchesFailed:
          type: integer
          contentEncoding: int32
          example: 10
        numberBatchesInProgress:
          type: integer
          contentEncoding: int32
          example: 10
        numberBatchesQueued:
          type: integer
          contentEncoding: int32
          example: 10
        numberBatchesTotal:
          type: integer
          contentEncoding: int32
          example: 42
        numberRecordsFailed:
          type: integer
          contentEncoding: int32
          example: 10
        numberRecordsProcessed:
          type: integer
          contentEncoding: int32
          example: 10
        numberRetries:
          type: integer
          contentEncoding: int32
          example: 10
        object:
          type: string
          example: example_value
        operation:
          type: string
          example: example_value
        state:
          type: string
          example: example_value
        systemModstamp:
          type: string
          example: example_value
        totalProcessingTime:
          type: integer
          contentEncoding: int32
          example: 1700000000000
      examples:
      - apexProcessingTime: 0
        apiActiveProcessingTime: 0
        apiVersion: 58
        assignmentRuleId: null
        concurrencyMode: Parallel
        contentType: CSV
        createdById: 005...
        createdDate: <date_time>
        externalIdFieldName: null
        fastPathEnabled: false
        id: 750...
        numberBatchesCompleted: 0
        numberBatchesFailed: 0
        numberBatchesInProgress: 0
        numberBatchesQueued: 0
        numberBatchesTotal: 0
        numberRecordsFailed: 0
        numberRecordsProcessed: 0
        numberRetries: 0
        object: <Object>
        operation: insert
        state: Open
        systemModstamp: <date_time>
        totalProcessingTime: 0
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: '{DefaultParameterValue}{DefaultParameterValue}/services/oauth2/authorize'
          scopes:
            api: ''