Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Salesforce Administrator
hard

What is the difference between SOAP API, REST API, Bulk API, and Streaming API — and when would you use each?

Salesforce exposes multiple APIs because they serve different patterns.

SOAP API — XML-based, Synchronous, request-response. Each call sends/receives XML messages. Strongly typed via WSDL. Heavier than REST. Use cases: legacy integrations that already speak SOAP, integrations needing strict schema. Most modern projects pick REST instead.

REST API — JSON-based, Synchronous, lightweight. Standard HTTP verbs (GET/POST/PATCH/DELETE). Use cases: most modern integrations — web apps, mobile apps, server-to-server, low-volume batch. Default choice unless you need volume or async.

Bulk API — Asynchronous, batch-oriented, optimised for large data volumes. You submit a job containing CSV-formatted records (or JSON in Bulk API 2.0), Salesforce processes it asynchronously, you poll for results. Two versions: 1.0 (older, more configurable) and 2.0 (simpler, more automated). Use cases: any data load above ~5,000 rows. Loading 50k Account updates? Bulk API. Doing it via REST one-by-one will hit your daily call limit and take hours.

Streaming API — Push-based, server-sends-to-client. Salesforce publishes events; clients subscribe via long-polling or CometD/Bayeux. Use cases: real-time notification of record changes (Change Data Capture / Platform Events), server-to-server pub-sub. Replaces polling-for-changes patterns.

Other API flavours worth knowing:

  • Composite API — bundle multiple REST calls into one HTTP request to save round-trips and stay under API limits.
  • GraphQL API — newer; flexible queries with a single endpoint. Some admins prefer it for nuanced data fetching.
  • Tooling API — for metadata operations (deploying classes, querying setup objects). Not for data.
  • Metadata API — bulk metadata deploys, full org backups, retrieval of customisations.
  • UI API — for building custom UIs that mirror Salesforce's own; respects sharing, FLS, labels, etc., out of the box.

Decision tree:

  • One record, real-time, user-driven -> REST.
  • Thousands of records, async -> Bulk API.
  • Listening for changes -> Streaming (CDC or Platform Events).
  • Metadata ops -> Metadata API.
  • Building UI on top -> UI API.
  • Aggregating multiple REST calls -> Composite API.

Pick based on volume, latency, and data-vs-metadata.

Why this answer works

Senior integration question. Knowing all 5+ APIs and their fit signals broad platform fluency. The CDC/Platform Events distinction is what separates someone current from someone whose mental model stopped at 2018.

Follow-ups to expect

Related dictionary terms