Upsert rows into a Salesforce Marketing Cloud Data Extension using the synchronous REST API

domain: developer.salesforce.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

In-depth guide

Salesforce Bulk API 2.0 limits — the full failure-mode walkthrough related to developer.salesforce.com, checked against official docs, with linked verified routes.

Steps

  1. Authenticate with the Marketing Cloud OAuth 2.0 client credentials flow and obtain both the access token and the REST base URL from the token response.
  2. Identify the external key of the target Data Extension from the Marketing Cloud UI or via the asset REST API.
  3. Upsert a single row by sending PUT {rest_base_url}/data/v1/customobjectdata/key/{data_extension_key}/rowset with a JSON body containing the row's field values — PUT will insert the row if the primary key is absent or update it if it exists.
  4. To upsert multiple rows in one call, include an items array in the request body, each element representing one row's key-value field pairs.
  5. Verify the upsert by querying the row with GET using the same endpoint path appended with the primary key value, and confirm the returned fields match what was sent.

Known gotchas

Related routes

Upsert rows in a Salesforce Marketing Cloud Data Extension using the REST API with batching
salesforce.com · 6 steps · unrated
Upsert rows into a Salesforce Marketing Cloud Data Extension using the REST API with batching
developer.salesforce.com · 6 steps · unrated
Upsert Salesforce records by external ID using the REST API
salesforce.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans