Salesforce Create API

The Create API from Salesforce — 23 operation(s) for create.

Documentation

Specifications

Schemas & Data

OpenAPI Specification

salesforce-create-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Salesforce Bulk API 2.0 Abort Create API
  description: 'Salesforce Bulk API 2.0 is a simplified, REST-based interface for bulk data operations that improves on the original Bulk API. It uses a straightforward job model and supports CSV format for ingest and query jobs, enabling processing of millions of records asynchronously.

    '
  version: v63.0
  contact:
    name: Salesforce Developers
    url: https://developer.salesforce.com/
  license:
    name: Salesforce Developer Terms
    url: https://www.salesforce.com/company/legal/agreements/
servers:
- url: https://{instance}.salesforce.com/services/data/v{version}/jobs
  description: Salesforce Bulk API 2.0 jobs endpoint
  variables:
    instance:
      default: yourInstance
      description: 'The Salesforce instance identifier (e.g., na1, eu3, or a My Domain subdomain like mycompany).

        '
    version:
      default: '63.0'
      description: 'The Salesforce API version number (e.g., 63.0). Use the latest supported version for new integrations.

        '
security:
- BearerAuth: []
tags:
- name: Create
paths:
  /data/v64.0/jobs/query:
    parameters: []
    post:
      tags:
      - Create
      summary: Salesforce Successful Create Job Query
      operationId: SuccessfulCreatejobQuery
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/SuccessfulCreatejobQueryRequest'
              - examples:
                - operation: query
                  query: SELECT fields FROM object WHERE filter
                  contentType: CSV
                  columnDelimiter: BACKQUOTE | CARET | COMMA | PIPE | SEMICOLON | TAB
                  lineEnding: CRLF | LF
              contentMediaType: application/json
            example:
              operation: query
              query: SELECT fields FROM object WHERE filter
              contentType: CSV
              columnDelimiter: BACKQUOTE | CARET | COMMA | PIPE | SEMICOLON | TAB
              lineEnding: CRLF | LF
        required: true
      responses:
        '200':
          description: OK
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Mon, 20 Nov 2023 15:06:06 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
            Sforce-Limit-Info:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: api-usage=18/15000
            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:
            application/json;charset=UTF-8:
              schema:
                allOf:
                - $ref: '#/components/schemas/SuccessfulCreatejobQuery'
                - examples:
                  - id: 750...
                    operation: query
                    object: Account
                    createdById: 005...
                    createdDate: <datetime>
                    systemModstamp: <datetime>
                    state: UploadComplete
                    concurrencyMode: Parallel
                    contentType: CSV
                    apiVersion: 58
                    lineEnding: LF
                    columnDelimiter: COMMA
                contentMediaType: application/json;charset=UTF-8
              example:
                id: 750...
                operation: query
                object: Account
                createdById: 005...
                createdDate: <datetime>
                systemModstamp: <datetime>
                state: UploadComplete
                concurrencyMode: Parallel
                contentType: CSV
                apiVersion: 58
                lineEnding: LF
                columnDelimiter: COMMA
      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:
      - Create
      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//batch:
    parameters: []
    post:
      tags:
      - Create
      summary: Salesforce Bulk Create Batch
      operationId: BulkCreateBatch
      parameters:
      - name: X-SFDC-Session
        in: header
        description: ''
        required: true
        schema:
          type: string
        example: example_value
      - name: Content-Type
        in: header
        description: ''
        required: true
        schema:
          const: text/csv
          type: string
          examples:
          - text/csv
        example: example_value
      - name: charset
        in: header
        description: ''
        required: true
        schema:
          type: string
          examples:
          - UTF-8
        example: example_value
      requestBody:
        content:
          multipart/form-data:
            encoding: {}
            schema:
              required:
              - File
              type: object
              properties:
                File:
                  type: string
                  contentEncoding: base64
              contentMediaType: multipart/form-data
            examples:
              BulkcreatebatchRequestExample:
                summary: Default BulkCreateBatch request
                x-microcks-default: true
                value:
                  File: example_value
        required: false
      responses:
        '201':
          description: Created
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Thu, 16 Nov 2023 16:16:10 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/batch/7512o00001DSJWnAAP
            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/xml:
              schema:
                allOf:
                - $ref: '#/components/schemas/batchInfo'
                - xml:
                    name: batchInfo
                    attribute: false
                    wrapped: false
                  examples:
                  - "<batchInfo>\n\n  <id>751...</id>\n\n  <jobId>750...</jobId>\n\n  <state>Queued</state>\n\n  <createdDate>datetime</createdDate>\n\n  <systemModstamp>datetime</systemModstamp>\n\n  <numberRecordsProcessed>0</numberRecordsProcessed>\n\n  <numberRecordsFailed>0</numberRecordsFailed>\n\n  <totalProcessingTime>0</totalProcessingTime>\n\n  <apiActiveProcessingTime>0</apiActiveProcessingTime>\n\n  <apexProcessingTime>0</apexProcessingTime>\n\n</batchInfo>"
                contentMediaType: application/xml
              example: "<batchInfo>\n\n  <id>751...</id>\n\n  <jobId>750...</jobId>\n\n  <state>Queued</state>\n\n  <createdDate>datetime</createdDate>\n\n  <systemModstamp>datetime</systemModstamp>\n\n  <numberRecordsProcessed>0</numberRecordsProcessed>\n\n  <numberRecordsFailed>0</numberRecordsFailed>\n\n  <totalProcessingTime>0</totalProcessingTime>\n\n  <apiActiveProcessingTime>0</apiActiveProcessingTime>\n\n  <apexProcessingTime>0</apexProcessingTime>\n\n</batchInfo>"
      deprecated: false
      servers:
      - url: https://services
        variables: {}
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /data/v64.0/jobs/ingest:
    parameters: []
    post:
      tags:
      - Create
      summary: Salesforce Create Job
      operationId: Createjob
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/CreatejobRequest'
              - examples:
                - object: Asset
                  operation: update
              contentMediaType: application/json
            example:
              object: Asset
              operation: update
        required: true
      responses:
        '200':
          description: OK
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Mon, 20 Nov 2023 14:58:56 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
            Sforce-Limit-Info:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: api-usage=1/15000
            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:
            application/json;charset=UTF-8:
              schema:
                allOf:
                - $ref: '#/components/schemas/SuccessfulCreatejob'
                - examples:
                  - id: 750...
                    operation: insert
                    object: Account
                    createdById: 005...
                    createdDate: <datetime>
                    systemModstamp: <datetime>
                    state: Open
                    concurrencyMode: Parallel
                    contentType: CSV
                    apiVersion: 58
                    contentUrl: services/data/v58.0/jobs/ingest/750.../batches
                    lineEnding: LF
                    columnDelimiter: COMMA
                contentMediaType: application/json;charset=UTF-8
              example:
                id: 750...
                operation: insert
                object: Account
                createdById: 005...
                createdDate: <datetime>
                systemModstamp: <datetime>
                state: Open
                concurrencyMode: Parallel
                contentType: CSV
                apiVersion: 58
                contentUrl: services/data/v58.0/jobs/ingest/750.../batches
                lineEnding: LF
                columnDelimiter: COMMA
      deprecated: false
      servers:
      - url: https://services
        variables: {}
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /data/v64.0/composite/sobjects:
    parameters: []
    post:
      tags:
      - Create
      summary: Salesforce Sobject Collections Create
      description: 'Executes actions on multiple records in one request. Use SObject Collections to reduce the number of round-trips between the client and server. This resource is available in API version 42.0 and later.


        https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_composite_sobjects_collections.htm'
      operationId: SObjectCollectionsCreate
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/SObjectCollectionsCreateRequest'
              - examples:
                - allOrNone: false
                  records:
                  - attributes:
                      type: Account
                    Name: example.com
                    BillingCity: San Francisco
                  - attributes:
                      type: Contact
                    LastName: Johnson
                    FirstName: Erica
              contentMediaType: application/json
            example:
              allOrNone: false
              records:
              - attributes:
                  type: Account
                Name: example.com
                BillingCity: San Francisco
              - attributes:
                  type: Contact
                LastName: Johnson
                FirstName: Erica
        required: true
      responses:
        '200':
          description: OK
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Mon, 20 Nov 2023 15:25:46 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
            Sforce-Limit-Info:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: api-usage=44/15000
            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:
            application/json;charset=UTF-8:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SuccessfulSObjectCollectionsCreate'
                description: ''
                examples:
                - - id: 001...
                    success: true
                    errors: []
                  - id: 003...
                    success: true
                    errors: []
                contentMediaType: application/json;charset=UTF-8
              example:
              - id: 001...
                success: true
                errors: []
              - id: 003...
                success: true
                errors: []
      deprecated: false
      servers:
      - url: https://services
        variables: {}
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /data/v64.0/named-credentials/credential:
    parameters: []
    post:
      tags:
      - Create
      summary: Salesforce Create Credential
      description: Create a credential.
      operationId: CreateCredential
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/CreateCredentialRequest'
              - examples:
                - authenticationProtocol: Custom
                  credentials: {}
                  externalCredential: SampleExternalCredential
                  principalName: SamplePrincipal
                  principalType: NamedPrincipal
              contentMediaType: application/json
            example:
              authenticationProtocol: Custom
              credentials: {}
              externalCredential: SampleExternalCredential
              principalName: SamplePrincipal
              principalType: NamedPrincipal
        required: true
      responses:
        '201':
          description: Created
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Wed, 22 Nov 2023 12:06:08 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
            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:
            application/json;charset=UTF-8:
              schema:
                allOf:
                - $ref: '#/components/schemas/successfulCreateCredential'
                - examples:
                  - authenticationProtocol: Custom
                    authenticationStatus: Unknown
                    credentials: {}
                    externalCredential: SampleExternalCredential
                    principalName: SamplePrincipal
                    principalType: NamedPrincipal
                contentMediaType: application/json;charset=UTF-8
              example:
                authenticationProtocol: Custom
                authenticationStatus: Unknown
                credentials: {}
                externalCredential: SampleExternalCredential
                principalName: SamplePrincipal
                principalType: NamedPrincipal
      deprecated: false
      servers:
      - url: https://services
        variables: {}
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /data/v64.0/named-credentials/external-credentials:
    parameters: []
    post:
      tags:
      - Create
      summary: Salesforce Create External Credential
      description: Create an external credential.
      operationId: CreateExternalCredential
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/CreateExternalCredentialRequest'
              - examples:
                - developerName: SampleExternalCredential
                  masterLabel: Sample External Credential
                  authenticationProtocol: Custom
                  principals:
                  - principalName: SamplePrincipal
                    principalType: NamedPrincipal
                    sequenceNumber: 1
                  customHeaders:
                  - headerName: SampleHeader
                    headerValue: SampleHeaderValue
                    sequenceNumber: 1
              contentMediaType: application/json
            example:
              developerName: SampleExternalCredential
              masterLabel: Sample External Credential
              authenticationProtocol: Custom
              principals:
              - principalName: SamplePrincipal
                principalType: NamedPrincipal
                sequenceNumber: 1
              customHeaders:
              - headerName: SampleHeader
                headerValue: SampleHeaderValue
                sequenceNumber: 1
        required: true
      responses:
        '201':
          description: Created
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Mon, 20 Nov 2023 16:53:51 GMT
            Strict-Transport-Secu

# --- truncated at 32 KB (2278 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/salesforce/refs/heads/main/openapi/salesforce-create-api-openapi.yml